/* =========================================================
   Colegio NSD — Sistema de diseño
   ---------------------------------------------------------
   Dos capas de tokens:

   1. RAMPA DE MARCA (--brand-*, --gold-*)
      Valores FIJOS. Nunca cambian entre temas. Úsalos cuando
      el color debe ser el mismo siempre (footer, secciones
      oscuras, el logo, gradientes de marca).

   2. TOKENS SEMÁNTICOS (--ink-*, --white, --surface-*)
      Texto, fondos y bordes. Nombres por función, no por color,
      para poder ajustar la paleta sin tocar los componentes.
   ========================================================= */

:root {
  color-scheme: light dark;

  /* ── 1. Rampa de marca ─────────────────────────────────── */
  --brand-900: #04120A;
  --brand-800: #0B3A18;
  --brand-700: #10572C;
  --brand-600: #1A7040;
  --brand-500: #229050;
  --brand-400: #3FA858;
  --brand-300: #5EBF78;
  --brand-200: #9BD6AE;
  --brand-100: #D4EBE0;
  --brand-50:  #EAF5EF;

  --gold-700: #6A4700;
  --gold-500: #C49200;
  --gold-400: #D4A80E;
  --gold-300: #E3C254;
  --gold-100: #F2E6C4;

  /* ── 2. Tokens adaptativos ─────────────────────────────── */
  /* Verde interactivo: botones, enlaces, iconos */
  --green-900: #04120A;
  --green-800: #0B3A18;
  --green-700: #10572C;
  --green-600: #1A7040;
  --green-500: #229050;
  --green-400: #3FA858;
  --green-300: #5EBF78;
  --green-200: #9BD6AE;
  --green-100: #D4EBE0;
  --green-50:  #EAF5EF;

  /* Oro — acento único, solo para énfasis puntual */
  --yellow-700: #6A4700;
  --yellow-500: #C49200;
  --yellow-400: #D4A80E;
  --yellow-100: #F2E6C4;

  /* Texto — de más a menos contraste. La escala está completa a
     propósito: algunas páginas usan los pasos intermedios en estilos
     inline y si falta el token el color se queda sin resolver. */
  --ink-900: #101810;
  --ink-800: #1C281C;
  --ink-700: #283828;
  --ink-600: #3A4E3D;
  --ink-500: #4C6450;
  --ink-400: #697F6C;
  --ink-300: #869E88;
  --ink-200: #A6BBA9;
  --ink-100: #C6D8CA;
  --ink-50:  #E6F0E8;

  /* Superficies — crema pergamino */
  --white:          #F5F1EA;
  --surface:        #F5F1EA;  /* fondo de página */
  --surface-raised: #FFFCF7;  /* tarjetas, menús, popovers */
  --surface-sunken: #EDE8DF;  /* secciones suaves, zonas hundidas */
  --surface-subtle: #EDE8DF;  /* chips, iconos, botones fantasma */
  --surface-overlay: rgba(245,241,234,.82); /* barras translúcidas */
  --border:        #DED8CC;
  --border-strong: #C7BFAE;

  /* ── Geometría — curvatura continua estilo Apple ───────── */
  --radius-xs:  6px;
  --radius-sm:  10px;
  --radius:     14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-2xl: 36px;
  --radius-pill: 999px;

  /* ── Elevación — sombras suaves y teñidas, en capas ────── */
  --shadow-xs: 0 1px 2px rgba(11,58,24,.06);
  --shadow-sm: 0 1px 3px rgba(11,58,24,.07), 0 4px 10px -4px rgba(11,58,24,.06);
  --shadow:    0 2px 6px rgba(11,58,24,.07), 0 12px 28px -8px rgba(11,58,24,.12);
  --shadow-lg: 0 4px 12px rgba(11,58,24,.08), 0 28px 56px -16px rgba(11,58,24,.18);
  --shadow-xl: 0 8px 20px rgba(11,58,24,.10), 0 44px 88px -24px rgba(11,58,24,.24);
  /* Brillo interior superior: da volumen sin recurrir a glows */
  --sheen: inset 0 1px 0 rgba(255,255,255,.7);

  /* ── Movimiento — curvas estilo Apple ──────────────────── */
  --ease-out:    cubic-bezier(.32,.72,0,1);   /* la curva firma */
  --ease-in-out: cubic-bezier(.65,0,.35,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1); /* rebote sutil */
  --dur-fast: .16s;
  --dur:      .28s;
  --dur-slow: .48s;

  /* ── Layout ────────────────────────────────────────────── */
  --container: 1200px;
  --gutter: 24px;

  --font-sans: 'Outfit', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Cualquier regla con display: flex/grid gana al [hidden] del navegador
   y el elemento se sigue viendo. Esto lo evita en todo el sitio. */
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--white);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a   { color: var(--green-700); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green-900); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 .6em;
  letter-spacing: -.02em;
  color: var(--ink-900);
}
h1 { font-size: clamp(2.6rem, 5.5vw, 4.2rem); font-weight: 900; letter-spacing: -.04em; line-height: 1.05; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); letter-spacing: -.03em; line-height: 1.1; }
h3 { font-size: 1.45rem; letter-spacing: -.01em; }
h4 { font-size: 1.1rem; font-family: var(--font-sans); font-weight: 700; letter-spacing: 0; }
h5 { font-size: .82rem; font-family: var(--font-sans); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
p  { margin: 0 0 1em; color: var(--ink-700); line-height: 1.75; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--green-700);
  margin-bottom: 1.2rem;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  flex-shrink: 0;
}
.eyebrow--light { color: var(--gold-300); }  /* el yellow-500 sobre verde solo daba 2,83:1 */

.text-gradient {
  background: linear-gradient(120deg, var(--green-700) 0%, var(--yellow-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============== TOPBAR ============== */
.topbar {
  background: var(--brand-800);
  border-bottom: 1px solid rgba(196,146,0,.20);
  color: #aec4b4;
  font-size: .85rem;
}
.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar a { color: #b8ccbf; }
.topbar a:hover { color: var(--yellow-400); }
.topbar__contact, .topbar__quick {
  display: flex; gap: 16px; align-items: center;
}
/* Todos los links del topbar: misma altura y alineación */
.topbar a {
  display: inline-flex; align-items: center; gap: 5px;
  color: #b8ccbf;
}
.topbar a:hover { color: var(--yellow-400); }
/* Todos los iconos: mismo tamaño y color */
.topbar i {
  font-size: 1rem;
  color: inherit;
  flex-shrink: 0;
}
.topbar__addr { opacity: .8; }
/* Pastillas Alexia / Raíces */
.quick-link {
  background: rgba(255,255,255,.08);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .82rem;
  transition: background .2s;
}
.quick-link:hover { background: rgba(247,211,0,.18); color: var(--yellow-500); }
.quick-link--sv {
  background: rgba(191,140,0,.20);
  color: var(--yellow-400) !important;
  font-weight: 700;
  border: 1px solid rgba(191,140,0,.40);
}
.quick-link--sv:hover { background: var(--yellow-400) !important; color: #021509 !important; }

@media (max-width: 720px) { .d-none-mobile { display: none; } }

/* Móvil: la topbar cabe en UNA sola fila.
   Se queda lo accionable (llamar, escribir, secretaría, tema) y se
   quitan las redes, que ya están en el pie del menú lateral. */
@media (max-width: 720px) {
  .topbar { font-size: .78rem; padding: 6px 0; }
  .topbar__inner {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 10px;
  }
  .topbar__contact { gap: 14px; flex-shrink: 0; }
  .topbar__contact a span,
  .topbar__contact a:not([href^="tel"]):not([href^="mailto"]) { display: none; }
  .topbar__quick {
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
  }
  .topbar__quick .quick-link { display: none; }
  .topbar__quick a[aria-label] { display: none; }   /* redes sociales */
  .topbar__quick .quick-link--sv {
    display: inline-flex;
    white-space: nowrap;
    min-width: 0;
    padding: 5px 10px;
  }
  /* El texto largo se recorta antes que provocar un salto de línea */
  .topbar__quick .quick-link--sv span { display: none; }
}

/* Pantallas muy estrechas: solo iconos imprescindibles */
@media (max-width: 380px) {
  .topbar__quick .quick-link--sv { display: none; }
}

/* ============== NAVBAR ============== */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(245,241,234,.90);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  z-index: 50;
  border-bottom: 1px solid rgba(11,58,24,.10);
  transition: box-shadow .2s, background .2s;
}
.navbar.is-scrolled {
  box-shadow: 0 2px 20px rgba(11,58,24,.10);
  background: rgba(245,241,234,.98);
}
.navbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 76px; gap: 24px;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink-900);
  position: relative;
}
.brand__logo {
  width: 58px; height: 58px;
  object-fit: contain;
  flex-shrink: 0;
  /* PNG ya tiene fondo transparente, no necesita mix-blend */
}
.brand__logo--lg { width: 72px; height: 72px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text strong {
  font-family: var(--font-display); font-weight: 900;
  font-size: 1.1rem; color: var(--green-900); letter-spacing: -.02em;
}
.brand__text small { color: var(--ink-500); font-size: .73rem; letter-spacing: .05em; font-weight: 500; }

.nav > ul {
  list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; align-items: center;
}
.nav a {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--ink-700); font-weight: 600; font-size: .9rem;
  padding: 7px 12px; border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--green-100); color: var(--green-900); }
.nav-cta {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-900));
  color: #fff !important;
  box-shadow: 0 6px 20px -6px rgba(10,74,30,.55);
  letter-spacing: .03em;
}
.nav-cta:hover {
  background: linear-gradient(135deg, var(--green-700), #021509);
  box-shadow: 0 8px 24px -6px rgba(10,74,30,.7);
  color: #fff !important;
}

/* Secretaría Virtual — outlined button */
.nav-sv {
  border: 1.5px solid var(--green-700) !important;
  color: var(--green-700) !important;
  border-radius: var(--radius-sm) !important;
}
.nav-sv:hover { background: var(--brand-700) !important; color: #fff !important; }
.nav-sv i { color: inherit !important; }

/* Active nav link */
.nav a.is-active { background: var(--green-100); color: var(--green-900); }

/* dropdown */
.has-dropdown { position: relative; }
.has-dropdown > a .dd-arrow { transition: transform .22s; display: inline-block; }

/* transparent bridge over the gap — keeps :hover alive while cursor crosses it */
.has-dropdown::after {
  content: '';
  position: absolute;
  top: 100%; left: -12px; right: -12px;
  height: 16px;
  z-index: 99;
}

.dropdown {
  position: absolute; top: calc(100% + 10px); left: 0;
  background: var(--surface-raised); border: 1px solid var(--ink-100);
  border-radius: var(--radius); padding: 5px; min-width: 200px;
  box-shadow: 0 10px 30px rgba(0,0,0,.11), 0 2px 6px rgba(0,0,0,.06);
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity .18s, transform .18s;
  display: block;
  z-index: 100;
}
.dropdown ul { list-style: none; padding: 0; margin: 0; }
.dropdown li { width: 100%; list-style: none; }
.dropdown a {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 8px; font-weight: 500;
  color: var(--ink-700); font-size: .88rem;
}
.dropdown a .dd-icon {
  font-size: .8rem; color: var(--green-600); flex-shrink: 0;
  width: 16px; text-align: center; line-height: 1;
}
.dropdown a:hover { background: var(--green-50); color: var(--green-800); }
.dropdown a:hover .dd-icon { color: var(--green-700); }
.dropdown-divider { height: 1px; background: var(--ink-100); margin: 4px 6px; }

/* open — triggered both by :hover (CSS) and .is-open (JS delay) */
.has-dropdown:hover > a .dd-arrow,
.has-dropdown.is-open > a .dd-arrow,
.has-dropdown:focus-within > a .dd-arrow { transform: rotate(180deg); }

.has-dropdown:hover .dropdown,
.has-dropdown.is-open .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}

/* drawer mobile accordion */
.drawer__sub-toggle {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: 12px;
  font-size: .95rem; font-weight: 600; color: rgba(255,255,255,.8);
  transition: background .15s, color .15s;
}
.drawer__sub-toggle:hover { background: rgba(255,255,255,.06); color: #fff; }
.drawer__sub-toggle .dd-arrow { transition: transform .22s; }
.drawer__has-sub.is-open .drawer__sub-toggle .dd-arrow { transform: rotate(180deg); }
.drawer__has-sub.is-open .drawer__sub-toggle { color: #fff; }
.drawer__sub {
  display: none; padding: 0 0 4px 16px;
}
.drawer__has-sub.is-open .drawer__sub { display: block; }
.drawer__sub li { list-style: none; }
.drawer__sub a {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 10px;
  font-size: .88rem; color: rgba(255,255,255,.6);
  text-decoration: none; transition: background .15s, color .15s;
}
.drawer__sub a:hover { background: rgba(255,255,255,.07); color: #fff; }
.drawer__sub a i { font-size: .8rem; color: var(--green-400); width: 14px; text-align: center; }

/* hamburger */
.hamburger {
  display: none;
  background: transparent; border: 1px solid var(--ink-100);
  border-radius: 12px; width: 44px; height: 44px;
  flex-direction: column; gap: 5px; align-items: center; justify-content: center;
  cursor: pointer;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--ink-900); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 980px) {
  /* En móvil ocultamos la navegación inline y usamos el drawer (animations.css) */
  .nav { display: none; }
  .hamburger { display: none; } /* sustituido por .hamburger-x */
  .navbar__inner { min-height: 64px; }
  .brand__logo { width: 52px; height: 52px; }
  .brand__text strong { font-size: 1rem; }
  .brand__text small { font-size: .68rem; }
}

/* ============== HERO ============== */
.hero {
  position: relative;
  padding: 110px 0 130px;
  background: var(--white);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}
.hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  overflow: hidden;
}
/* Manchas difuminadas del hero. Usan la rampa de marca (fija) para que
   en tema oscuro no se conviertan en un verde brillante que tape el texto. */
.blob {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: .18;
}
.blob--1 { width: 600px; height: 600px; background: var(--brand-700); top: -180px; left: -220px; }
.blob--2 { width: 460px; height: 460px; background: var(--gold-100); bottom: -180px; right: -140px; opacity: .55; }
.blob--3 { width: 280px; height: 280px; background: var(--brand-600); top: 22%; right: 5%; opacity: .10; }

/* En oscuro se atenúan mucho: sobre fondo oscuro cualquier mancha
   compite con el texto del hero. */

.hero__grid {
  position: relative;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center;
}
.hero__content .badge-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(191,140,0,.08);
  border: 1px solid rgba(191,140,0,.30);
  padding: 7px 16px 7px 7px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; color: var(--yellow-700);
  letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 2px 16px rgba(191,140,0,.10);
}
.hero__content .badge-pill i {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--yellow-400), var(--yellow-500));
  color: #fff;
  display: grid; place-items: center; font-size: .9rem; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(191,140,0,.35);
}

.lead { font-size: 1.12rem; color: var(--ink-500); max-width: 540px; line-height: 1.8; font-weight: 400; }

.hero__cta { display: flex; gap: 12px; margin: 22px 0 24px; flex-wrap: wrap; }
.hero__chips { list-style: none; padding: 0; margin: 8px 0 0; display: flex; gap: 10px; flex-wrap: wrap; }
.hero__chips li {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-raised); border: 1px solid rgba(191,140,0,.20);
  padding: 8px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--ink-700);
}
.hero__chips i { color: var(--green-700); }

/* hero card */
.hero__card { position: relative; overflow: visible; }
.hero__card-inner {
  position: relative; aspect-ratio: 4/4.5; max-width: 520px; margin-left: auto;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
  box-shadow:
    0 1px 1px rgba(14,27,20,.04),
    0 8px 16px -4px rgba(14,27,20,.12),
    0 24px 48px -16px rgba(14,27,20,.22);
  /* overflow visible para que las floating cards sobresalgan */
  overflow: visible;
}
.hero__photo {
  position: absolute; inset: 14px;
  border-radius: var(--radius-lg);
  /* clipping propio para mantener el border-radius de la imagen */
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent 50%, rgba(0,0,0,.35) 100%),
    url('https://images.unsplash.com/photo-1571260899304-425eee4c7efc?w=900&auto=format&fit=crop') center/cover;
  z-index: 1;
}

/* Las floating cards van POR ENCIMA del card-inner, fuera del overflow */
.hero__floating {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 5; /* por encima de hero__photo (z-index:1) */
}

.float-card {
  position: absolute;
  background: var(--surface-raised); padding: 14px 16px; border-radius: 16px;
  display: flex; gap: 12px; align-items: center;
  pointer-events: auto;
  font-size: .85rem;
  /* Sombras 3D multi-capa para efecto premium de "tarjeta levitando" */
  box-shadow:
    0 1px 2px rgba(14,27,20,.06),
    0 4px 8px rgba(14,27,20,.06),
    0 12px 24px -6px rgba(14,27,20,.18),
    0 28px 50px -12px rgba(14,27,20,.28),
    0 50px 80px -24px rgba(14,27,20,.18);
  /* Borde sutil para definirla mejor sobre el fondo */
  border: 1px solid var(--border);
  /* Fondo sólido del tema. Antes era un degradado blanco fijo: en oscuro
     la tarjeta se quedaba blanca con el texto claro encima, ilegible.
     Se deja opaca a propósito, porque semitransparente el texto pierde
     contraste según lo que tenga detrás. */
  background: var(--surface-raised);
  -webkit-backdrop-filter: blur(10px);
  /* Pequeña inclinación 3D inicial */
  transform: perspective(800px) rotateY(-2deg);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
}
.float-card:hover {
  transform: perspective(800px) rotateY(0) translateY(-4px) scale(1.04);
  box-shadow:
    0 1px 2px rgba(14,27,20,.06),
    0 8px 16px rgba(14,27,20,.08),
    0 20px 40px -8px rgba(14,27,20,.22),
    0 40px 70px -16px rgba(14,27,20,.32),
    0 70px 100px -32px rgba(14,27,20,.22);
  z-index: 6;
}
.float-card strong {
  display: block; color: var(--ink-900);
  font-family: var(--font-sans); font-weight: 700;
}
.float-card small { color: var(--ink-500); }
.float-card__icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.15rem;
  /* Sombra interna sutil al icono */
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04), 0 4px 12px -4px rgba(0,0,0,.15);
}
/* Posicionamiento: que sobresalgan claramente fuera de la imagen.
   Cada tarjeta tiene su propia keyframe para preservar la inclinación 3D durante el float. */
.float-card--1 {
  top: 6%; left: -36px;
  animation: floatCard1 6s ease-in-out infinite;
}
.float-card--2 {
  bottom: 28%; right: -44px;
  animation: floatCard2 7s ease-in-out infinite;
}
.float-card--3 {
  bottom: -22px; left: 14%;
  animation: floatCard3 8s ease-in-out infinite;
}

@keyframes floatCard1 {
  0%, 100% { transform: perspective(800px) rotateY(-3deg) rotateZ(-1.5deg) translateY(0); }
  50%      { transform: perspective(800px) rotateY(-3deg) rotateZ(-1.5deg) translateY(-12px); }
}
@keyframes floatCard2 {
  0%, 100% { transform: perspective(800px) rotateY(3deg)  rotateZ(1.5deg)  translateY(0); }
  50%      { transform: perspective(800px) rotateY(3deg)  rotateZ(1.5deg)  translateY(-14px); }
}
@keyframes floatCard3 {
  0%, 100% { transform: perspective(800px) rotateY(-1deg) rotateZ(-1deg)   translateY(0); }
  50%      { transform: perspective(800px) rotateY(-1deg) rotateZ(-1deg)   translateY(-10px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero__scroll {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 46px; border: 2px solid var(--ink-300); border-radius: 999px;
  display: grid; place-items: center;
}
.hero__scroll span {
  width: 4px; height: 8px; background: var(--green-700); border-radius: 4px;
  animation: scroll 1.6s ease-in-out infinite;
}
@keyframes scroll {
  0% { transform: translateY(-6px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(8px); opacity: 0; }
}

/* float-card--2 se acerca al borde derecho del contenedor en pantallas medianas */
@media (max-width: 1248px) {
  .float-card--2 { right: -18px; }
}

@media (max-width: 980px) {
  .hero { padding: 40px 0 60px; }
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__card { max-width: 460px; margin: 0 auto; width: 100%; }
  .hero__card-inner { margin: 0 auto; max-width: 100%; aspect-ratio: 4/4; }
  /* En tablet, la tarjeta es full-width: ajustar posiciones para que no se corten */
  .float-card--1 { left: -10px; }
  .float-card--2 { right: -10px; }
  .float-card--3 { bottom: -8px; }
  .hero__scroll { display: none; }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.6rem); }
  .lead { font-size: 1rem; }
  /* Botones hero iguales y compactos */
  .hero__cta { gap: 10px; flex-wrap: nowrap; }
  .hero__cta .btn { flex: 1 1 0; padding: 12px 14px; font-size: .85rem; min-width: 0; justify-content: center; }
  .hero__cta .btn--lg { padding: 12px 14px; font-size: .85rem; }
  .hero__chips { gap: 6px; }
  .hero__chips li { padding: 6px 10px; font-size: .78rem; }
}
@media (max-width: 540px) {
  .hero { padding: 30px 0 50px; }
  .hero__card-inner { aspect-ratio: 4/3.8; }
  .float-card { padding: 8px 12px; font-size: .76rem; gap: 8px; }
  .float-card__icon { width: 30px; height: 30px; font-size: .9rem; flex-shrink: 0; }
  .float-card strong { font-size: .76rem; line-height: 1.15; }
  .float-card small { font-size: .62rem; line-height: 1.1; }
  /* En móvil pequeño, las cards quedan dentro de la tarjeta */
  .float-card--1 { left: 6px; }
  .float-card--2 { right: 6px; }
  .float-card--3 { bottom: 4px; }
  /* Botones aun mas pequenos */
  .hero__cta .btn { padding: 11px 12px; font-size: .8rem; }
  .hero__cta .btn--lg { padding: 11px 12px; font-size: .8rem; }
}
@media (max-width: 380px) {
  .float-card { padding: 6px 10px; font-size: .7rem; }
  .float-card strong { font-size: .7rem; }
}
/* Evita scroll horizontal */
body { overflow-x: hidden; }

/* ============== STATS ============== */
.stats {
  background: var(--brand-800);
  color: #fff;
  padding: 90px 0;
  position: relative;
  overflow: hidden;
}
.stats::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 0% 50%, rgba(16,87,44,.6), transparent 55%),
    radial-gradient(ellipse at 100% 50%, rgba(196,146,0,.08), transparent 55%);
  pointer-events: none;
}
.stats::after {
  content: "1957";
  position: absolute; right: -2%; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(8rem, 18vw, 16rem);
  color: rgba(255,255,255,.03);
  line-height: 1; pointer-events: none; user-select: none;
  letter-spacing: -.05em;
}
.stats > .container { position: relative; }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  text-align: center;
}
.stat {
  padding: 20px 30px;
  border-right: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.stat:last-child { border-right: none; }
.stat__label {
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--yellow-500); font-weight: 700; margin-bottom: 8px;
}
.stat__num {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(3.2rem, 6.5vw, 5.5rem);
  color: #fff;
  display: inline-block;
  line-height: 1;
  letter-spacing: -.04em;
}
.stat__figure { display: flex; align-items: baseline; gap: 2px; }
.stat__plus { font-size: 2rem; color: var(--yellow-500); font-weight: 900; line-height: 1; margin-bottom: 10px; }
.stat p { color: rgba(255,255,255,.78); margin: 6px 0 0; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 720px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-right: none; border-bottom: 1px solid rgba(255,255,255,.08); }
  .stat:nth-child(2n) { border-right: none; }
  .stat:last-child, .stat:nth-last-child(2) { border-bottom: none; }
}

/* ============== SECTIONS ============== */
.section { padding: 110px 0; }
.section--soft { background: var(--surface-sunken); }
@media (max-width: 720px) {
  .section { padding: 70px 0; }
  .section__head { margin-bottom: 40px; }
  .container { padding: 0 20px; }
}
.section--dark {
  background: var(--brand-800);
  color: #fff;
}
.section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark p { color: rgba(255,255,255,.60); }

.section__head { max-width: 680px; margin: 0 auto 60px; text-align: center; }
.section__head--light .eyebrow { color: var(--yellow-500); }
.section__head.between {
  display: flex; justify-content: space-between; align-items: end; gap: 24px;
  text-align: left; max-width: 100%;
}
.section__head.between .eyebrow { display: inline-flex; }

/* two-col layout */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center;
}
.two-col--reverse .two-col__media { order: 2; }
@media (max-width: 980px) {
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .two-col--reverse .two-col__media { order: 0; }
}

.img-stack { position: relative; aspect-ratio: 1/1; }
.img-stack__main {
  position: absolute; inset: 0 24px 24px 0;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(0,0,0,.0) 60%, rgba(0,0,0,.3) 100%),
    url('../img/historia.jpg') center/cover;
  box-shadow: var(--shadow);
}
.img-stack__accent {
  position: absolute; inset: 24px 0 0 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--yellow-100), #EDE3C5);
  z-index: -1;
}
.img-stack__badge {
  position: absolute; bottom: -10px; left: -10px;
  background: var(--surface-raised); padding: 14px 18px; border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; line-height: 1.1;
}
.img-stack__badge strong {
  font-family: var(--font-display); font-weight: 900;
  color: var(--green-700); font-size: 1.6rem;
}
.img-stack__badge span { font-size: .8rem; color: var(--ink-500); }

.check-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.check-list i { color: var(--green-700); margin-right: 8px; }

/* ============== STAGES ============== */
/* 5 filas: icono | edad | título | párrafo(1fr) | link */
.stages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto auto 1fr auto;
  column-gap: 22px;
  row-gap: 0;
}
.stage {
  grid-row: span 5;
  display: grid;
  grid-template-rows: subgrid;
  background: var(--surface-raised); border: 1px solid var(--ink-100); border-radius: var(--radius-lg);
  padding: 32px 28px; transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s, border-color .25s;
  position: relative; overflow: hidden;
}
.stage::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0) 40%, color-mix(in srgb, var(--c, var(--green-700)) 6%, transparent) 100%);
  pointer-events: none; transition: opacity .35s;
  opacity: 0;
}
.stage:hover { transform: translateY(-8px); box-shadow: 0 24px 48px -16px rgba(14,27,20,.18), 0 4px 12px rgba(14,27,20,.06); border-color: transparent; }
.stage:hover::after { opacity: 1; }
.stage__icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: color-mix(in srgb, var(--c) 18%, white);
  color: var(--c); display: grid; place-items: center; font-size: 1.5rem;
  align-self: start; margin-bottom: 12px;
}
.stage__age {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-500);
  align-self: start; margin-bottom: 4px;
}
.stage h3 { align-self: start; margin-bottom: 0; }
.stage p { font-size: .92rem; color: var(--ink-700); margin: 12px 0 0; align-self: start; }
.stage__link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: .9rem; color: var(--green-700);
  align-self: end; padding-top: 18px; margin-top: 0;
}
.stage__link i { transition: transform .2s; }
.stage__link:hover i { transform: translateX(4px); }

/* En tablet y móvil volvemos a flex column (no hay alineación cruzada) */
@media (max-width: 980px) {
  .stages { grid-template-columns: repeat(2,1fr); grid-template-rows: none; gap: 22px; }
  .stage { grid-row: auto; display: flex; flex-direction: column; }
  .stage__icon { margin-bottom: 14px; }
  .stage p { margin: 0; flex: 1; }
  .stage__link { margin-top: auto; }
}
@media (max-width: 560px) { .stages { grid-template-columns: 1fr; } }

/* ============== VALUES ============== */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--ink-100); border-radius: var(--radius-lg); overflow: hidden; }
.value {
  background: var(--surface-raised);
  padding: 36px 30px;
  transition: background .3s;
  position: relative;
  counter-increment: value-counter;
}
.value::before {
  content: "0" counter(value-counter);
  position: absolute; top: 22px; right: 26px;
  font-family: var(--font-display); font-weight: 900;
  font-size: 2.8rem; color: var(--ink-100);
  letter-spacing: -.04em; line-height: 1;
  transition: color .3s;
}
.value:hover { background: var(--green-100); }
.value:hover::before { color: rgba(31,164,44,.15); }
.value i {
  font-size: 1.4rem; color: var(--green-700); background: var(--green-100);
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  margin-bottom: 18px; transition: background .3s;
}
.value:hover i { background: rgba(31,164,44,.2); }
.value h4 { margin-bottom: 8px; font-size: 1rem; }
.value p { margin: 0; font-size: .9rem; color: var(--ink-500); line-height: 1.65; }
.values { counter-reset: value-counter; }
@media (max-width: 880px) { .values { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 540px) { .values { grid-template-columns: 1fr; } }

/* ============== SERVICES ============== */
.services {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.service {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  padding: 22px; border-radius: var(--radius);
  transition: transform .25s, background .25s, border-color .25s;
  display: flex; flex-direction: column; gap: 10px;
  color: #fff;
}
.service:hover {
  background: rgba(247,211,0,.12); border-color: var(--yellow-500);
  transform: translateY(-4px); color: #fff;
}
.service__ic {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(247,211,0,.18); color: var(--yellow-500);
  display: grid; place-items: center; font-size: 1.25rem;
}
.service h4 { margin: 0; color: #fff; font-size: 1rem; }
.service p { margin: 0; font-size: .85rem; color: #c4d0c8; }
/* Tarjeta destacada: campamento con web propia */
.service--featured {
  position: relative;
  background: linear-gradient(135deg, rgba(201,160,66,.14), rgba(201,160,66,.18));
  border: 2px solid var(--yellow-500);
  box-shadow: 0 12px 40px rgba(201,160,66,.2);
  padding-top: 22px;
}
.service--featured::before {
  content: '';
  position: absolute; inset: -3px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--yellow-500), var(--yellow-700), var(--yellow-500));
  background-size: 200% 200%;
  z-index: -1;
  opacity: 0;
  filter: blur(10px);
  animation: borderShine 3s ease-in-out infinite;
}
.service--featured:hover { border-color: var(--yellow-500); transform: translateY(-6px); }
.service--featured:hover::before { opacity: .6; }
.service--featured .service__ic {
  background: var(--yellow-500);
  color: var(--brand-900);
  box-shadow: 0 6px 16px rgba(201,160,66,.35);
}
.service--featured h4 { color: var(--gold-300); }
.service__ribbon {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--yellow-500);
  color: var(--brand-900);
  padding: 5px 11px; border-radius: 999px;
  font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(201,160,66,.4);
  animation: ribbonPulse 2.4s ease-in-out infinite;
  white-space: nowrap;
  z-index: 2;
}
.service__ribbon i { font-size: .78rem; }
@media (max-width: 980px) { .services { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 540px) {
  .services { grid-template-columns: repeat(2,1fr); gap: 12px; }
  .service { padding: 16px 14px; gap: 8px; }
  .service h4 { font-size: .9rem; }
  .service p { font-size: .78rem; }
  .service__ic { width: 36px; height: 36px; font-size: 1.05rem; }
}
@media (max-width: 360px) { .services { grid-template-columns: 1fr; } }

/* ============== NEWS ============== */
.news {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  grid-auto-rows: 1fr;
}
.news__item {
  background: var(--surface-raised); border: 1px solid var(--ink-100); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.news__item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news__item--feat { grid-column: span 2; flex-direction: row; }
.news__item--feat .news__img {
  flex: 0 0 45%;
  width: 45%;
  min-height: 280px;
  aspect-ratio: auto;
}
.news__item--feat .news__body { padding: 30px; flex: 1 1 55%; }
.news__img {
  position: relative; aspect-ratio: 16/10; background: var(--green-100);
}
.news__cat {
  position: absolute; top: 14px; left: 14px;
  background: rgba(0,0,0,.55); color: #fff;
  padding: 4px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.news__body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news__body time { font-size: .8rem; color: var(--ink-500); font-weight: 600; }
.news__body h3 { margin: 0; }
.news__body p  { margin: 0 0 6px; font-size: .92rem; }
.news__body .btn { margin-top: auto; align-self: flex-start; padding: 0; }
@media (max-width: 980px) {
  .news { grid-template-columns: repeat(2,1fr); }
  .news__item--feat { grid-column: span 2; flex-direction: column; }
  .news__item--feat .news__img { min-height: 200px; }
}
@media (max-width: 600px) {
  .news { grid-template-columns: 1fr; }
  .news__item--feat { grid-column: span 1; }
}

/* ============== CTA ============== */
.cta {
  position: relative;
  background: var(--brand-800);
  color: #fff;
  padding: 110px 0;
  overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(31,164,44,.18), transparent 55%),
    radial-gradient(ellipse at 85% 30%, rgba(247,211,0,.12), transparent 50%);
  pointer-events: none;
}
.cta::after {
  content: "NSD";
  position: absolute; right: 3%; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(8rem, 20vw, 18rem);
  color: rgba(255,255,255,.025);
  line-height: 1; pointer-events: none; user-select: none;
  letter-spacing: -.06em;
}
.cta__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: center;
}
.cta h2 { color: #fff; margin: 6px 0 12px; }
.cta p { color: rgba(255,255,255,.55); margin: 0; font-size: 1.05rem; }
.cta__actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 880px) {
  .cta__inner { grid-template-columns: 1fr; gap: 36px; }
  .cta__actions { justify-content: flex-start; }
}
.cta .btn--primary {
  background: var(--yellow-500);
  color: var(--brand-900);
  box-shadow: 0 8px 24px -8px rgba(201,160,66,.45);
}
.cta .btn--primary:hover { color: var(--brand-900); transform: translateY(-2px); box-shadow: 0 14px 32px -10px rgba(201,160,66,.6); }
.cta .btn--ghost { background: rgba(255,255,255,.07); color: #fff; border: 1.5px solid rgba(255,255,255,.2); }
.cta .btn--ghost:hover { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); }

/* ============== CONTACT ============== */
.contact-list { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 10px; }
.contact-list i {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--green-100); color: var(--green-700);
  margin-right: 10px;
}
.contact-list li { display: flex; align-items: center; color: var(--ink-700); }
.contact-social { display: flex; gap: 10px; }
.contact-social a {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--ink-50); color: var(--ink-700);
  display: grid; place-items: center; font-size: 1.1rem;
  transition: background .2s, color .2s, transform .2s;
}
.contact-social a:hover { background: var(--brand-700); color: #fff; transform: translateY(-2px); }

/* ── Form card rediseño ────────────────────────────────── */
.form-card {
  background: var(--surface-raised);
  border: none;
  border-radius: var(--radius-xl);
  box-shadow:
    0 2px 4px rgba(14,91,20,.04),
    0 12px 32px -8px rgba(14,91,20,.14),
    0 32px 64px -20px rgba(14,91,20,.18);
  overflow: hidden;
  padding: 0;
}
/* Cabecera con gradiente */
.form-card__header {
  background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 100%);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.form-card__header::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 85% -20%, rgba(255,211,0,.22), transparent 55%);
  pointer-events: none;
}
.form-card__header-ico {
  width: 48px; height: 48px;
  background: rgba(255,255,255,.18);
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 1.45rem;
  flex-shrink: 0;
  position: relative; z-index: 1;
}
.form-card__header-ico i { color: #fff; }
.form-card__header-text { position: relative; z-index: 1; }
.form-card__header-text h3 { color: #fff; margin: 0 0 3px; font-size: 1.15rem; }
.form-card__header-sub { color: rgba(255,255,255,.78); font-size: .8rem; margin: 0; }
/* Cuerpo del formulario */
.form-body { padding: 24px 28px 28px; }
.form-row { margin-bottom: 14px; }
.form-row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Fila mensaje + privacidad en paralelo */
.form-row--msg {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 14px;
}
.form-card label {
  display: block; font-size: .83rem; font-weight: 700; color: var(--ink-700);
}
.form-card label i.lbl-ico { color: var(--green-700); margin-right: 3px; font-size: .88em; }
.form-card input, .form-card select, .form-card textarea {
  margin-top: 6px;
  width: 100%; padding: 11px 14px; font: inherit; color: var(--ink-900);
  border: 1.5px solid var(--ink-100); border-radius: 10px;
  background: var(--ink-50);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus {
  outline: none; border-color: var(--green-700); background: var(--surface-raised);
  box-shadow: 0 0 0 3px rgba(31,164,44,.13);
}
/* Recuadro de privacidad al lado del textarea */
.form-privacy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--green-100);
  border: 1.5px solid rgba(31,164,44,.22);
  border-radius: 12px;
  padding: 14px 10px;
  font-size: .76rem;
  font-weight: 600;
  color: var(--ink-700);
  text-align: center;
  cursor: pointer;
  width: 120px;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
}
.form-privacy:hover { background: #c8f0cc; border-color: var(--green-700); }
.form-privacy input[type="checkbox"] {
  width: 20px; height: 20px; margin-top: 0;
  accent-color: var(--green-700); cursor: pointer;
  flex-shrink: 0;
}
.form-privacy i { font-size: 1.55rem; color: var(--green-700); }
.form-privacy a { color: var(--green-900); font-weight: 700; }
.form-check {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; font-weight: 500; color: var(--ink-500);
  margin-bottom: 16px;
}
.form-check a { color: var(--green-700); }

@media (max-width: 620px) {
  .form-row--2 { grid-template-columns: 1fr; }
  .form-row--msg { grid-template-columns: 1fr; }
  .form-privacy { width: 100%; flex-direction: row; padding: 12px 14px; text-align: left; }
}

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 4px;
  font-weight: 700; font-size: .95rem;
  border: 0; cursor: pointer;
  transition: transform .15s, background .2s, color .2s, border-color .2s, box-shadow .2s;
  text-decoration: none;
  background-clip: padding-box;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
  line-height: 1;
}
.btn:focus-visible { outline: 3px solid rgba(31,164,44,.4); outline-offset: 2px; }
.btn--lg { padding: 14px 24px; font-size: 1rem; }
.btn--block { width: 100%; justify-content: center; }
/* Usa la rampa de marca (fija), no la adaptativa: este botón debe
   tener fondo verde oscuro y texto blanco en los dos temas. */
.btn--primary {
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-900) 100%);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(10,74,30,.55);
  letter-spacing: .02em;
}
.btn--primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -10px rgba(10,74,30,.7);
  background: linear-gradient(135deg, var(--brand-700) 0%, #021509 100%);
}
/* CTA oscura — botón dorado para contrastar */
.cta .btn--primary {
  background: linear-gradient(135deg, var(--yellow-400), var(--yellow-500));
  color: var(--brand-900);
  box-shadow: 0 8px 28px -8px rgba(191,140,0,.55);
}
.cta .btn--primary:hover {
  color: var(--brand-900);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -10px rgba(191,140,0,.7);
}
.btn--ghost {
  background: transparent; color: var(--ink-700);
  border: 1.5px solid rgba(10,74,30,.25);
  padding: 12px 20px;
}
.btn--ghost:hover {
  background: rgba(10,74,30,.06);
  color: var(--green-700);
  border-color: rgba(10,74,30,.45);
}
.cta .btn--ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.4); padding: 12px 20px; }
.cta .btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn--link {
  padding: 4px 0; background: transparent; color: var(--green-700);
}
.btn--link:hover { color: var(--green-900); }

/* ============== FOOTER ============== */
.footer {
  background: var(--brand-800); color: #e6ede8; padding: 70px 0 0;
  position: relative;
}
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr; gap: 36px;
  padding-bottom: 50px;
}
.footer__brand p { margin-top: 14px; max-width: 320px; color: #e6ede8; font-size: .95rem; line-height: 1.65; }
.footer h5 {
  font-family: var(--font-sans); font-weight: 800; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .18em; color: rgba(255,255,255,.78); margin-bottom: 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer a:not(.btn) { color: #e6ede8; }
.footer a:not(.btn):hover { color: var(--yellow-500); }
.footer__contact i { color: var(--yellow-500); margin-right: 8px; }

/* ── Contraste sobre el fondo verde oscuro del pie ──────────────────
   El pie es una zona permanentemente oscura, pero estos elementos
   heredaban colores de texto pensados para fondo claro (--ink-*) y
   quedaban prácticamente invisibles. Se fuerzan tonos claros. */
.footer .brand__text strong { color: #fff; }
.footer .brand__text small  { color: rgba(255,255,255,.72); }
.footer p                   { color: #e6ede8; }
.footer__bottom p,
.footer__bottom              { color: rgba(255,255,255,.72); }

.footer__bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0; font-size: .82rem; }
.footer__bottom-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.footer__bottom ul { display: flex; gap: 16px; list-style: none; padding: 0; margin: 0; }

.to-top {
  position: fixed; right: 24px; bottom: 24px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--brand-700);
  color: #fff;
  border: none; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(15,94,22,.32), 0 2px 6px rgba(0,0,0,.08);
  opacity: 0; visibility: hidden;
  transform: translateY(14px) scale(.92);
  transition: opacity .3s ease, transform .3s cubic-bezier(.22,1,.36,1), visibility 0s linear .3s, background .2s, box-shadow .2s;
  z-index: 80;
  text-decoration: none;
  cursor: pointer;
}
.to-top.is-visible {
  opacity: 1; visibility: visible; transform: translateY(0) scale(1);
  transition: opacity .3s ease, transform .3s cubic-bezier(.22,1,.36,1), visibility 0s, background .2s, box-shadow .2s;
}
.to-top:hover {
  background: var(--brand-900); color: #fff;
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 10px 28px rgba(15,94,22,.45), 0 4px 10px rgba(0,0,0,.12);
}
.to-top:active { transform: translateY(-1px) scale(.98); }
/* Centrado perfecto del icono Bootstrap (que viene con line-height interno) */
.to-top i {
  display: block;
  font-size: 1.15rem;
  line-height: 1;
  margin: 0;
  transform: translateY(-1px);  /* corrige offset visual del glyph */
}
@media (max-width: 720px) {
  .to-top { right: 14px; bottom: 86px; width: 42px; height: 42px; }
  .to-top i { font-size: 1.05rem; }
}

@media (max-width: 980px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: span 2; }
}
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } .footer__brand { grid-column: auto; } }

/* ============== Reveal animation ============== */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============== STAGE FEATURED (Infantil con web propia) ============== */
.stage--featured {
  position: relative;
  background: linear-gradient(160deg, var(--white) 0%, var(--yellow-100) 100%);
  border: 2px solid rgba(196,146,0,.45);
  box-shadow: 0 12px 40px rgba(196,146,0,.15), 0 4px 12px rgba(11,58,24,.08);
  transform: translateY(-4px);
  overflow: visible !important;
}
.stage--featured::before {
  content: '';
  position: absolute; inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--yellow-500), var(--yellow-700), var(--yellow-500));
  background-size: 200% 200%;
  z-index: -1;
  opacity: 0;
  animation: borderShine 3s ease-in-out infinite;
  filter: blur(8px);
}
.stage--featured:hover::before { opacity: .55; }
@keyframes borderShine {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.stage__ribbon {
  position: absolute; top: 14px; right: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-700);
  color: #fff; padding: 6px 12px; border-radius: 999px;
  font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(15,94,22,.28);
  animation: ribbonPulse 2.4s ease-in-out infinite;
}
.stage__ribbon i { font-size: .85rem; }
@keyframes ribbonPulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* ============== NEWS card mejorada con imagen real ============== */
.news__img {
  display: block;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.news__img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.55) 100%);
  pointer-events: none;
}
.news__item:hover .news__img { transform: scale(1); }
.news__meta {
  display: flex; gap: 14px; font-size: .78rem; color: var(--ink-500);
  align-items: center; flex-wrap: wrap; margin-bottom: 4px;
}

.news__meta span { display: inline-flex; align-items: center; gap: 4px; }
.news__meta i { font-size: .82rem; }

/* ============== GALLERY tile mejorada con imagen ============== */
.gallery-tile {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.gallery-tile::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.7) 100%);
  z-index: 1;
  pointer-events: none;
}
.gallery-tile span.gallery-tile__icon {
  position: absolute; top: 12px; right: 12px; left: auto; bottom: auto;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.95); color: var(--green-900);
  display: grid; place-items: center; font-size: 1.15rem;
  z-index: 3;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  transition: transform .35s cubic-bezier(.22,1,.36,1), background .25s;
  padding: 0; letter-spacing: 0; text-transform: none;
  backdrop-filter: none;
}
.gallery-tile:hover span.gallery-tile__icon {
  transform: scale(1.12) rotate(-8deg);
  background: var(--yellow-500);
  color: var(--green-900);
}
/* Etiqueta de texto: glassmorphism elegante en la parte inferior */
.gallery-tile__label,
.gallery-tile > span:not(.gallery-tile__icon) {
  position: absolute !important;
  left: 14px; bottom: 14px; right: auto;
  background: rgba(15, 23, 33, .55);
  color: #fff;
  padding: 7px 14px; border-radius: 999px;
  font-size: .78rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  text-align: left;
  z-index: 2;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255,255,255,.18);
  white-space: nowrap;
  transition: transform .3s, background .25s, color .25s, opacity .2s;
}
.gallery-tile:hover > span:not(.gallery-tile__icon) {
  opacity: 0;
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.35);
}

/* Skip link — accesibilidad teclado */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 999999;
  padding: 10px 20px;
  background: #101810;
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: 0; }

/* =========================================================
   Utilidad: texto solo para lectores de pantalla
   ========================================================= */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   TEMA OSCURO
   ---------------------------------------------------------
   Funciona casi entero con solo cambiar los tokens, porque los
   componentes ya usan --surface-*, --ink-* y --border en vez de
   colores fijos. Las zonas que deben seguir oscuras siempre
   (pie, franjas verdes, marquee) usan la rampa --brand-*, que
   NO cambia entre temas: por eso no necesitan parches.

   Se declara dos veces a propósito:
   1) media query  → funciona aunque falle el JS
   2) [data-theme] → permite forzar el tema desde el selector
   ========================================================= */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --ink-900: #ECEFEC;
    --ink-800: #D5DCD7;
    --ink-700: #BFC8C2;
    --ink-600: #A8B3AD;
    --ink-500: #93A099;
    --ink-400: #7D8C84;
    --ink-300: #68786F;
    --ink-200: #46564E;
    --ink-100: #2A3833;
    --ink-50:  #1B2520;

    --white:           #0F1814;
    --surface:         #0F1814;
    --surface-raised:  #17221D;
    --surface-sunken:  #141E19;
    --surface-subtle:  #1F2A24;
    --surface-overlay: rgba(15,24,20,.85);
    --border:          #27332D;
    --border-strong:   #35433B;

    --green-900: #9BD6AE;
    --green-700: #5EBF78;
    --green-600: #4FBA6B;
    --green-500: #3FA858;
    --green-400: #7FD196;
    --green-300: #9BD6AE;
    --green-200: #22382A;
    --green-100: #18291E;
    --green-50:  #121C16;
    --yellow-700: #E8C97A;
    --yellow-100: #33240A;

    --shadow-xs: 0 1px 2px rgba(0,0,0,.5);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.5), 0 4px 10px -4px rgba(0,0,0,.45);
    --shadow:    0 2px 6px rgba(0,0,0,.5), 0 12px 28px -8px rgba(0,0,0,.5);
    --shadow-lg: 0 4px 12px rgba(0,0,0,.5), 0 28px 56px -16px rgba(0,0,0,.6);
    --shadow-xl: 0 8px 20px rgba(0,0,0,.5), 0 44px 88px -24px rgba(0,0,0,.7);
    --sheen: inset 0 1px 0 rgba(255,255,255,.05);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --ink-900: #ECEFEC;
  --ink-800: #D5DCD7;
  --ink-700: #BFC8C2;
  --ink-600: #A8B3AD;
  --ink-500: #93A099;
  --ink-400: #7D8C84;
  --ink-300: #68786F;
  --ink-200: #46564E;
  --ink-100: #2A3833;
  --ink-50:  #1B2520;

  --white:           #0F1814;
  --surface:         #0F1814;
  --surface-raised:  #17221D;
  --surface-sunken:  #141E19;
  --surface-subtle:  #1F2A24;
  --surface-overlay: rgba(15,24,20,.85);
  --border:          #27332D;
  --border-strong:   #35433B;

  --green-900: #9BD6AE;
  --green-700: #5EBF78;
  --green-600: #4FBA6B;
  --green-500: #3FA858;
  --green-400: #7FD196;
  --green-300: #9BD6AE;
  --green-200: #22382A;
  --green-100: #18291E;
  --green-50:  #121C16;
  --yellow-700: #E8C97A;
  --yellow-100: #33240A;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.5);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.5), 0 4px 10px -4px rgba(0,0,0,.45);
  --shadow:    0 2px 6px rgba(0,0,0,.5), 0 12px 28px -8px rgba(0,0,0,.5);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.5), 0 28px 56px -16px rgba(0,0,0,.6);
  --shadow-xl: 0 8px 20px rgba(0,0,0,.5), 0 44px 88px -24px rgba(0,0,0,.7);
  --sheen: inset 0 1px 0 rgba(255,255,255,.05);
}

/* ---- Los pocos parches que sí hacen falta ----------------
   Solo para cosas con colores fijos dentro (degradados,
   fotos con velo) que los tokens no alcanzan.            */

/* Hero: el degradado y las manchas se calman sobre fondo oscuro */
[data-theme="dark"] .hero {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-sunken) 100%);
}
[data-theme="dark"] .blob--1 { opacity: .10; }
[data-theme="dark"] .blob--2 { opacity: .06; }
[data-theme="dark"] .blob--3 { opacity: .05; }
[data-theme="dark"] .hero__photo { filter: brightness(.9); }

/* Texto con degradado: los verdes y oros originales quedan casi
   negros sobre fondo oscuro, hay que subirles la luminosidad */
[data-theme="dark"] .text-gradient-anim {
  background: linear-gradient(120deg, #6ED08A 0%, #E8C55C 30%, #F0D678 50%, #6ED08A 75%, #E8C55C 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
}

/* Barra superior fija y translúcida */
[data-theme="dark"] .navbar {
  background: var(--surface-overlay) !important;
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .navbar.is-scrolled { background: rgba(15,24,20,.95) !important; }

/* Aviso de alérgenos: lleva amarillos fijos */
[data-theme="dark"] .allergen-notice { background: #2A2108; border-color: #5C4A12; }
[data-theme="dark"] .allergen-notice p { color: #F0DFA8; }
[data-theme="dark"] .allergen-notice i { color: var(--yellow-400); }

/* Cabecera de página: el velo verde sobre la foto se oscurece */
[data-theme="dark"] .page-hero {
  background:
    linear-gradient(135deg, rgba(4,18,10,.96), rgba(8,48,22,.94)),
    url('https://images.unsplash.com/photo-1497633762265-9d179a990aa6?w=1600&auto=format&fit=crop') center/cover;
}

/* Mosaico de la galería */
[data-theme="dark"] .gallery-tile { background: var(--surface-subtle) center/cover; }

/* Barra fija inferior en móvil */
[data-theme="dark"] .mobile-cta-bar {
  background: rgba(15,24,20,.95) !important;
  border-top-color: var(--border);
}

/* Banner de cookies: tiene colores propios */
[data-theme="dark"] #ck-banner { background: var(--surface-raised) !important; color: var(--ink-900) !important; border-color: var(--border) !important; }
[data-theme="dark"] #ck-banner .ck-info h3 { color: var(--green-700) !important; }
[data-theme="dark"] #ck-banner .ck-info p  { color: var(--ink-500) !important; }
[data-theme="dark"] #ck-banner .ck-cat     { background: var(--ink-50); border-color: var(--border-strong); }
[data-theme="dark"] #ck-banner .ck-cat h4  { color: var(--green-700); }
[data-theme="dark"] #ck-banner .ck-cat p   { color: var(--ink-500); }
[data-theme="dark"] #ck-banner .ck-slider  { background: var(--border-strong); }
[data-theme="dark"] #ck-banner .ck-btn-reject { color: var(--ink-600); border-color: var(--border-strong); }

/* Controles nativos (calendarios, desplegables, barras de scroll) */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] button { color-scheme: dark; }

/* =========================================================
   Selector de tema (claro / sistema / oscuro)
   ========================================================= */
.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  margin-left: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18);
  flex-shrink: 0;
}
.theme-switch__thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 30px; height: 26px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.88));
  box-shadow: 0 1px 3px rgba(0, 0, 0, .28);
  transition: transform var(--dur) var(--ease-out);
  pointer-events: none;
}
.theme-switch[data-choice="system"] .theme-switch__thumb { transform: translateX(30px); }
.theme-switch[data-choice="dark"]   .theme-switch__thumb { transform: translateX(60px); }

.theme-switch__opt {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 26px;
  padding: 0;
  border: 0;
  background: none;
  border-radius: var(--radius-pill);
  color: rgba(255, 255, 255, .72);
  font-size: .82rem;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.theme-switch__opt:hover { color: #fff; }
.theme-switch__opt:active { transform: scale(.92); }
.theme-switch__opt[aria-checked="true"] { color: var(--brand-800); }
.theme-switch__opt:focus-visible { outline: 2px solid var(--yellow-400); outline-offset: 2px; }

.drawer__theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
}
.drawer__theme-label {
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .78);
}
.drawer__theme .theme-switch { margin-left: 0; }

@media (max-width: 720px) { .theme-switch { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .theme-switch__thumb { transition: none; } }
