/* preescolar — page-specific styles
   (Global chrome lives in css/global.css)
*/

/* ============================================================
   COLEGIO MARCELINA — MAIN STYLES
   Página: Preescolar
   Tipografía, navbar, footer + estilos específicos de página
   ============================================================
   Dependencias: variables.css, animations.css, components.css,
                 responsive.css
   ============================================================ */


/* ──────────────────────────────────────────
   FUENTES — Google Fonts
────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Source+Serif+4:ital,opsz,wght@0,8..60,400..900;1,8..60,200..900&display=swap');


/* ──────────────────────────────────────────
   VARIABLES TIPOGRÁFICAS
────────────────────────────────────────── */

:root {
  --sans:  'Inter', system-ui, -apple-system, sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; }
a { color: inherit; }


/* ──────────────────────────────────────────
   HERO — Preescolar (background brown→orange)
────────────────────────────────────────── */

.hero-pre {
  position: relative;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(135deg,
      rgba(20, 12, 4, 0.75) 0%,
      rgba(80, 40, 6, 0.50) 30%,
      rgba(180, 95, 10, 0.10) 70%,
      transparent 100%),
    url('../assets/preescolar/hero/hero-bg.png') center/cover no-repeat,
    linear-gradient(135deg, #2a1908 0%, #6b3a0a 38%, #b8650c 72%, #e8850a 100%);
  padding-block: clamp(64px, 8vw, 112px);
  padding-inline: clamp(20px, 5vw, 72px);
}

.hero-pre-inner {
  max-width: 1320px;
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

.hero-bc {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 22px;
  letter-spacing: 0.3px;
}

.hero-bc a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.15s ease;
}

.hero-bc a:hover { color: white; }
.hero-bc .sep { margin-inline: 8px; opacity: 0.55; }
.hero-bc .cur { color: rgba(255, 255, 255, 0.85); }

.hero-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2.2rem, 5.8vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: white;
  margin: 0 0 18px;
  max-width: 920px;
}

.hero-title em {
  font-style: italic;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.94);
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: clamp(14px, 1.3vw, 16px);
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
  font-weight: 300;
  max-width: 540px;
  margin: 0 0 30px;
}

/* Botón naranja específico de preescolar (CTA "Solicitar información") */
.btn-orange {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(135deg, #f59e0b 0%, #e8850a 100%);
  color: white;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(232, 133, 10, 0.40);
  transition: transform 0.22s var(--ease-smooth),
              box-shadow 0.22s var(--ease-smooth),
              filter 0.18s ease;
}

.btn-orange:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(232, 133, 10, 0.55);
  filter: brightness(1.06);
}
.btn-orange:active { transform: scale(0.97); }


/* ──────────────────────────────────────────
   TABS — Niveles (Preescolar | Primaria | …)
────────────────────────────────────────── */

.lvl-tabs {
  background: white;
  border-bottom: 1px solid rgba(76, 72, 200, 0.08);
  position: sticky;
  top: var(--navbar-height);
  z-index: 80;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.96);
}

.lvl-tabs-inner {
  max-width: 1320px;
  margin-inline: auto;
  display: flex;
  gap: 4px;
  padding: 0 clamp(20px, 5vw, 72px);
  overflow-x: auto;
  scrollbar-width: none;
}
.lvl-tabs-inner::-webkit-scrollbar { display: none; }

.lvl-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.22s var(--ease-smooth);
  cursor: pointer;
}

.lvl-tab .ico {
  font-size: 15px;
  line-height: 1;
  filter: grayscale(0.4);
  opacity: 0.7;
  transition: filter 0.22s ease, opacity 0.18s ease, transform 0.22s var(--ease-smooth);
}

.lvl-tab:hover {
  color: var(--color-indigo-deeper);
}
.lvl-tab:hover .ico { filter: grayscale(0); opacity: 1; transform: scale(1.1); }

.lvl-tab.active {
  color: var(--color-nivel-preescolar);
  border-bottom-color: var(--color-nivel-preescolar);
}
.lvl-tab.active .ico { filter: grayscale(0); opacity: 1; }

.lvl-tab[data-nivel="primaria"].active     { color: var(--color-nivel-primaria);     border-bottom-color: var(--color-nivel-primaria); }
.lvl-tab[data-nivel="secundaria"].active   { color: var(--color-nivel-secundaria);   border-bottom-color: var(--color-nivel-secundaria); }
.lvl-tab[data-nivel="preparatoria"].active { color: var(--color-nivel-preparatoria); border-bottom-color: var(--color-nivel-preparatoria); }


/* ──────────────────────────────────────────
   SECCIÓN INTRO — Carrusel + texto
────────────────────────────────────────── */

.intro-sec {
  padding-block: clamp(56px, 7vw, 96px);
  padding-inline: clamp(20px, 5vw, 72px);
  background: white;
}

.intro-grid {
  max-width: 1320px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

/* Carrusel de preescolar */
.pre-carr {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: var(--color-indigo-deeper);
  box-shadow: 0 24px 60px rgba(15, 14, 36, 0.18);
  aspect-ratio: 4 / 3;
}

.pre-carr-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.pre-carr-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
}

.pre-carr-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Caption con gradiente bottom — más suave */
.pre-carr-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 60px 22px 22px;
  background: linear-gradient(
    to top,
    rgba(13, 11, 43, 0.72) 0%,
    rgba(13, 11, 43, 0.30) 50%,
    transparent 100%
  );
  color: white;
}

.pre-carr-cap-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.30);
}

.pre-carr-cap-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-lima);
  color: var(--color-indigo-deeper);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.2px;
}

.pre-carr-cap-pill::before {
  content: '✓';
  font-size: 10px;
}

/* Flechas */
.pre-carr-arr {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.30);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background 0.18s ease,
              transform 0.22s var(--ease-smooth);
  font-size: 14px;
}
.pre-carr-arr:hover {
  background: rgba(255, 255, 255, 0.30);
  transform: translateY(-50%) scale(1.08);
}
.pre-carr-arr.prev { left: 14px; }
.pre-carr-arr.next { right: 14px; }

/* Dots */
.pre-carr-dots {
  position: absolute;
  bottom: 18px;
  right: 20px;
  display: flex;
  gap: 6px;
  z-index: 3;
}

.pre-carr-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.28s var(--ease-smooth);
}

.pre-carr-dot.act {
  width: 20px;
  height: 4px;
  border-radius: 4px;
  background: white;
}

/* Texto lateral */
.intro-text-title {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3.1vw, 2.7rem);
  font-weight: 900;
  color: var(--color-indigo-deeper);
  line-height: 1.06;
  letter-spacing: -0.018em;
  margin: 0 0 18px;
}

.intro-text-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--color-nivel-preescolar);
}

.intro-text-body {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.75;
  margin: 0 0 26px;
  font-weight: 300;
  max-width: 540px;
}


/* ──────────────────────────────────────────
   MODELO EDUCATIVO — Sección con fondo crema
────────────────────────────────────────── */

.modelo-sec {
  padding-block: clamp(56px, 7vw, 96px);
  padding-inline: clamp(20px, 5vw, 72px);
  background: linear-gradient(180deg, #FFF6E8 0%, #FFEFD9 100%);
}

.modelo-inner {
  max-width: 1320px;
  margin-inline: auto;
}

.modelo-hdr {
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.modelo-eyebrow {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--color-nivel-preescolar);
  margin-bottom: 12px;
}

.modelo-title {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3.3vw, 2.8rem);
  font-weight: 900;
  color: var(--color-indigo-deeper);
  letter-spacing: -0.018em;
  line-height: 1.06;
  margin: 0;
}

.modelo-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--color-nivel-preescolar);
}

.modelo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.modelo-card {
  background: white;
  border-radius: 22px;
  padding: 28px 22px 26px;
  text-align: center;
  border: 1px solid rgba(232, 133, 10, 0.10);
  box-shadow: 0 2px 12px rgba(232, 133, 10, 0.06);
  transition: transform 0.28s var(--ease-smooth),
              box-shadow 0.28s var(--ease-smooth),
              border-color 0.22s ease;
  position: relative;
  overflow: hidden;
}

.modelo-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #e8850a);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-smooth);
}

.modelo-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 38px rgba(232, 133, 10, 0.14);
  border-color: rgba(232, 133, 10, 0.25);
}

.modelo-card:hover::before { transform: scaleX(1); }

.modelo-ico {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FFE7C4 0%, #FFD49E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 18px;
  transition: transform 0.32s var(--ease-smooth);
}

.modelo-card:hover .modelo-ico {
  transform: scale(1.08) rotate(-4deg);
}

.modelo-card h3 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 800;
  color: var(--color-indigo-deeper);
  margin: 0 0 10px;
  line-height: 1.25;
}

.modelo-card p {
  font-size: 12.5px;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0;
  font-weight: 300;
}


/* ──────────────────────────────────────────
   GALERÍA — Fondo navy/indigo oscuro
────────────────────────────────────────── */

.gal-sec {
  padding-block: clamp(60px, 7vw, 96px);
  padding-inline: clamp(20px, 5vw, 72px);
  background:
    linear-gradient(180deg, rgba(30, 27, 75, 0.92), rgba(30, 27, 75, 0.95)),
    url('../assets/preescolar/galeria/gal-bg.png') center/cover no-repeat;
  background-color: var(--color-indigo-deeper);
}

.gal-inner {
  max-width: 1320px;
  margin-inline: auto;
}

.gal-hdr {
  margin-bottom: clamp(28px, 4vw, 42px);
}

.gal-eyebrow {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--color-lima);
  margin-bottom: 12px;
}

.gal-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.3vw, 2.8rem);
  font-weight: 900;
  color: white;
  letter-spacing: -0.018em;
  line-height: 1.06;
  margin: 0;
}

.gal-title em {
  font-style: italic;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
}

.gal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.gal-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s var(--ease-smooth),
              box-shadow 0.35s var(--ease-smooth);
}

.gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-smooth),
              filter 0.4s ease;
}

.gal-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 40%,
    rgba(13, 11, 43, 0.40) 100%
  );
  opacity: 0;
  transition: opacity 0.32s ease;
  pointer-events: none;
}

.gal-item:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.gal-item:hover img { transform: scale(1.06); }
.gal-item:hover::after { opacity: 1; }


/* ──────────────────────────────────────────
   CTA — "Únete a la familia"
────────────────────────────────────────── */

.cta-pre {
  padding-block: clamp(70px, 9vw, 120px);
  padding-inline: clamp(20px, 5vw, 72px);
  background:
    linear-gradient(135deg, rgba(76, 72, 200, 0.95), rgba(89, 84, 220, 0.95)),
    url('../assets/preescolar/cta/cta-bg.png') center/cover no-repeat;
  background-color: var(--color-indigo);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Anillos decorativos */
.cta-pre::before,
.cta-pre::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  pointer-events: none;
}

.cta-pre::before {
  width: 540px;
  height: 540px;
  bottom: -280px;
  left: -120px;
}

.cta-pre::after {
  width: 380px;
  height: 380px;
  top: -160px;
  right: -100px;
}

.cta-pre-inner {
  max-width: 760px;
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

.cta-pre-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 900;
  color: white;
  letter-spacing: -0.018em;
  line-height: 1.08;
  margin: 0 0 8px;
}

.cta-pre-title em {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--color-lima);
  margin-top: 4px;
}

.cta-pre-sub {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 28px;
  font-weight: 300;
}


/* ──────────────────────────────────────────
   RESPONSIVE OVERRIDES — Página preescolar
────────────────────────────────────────── */

@media (max-width: 1024px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .modelo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .gal-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  /* Navbar — mostrar burger, ocultar links */
  .nav-links { display: none; }
  .nav-cta   { display: none; }
  .nav-burger { display: flex; }

  /* Hero — más compacto */
  .hero-pre { padding-block: 56px; }
  .hero-title { font-size: clamp(2rem, 7.5vw, 2.6rem); }

  /* Tabs — scroll horizontal */
  .lvl-tabs-inner {
    padding-inline: 16px;
    gap: 0;
  }
  .lvl-tab { padding: 14px 16px; font-size: 12.5px; }

  /* Intro — stack */
  .intro-grid { gap: 28px; }
  .pre-carr {
    aspect-ratio: 4 / 3;
    border-radius: 18px;
  }
  .intro-text-title { font-size: 1.55rem; }
  .intro-text-body { font-size: 13.5px; }

  /* Modelo */
  .modelo-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Galería */
  .gal-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .gal-item { aspect-ratio: 16 / 10; }

  /* CTA */
  .cta-pre { padding-block: 64px; }
  .cta-pre-title { font-size: 1.85rem; }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bot {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
  }
  .footer-bot-links { gap: 16px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .hero-pre { padding-block: 48px; }
  .intro-sec { padding-block: 48px; }
  .modelo-sec { padding-block: 48px; }
  .gal-sec { padding-block: 56px; }
  .cta-pre { padding-block: 56px; }

  .modelo-card { padding: 24px 18px; }
  .modelo-card h3 { font-size: 15px; }

  .nav-inner { padding: 12px 16px; }
  .nav-logo img { height: 36px; }
}


/* ──────────────────────────────────────────
   REDUCED MOTION
────────────────────────────────────────── */

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