/* ============================================================
   I.E.P. SAN GABRIEL — styles.css
   Diseño moderno, elegante y profesional para institución educativa
   ============================================================ */

/* ---- Variables de diseño ---- */
:root {
  /* Paleta principal: Azul institucional profundo + acentos cálidos */
  --blue-900: #0d1f3c;
  --blue-800: #102a50;
  --blue-700: #1a3d6e;
  --blue-600: #1e4d8c;
  --blue-500: #2563b0;
  --blue-400: #3b7dd8;
  --blue-300: #7eb3f0;
  --blue-100: #deeaf9;
  --blue-50:  #f0f6ff;

  --sky-400:  #38bdf8;
  --sky-200:  #bae6fd;

  --gold-500: #c9922a;
  --gold-400: #e6aa38;
  --gold-100: #fef3dc;

  --teal-500: #0d9488;
  --green-500: #16a34a;
  --purple-500: #7c3aed;
  --red-500: #dc2626;

  --white: #ffffff;
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Tipografía */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  /* Espaciado */
  --section-py: 96px;
  --container: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Sombras */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10), 0 1px 3px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 40px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.06);
  --shadow-xl:  0 20px 60px rgba(0,0,0,.16);
  --shadow-blue: 0 8px 28px rgba(37, 99, 176, .28);

  /* Transiciones */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --dur: 280ms;
}

/* ---- Reset y base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; object-fit: cover; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 1rem; }
iframe { border: none; }

/* ---- Utilidades ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: var(--section-py);
}

.section-alt {
  background: var(--gray-50);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-500);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--blue-900);
  line-height: 1.22;
  margin-bottom: 16px;
}

.section-desc {
  color: var(--gray-500);
  font-size: 1.05rem;
  line-height: 1.7;
}

.lead-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--gray-700);
  line-height: 1.65;
  margin-bottom: 16px;
}

/* ---- Botones ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-size: .93rem;
  font-weight: 600;
  letter-spacing: .01em;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue-500);
  color: var(--white);
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover {
  background: var(--blue-600);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(37,99,176,.38);
}

.btn-outline {
  background: transparent;
  color: var(--blue-600);
  border: 2px solid var(--blue-300);
}
.btn-outline:hover {
  background: var(--blue-50);
  border-color: var(--blue-500);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.5);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,.12);
  border-color: var(--white);
}

.btn-light {
  background: var(--white);
  color: var(--blue-700);
  box-shadow: var(--shadow-md);
}
.btn-light:hover {
  background: var(--blue-50);
  transform: translateY(-2px);
}

.btn-lg { padding: 15px 34px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ---- Animación reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   WHATSAPP FLOTANTE
   ============================================================ */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: var(--white);
  padding: 13px 20px;
  border-radius: 100px;
  font-weight: 600;
  font-size: .9rem;
  box-shadow: 0 6px 24px rgba(37,211,102,.38);
  transition: all var(--dur) var(--ease);
}
.whatsapp-float:hover {
  background: #1dbb57;
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(37,211,102,.5);
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  padding-block: 20px;
  transition: background var(--dur) var(--ease), padding var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.header.scrolled {
  background: var(--white);
  padding-block: 12px;
  box-shadow: 0 2px 20px rgba(0,0,0,.09);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.logo-icon {
  color: var(--white);
  transition: color var(--dur) var(--ease);
}
.header.scrolled .logo-icon { color: var(--blue-600); }
.logo-icon--white { color: var(--white); }

.logo-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  transition: color var(--dur) var(--ease);
}
.header.scrolled .logo-name { color: var(--blue-900); }
.logo-sub {
  display: block;
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  transition: color var(--dur) var(--ease);
}
.header.scrolled .logo-sub { color: var(--gray-500); }

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  font-size: .88rem;
  font-weight: 500;
  color: rgba(255,255,255,.88);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--dur) var(--ease);
}
.nav-link:hover { color: var(--white); background: rgba(255,255,255,.12); }
.header.scrolled .nav-link { color: var(--gray-700); }
.header.scrolled .nav-link:hover { color: var(--blue-600); background: var(--blue-50); }

.nav-cta { margin-left: 10px; }
.header.scrolled .nav-cta { /* Stays same */ }

/* Hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: var(--radius-sm);
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--dur) var(--ease);
}
.header.scrolled .hamburger span { background: var(--gray-800); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO / SLIDER
   ============================================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 580px;
  overflow: hidden;
}

.hero-slider { height: 100%; }

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .9s var(--ease);
}
.hero-slide.active { opacity: 1; z-index: 1; }

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--blue-900); /* fallback si no hay imagen */
  transform: scale(1.04);
  transition: transform 8s linear;
}
.hero-slide.active .hero-bg { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 26, 58, .78) 0%,
    rgba(10, 26, 58, .45) 60%,
    rgba(10, 26, 58, .2) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 80px;
  max-width: 720px;
}

.hero-tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 18px;
  opacity: 0;
  animation: heroFadeUp .7s var(--ease) .3s forwards;
}
.hero-slide.active .hero-tag { animation: heroFadeUp .7s var(--ease) .3s forwards; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
  opacity: 0;
  animation: heroFadeUp .7s var(--ease) .5s forwards;
}
.hero-title em {
  font-style: italic;
  color: var(--sky-400);
}

.hero-desc {
  font-size: clamp(.95rem, 1.5vw, 1.15rem);
  color: rgba(255,255,255,.85);
  max-width: 540px;
  margin-bottom: 36px;
  opacity: 0;
  animation: heroFadeUp .7s var(--ease) .7s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  opacity: 0;
  animation: heroFadeUp .7s var(--ease) .9s forwards;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* Slider controls */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(6px);
  color: var(--white);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease);
}
.slider-btn:hover { background: rgba(255,255,255,.28); }
.slider-prev { left: 24px; }
.slider-next { right: 24px; }

.slider-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  transition: all var(--dur) var(--ease);
}
.dot.active {
  background: var(--white);
  width: 28px;
  border-radius: 4px;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 36px;
  right: 48px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.65);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero-scroll span {
  display: block;
  width: 1.5px;
  height: 36px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.65));
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
}

/* ============================================================
   TRUST STRIP
   ============================================================ */
.trust-strip {
  background: var(--blue-900);
  padding-block: 28px;
}
.trust-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 40px;
  text-align: center;
}
.trust-item strong {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-400);
  line-height: 1;
}
.trust-item span {
  font-size: .82rem;
  color: rgba(255,255,255,.65);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.trust-divider {
  width: 1px;
  height: 50px;
  background: rgba(255,255,255,.12);
}

/* ============================================================
   NOSOTROS
   ============================================================ */
.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.nosotros-image {
  position: relative;
}
.nosotros-image img {
  width: 100%;
  height: 520px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  background: var(--blue-100); /* fallback */
}
.nosotros-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--blue-500);
  color: var(--white);
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-blue);
}
.badge-year {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}
.badge-text {
  display: block;
  font-size: .78rem;
  opacity: .88;
  margin-top: 4px;
}

.nosotros-content .section-title { text-align: left; }
.nosotros-content p { color: var(--gray-600); margin-bottom: 20px; }

.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0 32px;
}
.mv-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: box-shadow var(--dur) var(--ease);
}
.mv-card:hover { box-shadow: var(--shadow-md); }
.mv-icon {
  color: var(--blue-500);
  margin-bottom: 10px;
}
.mv-card h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 8px;
}
.mv-card p { font-size: .87rem; color: var(--gray-500); margin: 0; }

/* ============================================================
   VALORES
   ============================================================ */
.valores-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.valor-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--dur) var(--ease);
}
.valor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.valor-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  margin-bottom: 16px;
}
.valor-icon--blue   { background: var(--blue-50);  color: var(--blue-500); }
.valor-icon--teal   { background: #f0fdfa;          color: var(--teal-500); }
.valor-icon--gold   { background: var(--gold-100);  color: var(--gold-500); }
.valor-icon--green  { background: #f0fdf4;          color: var(--green-500); }
.valor-icon--navy   { background: var(--blue-50);   color: var(--blue-700); }
.valor-icon--purple { background: #f5f3ff;          color: var(--purple-500); }

.valor-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 10px;
}
.valor-card p { font-size: .88rem; color: var(--gray-500); line-height: 1.6; }

/* ============================================================
   NIVELES EDUCATIVOS
   ============================================================ */
.niveles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: start;
}

.nivel-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--dur) var(--ease);
}
.nivel-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); }
.nivel-card--featured {
  border-color: var(--blue-300);
  box-shadow: var(--shadow-blue);
  transform: translateY(-12px);
}
.nivel-card--featured:hover { transform: translateY(-18px); }

.nivel-img { position: relative; overflow: hidden; }
.nivel-img img {
  width: 100%;
  height: 220px;
  transition: transform .5s var(--ease);
  background: var(--blue-100); /* fallback */
}
.nivel-card:hover .nivel-img img { transform: scale(1.05); }

.nivel-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  color: var(--blue-700);
  font-size: .78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
}
.nivel-badge--featured {
  background: var(--blue-500);
  color: var(--white);
}

.nivel-body { padding: 28px 24px 30px; }

.nivel-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.nivel-icon--warm { background: var(--gold-100); color: var(--gold-500); }
.nivel-icon--blue { background: var(--blue-50); color: var(--blue-500); }
.nivel-icon--dark { background: var(--blue-900); color: var(--white); }

.nivel-body h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 10px;
}
.nivel-body > p { font-size: .9rem; color: var(--gray-600); margin-bottom: 18px; }

.nivel-features {
  margin-bottom: 22px;
}
.nivel-features li {
  position: relative;
  padding-left: 18px;
  font-size: .87rem;
  color: var(--gray-600);
  margin-bottom: 7px;
}
.nivel-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  background: var(--blue-400);
  border-radius: 50%;
}
.nivel-card--featured .nivel-features li::before { background: var(--blue-500); }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  position: relative;
  padding-block: 90px;
  text-align: center;
  overflow: hidden;
}
.cta-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--blue-800);
}
.cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13, 31, 60, .88), rgba(30, 77, 140, .82));
}
.cta-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}
.cta-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--white);
  font-style: italic;
  margin-bottom: 16px;
  line-height: 1.3;
}
.cta-content p {
  color: rgba(255,255,255,.82);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

/* ============================================================
   SERVICIOS
   ============================================================ */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.servicio-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  transition: all var(--dur) var(--ease);
}
.servicio-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-200);
}
.servicio-icon {
  width: 60px;
  height: 60px;
  background: var(--blue-50);
  color: var(--blue-500);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: all var(--dur) var(--ease);
}
.servicio-card:hover .servicio-icon {
  background: var(--blue-500);
  color: var(--white);
}
.servicio-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 8px;
}
.servicio-card p { font-size: .87rem; color: var(--gray-500); line-height: 1.6; }

/* ============================================================
   INFRAESTRUCTURA
   ============================================================ */
.infra-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 20px;
}

.infra-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease);
}
.infra-card:hover { transform: scale(1.02); }
.infra-card--tall { grid-row: span 2; }

.infra-img {
  width: 100%;
  height: 100%;
  min-height: 200px;
}
.infra-card--tall .infra-img { min-height: 440px; }
.infra-img img {
  width: 100%;
  height: 100%;
  background: var(--blue-100);
  transition: transform .5s var(--ease);
}
.infra-card:hover .infra-img img { transform: scale(1.06); }

.infra-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(13,31,60,.88), transparent);
  color: var(--white);
  padding: 32px 18px 16px;
  font-size: .88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   ADMISIÓN
   ============================================================ */
.admision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.admision-content .section-title { text-align: left; }
.admision-content p { color: var(--gray-600); margin-bottom: 16px; }

.steps-list {
  margin: 28px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.step-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.step-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue-500);
  color: var(--white);
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-text { display: flex; flex-direction: column; gap: 2px; }
.step-text strong { font-size: .95rem; color: var(--blue-900); }
.step-text span { font-size: .87rem; color: var(--gray-500); }

.admision-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.admision-image img {
  width: 100%;
  height: 500px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  background: var(--blue-100);
}

/* ============================================================
   NOTICIAS
   ============================================================ */
.noticias-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.noticia-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--dur) var(--ease);
}
.noticia-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.noticia-img {
  position: relative;
  overflow: hidden;
}
.noticia-img img {
  width: 100%;
  height: 200px;
  background: var(--blue-100);
  transition: transform .5s var(--ease);
}
.noticia-card:hover .noticia-img img { transform: scale(1.06); }

.noticia-categoria {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--blue-500);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
}

.noticia-body { padding: 22px 22px 24px; }
.noticia-fecha { font-size: .78rem; color: var(--gray-400); }
.noticia-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue-900);
  margin: 8px 0 10px;
  line-height: 1.4;
}
.noticia-body p { font-size: .88rem; color: var(--gray-600); line-height: 1.6; margin-bottom: 14px; }
.noticia-link {
  font-size: .88rem;
  font-weight: 600;
  color: var(--blue-500);
  transition: color var(--dur) var(--ease);
}
.noticia-link:hover { color: var(--blue-700); }

/* ============================================================
   GALERÍA
   ============================================================ */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 220px);
  gap: 12px;
}

.galeria-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
}
.galeria-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }

.galeria-item img {
  width: 100%;
  height: 100%;
  background: var(--blue-100);
  transition: transform .5s var(--ease);
}
.galeria-item:hover img { transform: scale(1.08); }

.galeria-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,31,60,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.galeria-item:hover .galeria-overlay { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-content { max-width: 90vw; max-height: 88vh; }
.lightbox-content img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-md);
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: var(--white);
  font-size: 1.5rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.12);
  transition: background var(--dur) var(--ease);
}
.lightbox-close:hover { background: rgba(255,255,255,.22); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white);
  font-size: 1.4rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease);
}
.lightbox-nav:hover { background: rgba(255,255,255,.22); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ============================================================
   AULA VIRTUAL
   ============================================================ */
.aula-virtual-section {
  position: relative;
  padding-block: 110px;
  text-align: center;
}
.av-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--blue-700);
}
.av-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,31,60,.92), rgba(37,99,176,.82));
}
.av-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}
.av-icon-wrap {
  width: 88px;
  height: 88px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  margin-bottom: 24px;
  color: var(--white);
}
.av-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
}
.av-content p {
  color: rgba(255,255,255,.82);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 36px;
}
.av-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   CONTACTO
   ============================================================ */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  margin-bottom: 60px;
  align-items: start;
}

.contacto-info { display: flex; flex-direction: column; gap: 22px; }
.info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.info-icon {
  width: 42px;
  height: 42px;
  background: var(--blue-50);
  color: var(--blue-500);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.info-item > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.info-item strong { font-size: .88rem; font-weight: 700; color: var(--blue-900); }
.info-item span, .info-item a { font-size: .93rem; color: var(--gray-600); }
.info-item a:hover { color: var(--blue-500); }

.redes-sociales { margin-top: 8px; }
.redes-sociales > strong { display: block; font-size: .88rem; color: var(--blue-900); margin-bottom: 12px; }
.redes-links { display: flex; gap: 12px; flex-wrap: wrap; }
.red-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  transition: all var(--dur) var(--ease);
}
.red-fb { background: #f0f4ff; color: #1877f2; }
.red-fb:hover { background: #1877f2; color: var(--white); }
.red-ig { background: #fff0f6; color: #e1306c; }
.red-ig:hover { background: #e1306c; color: var(--white); }
.red-yt { background: #fff0f0; color: #ff0000; }
.red-yt:hover { background: #ff0000; color: var(--white); }

/* Formulario */
.contacto-form {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
}
.contacto-form h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--blue-900);
  margin-bottom: 24px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--gray-700); }
.form-group input,
.form-group textarea,
.form-group select {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(59,125,216,.12);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--gray-400); }

.form-msg {
  margin-top: 14px;
  font-size: .9rem;
  font-weight: 600;
  text-align: center;
  min-height: 22px;
}
.form-msg.success { color: var(--green-500); }
.form-msg.error   { color: var(--red-500); }

/* Mapa */
.mapa-wrapper {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.mapa-wrapper iframe {
  width: 100%;
  height: 380px;
  display: block;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--gray-900); color: var(--white); }

.footer-top { padding-block: 70px 50px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.footer-logo-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
}
.footer-logo-sub {
  display: block;
  font-size: .65rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.footer-desc {
  font-size: .9rem;
  color: rgba(255,255,255,.6);
  line-height: 1.65;
  margin-bottom: 10px;
}
.footer-desc.small { font-size: .82rem; }

.footer-col h4 {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: 18px;
}
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  font-size: .9rem;
  color: rgba(255,255,255,.65);
  transition: color var(--dur) var(--ease);
}
.footer-links a:hover { color: var(--white); }

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: .88rem;
  color: rgba(255,255,255,.65);
}
.footer-contact li svg { flex-shrink: 0; margin-top: 2px; color: rgba(255,255,255,.4); }

.footer-redes {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.footer-red {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.65);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur) var(--ease);
}
.footer-red:hover { background: var(--blue-500); color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-block: 22px;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: .82rem; color: rgba(255,255,255,.4); }
.footer-legal { display: flex; align-items: center; gap: 10px; }
.footer-legal a {
  font-size: .82rem;
  color: rgba(255,255,255,.4);
  transition: color var(--dur) var(--ease);
}
.footer-legal a:hover { color: rgba(255,255,255,.8); }
.footer-legal span { color: rgba(255,255,255,.2); }

/* ============================================================
   MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.modal.open { opacity: 1; pointer-events: all; }
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
}
.modal-box {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  max-width: 560px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  max-height: 80vh;
  overflow-y: auto;
}
.modal-box h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--blue-900);
  margin-bottom: 18px;
}
.modal-box p {
  font-size: .9rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 14px;
}
.modal-box a { color: var(--blue-500); }
.modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 1.1rem;
  color: var(--gray-400);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  transition: background var(--dur) var(--ease);
}
.modal-close:hover { background: var(--gray-200); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablets grandes → laptops pequeñas */
@media (max-width: 1100px) {
  .servicios-grid { grid-template-columns: repeat(2, 1fr); }
  .valores-grid   { grid-template-columns: repeat(2, 1fr); }
  .footer-grid    { grid-template-columns: 1fr 1fr; }
}

/* Tablets */
@media (max-width: 900px) {
  :root { --section-py: 70px; }

  .hamburger { display: flex; }

  /* Menú móvil */
  .nav {
    position: fixed;
    top: 0; right: -100%;
    width: min(380px, 90vw);
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 28px 32px;
    box-shadow: -8px 0 40px rgba(0,0,0,.15);
    transition: right .35s var(--ease);
    z-index: 99;
    gap: 0;
    overflow-y: auto;
  }
  .nav.open { right: 0; }
  .nav-list { flex-direction: column; align-items: flex-start; width: 100%; gap: 4px; }
  .nav-link {
    color: var(--gray-700);
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
  }
  .nav-link:hover { color: var(--blue-600); background: var(--blue-50); }
  .nav-cta { width: 100%; justify-content: center; margin: 16px 0 0; }

  .nosotros-grid  { grid-template-columns: 1fr; gap: 48px; }
  .nosotros-image img { height: 320px; }
  .nosotros-badge { bottom: -12px; right: -8px; }
  .nosotros-content .section-title { text-align: center; }

  .mv-grid { grid-template-columns: 1fr; }

  .niveles-grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .nivel-card--featured { transform: none; }
  .nivel-card--featured:hover { transform: translateY(-8px); }

  .noticias-grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }

  .admision-grid { grid-template-columns: 1fr; gap: 48px; }
  .admision-content .section-title { text-align: center; }
  .admision-actions { justify-content: center; }

  .contacto-grid { grid-template-columns: 1fr; gap: 40px; }

  .galeria-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }
  .galeria-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .galeria-item { height: 180px; }

  .infra-grid { grid-template-columns: 1fr 1fr; }
  .infra-card--tall { grid-row: span 1; }
  .infra-card--tall .infra-img { min-height: 220px; }

  .trust-inner { gap: 0; }
  .trust-divider { display: none; }
  .trust-item { padding: 14px 20px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-scroll { display: none; }
}

/* Móviles */
@media (max-width: 600px) {
  :root { --section-py: 56px; }

  .container { padding-inline: 16px; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .valores-grid { grid-template-columns: 1fr; }
  .servicios-grid { grid-template-columns: 1fr; }

  .infra-grid { grid-template-columns: 1fr; }

  .galeria-grid { grid-template-columns: 1fr 1fr; }
  .galeria-item { height: 140px; }
  .galeria-item:nth-child(1) { grid-column: span 2; height: 200px; }

  .form-row { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }

  .trust-inner { flex-direction: column; }
  .trust-item { padding: 12px 0; width: 100%; }

  .mv-grid { grid-template-columns: 1fr; }

  .av-actions { flex-direction: column; align-items: center; }

  .slider-btn { display: none; }

  .whatsapp-float span { display: none; }
  .whatsapp-float { padding: 14px; }

  .modal-box { padding: 28px 20px; }

  .contacto-form { padding: 24px 18px; }
}
