/* Tipografía base
   Caviar Dreams no está en Google Fonts, por lo que aquí se la referencia
   como si estuviera instalada localmente o cargada por @font-face. */
:root {
  --color-primario: #712182; /* morado principal, tomado del ISO */
  --color-primario-oscuro: #4e165a;
  --color-claro: #f5f1f8;
  --color-fondo: #ffffff;
  --color-oscuro: #1f1a24;
  --color-gris: #e7e7e7;
  --color-texto: #232323;

  --radio-card: 1.5rem;
  --sombra-suave: 0 10px 25px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-texto);
  background-color: var(--color-fondo);
  line-height: 1.6;
}

/* CONTENEDOR GENERAL */

.container {
  width: min(1120px, 100% - 2.5rem);
  margin: 0 auto;
}

/* HEADER / NAV */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 241, 248, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.75rem;
}

/* Logo */

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  height: 48px;
  width: auto;
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
  font-family: "Caviar Dreams", "Roboto", system-ui, sans-serif;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: var(--color-primario-oscuro);
}

.brand-tagline {
  font-size: 0.8rem;
  color: #555;
}

/* Navegación */

.main-nav {
  display: flex;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-list > li > a,
.submenu-toggle {
  font-size: 0.9rem;
  text-decoration: none;
  color: #333;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0.35rem 0;
  position: relative;
}

.nav-list > li > a::after,
.submenu-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  background: var(--color-primario);
  transition: width 0.2s ease;
}

.nav-list > li > a:hover::after,
.submenu-toggle:hover::after {
  width: 100%;
}

/* Submenús */

.has-submenu {
  position: relative;
}

.submenu {
  position: absolute;
  top: 130%;
  left: 0;
  background: #fff;
  min-width: 180px;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  border-radius: 0.75rem;
  box-shadow: var(--sombra-suave);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 30;
}

.submenu li a {
  display: block;
  padding: 0.4rem 0.9rem;
  text-decoration: none;
  font-size: 0.85rem;
  color: #333;
}

.submenu li a:hover {
  background: var(--color-claro);
}

.has-submenu:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Botón menú móvil */

.nav-toggle {
  display: none;
  border: none;
  background: none;
  font-size: 1.6rem;
  cursor: pointer;
}

/* HERO */

.hero {
  position: relative;
  min-height: 75vh;
  display: grid;
  grid-template-rows: auto auto;
  align-items: stretch;
  background: radial-gradient(circle at top left, #f4e8ff, #f5f1f8 55%, #ffffff);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at bottom right, rgba(113, 33, 130, 0.18), transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  padding-block: 3.5rem 1.5rem;
  z-index: 2;
}

.hero h1 {
  font-family: "Caviar Dreams", "Roboto", system-ui, sans-serif;
  font-size: clamp(2.2rem, 5vw, 2.9rem);
  max-width: 24ch;
  margin-bottom: 1rem;
  color: var(--color-oscuro);
}

.hero p {
  max-width: 45ch;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

/* Botón primario */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--color-primario), var(--color-primario-oscuro));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(113, 33, 130, 0.35);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(113, 33, 130, 0.4);
}

/* CARRUSEL */

.carousel {
  position: relative;
  grid-row: 2 / 3;
  z-index: 1;
  padding-bottom: 2.5rem;
}

.carousel-inner {
  position: relative;
  width: min(1024px, 100% - 2.5rem);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 1.5rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.carousel-item {
  display: none;
}

.carousel-item img {
  display: block;
  width: 100%;
  height: clamp(220px, 40vh, 380px);
  object-fit: cover;
}

.carousel-item.active {
  display: block;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.carousel-control.prev {
  left: 1rem;
}

.carousel-control.next {
  right: 1rem;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  padding: 0;
}

.indicator.active {
  width: 24px;
  background: var(--color-primario);
}

/* SECCIONES GENERALES */

.section-light,
.section-dark {
  padding-block: 3.5rem;
}

.section-light {
  background: #ffffff;
}

.section-dark {
  background: #1f1a24;
  color: #f5f5f5;
}

.section-dark h2,
.section-dark h3 {
  color: #ffffff;
}

.section-intro {
  max-width: 44ch;
  margin-bottom: 2rem;
  font-size: 0.98rem;
  opacity: 0.9;
}

/* Layout de dos columnas */

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: flex-start;
}

/* Valores */

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.value-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radio-card);
  padding: 1.4rem 1.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.value-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* Info blocks (clases, cuotas, ubicación) */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.info-block {
  background: #ffffff;
  border-radius: var(--radio-card);
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--color-gris);
  box-shadow: var(--sombra-suave);
}

.section-dark .info-block {
  background: #282230;
  border-color: rgba(255, 255, 255, 0.12);
}

.info-block h3 {
  margin-top: 0;
}

.info-list {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.info-list li {
  margin-bottom: 0.4rem;
}

.note {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 0.5rem;
}

/* Eventos */

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.event-card {
  background: #282230;
  border-radius: var(--radio-card);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--sombra-suave);
  display: flex;
  flex-direction: column;
}

.event-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.event-body {
  padding: 1rem 1.2rem 1.2rem;
}

.event-title {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.event-subtitle {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.event-date {
  font-size: 0.85rem;
  opacity: 0.85;
}

.events-empty {
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Contacto */

.contact-form {
  background: #2c2634;
  border-radius: var(--radio-card);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--sombra-suave);
}

.form-group {
  margin-bottom: 0.85rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.08);
  color: #fff;
  font: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--color-primario);
  outline-offset: 1px;
}

/* Footer */

.site-footer {
  background: #120f16;
  color: #aaa;
  padding-block: 1.2rem;
  font-size: 0.8rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: center;
  text-align: center;
}

.footer-credit {
  opacity: 0.85;
}

/* RESPONSIVE */

@media (max-width: 880px) {
  .two-column {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-rows: auto auto;
  }
}

@media (max-width: 768px) {
  .main-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: rgba(245, 241, 248, 0.98);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
  }

  .main-nav.open {
    max-height: 260px;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1.2rem 1rem;
    gap: 0.4rem;
  }

  .submenu {
    position: static;
    box-shadow: none;
    border-radius: 0.5rem;
    padding-left: 0.4rem;
    margin-top: 0.25rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
  }

  .submenu li a {
    padding: 0.2rem 0.4rem;
  }

  .nav-toggle {
    display: block;
  }
}
