/* Escuela Especial Aprender a Crecer — estilos del sitio */

:root {
  --azul: #1d3461;
  --azul-claro: #2c4c86;
  --amarillo: #f2a516;
  --amarillo-suave: #fff3d6;
  --rosa: #d2397a;
  --turquesa: #3c9fa5;
  --fondo: #fbf8f2;
  --superficie: #ffffff;
  --texto: #1f2433;
  --texto-suave: #5a6070;
  --borde: #e7e1d6;
  --radio: 16px;
  --sombra: 0 1px 2px rgba(29, 52, 97, .06), 0 6px 20px rgba(29, 52, 97, .08);
  --ancho: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--texto);
  background: var(--fondo);
}

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

a { color: var(--azul-claro); text-underline-offset: 3px; }
a:hover { color: var(--rosa); }

h1, h2, h3 { line-height: 1.2; color: var(--azul); margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 20px; }
.angosto { max-width: 780px; }

.saltar {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--amarillo); color: var(--azul); padding: 8px 14px; border-radius: 8px; font-weight: 700;
}
.saltar:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; }

/* ---------- Cabecera ---------- */

.cabecera {
  position: sticky; top: 0; z-index: 50;
  background: var(--azul);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}
.cabecera__barra { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; }
.marca img { height: 50px; width: auto; }

.menu-boton {
  display: none;
  background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .35);
  border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer;
}

.menu > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.menu a, .menu .submenu > button {
  display: block; color: #fff; text-decoration: none; font: inherit; font-weight: 700; font-size: .98rem;
  padding: 10px 14px; border-radius: 10px; background: none; border: 0; cursor: pointer;
}
.menu a:hover, .menu .submenu > button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.menu a[aria-current="page"] { color: var(--amarillo); }
.menu .boton-menu { background: var(--amarillo); color: var(--azul); margin-left: 6px; }
.menu .boton-menu:hover { background: #ffbb3a; color: var(--azul); }

.submenu { position: relative; }
.submenu > button::after { content: ""; display: inline-block; margin-left: 7px; border: 5px solid transparent; border-top-color: currentColor; transform: translateY(3px); }
.submenu ul {
  list-style: none; margin: 0; padding: 8px; position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px;
  background: var(--superficie); border-radius: 14px; box-shadow: var(--sombra);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .15s ease;
}
.submenu ul a { color: var(--texto); font-weight: 600; }
.submenu ul a:hover { background: var(--amarillo-suave); color: var(--azul); }
.submenu ul a[aria-current="page"] { color: var(--rosa); }
.submenu.abierto ul { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 981px) {
  .submenu:hover ul { opacity: 1; visibility: visible; transform: none; }
}

@media (max-width: 980px) {
  .menu-boton { display: block; }
  .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--azul); padding: 8px 20px 20px; max-height: calc(100vh - 76px); overflow-y: auto; }
  .menu.abierto { display: block; }
  .menu > ul { flex-direction: column; align-items: stretch; }
  .menu .submenu > button { width: 100%; text-align: left; }
  .submenu ul { position: static; opacity: 1; visibility: visible; transform: none; display: none; background: rgba(255, 255, 255, .06); box-shadow: none; }
  .submenu.abierto ul { display: block; }
  .submenu ul a { color: #fff; }
  .submenu ul a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .menu .boton-menu { margin: 8px 0 0; text-align: center; }
}

/* ---------- Portada de página ---------- */

.portada {
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-claro) 100%);
  color: #fff; padding: 56px 0 64px; position: relative; overflow: hidden;
}
.portada::after {
  content: ""; position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%;
  background: var(--amarillo); opacity: .16;
}
.portada h1 { color: #fff; margin: 0; max-width: 900px; }
.portada .bajada { font-size: 1.15rem; opacity: .9; margin: 14px 0 0; max-width: 760px; }
.portada .seccion { color: var(--amarillo); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin: 0 0 10px; }
.portada .fecha { display: inline-block; background: rgba(255, 255, 255, .14); padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .9rem; margin-bottom: 14px; }

/* ---------- Secciones ---------- */

.bloque { padding: 64px 0; }
.bloque--blanco { background: var(--superficie); }
.bloque--suave { background: var(--amarillo-suave); }
.titulo-bloque { text-align: center; margin-bottom: 36px; }
.titulo-bloque p { color: var(--texto-suave); max-width: 640px; margin: 0 auto; }
.antetitulo { color: var(--rosa); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin: 0 0 6px; }

.texto { max-width: 780px; margin: 0 auto; }
.texto ul { padding-left: 1.3em; }
.texto li { margin-bottom: .45em; }
.texto li::marker { color: var(--amarillo); }
.texto h2 { margin-top: 1.4em; }

.dos-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.dos-columnas + .dos-columnas { margin-top: 64px; }
@media (max-width: 860px) { .dos-columnas { grid-template-columns: 1fr; gap: 28px; } }

.foto-redonda { border-radius: var(--radio); box-shadow: var(--sombra); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.video-marco { border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); background: #000; }
.video-marco video { width: 100%; aspect-ratio: 16 / 9; }

.cita {
  border-left: 5px solid var(--amarillo); background: var(--superficie); padding: 18px 22px; border-radius: 0 12px 12px 0;
  font-style: italic; color: var(--texto-suave); margin: 20px 0;
}
.cita footer { font-style: normal; font-weight: 700; color: var(--azul); margin-top: 8px; }

/* ---------- Botones ---------- */

.botones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.boton {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800;
  padding: 13px 24px; border-radius: 999px; background: var(--amarillo); color: var(--azul);
  border: 2px solid var(--amarillo); transition: transform .15s ease, background .15s ease; cursor: pointer; font-family: inherit; font-size: 1rem;
}
.boton:hover { background: #ffbb3a; color: var(--azul); transform: translateY(-2px); }
.boton--borde { background: transparent; color: inherit; border-color: currentColor; }
.boton--borde:hover { background: rgba(255, 255, 255, .12); color: inherit; }
.boton--azul { background: var(--azul); border-color: var(--azul); color: #fff; }
.boton--azul:hover { background: var(--azul-claro); color: #fff; }

/* ---------- Inicio ---------- */

.heroe {
  position: relative; color: #fff; min-height: min(78vh, 640px); display: flex; align-items: center;
  background: var(--azul) center / cover no-repeat;
}
.heroe::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 36, 70, .92) 0%, rgba(20, 36, 70, .65) 55%, rgba(20, 36, 70, .25) 100%); }
.heroe .contenedor { position: relative; padding-top: 60px; padding-bottom: 60px; }
.heroe h1 { color: #fff; font-size: clamp(2.2rem, 5.5vw, 3.8rem); max-width: 720px; }
.heroe h1 span { color: var(--amarillo); }
.heroe p { font-size: 1.2rem; max-width: 560px; opacity: .95; }
.heroe .antetitulo { color: var(--amarillo); }

.ofertas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .ofertas { grid-template-columns: 1fr; } }
.oferta { background: var(--superficie); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); display: flex; flex-direction: column; }
.oferta img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.oferta div { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.oferta p { color: var(--texto-suave); flex: 1; }
.oferta a { font-weight: 800; text-decoration: none; }

.niveles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 760px) { .niveles { grid-template-columns: 1fr; } }
.nivel { background: var(--superficie); border-radius: var(--radio); padding: 26px 28px; box-shadow: var(--sombra); border-top: 5px solid var(--amarillo); }
.nivel:nth-child(2) { border-top-color: var(--rosa); }
.nivel:nth-child(3) { border-top-color: var(--turquesa); }
.nivel:nth-child(4) { border-top-color: var(--azul-claro); }
.nivel p:last-child { margin-bottom: 0; }

.logos { background: var(--azul); padding: 36px 0; }
.logos ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 36px; }
.logos img { height: 64px; width: auto; opacity: .9; }

/* ---------- Tarjetas de noticias ---------- */

.notas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 960px) { .notas { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .notas { grid-template-columns: 1fr; } }

.nota {
  background: var(--superficie); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra);
  display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.nota:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(29, 52, 97, .08), 0 14px 30px rgba(29, 52, 97, .14); }
.nota__media { display: block; position: relative; aspect-ratio: 4 / 3; background: #e9e4da; overflow: hidden; border: 0; padding: 0; width: 100%; cursor: pointer; }
.nota__media img, .nota__media video { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.nota:hover .nota__media img { transform: scale(1.04); }
.nota__cuerpo { padding: 18px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.nota time { font-size: .85rem; font-weight: 800; color: var(--rosa); text-transform: uppercase; letter-spacing: .04em; }
.nota h3 { font-size: 1.1rem; margin: 6px 0 8px; overflow-wrap: anywhere; }
.nota h3 a { color: var(--azul); text-decoration: none; }
.nota h3 a:hover { color: var(--rosa); }
.nota p { color: var(--texto-suave); font-size: .97rem; }
.nota__mas { margin-top: auto; font-weight: 800; text-decoration: none; }
.nota__mas::after { content: " →"; }

.anios { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.anios a { text-decoration: none; font-weight: 800; padding: 8px 18px; border-radius: 999px; background: var(--superficie); color: var(--azul); box-shadow: var(--sombra); }
.anios a:hover { background: var(--amarillo); color: var(--azul); }
.anio { scroll-margin-top: 96px; }
.anio + .anio { margin-top: 56px; }
.anio > h2 { display: flex; align-items: center; gap: 16px; }
.anio > h2::after { content: ""; flex: 1; height: 3px; background: var(--borde); border-radius: 3px; }

/* ---------- Galería (todas las fotos del mismo tamaño) ---------- */

.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
@media (max-width: 520px) { .galeria { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.galeria figure { margin: 0; }
.galeria .cuadro {
  display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 12px; overflow: hidden;
  background: #e9e4da; cursor: zoom-in; box-shadow: var(--sombra);
}
.galeria .cuadro img, .galeria video { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.galeria .cuadro:hover img { transform: scale(1.05); }
.galeria .cuadro--video { cursor: default; background: #000; }
.galeria figcaption { font-size: .92rem; color: var(--texto-suave); padding: 8px 4px 0; font-weight: 600; }

.navegacion-galeria { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 28px; border-top: 2px solid var(--borde); }
.navegacion-galeria a { text-decoration: none; font-weight: 800; max-width: 46%; }
.navegacion-galeria small { display: block; color: var(--texto-suave); font-weight: 600; }
@media (max-width: 600px) { .navegacion-galeria a { max-width: 100%; } }

/* ---------- Visor de fotos ---------- */

.visor { position: fixed; inset: 0; z-index: 200; background: rgba(10, 16, 30, .94); display: none; align-items: center; justify-content: center; }
.visor.abierto { display: flex; }
.visor img { max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: 6px; }
.visor p { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #fff; margin: 0; padding: 0 70px; font-weight: 600; }
.visor button {
  position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%;
  font-size: 1.6rem; cursor: pointer; display: grid; place-items: center;
}
.visor button:hover { background: rgba(255, 255, 255, .25); }
.visor .cerrar { top: 16px; right: 16px; }
.visor .anterior { left: 16px; top: 50%; transform: translateY(-50%); }
.visor .siguiente { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Tarjetas simples (equipo, descargas, vacante) ---------- */

.tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.tarjeta { background: var(--superficie); border-radius: var(--radio); padding: 26px; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 10px; }
.tarjeta h3 { margin: 0; }
.tarjeta p { margin: 0; color: var(--texto-suave); }
.tarjeta .boton { margin-top: auto; align-self: flex-start; }
.icono-circulo { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--amarillo-suave); color: var(--azul); font-size: 1.5rem; font-weight: 800; }

/* ---------- Contacto ---------- */

.datos { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.datos li { display: flex; gap: 12px; align-items: baseline; }
.datos strong { min-width: 110px; color: var(--azul); }

.formulario { background: var(--superficie); border-radius: var(--radio); padding: 28px; box-shadow: var(--sombra); display: grid; gap: 14px; }
.formulario label { font-weight: 700; font-size: .95rem; display: grid; gap: 6px; }
.formulario input, .formulario textarea {
  font: inherit; padding: 12px 14px; border: 2px solid var(--borde); border-radius: 10px; background: var(--fondo); color: var(--texto); width: 100%;
}
.formulario input:focus, .formulario textarea:focus { border-color: var(--amarillo); outline: none; }
.formulario .boton { justify-self: start; }
.formulario small { color: var(--texto-suave); }
.mapa iframe { width: 100%; height: 100%; min-height: 380px; border: 0; border-radius: var(--radio); box-shadow: var(--sombra); }

/* ---------- Pie ---------- */

.pie { background: #14254a; color: #cfd6e6; padding: 56px 0 0; font-size: .97rem; }
.pie h2 { color: #fff; font-size: 1.15rem; }
.pie a { color: #fff; text-decoration: none; }
.pie a:hover { color: var(--amarillo); }
.pie__columnas { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr; gap: 40px; }
@media (max-width: 860px) { .pie__columnas { grid-template-columns: 1fr; gap: 28px; } }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pie__legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 44px; padding: 18px 0; font-size: .88rem; text-align: center; }

.whatsapp {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); transition: transform .15s ease;
}
.whatsapp:hover { transform: scale(1.08); }
.whatsapp svg { width: 32px; height: 32px; fill: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
