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

/* ============================================================
   COLEGIO MARCELINA — PREPARATORIA
   main.css — Estilos específicos de página
   Depende de: variables.css, animations.css, components.css, responsive.css
   ============================================================ */


/* ──────────────────────────────────────────
   TIPOGRAFÍA — Fuentes globales
────────────────────────────────────────── */

:root {
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: 'Playfair Display', 'Times New Roman', serif;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}


/* ──────────────────────────────────────────
   HERO — Liderazgo para la universidad y la vida
────────────────────────────────────────── */

.hero {
  position: relative;
  background:
    radial-gradient(900px 600px at 85% 50%, rgba(26, 114, 255, 0.45) 0%, transparent 60%),
    radial-gradient(700px 500px at 15% 100%, rgba(76, 72, 200, 0.35) 0%, transparent 55%),
    linear-gradient(120deg, #0E1E4A 0%, #162F6E 45%, #1A55E0 100%);
  padding: clamp(64px, 9vw, 120px) clamp(20px, 5vw, 72px) clamp(56px, 8vw, 100px);
  overflow: hidden;
  color: white;
}

/* Faint texture overlay for depth */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.04) 0%, transparent 40%);
  pointer-events: none;
}

/* Decorative blur orbs */
.hero::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  right: -180px;
  top: -200px;
  background: radial-gradient(circle, rgba(0, 194, 240, 0.18) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(20px);
}

.hero-inner {
  max-width: 1440px;
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: clamp(24px, 4vw, 44px);
  font-weight: 400;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.15s ease;
}

.breadcrumb a:hover {
  color: white;
}

.breadcrumb .sep {
  opacity: 0.55;
}

.breadcrumb .current {
  color: white;
  font-weight: 500;
}

/* Title */
.hero-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2rem, 4.6vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -0.018em;
  color: white;
  margin: 0 0 22px;
  max-width: 1280px;
}

.hero-title em {
  font-style: italic;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
}

.hero-sub {
  font-size: clamp(13.5px, 1.2vw, 15px);
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
  max-width: 540px;
  margin: 0 0 32px;
  font-weight: 300;
}

.hero-cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}


/* ──────────────────────────────────────────
   LEVEL TABS — Sticky tabs de niveles
────────────────────────────────────────── */

.nivel-tabs {
  background: white;
  border-bottom: 1px solid rgba(76, 72, 200, 0.08);
  position: sticky;
  top: 66px;
  z-index: 80;
}

.nivel-tabs-inner {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  gap: clamp(22px, 4vw, 56px);
  overflow-x: auto;
  scrollbar-width: none;
}

.nivel-tabs-inner::-webkit-scrollbar { display: none; }

.nivel-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 16px 2px;
  border: none;
  background: transparent;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  white-space: nowrap;
  transition: color 0.18s ease,
              border-color 0.18s ease;
}

.nivel-tab:hover:not(.act) {
  color: var(--color-indigo-deeper);
}

.nivel-tab .ico {
  font-size: 15px;
  line-height: 1;
}

/* Active states by level */
.nivel-tab.act {
  font-weight: 600;
}

.nivel-tab[data-level="preescolar"].act {
  color: var(--color-nivel-preescolar);
  border-bottom-color: var(--color-nivel-preescolar);
}

.nivel-tab[data-level="primaria"].act {
  color: var(--color-nivel-primaria);
  border-bottom-color: var(--color-nivel-primaria);
}

.nivel-tab[data-level="secundaria"].act {
  color: var(--color-nivel-secundaria);
  border-bottom-color: var(--color-nivel-secundaria);
}

.nivel-tab[data-level="preparatoria"].act {
  color: var(--color-nivel-preparatoria);
  border-bottom-color: var(--color-nivel-preparatoria);
}


/* ──────────────────────────────────────────
   SECTION INTRO — Carousel + texto
────────────────────────────────────────── */

.intro {
  background: var(--bg-white);
  padding: clamp(56px, 7vw, 100px) clamp(20px, 5vw, 72px);
}

.intro-inner {
  max-width: 1280px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

/* Carousel container */
.intro-carr {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  background: var(--bg-off);
}

.intro-carr-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.65s var(--ease-smooth);
  will-change: transform;
}

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

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

/* Dark gradient overlay for legibility */
.intro-carr-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(13, 11, 43, 0) 50%,
    rgba(13, 11, 43, 0.55) 100%);
  pointer-events: none;
}

/* Title and badge */
.intro-carr-meta {
  position: absolute;
  left: 20px;
  bottom: 20px;
  right: 20px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.intro-carr-title {
  color: white;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.intro-carr-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-lima);
  color: var(--color-indigo-deeper);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 14px rgba(132, 204, 22, 0.45);
}

.intro-carr-badge::before {
  content: '+';
  font-size: 13px;
  margin-right: 1px;
}

/* Arrows */
.intro-carr-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: background 0.18s ease,
              transform 0.18s var(--ease-smooth);
  color: var(--color-indigo-deeper);
}

.intro-carr-arrow:hover {
  background: white;
  transform: translateY(-50%) scale(1.05);
}

.intro-carr-arrow.prev { left: 12px; }
.intro-carr-arrow.next { right: 12px; }

.intro-carr-arrow svg {
  width: 14px;
  height: 14px;
}

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

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

.intro-carr-dot.act {
  width: 22px;
  border-radius: 4px;
  background: white;
}

/* Right column — text */
.intro-text {
  max-width: 540px;
}

.intro-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--color-indigo-deeper);
  margin: 0 0 18px;
}

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

.intro-text p {
  font-size: 13.5px;
  color: var(--color-text-muted);
  line-height: 1.75;
  margin: 0 0 24px;
  font-weight: 300;
}


/* ──────────────────────────────────────────
   MODELO EDUCATIVO — 4 cards
────────────────────────────────────────── */

.modelo {
  background: #FFF4F1;
  padding: clamp(64px, 8vw, 110px) clamp(20px, 5vw, 72px);
}

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

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

.modelo-eyebrow {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 3.6px;
  text-transform: uppercase;
  color: var(--color-indigo);
  margin-bottom: 10px;
}

.modelo-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -0.015em;
  line-height: 1.08;
  color: var(--color-indigo-deeper);
  margin: 0;
}

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

.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(76, 72, 200, 0.06);
  box-shadow: 0 1px 4px rgba(15, 14, 36, 0.04);
  transition: transform 0.32s var(--ease-smooth),
              box-shadow 0.32s var(--ease-smooth),
              border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* Top bar — scales from 0 to 1 on hover (like Preescolar landing) */
.modelo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-nivel-preparatoria);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease-smooth);
}

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

.modelo-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 16px 36px rgba(15, 14, 36, 0.10);
  border-color: rgba(204, 41, 54, 0.12);
}

.modelo-card-ico {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #FFE4DE;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 28px;
  line-height: 1;
  transition: transform 0.32s var(--ease-smooth);
}

.modelo-card:hover .modelo-card-ico {
  transform: scale(1.07) translateY(-2px);
}

.modelo-card-title {
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--color-indigo-deeper);
  margin: 0 0 10px;
  letter-spacing: -0.005em;
}

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


/* ──────────────────────────────────────────
   GALERÍA — Grid 3x2 sobre fondo navy
────────────────────────────────────────── */

.galeria {
  background:
    radial-gradient(900px 500px at 80% 0%, rgba(26, 114, 255, 0.20) 0%, transparent 55%),
    radial-gradient(700px 400px at 10% 100%, rgba(76, 72, 200, 0.18) 0%, transparent 55%),
    linear-gradient(170deg, #14225A 0%, #1A2E6E 50%, #1A2E6E 100%);
  padding: clamp(64px, 8vw, 110px) clamp(20px, 5vw, 72px);
  color: white;
  position: relative;
  overflow: hidden;
}

.galeria-inner {
  max-width: 1280px;
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

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

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

.galeria-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(1.8rem, 3.3vw, 2.5rem);
  letter-spacing: -0.015em;
  line-height: 1.08;
  color: white;
  margin: 0;
}

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

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

.galeria-item {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.4s var(--ease-smooth),
              box-shadow 0.4s var(--ease-smooth);
}

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

.galeria-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.3);
}

.galeria-item:hover img {
  transform: scale(1.05);
}

/* Subtle hover overlay */
.galeria-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(13, 11, 43, 0.4) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.galeria-item:hover::after {
  opacity: 1;
}


/* ──────────────────────────────────────────
   CTA — Prepara a tu hijo para el futuro
────────────────────────────────────────── */

.cta {
  position: relative;
  background:
    radial-gradient(800px 500px at 90% 50%, rgba(26, 114, 255, 0.28) 0%, transparent 60%),
    linear-gradient(120deg, #4944C0 0%, #5752D3 50%, #4D4AD0 100%);
  padding: clamp(72px, 9vw, 130px) clamp(20px, 5vw, 72px);
  text-align: center;
  color: white;
  overflow: hidden;
}

/* Subtle diagonal pattern */
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.022) 0,
    rgba(255, 255, 255, 0.022) 1px,
    transparent 0,
    transparent 22px
  );
  pointer-events: none;
}

/* Decorative ring on the right */
.cta::after {
  content: '';
  position: absolute;
  width: 620px;
  height: 620px;
  right: -180px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin-inline: auto;
}

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

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

.cta-sub {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
  margin: 16px 0 32px;
  font-weight: 300;
}


/* ──────────────────────────────────────────
   ENTRY ANIMATIONS — Hero stagger
   Estos sobreescriben las animaciones cuando se quieren delays específicos
────────────────────────────────────────── */

.hero .breadcrumb { animation: fadeUp 0.7s var(--ease-smooth) both; animation-delay: 0.05s; }
.hero-title       { animation: fadeUp 0.7s var(--ease-smooth) both; animation-delay: 0.15s; }
.hero-sub         { animation: fadeUp 0.7s var(--ease-smooth) both; animation-delay: 0.28s; }
.hero-cta-row     { animation: fadeUp 0.7s var(--ease-smooth) both; animation-delay: 0.4s; }


/* ──────────────────────────────────────────
   PAGE-LEVEL RESPONSIVE OVERRIDES
   (la mayoría de breakpoints viven en responsive.css —
    aquí solo lo específico de esta página)
────────────────────────────────────────── */

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

  .footer-brand {
    grid-column: 1 / -1;
  }

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

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

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

  .nav-inner {
    padding: 9px 16px;
    gap: 10px;
  }

  .nav-logo svg { width: 38px; }

  /* nav cta button smaller */
  .nav-cta.btn {
    font-size: 11.5px;
    padding: 9px 16px;
  }

  /* Hero */
  .hero {
    padding: clamp(28px, 8vw, 56px) 20px clamp(40px, 7vw, 64px);
  }

  .hero-title {
    font-size: clamp(1.75rem, 7vw, 2.4rem);
  }

  .hero-cta-row {
    width: 100%;
  }

  .hero-cta-row .btn {
    flex: 0 1 auto;
  }

  /* Level tabs */
  .nivel-tabs {
    top: 56px;
  }

  .nivel-tabs-inner {
    gap: 22px;
    padding-inline: 18px;
  }

  .nivel-tab {
    font-size: 12.5px;
    padding-block: 13px;
  }

  /* Nav-mobile top adjust */
  .nav-mobile { top: 56px; }

  /* Intro section */
  .intro-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Modelo cards single column on small mobile but 2x2 ok on larger */
  .modelo-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .modelo-card {
    padding: 24px 20px;
  }

  /* Galeria single col */
  .galeria-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .breadcrumb { font-size: 11px; }
  .intro-carr-arrow { width: 32px; height: 32px; }
}

/* Reduced motion — respect user prefs */
@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;
  }
}
