/* ==========================================================================
   1. VARIABLES
   ========================================================================== */
:root {
  --primary: #87CEEB;
  --primary-dark: #1E5A7A;
  --secondary: #F4C542;
  --green: #5FAF6B;
  --white: #FFFFFF;
  --dark: #183642;
  --gray: #667781;

  --primary-light: #E4F5FC;
  --dark-alt: #12262E;
  --red-accent: #D64545;

  --font-display: 'Poppins', sans-serif;
  --font-body: 'Nunito Sans', sans-serif;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 4px 16px rgba(24, 54, 66, 0.08);
  --shadow-md: 0 12px 32px rgba(24, 54, 66, 0.12);
  --shadow-lg: 0 20px 50px rgba(24, 54, 66, 0.18);
  --transition: 0.3s ease;
  --container-w: 1220px;
}

/* ==========================================================================
   2. RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid var(--secondary); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ==========================================================================
   3. TIPOGRAFÍA
   ========================================================================== */
body {
  font-family: var(--font-body);
  color: var(--dark);
  line-height: 1.65;
  background: var(--white);
  font-size: 16px;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--primary-dark); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { color: var(--gray); }

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

.tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 50px;
  margin-bottom: 14px;
}
.tag-light { background: rgba(255,255,255,0.15); color: var(--white); }
.tag-enlaces { background: rgba(214,69,69,0.1); color: var(--red-accent); }

.section-head { max-width: 640px; margin: 0 auto 46px; text-align: center; }
.section-head.light h2 { color: var(--white); }
.section-sub { font-size: 1.02rem; margin-top: 8px; }

section { padding: 96px 0; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--primary-dark); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--dark); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--secondary); color: var(--dark); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: #e0b530; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-outline-light { border: 2px solid rgba(255,255,255,0.7); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--primary-dark); transform: translateY(-3px); }
.btn-full { width: 100%; justify-content: center; }
.btn-header { margin-left: 20px; }

.link-arrow { color: var(--primary-dark); font-weight: 700; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 6px; transition: var(--transition); }
.link-arrow i { transition: var(--transition); }
.link-arrow:hover i { transform: translateX(4px); }

.center-btn { text-align: center; margin-top: 44px; }

/* ==========================================================================
   VENTANA DE PUBLICIDAD EXTERIOR (pop-up promocional)
   ========================================================================== */
.promo-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(12,26,32,0.72);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.promo-overlay.active { display: flex; }

.promo-modal {
  position: relative;
  display: flex;
  width: 100%; max-width: 760px;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: promo-in 0.4s ease;
}
@keyframes promo-in { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.promo-modal-image { display: block; max-width: 640px; }
.promo-image-link { display: block; line-height: 0; }
.promo-image { width: 100%; height: auto; display: block; transition: transform 0.4s ease; }
.promo-image-link:hover .promo-image { transform: scale(1.015); }

.promo-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.85); color: var(--dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; transition: var(--transition);
}
.promo-close:hover { background: var(--secondary); }

@media (max-width: 640px) {
  .promo-modal-image { max-width: 100%; }
}

/* ==========================================================================
   4. HEADER (topbar + header)
   ========================================================================== */
.topbar { background: var(--primary-dark); color: rgba(255,255,255,0.9); font-size: 0.82rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 9px 24px; flex-wrap: wrap; gap: 8px; }
.topbar-info { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-info li { display: flex; align-items: center; gap: 6px; }
.topbar-social { display: flex; gap: 14px; }
.topbar-social a { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.12); border-radius: 50%; transition: var(--transition); }
.topbar-social a:hover { background: var(--secondary); color: var(--dark); }

.header { position: sticky; top: 0; z-index: 500; background: var(--white); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo { width: 52px; height: 52px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--font-display); color: var(--primary-dark); font-size: 1.02rem; }
.brand-text small { color: var(--gray); font-size: 0.76rem; letter-spacing: 0.03em; }

/* ==========================================================================
   5. NAVEGACIÓN
   ========================================================================== */
.nav-list { display: flex; gap: 22px; flex-wrap: wrap; }
.nav-link { font-weight: 600; font-size: 0.9rem; color: var(--dark); position: relative; padding: 6px 0; transition: var(--transition); }
.nav-link::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--secondary); transition: var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--primary-dark); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.hamburger { display: none; flex-direction: column; gap: 5px; width: 34px; }
.hamburger span { height: 3px; background: var(--primary-dark); border-radius: 3px; transition: var(--transition); }
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ==========================================================================
   6. HERO SLIDER
   ========================================================================== */
.hero-slider { position: relative; height: 80vh; min-height: 520px; overflow: hidden; }
.hero-slides { position: relative; width: 100%; height: 100%; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; visibility: hidden;
  transition: opacity 1s ease;
  display: flex; align-items: center;
}
.hero-slide.active { opacity: 1; visibility: visible; z-index: 2; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(24,54,66,0.82) 10%, rgba(24,54,66,0.35) 75%); }
.hero-content { position: relative; z-index: 3; max-width: 640px; color: var(--white); }
.hero-content .eyebrow { display: inline-block; background: rgba(244,197,66,0.18); border: 1px solid var(--secondary); color: var(--secondary); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; padding: 6px 16px; border-radius: 50px; margin-bottom: 18px; }
.hero-content h1 { color: var(--white); margin-bottom: 18px; }
.hero-content p { color: rgba(255,255,255,0.88); font-size: 1.08rem; margin-bottom: 30px; max-width: 520px; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.18); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: var(--transition); backdrop-filter: blur(4px); }
.hero-arrow:hover { background: var(--secondary); color: var(--dark); }
.hero-prev { left: 24px; } .hero-next { right: 24px; }

.hero-dots { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 10px; }
.hero-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); transition: var(--transition); cursor: pointer; }
.hero-dots .dot.active { background: var(--secondary); width: 30px; border-radius: 6px; }

/* reveal animations */
.reveal, .reveal-left, .reveal-right { opacity: 0; transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal { transform: translateY(30px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal.in-view, .reveal-left.in-view, .reveal-right.in-view { opacity: 1; transform: translate(0,0); }
.hero-content .reveal { transform: translateY(20px); }

/* ==========================================================================
   8. BIENVENIDA
   ========================================================================== */
.welcome { background: var(--white); }
.welcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.welcome-media { position: relative; }
.welcome-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4/3.2; object-fit: cover; }
.badge-float { position: absolute; bottom: -18px; left: -18px; background: var(--white); color: var(--primary-dark); font-weight: 700; font-size: 0.85rem; padding: 14px 22px; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); border-left: 4px solid var(--secondary); }
.welcome-text p { margin: 18px 0 26px; font-size: 1.02rem; }

/* ==========================================================================
   9. ESTADÍSTICAS
   ========================================================================== */
.stats { background: var(--primary-dark); padding: 64px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.stat-item p { color: rgba(255,255,255,0.8); font-weight: 600; margin-top: 6px; text-transform: uppercase; font-size: 0.82rem; letter-spacing: 0.06em; }
.stat-number { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; color: var(--secondary); }
.stat-plus { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--secondary); }

/* ==========================================================================
   10. PROPUESTA EDUCATIVA
   ========================================================================== */
.propuesta { background: var(--primary-light); }

/* ==========================================================================
   11. SLIDER 2 (educación)
   ========================================================================== */
.edu-slider-wrap, .act-slider-wrap { position: relative; }
.edu-slider, .act-slider { overflow: hidden; }
.edu-track, .act-track { display: flex; transition: transform 0.5s ease; }
.edu-card, .act-card {
  flex: 0 0 calc(33.333% - 20px);
  margin-right: 20px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 36px 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.edu-card:hover, .act-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.edu-icon, .act-icon { width: 58px; height: 58px; border-radius: 16px; background: var(--primary-light); color: var(--primary-dark); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 20px; transition: var(--transition); }
.edu-card:hover .edu-icon, .act-card:hover .act-icon { background: var(--secondary); color: var(--dark); transform: rotate(-6deg) scale(1.05); }
.edu-card h3, .act-card h3 { margin-bottom: 10px; }
.edu-card p, .act-card p { font-size: 0.94rem; }

.edu-arrow, .act-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-md); color: var(--primary-dark); display: flex; align-items: center; justify-content: center; z-index: 4; transition: var(--transition); }
.edu-arrow:hover, .act-arrow:hover { background: var(--primary-dark); color: var(--white); }
.edu-prev, .act-prev { left: -20px; } .edu-next, .act-next { right: -20px; }
.edu-dots, .act-dots { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.edu-dots .dot, .act-dots .dot { width: 9px; height: 9px; border-radius: 50%; background: #cfd8dc; cursor: pointer; transition: var(--transition); }
.edu-dots .dot.active, .act-dots .dot.active { background: var(--primary-dark); width: 24px; border-radius: 5px; }

/* ==========================================================================
   12. GRADOS
   ========================================================================== */
.grados { background: var(--white); }
.grados-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grado-card { background: var(--white); border: 1px solid #eef1f2; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); padding-bottom: 24px; }
.grado-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.grado-img { height: 160px; background-size: cover; background-position: center; position: relative; }
.grado-num { position: absolute; bottom: -22px; right: 22px; width: 56px; height: 56px; background: var(--secondary); color: var(--dark); font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); border: 4px solid var(--white); }
.grado-card h3 { padding: 30px 24px 6px; }
.grado-card p { padding: 0 24px; margin-bottom: 14px; font-size: 0.92rem; }
.grado-card .link-arrow { margin: 0 24px; }

/* ==========================================================================
   13. ÁREAS
   ========================================================================== */
.areas { background: var(--primary-dark); }
.areas-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.area-item { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-md); padding: 30px 16px; text-align: center; transition: var(--transition); }
.area-item:hover { background: var(--secondary); }
.area-item:hover i, .area-item:hover span { color: var(--dark); }
.area-item i { font-size: 1.7rem; color: var(--secondary); display: block; margin-bottom: 12px; transition: var(--transition); }
.area-item span { color: var(--white); font-weight: 700; font-size: 0.9rem; }

/* ==========================================================================
   14. DOCENTES
   ========================================================================== */
.docentes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.docente-card { text-align: center; background: var(--primary-light); border-radius: var(--radius-md); padding: 30px 20px; transition: var(--transition); }
.docente-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.docente-card img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; border: 4px solid var(--white); box-shadow: var(--shadow-sm); }
.docente-card .cargo { display: block; color: var(--primary-dark); font-weight: 700; font-size: 0.88rem; margin-top: 4px; }
.docente-card .especialidad { display: block; color: var(--green); font-size: 0.78rem; font-weight: 700; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.03em; }
.docente-card p { font-size: 0.86rem; margin-top: 10px; }

/* ==========================================================================
   15. INFRAESTRUCTURA
   ========================================================================== */
.infra { background: var(--white); }
.infra-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; gap: 18px; }
.infra-item { position: relative; overflow: hidden; border-radius: var(--radius-md); cursor: pointer; }
.infra-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.infra-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.infra-item span { position: absolute; left: 16px; bottom: 14px; color: var(--white); font-weight: 700; z-index: 2; }
.infra-item::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(24,54,66,0.75), transparent 55%); }
.infra-item:hover img { transform: scale(1.08); }

/* ==========================================================================
   16. SLIDER 3 - ACTIVIDADES
   ========================================================================== */
.actividades { background: var(--primary-light); }

/* ==========================================================================
   17. NOTICIAS
   ========================================================================== */
.noticias-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.noticia-card { background: var(--white); border: 1px solid #eef1f2; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); }
.noticia-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.noticia-img { height: 170px; background-size: cover; background-position: center; position: relative; }
.noticia-cat { position: absolute; top: 14px; left: 14px; background: var(--secondary); color: var(--dark); font-size: 0.72rem; font-weight: 800; padding: 5px 12px; border-radius: 50px; text-transform: uppercase; }
.noticia-body { padding: 22px; }
.noticia-fecha { font-size: 0.78rem; color: var(--gray); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.noticia-body h3 { margin-bottom: 8px; }
.noticia-body p { font-size: 0.9rem; margin-bottom: 14px; }

/* ==========================================================================
   18. GALERÍA
   ========================================================================== */
.galeria-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 40px; }
.filter-btn { padding: 10px 22px; border-radius: 50px; border: 1.5px solid #dfe6e9; font-weight: 700; font-size: 0.86rem; color: var(--gray); transition: var(--transition); }
.filter-btn:hover { border-color: var(--primary-dark); color: var(--primary-dark); }
.filter-btn.active { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }

.galeria-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gal-item { border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; aspect-ratio: 1/1; transition: var(--transition); }
.gal-item.hide { display: none; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gal-item:hover img { transform: scale(1.12); }

/* Lightbox (galería + infraestructura) */
.lightbox { position: fixed; inset: 0; background: rgba(12,26,32,0.94); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 40px; }
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox-close { position: absolute; top: 26px; right: 30px; color: var(--white); font-size: 1.6rem; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; }
.lightbox-close:hover { background: var(--secondary); color: var(--dark); }
.lightbox-arrow { color: var(--white); font-size: 1.3rem; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; }
.lightbox-arrow:hover { background: var(--secondary); color: var(--dark); }
.lightbox-prev { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   19. TESTIMONIOS
   ========================================================================== */
.testimonios { background: var(--white); }
.testimonios-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.testimonio-card { background: var(--primary-light); border-radius: var(--radius-md); padding: 34px 26px; text-align: center; position: relative; transition: var(--transition); }
.testimonio-card:hover { transform: translateY(-6px); }
.stars { color: var(--secondary); letter-spacing: 3px; margin-bottom: 16px; }
.testimonio-card img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; border: 3px solid var(--white); }
.testimonio-card h4 { font-size: 1rem; }
.testimonio-card span { color: var(--green); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; }
.testimonio-card p { margin-top: 14px; font-style: italic; font-size: 0.92rem; }

/* ==========================================================================
   20. MATRÍCULA
   ========================================================================== */
.matricula-cta { background: linear-gradient(120deg, var(--primary-dark), #24728f); padding: 80px 0; }
.matricula-cta-inner { max-width: 700px; margin: 0 auto; text-align: center; }
.matricula-cta-inner h2 { color: var(--white); }
.matricula-cta-inner p { color: rgba(255,255,255,0.85); margin: 16px 0 30px; }
.matricula-cta-inner .hero-btns { justify-content: center; }

.matricula { background: var(--white); }
.matricula-grid { display: grid; grid-template-columns: 0.9fr 1.3fr; gap: 60px; align-items: start; }
.req-list { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.req-list li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--dark); font-size: 0.94rem; }
.req-list i { color: var(--green); font-size: 1.1rem; }

/* ==========================================================================
   21. FORMULARIOS
   ========================================================================== */
.matricula-form, .contacto-form { background: var(--primary-light); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-sm); }
.matricula-form h3 { margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; position: relative; }
.form-group label { display: block; font-weight: 700; font-size: 0.86rem; margin-bottom: 6px; color: var(--dark); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); border: 1.5px solid #dfe6e9; background: var(--white); transition: var(--transition); font-size: 0.94rem;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary-dark); }
.form-group textarea { resize: vertical; }
.error-msg { display: none; color: var(--red-accent); font-size: 0.78rem; margin-top: 5px; font-weight: 600; }
.form-group.invalid input, .form-group.invalid select, .form-group.invalid textarea { border-color: var(--red-accent); }
.form-group.invalid .error-msg { display: block; }
.form-success { display: none; background: rgba(95,175,107,0.12); color: #2f7a3f; font-weight: 700; padding: 14px 18px; border-radius: var(--radius-sm); margin-top: 16px; text-align: center; font-size: 0.9rem; }
.form-success.show { display: block; }

/* ==========================================================================
   22. CONTACTO
   ========================================================================== */
.contacto { background: var(--primary-light); }
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.contacto-item { display: flex; gap: 16px; margin-bottom: 22px; }
.contacto-item i { width: 46px; height: 46px; background: var(--white); color: var(--primary-dark); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--shadow-sm); }
.contacto-item h4 { font-size: 0.94rem; }
.contacto-item p { font-size: 0.9rem; }
.mapa { border-radius: var(--radius-md); overflow: hidden; margin-top: 10px; box-shadow: var(--shadow-sm); }
.contacto-form { background: var(--white); }

/* ==========================================================================
   23. WHATSAPP
   ========================================================================== */
.whatsapp-float {
  position: fixed; bottom: 26px; left: 26px; z-index: 900;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25D366; color: var(--white); font-size: 1.7rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.5);
  animation: wa-pulse 2.4s infinite;
}
.whatsapp-float:hover { transform: scale(1.08); }
@keyframes wa-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); } 50% { box-shadow: 0 0 0 14px rgba(37,211,102,0); } }

/* ==========================================================================
   24. FOOTER
   ========================================================================== */
.footer { background: var(--dark-alt); color: rgba(255,255,255,0.7); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding: 70px 24px 40px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { width: 46px; height: 46px; object-fit: contain; }
.footer-brand div { color: var(--white); font-family: var(--font-display); line-height: 1.3; }
.footer-col h4 { color: var(--white); font-size: 1rem; margin-bottom: 18px; }
.footer-col ul li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--secondary); }
.footer-contact li { display: flex; align-items: center; gap: 8px; }
.footer-social { display: flex; gap: 12px; margin-top: 18px; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.footer-social a:hover { background: var(--secondary); color: var(--dark); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.82rem; }

/* ==========================================================================
   ENLACES OFICIALES
   ========================================================================== */
.enlaces { background: var(--white); }
.enlaces-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.enlace-card { background: var(--white); border: 1px solid #eef1f2; border-radius: var(--radius-md); padding: 34px 28px; box-shadow: var(--shadow-sm); transition: var(--transition); display: flex; flex-direction: column; align-items: flex-start; }
.enlace-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--red-accent); }
.enlace-icon { width: 56px; height: 56px; border-radius: 16px; background: rgba(214,69,69,0.08); color: var(--red-accent); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 18px; transition: var(--transition); }
.enlace-card:hover .enlace-icon { background: var(--red-accent); color: var(--white); transform: scale(1.08); }
.enlace-card h3 { font-size: 1.02rem; margin-bottom: 8px; }
.enlace-card p { font-size: 0.88rem; margin-bottom: 20px; }
.btn-enlace { margin-top: auto; background: var(--primary-dark); color: var(--white); padding: 11px 22px; border-radius: 50px; font-weight: 700; font-size: 0.84rem; transition: var(--transition); }
.enlace-card:hover .btn-enlace { background: var(--red-accent); }

/* ==========================================================================
   25. ANIMACIONES (contador, back-to-top)
   ========================================================================== */
.back-to-top {
  position: fixed; bottom: 26px; right: 26px; z-index: 900;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--primary-dark); color: var(--white); font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: var(--transition);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--dark); }

/* ==========================================================================
   26. RESPONSIVE
   ========================================================================== */
@media (max-width: 1200px) {
  .docentes-grid { grid-template-columns: repeat(2, 1fr); }
  .edu-card, .act-card { flex: 0 0 calc(50% - 20px); }
}

@media (max-width: 992px) {
  .nav { position: fixed; top: 0; right: -100%; width: 78%; max-width: 340px; height: 100vh; background: var(--white); box-shadow: -8px 0 30px rgba(0,0,0,0.15); transition: right 0.35s ease; z-index: 600; padding: 100px 30px 30px; overflow-y: auto; }
  .nav.active { right: 0; }
  .nav-list { flex-direction: column; gap: 4px; }
  .nav-list li { border-bottom: 1px solid #f0f2f3; }
  .nav-link { display: block; padding: 14px 0; }
  .btn-header { display: none; }
  .hamburger { display: flex; }

  .welcome-grid, .matricula-grid, .contacto-grid { grid-template-columns: 1fr; gap: 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 34px; }
  .grados-grid, .noticias-grid, .testimonios-grid, .enlaces-grid { grid-template-columns: repeat(2, 1fr); }
  .areas-grid { grid-template-columns: repeat(3, 1fr); }
  .galeria-grid { grid-template-columns: repeat(3, 1fr); }
  .infra-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 160px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  section { padding: 68px 0; }
  .topbar-info li:nth-child(3), .topbar-info li:nth-child(4) { display: none; }
  .hero-slider { height: 88vh; }
  .hero-content p { font-size: 0.98rem; }
  .docentes-grid { grid-template-columns: 1fr; }
  .grados-grid, .noticias-grid, .testimonios-grid, .enlaces-grid { grid-template-columns: 1fr; }
  .areas-grid { grid-template-columns: repeat(2, 1fr); }
  .galeria-grid { grid-template-columns: repeat(2, 1fr); }
  .infra-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .infra-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .edu-card, .act-card { flex: 0 0 100%; margin-right: 0; }
  .edu-prev, .act-prev { left: 4px; } .edu-next, .act-next { right: 4px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 576px) {
  .container { padding: 0 18px; }
  .hero-btns, .matricula-cta-inner .hero-btns { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; padding: 50px 20px 30px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .areas-grid, .galeria-grid { grid-template-columns: 1fr 1fr; }
  .whatsapp-float { width: 52px; height: 52px; font-size: 1.4rem; left: 18px; bottom: 18px; }
  .back-to-top { width: 44px; height: 44px; right: 18px; bottom: 18px; }
  .matricula-form, .contacto-form { padding: 26px; }
}
