/* ==========================================================
   Tipografías alojadas en el propio sitio (carpeta /fonts).
   Poppins, Nunito Sans y Caveat: licencia SIL Open Font License 1.1
   (uso comercial libre). Solo el subconjunto latino, que cubre el español.
   ========================================================== */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-700.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-vf.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 200 1000;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/nunito-sans-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/caveat-700.woff2") format("woff2");
}

/* ==========================================================
   Variables del sitio: colores y tipografías.
   Es el ÚNICO lugar donde se cambian (ver brief, sección 7).
   ========================================================== */
:root {
  --navy-dark: #152a45;
  /* azul oscuro (títulos, bloque de admisiones) */
  --navy: #1e386b;
  /* azul del texto del logo (botones) */
  --blue: #10639e;
  /* azul de la estrella del logo */
  --red: #dd0d3a;
  /* rojo de la punta del logo (tomado de la imagen; PENDIENTE: confirmar código oficial) */
  --green: #1f9d55;
  /* verde sobrio (paso 4 del proceso de admisión) */

  --blue-tint: #e3eef8;
  --red-tint: #fde6eb;
  --green-tint: #e2f4ea;
  --green-ink: #17753e;
  /* verde para texto sobre tinte (cumple contraste AA) */
  --navy-tint: #e5eaf1;
  --blue-ink: #0f5a94;
  /* azul para texto/íconos sobre tinte */
  --red-ink: #c20c33;
  /* rojo para íconos sobre tinte */

  --paper: #fbf6ec;
  /* papel crema: solo para las pausas "respiro" y las notas sobre fotos */
  --paper-line: #e8dcc4;
  /* renglones y bordes del papel crema */

  --bg-soft: #f6f4ef;
  /* gris cálido, casi papel: antes #f1f5f9 (gris frío) */
  --line: #e1e8ef;
  --card-line: #d6e0ea;
  --text: #2f4258;
  --muted: #475a6e;
  --white: #ffffff;

  /* Calendario escolar (css/calendario.css): tonos por tipo de evento. Se agregaron sin tocar los de arriba. */
  --red-deep: #a8082d;
  /* texto rojo sobre --red-tint */
  --red-edge: #f6c3cd;
  --blue-deep: #0b4f82;
  --blue-edge: #bfd7ec;
  --green-bar: #1b8a4b;
  /* verde de actividades y salidas */
  --green-deep: #145c34;
  --green-edge: #b9dfc8;
  --slate: #6b7a90;
  /* festivos y receso */
  --slate-deep: #3e4c5f;
  --slate-tint: #e8ecf1;
  --slate-edge: #cbd3de;
  --mist: #b7c3d2;
  /* fechas especiales */
  --mist-deep: #44546a;
  --line-strong: #c5cfdd;

  /* Azules sobre fondos claros y oscuros (antes repetidos a mano en varios CSS) */
  --blue-wash: #cfe0f0;
  /* bloque plano detrás de fotos y tarjetas */
  --on-navy: #9fcdf0;
  /* texto secundario y contornos de foco sobre azul oscuro */
  --on-navy-soft: #dde7f1;
  /* párrafos sobre azul oscuro */

  --whatsapp: #25d366;
  /* verde oficial del botón */
  --whatsapp-btn-hover: #1fb957;
  /* hover del botón verde con texto azul oscuro (el --whatsapp-hover de abajo es para el botón flotante) */
  --whatsapp-hover: #15803d;
  /* verde más oscuro: con él el texto blanco "Escríbenos" cumple contraste AA */

  --font-title: "Poppins", sans-serif;
  /* PENDIENTE: confirmar tipografías del colegio */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  /* títulos grandes (h1, h2 y citas): serif editorial con carácter */
  --font-body: "Nunito Sans", system-ui, sans-serif;
  --font-script: "Caveat", cursive;
}

/* ==========================================================
   Gimnasio Americano Howard Gardner — Estilos comunes y de la portada
   Al inicio de este archivo están las tipografías (@font-face) y las variables (colores y fuentes).
   Estructura: base · botones · encabezado · hero · pilares · colegio ·
   etapas · admisiones · pie · WhatsApp · responsive
   Las páginas internas usan además paginas.css
   ========================================================== */

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
}

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

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

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

h1,
h2,
h3 {
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--navy-dark);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.012em;
}

/* h3 y las etiquetas siguen en Poppins */
p {
  text-wrap: pretty;
}

::selection {
  background: #ffe9a3;
  color: var(--navy-dark);
}

/* texto seleccionado como con resaltador amarillo */

.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.star {
  width: 1em;
  height: 1em;
  flex: none;
  object-fit: contain;
}

/* estrella real del logo (img/estrella.png) */

.tint-blue {
  background: var(--blue-tint);
  color: var(--blue-ink);
}

.tint-red {
  background: var(--red-tint);
  color: var(--red-ink);
}

.tint-navy {
  background: var(--navy-tint);
  color: var(--navy-dark);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--navy-dark);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid var(--focus, var(--blue));
  outline-offset: 3px;
}

/* Sobre azul oscuro el contorno azul/marino no se ve: las zonas oscuras usan un azul claro */
.page-banner,
.stage-banner,
.cta-band,
.admissions,
.enroll {
  --focus: var(--on-navy);
}

/* Al saltar a una sección (admisiones.html#fechas, las pestañas de identidad…) el encabezado fijo no debe tapar su título.
   --header-h lo mide script.js; 85px es el respaldo si no carga. */
main [id] {
  scroll-margin-top: calc(var(--header-h, 85px) + 16px);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 14px 26px;
  border-radius: 10px;
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.btn .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.btn-red {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 8px 18px -8px rgba(221, 13, 58, 0.55);
}

.btn-red:hover {
  background: var(--red-ink);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 8px 18px -8px rgba(30, 56, 107, 0.55);
}

.btn-navy:hover {
  background: var(--navy-dark);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-outline {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
  border-radius: 999px;
}

.btn-pill {
  border-radius: 999px;
}

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky;
  top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  padding: 12px max(40px, calc((100% - 1240px) / 2));
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 24px -20px rgba(21, 42, 69, 0.45);
  z-index: 45;
}

/* Franja tricolor del logo en el borde superior: el mismo remate que el pie de página */
.site-header {
  padding-top: 17px;
}

.site-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  background: linear-gradient(to right, var(--navy-dark) 0 33.34%, var(--blue) 33.34% 66.67%, var(--red) 66.67% 100%);
  pointer-events: none;
}

.brand img {
  display: block;
  height: 60px;
  width: auto;
}

.nav>ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-dark);
}

.nav a,
.sub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
}

.nav>ul>li>a:hover,
.sub-toggle:hover {
  color: var(--blue);
}

.nav a[aria-current="page"],
.nav .is-current>.sub-toggle {
  font-weight: 700;
  border-bottom: 3px solid var(--red);
}

.icon-chevron {
  width: 12px;
  height: 12px;
  stroke-width: 2.4;
}

.nav-cta-mobile {
  display: none;
}

/* Desplegables (Niveles, Vida escolar) */
.has-sub {
  position: relative;
}

.sub-toggle {
  background: none;
  border: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.sub-toggle[aria-expanded="true"] .icon-chevron {
  transform: rotate(180deg);
}

.sub {
  display: none;
}

.sub-toggle[aria-expanded="true"]+.sub {
  display: block;
}

@media (min-width: 1101px) {
  .sub {
    position: absolute;
    left: -14px;
    top: calc(100% + 14px);
    z-index: 60;
    min-width: 280px;
    padding: 10px;
    background: var(--white);
    border: 1px solid var(--card-line);
    border-radius: 12px;
  }

  .sub-toggle[aria-expanded="true"]+.sub {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  /* separación entre opciones: el fondo del hover ya no toca al de la vecina */
  .sub::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -15px;
    height: 15px;
  }

  /* puente para que el cursor no pierda el hover */
  .sub a {
    display: block;
    padding: 11px 16px;
    border-radius: 8px;
    font-weight: 600;
  }

  .sub a:hover {
    background: var(--bg-soft);
  }

  .sub a[aria-current="page"] {
    border-bottom: 0;
    background: var(--bg-soft);
    color: var(--red-ink);
  }
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: var(--white);
  color: var(--navy-dark);
  border: 1px solid #c9d5e0;
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle .icon {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  background: var(--white);
}

.hero-text {
  padding: 72px 40px 72px max(56px, calc((100vw - 1240px) / 2));
  /* alinea con el resto de secciones en pantallas anchas */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.eyebrow {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.7;
  color: var(--navy-dark);
  max-width: 340px;
  margin-bottom: 22px;
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 28px;
  height: 2px;
  margin-top: 0.85em;
  background: var(--red);
}

.eyebrow-blue {
  color: var(--blue-ink);
  max-width: none;
  margin-bottom: 10px;
  font-size: 13px;
  letter-spacing: 0.2em;
}

.eyebrow-light {
  color: var(--on-navy);
  max-width: none;
  margin-bottom: 10px;
}

.hero h1 {
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.08;
  max-width: 540px;
}

.hero-script {
  display: block;
  font-family: var(--font-script);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(60px, 7vw, 92px);
  line-height: 0.95;
  color: var(--blue);
  margin-top: 6px;
}

.hero-underline {
  display: block;
  width: min(400px, 100%);
  height: 16px;
  margin-top: 2px;
  color: var(--red);
}

.hero-lead {
  font-size: 19px;
  line-height: 1.6;
  max-width: 480px;
  margin: 24px 0 32px;
}

.hero-visual {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

.hero-frame {
  position: absolute;
  top: 56px;
  right: max(56px, calc((100vw - 1240px) / 2));
  bottom: 56px;
  left: 44px;
}

.hero-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--blue);
  border-radius: 28px;
  transform: translate(16px, 16px) rotate(2deg);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% center;
  border: 8px solid var(--white);
  border-radius: 28px;
  transform: rotate(-1.5deg);
  box-shadow: 0 28px 44px -26px rgba(21, 42, 69, 0.5);
}

.badge {
  position: absolute;
  left: -30px;
  bottom: -22px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  box-shadow: 0 14px 24px -12px rgba(194, 12, 51, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  background: var(--red);
  color: var(--white);
  border: 4px solid var(--white);
  transform: rotate(-10deg);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.badge .star {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

/* ---------- Pilares ---------- */
.pillars {
  padding: 44px 56px 52px;
  background: var(--white);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 28px 24px;
  max-width: 1240px;
  margin: 0 auto;
}

.pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.pillar-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(21, 42, 69, 0.08);
}

.pillar-icon .icon {
  width: 38px;
  height: 38px;
  stroke-width: 1.6;
}

.pillar-title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--navy-dark);
}

.pillar-sub {
  font-size: 14px;
  color: var(--muted);
}

@media (min-width: 901px) {
  .pillars-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
  }

  .pillar {
    padding: 4px 20px;
  }

  .pillar+.pillar {
    border-left: 1px solid var(--line);
  }

  /* filete fino entre pilares */
}

.wave {
  background: var(--white);
  line-height: 0;
}

.wave svg {
  display: block;
  width: 100%;
  height: 44px;
  fill: var(--bg-soft);
}

/* ---------- Nuestro colegio ---------- */
.about {
  padding: 24px 56px 72px;
  background: var(--bg-soft);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px 64px;
  max-width: 1240px;
  margin: 0 auto;
}

.about-visual {
  position: relative;
  padding: 18px;
}

.about-blob {
  position: absolute;
  top: 4px;
  right: 0;
  bottom: 0;
  left: 28px;
  background: var(--blue-wash);
  border-radius: 52% 48% 46% 54% / 50% 54% 46% 50%;
  transform: rotate(5deg);
}

.about-photo {
  position: relative;
  display: block;
  width: 100%;
  height: 340px;
  object-fit: cover;
  border: 8px solid var(--white);
  border-radius: 56% 44% 48% 52% / 52% 46% 54% 48%;
}

.about-text h2 {
  font-size: 42px;
  line-height: 1.12;
  margin-bottom: 20px;
}

.underline-red {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 4px;
  text-underline-offset: 7px;
}

.about-text>p:not(.eyebrow) {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.about-text strong {
  color: var(--navy-dark);
}

/* ---------- Etapas ---------- */
.stages {
  position: relative;
  overflow: hidden;
  padding: 72px 56px 88px;
  background: var(--white);
}

.stages-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.stages-heading {
  text-align: left;
}

/* igual que los demás títulos de sección: eyebrow arriba y alineado a la izquierda */
.stages-heading h2 {
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.12;
}

.stages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
  align-items: start;
}

.stage {
  position: relative;
  background: var(--white);
  border: 1px solid var(--card-line);
  border-top: 6px solid var(--blue);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 34px -24px rgba(21, 42, 69, 0.45);
}

.stage-navy {
  border-top-color: var(--navy);
}

.stage-red {
  border-top-color: var(--red);
}

.stage:nth-child(2) {
  margin-top: 28px;
}

.stage:nth-child(3) {
  margin-top: 56px;
}

.stage-media {
  position: relative;
}

.stage-media img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.stage-number {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 16px;
}

.stage-navy .stage-number {
  background: var(--navy);
}

.stage-red .stage-number {
  background: var(--red);
}

.stage-icon {
  position: absolute;
  left: 20px;
  bottom: -26px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--white);
}

.stage-icon .icon {
  width: 26px;
  height: 26px;
  stroke-width: 1.8;
}

.stage-body {
  padding: 40px 22px 26px;
}

.stage-body h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.stage-body p {
  font-size: 15px;
  line-height: 1.55;
}

.stage-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  width: 100%;
  font-weight: 700;
  font-size: 14px;
  color: var(--blue-ink);
}

.stage-red .stage-link {
  color: var(--red-ink);
}

.stage-navy .stage-link {
  color: var(--navy);
}

.stage-link .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.stage:hover .stage-link span {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.stage-body h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* toda la tarjeta es clicable */
.stage:hover h3 a {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.stage:focus-within {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.stage a:focus-visible {
  outline: 0;
}

/* ---------- Admisiones ---------- */
.admissions {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--navy-dark);
}

.admissions-photo {
  position: relative;
  min-height: 340px;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
}

.admissions-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.admissions-text {
  position: relative;
  overflow: hidden;
  padding: 56px 64px 56px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: var(--white);
}

.admissions-text>* {
  position: relative;
}

.admissions-text>.admissions-star {
  position: absolute;
  right: 40px;
  bottom: 28px;
  width: 240px;
  height: 240px;
  object-fit: contain;
  opacity: 0.16;
}

.admissions-text h2 {
  font-size: 42px;
  line-height: 1.12;
  color: var(--white);
  max-width: 480px;
  margin-bottom: 16px;
}

.admissions-text p:not(.eyebrow) {
  font-size: 17px;
  line-height: 1.65;
  color: var(--on-navy-soft);
  max-width: 440px;
  margin-bottom: 30px;
}

/* ---------- Pie de página ---------- */
.brand-stripe {
  display: flex;
  height: 6px;
}

.brand-stripe span {
  flex: 1;
}

.brand-stripe span:nth-child(1) {
  background: var(--navy-dark);
}

.brand-stripe span:nth-child(2) {
  background: var(--blue);
}

.brand-stripe span:nth-child(3) {
  background: var(--red);
}

.site-footer {
  padding: 56px 56px 28px;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0 39px, rgba(16, 99, 158, 0.07) 39px 40px);
}

/* hoja de cuaderno con renglones: cierra la página igual que las pausas con cita */
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 36px 48px;
  max-width: 1240px;
  margin: 0 auto;
}

.footer-brand {
  flex: 1 1 200px;
}

.footer-brand img {
  display: block;
  height: 56px;
  width: auto;
}

.footer-col {
  flex: 0 1 210px;
}

.footer-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-ink);
  margin-bottom: 16px;
}

.footer-tagline {
  margin-top: 14px;
  max-width: 300px;
  font-family: var(--font-script);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.1;
  color: var(--blue);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.footer-col a:hover,
.footer-copy a:hover {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 4px;
}

.footer-copy {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: 1240px;
  margin: 32px auto 0;
  padding-top: 18px;
  border-top: 1px dashed var(--paper-line);
  font-size: 13px;
  color: var(--muted);
}

/* Globo de chat: tres esquinas redondas y una pequeña abajo a la derecha (como el 4px/16px del resto del sitio).
   Contorno y sombra plana en azul oscuro, en vez de un círculo verde suelto. */
.whatsapp {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 50;
  height: 56px;
  border-radius: 20px 20px 4px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: var(--whatsapp);
  color: var(--white);
  box-shadow: 0 0 0 2px var(--navy-dark), 4px 4px 0 2px var(--navy-dark);
}

.whatsapp:focus-visible {
  outline-offset: 8px;
}

/* Nota a mano que crea script.js una sola vez por visita; sin GSAP no se crea. */
.whatsapp-nota {
  position: absolute;
  right: 0;
  bottom: calc(100% + 18px);
  padding: 7px 16px 9px;
  white-space: nowrap;
  font-family: var(--font-script);
  font-weight: 700;
  font-size: 23px;
  line-height: 1.1;
  color: var(--navy-dark);
  background: var(--white);
  border: 1.5px solid var(--navy-dark);
  border-radius: 4px 14px 14px 14px;
  box-shadow: 4px 4px 0 var(--whatsapp);
  transform-origin: 100% 100%;
  visibility: hidden;
  opacity: 0;
}

.whatsapp-icon {
  flex: none;
  width: 56px;
  height: 56px;
  padding: 13px;
}

/* Texto oculto; al pasar el cursor o enfocar con teclado el botón se expande hacia la izquierda.
   Con GSAP cargado (clase .gsap-wa) la animación la hace script.js; sin GSAP queda este respaldo. */
.whatsapp-label {
  display: block;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 700;
  font-size: 15px;
}

.whatsapp-label span {
  display: inline-block;
  padding-left: 22px;
}

html:not(.gsap-wa) .whatsapp:hover,
html:not(.gsap-wa) .whatsapp:focus-visible {
  background: var(--whatsapp-hover);
  box-shadow: 0 0 0 2px var(--navy-dark), 1px 1px 0 2px var(--navy-dark);
  transform: translate(3px, 3px);
}

html:not(.gsap-wa) .whatsapp:hover .whatsapp-label,
html:not(.gsap-wa) .whatsapp:focus-visible .whatsapp-label {
  width: auto;
}

/* ==========================================================
   Responsive
   ========================================================== */

/* Menú de hamburguesa: con 7 opciones hace falta antes que el resto del diseño responsivo */
@media (max-width: 1100px) {
  .site-header {
    padding: 14px 16px 10px;
    flex-wrap: nowrap;
  }

  .brand img {
    height: 44px;
  }

  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 40;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 20px;
  }

  .nav.is-open {
    display: block;
  }

  .nav>ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav a,
  .sub-toggle {
    min-height: 48px;
    padding: 12px 0;
  }

  .sub-toggle {
    width: 100%;
    justify-content: space-between;
    text-align: left;
  }

  .nav a[aria-current="page"],
  .nav .is-current>.sub-toggle {
    border-bottom: 0;
    color: var(--red);
  }

  .sub {
    padding: 0 0 6px 14px;
    border-left: 3px solid var(--line);
    margin-bottom: 6px;
  }

  .sub a {
    min-height: 44px;
    padding: 10px 0;
  }

  .nav-cta-mobile {
    display: block;
    margin-top: 12px;
  }

  .nav-cta-mobile .btn {
    width: 100%;
  }
}

/* Tablet y teléfono */
@media (max-width: 900px) {

  /* Hero apilado */
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-text {
    padding: 32px 20px 20px;
  }

  .eyebrow {
    font-size: 12px;
    letter-spacing: 0.2em;
  }

  .hero-lead {
    font-size: 16px;
    margin: 18px 0 22px;
  }

  .hero-text .btn {
    width: 100%;
  }

  .hero-visual {
    min-height: 0;
    height: 330px;
  }

  .hero-frame {
    top: 20px;
    right: 28px;
    bottom: 36px;
    left: 20px;
  }

  .hero-frame::before {
    border-radius: 22px;
    transform: translate(10px, 10px) rotate(2deg);
  }

  .hero-photo {
    border-width: 6px;
    border-radius: 22px;
  }

  .badge {
    left: -10px;
    bottom: -22px;
    width: 104px;
    height: 104px;
    font-size: 9.5px;
    gap: 4px;
  }

  .badge .star {
    width: 16px;
    height: 16px;
  }

  /* Pilares */
  .pillars {
    padding: 28px 16px 36px;
  }

  .pillars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 14px;
  }

  .pillar:last-child {
    grid-column: 1 / -1;
  }

  .pillar {
    gap: 8px;
  }

  .pillar-icon {
    width: 68px;
    height: 68px;
  }

  .pillar-icon .icon {
    width: 32px;
    height: 32px;
  }

  .pillar-title {
    font-size: 15px;
  }

  .pillar-sub {
    font-size: 13px;
  }

  .wave svg {
    height: 30px;
  }

  /* Colegio */
  .about {
    padding: 20px 20px 48px;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .about-visual {
    padding: 14px;
  }

  .about-photo {
    height: 250px;
    border-width: 6px;
  }

  .about-text h2 {
    font-size: 30px;
  }

  .about-text .btn {
    width: 100%;
  }

  /* Etapas */
  .stages {
    padding: 48px 16px 56px;
  }

  .stages-heading h2 {
    font-size: 30px;
  }

  .stages-grid {
    grid-template-columns: 1fr;
    margin-top: 28px;
    gap: 20px;
  }

  .stage:nth-child(2),
  .stage:nth-child(3) {
    margin-top: 0;
  }

  /* Admisiones */
  .admissions {
    grid-template-columns: 1fr;
  }

  .admissions-photo {
    min-height: 0;
    height: 230px;
    clip-path: none;
  }

  .admissions-text {
    padding: 36px 20px 44px;
  }

  .admissions-text h2 {
    font-size: 30px;
  }

  .admissions-text p:not(.eyebrow) {
    font-size: 15px;
  }

  .admissions-text .btn {
    width: 100%;
  }

  .admissions-text>.admissions-star {
    width: 190px;
    height: 190px;
    right: 16px;
    bottom: 16px;
  }

  /* Pie */
  .site-footer {
    padding: 36px 20px 24px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 24px;
  }

  .footer-brand,
  .footer-col {
    flex: none;
  }

  .footer-brand img {
    height: 48px;
  }

  .footer-title {
    font-size: 16px;
  }

  .footer-col ul {
    font-size: 16px;
    gap: 0;
  }

  .footer-col a,
  .footer-copy a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
  }

  /* zona táctil de 44px */
  .footer-copy {
    padding-bottom: 72px;
    font-size: 16px;
  }

  /* deja libre el botón flotante de WhatsApp */
  .nav a {
    min-width: 44px;
  }

  /* "Inicio" medía 36px de ancho */

  /* Zonas táctiles de 44px sin cambiar el aspecto: el área extra es un pseudo-elemento invisible */
  .link-arrow,
  .info-list dd a {
    position: relative;
  }

  .link-arrow::after {
    content: "";
    position: absolute;
    inset: -9px 0;
  }

  .info-list dd a::after {
    content: "";
    position: absolute;
    inset: -11px 0;
  }

  .whatsapp {
    right: 18px;
    bottom: 18px;
  }

  .whatsapp-nota {
    font-size: 21px;
  }
}

/* ---------- Inicio: mismo lenguaje de papelería que las páginas internas ---------- */
.pillar-icon {
  width: 72px;
  height: 72px;
  border-radius: 6px 26px 6px 26px;
  box-shadow: 4px 4px 0 rgba(21, 42, 69, 0.08);
}

.pillar-title {
  font-size: 16px;
}

.pillar-sub {
  max-width: 170px;
}

.stage {
  --t-tint: var(--blue-tint);
  border-radius: 6px 6px 16px 16px;
  box-shadow: 6px 6px 0 var(--t-tint);
}

.stage-navy {
  --t-tint: var(--navy-tint);
}

.stage-red {
  --t-tint: var(--red-tint);
}

.stage-number {
  width: 38px;
  height: 38px;
  border-radius: 50% 50% 50% 8px;
  border: 3px solid var(--white);
}

.stage-icon {
  border-radius: 6px 16px 6px 16px;
}

.stage-link {
  border-top: 2px dotted var(--card-line);
}

/* El subrayado a lápiz rojo queda para el titular de la portada y el h1 de cada página: aquí se quitó para que no se repita en cada título */

/* Punto de color de cada nivel (los mismos de la portada) en el menú "Niveles" y en el pie */
#sub-niveles a::before,
.footer-col a[href="preescolar.html"]::before,
.footer-col a[href="primaria.html"]::before,
.footer-col a[href="secundaria-media.html"]::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 10px;
  vertical-align: 1px;
  background: var(--dot);
  border-radius: 50% 50% 50% 2px;
}

#sub-niveles a[href="preescolar.html"],
.footer-col a[href="preescolar.html"] {
  --dot: var(--blue);
}

#sub-niveles a[href="primaria.html"],
.footer-col a[href="primaria.html"] {
  --dot: var(--navy);
}

#sub-niveles a[href="secundaria-media.html"],
.footer-col a[href="secundaria-media.html"] {
  --dot: var(--red);
}

/* Estado de una fecha (periodos de matrícula y eventos): lo calcula el script con la fecha de hoy */
.date-state {
  display: none;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: 8px;
  padding: 3px 11px 3px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  background: var(--navy-tint);
  color: var(--navy-dark);
}

.date-state:not(:empty) {
  display: flex;
}

.date-state::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.date-state[data-estado="abierta"],
.date-state[data-estado="hoy"] {
  background: var(--green-tint);
  color: var(--green-ink);
}

.date-state[data-estado="pronto"] {
  background: var(--blue-tint);
  color: var(--blue-ink);
}

/* ---------- Impresión (requisitos, fechas de admisión…): solo el contenido, sin menú ni botones ---------- */
@media print {
  @page {
    margin: 16mm;
  }

  .site-header,
  .skip-link,
  .whatsapp,
  .brand-stripe,
  .cta-band,
  .btn-row,
  .nav-toggle {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  main a[href^="http"]:not(.btn)::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    word-break: break-all;
  }

  .step,
  .platform,
  .evento,
  .wa-card,
  figure,
  .info-strip,
  .footer-col {
    break-inside: avoid;
  }

  * {
    box-shadow: none !important;
  }
}

/* ---------- Eventos: color por tipo (los mismos tipos del calendario) y el próximo, más grande ---------- */
.evento[data-tipo] {
  --t: var(--navy);
  --t-tint: var(--navy-tint);
  --t-ink: var(--navy-dark);
}

.evento[data-tipo="familias"] {
  --t: var(--blue);
  --t-tint: var(--blue-tint);
  --t-ink: var(--blue-ink);
}

.evento[data-tipo="evaluacion"] {
  --t: var(--red);
  --t-tint: var(--red-tint);
  --t-ink: var(--red-ink);
}

.evento[data-tipo="actividad"] {
  --t: var(--green-bar);
  --t-tint: var(--green-tint);
  --t-ink: var(--green-ink);
}

.evento[data-tipo="festivo"] {
  --t: var(--slate);
  --t-tint: var(--slate-tint);
  --t-ink: var(--slate-deep);
}

.evento[data-tipo="especial"] {
  --t: var(--mist-deep);
  --t-tint: var(--slate-tint);
  --t-ink: var(--mist-deep);
}

.evento.evento-destacado {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0 26px;
  padding: 24px 28px 26px;
  box-shadow: 7px 7px 0 var(--t-tint);
}

.evento-destacado .evento-fecha {
  width: 92px;
  padding: 14px 0 12px;
}

.evento-destacado .evento-dia {
  font-size: 40px;
}

.evento-destacado .evento-mes {
  font-size: 13px;
}

.evento-destacado .evento-titulo {
  font-size: 24px;
  margin-bottom: 6px;
}

.evento-destacado .evento-datos {
  font-size: 15px;
}

.evento-destacado .evento-desc {
  font-size: 16px;
}

@media (max-width: 900px) {
  .evento.evento-destacado {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 0 16px;
    padding: 18px;
  }

  .evento-destacado .evento-fecha {
    width: 64px;
    padding: 10px 0;
  }

  .evento-destacado .evento-dia {
    font-size: 28px;
  }

  .evento-destacado .evento-titulo {
    font-size: 20px;
  }

  .evento-destacado .evento-desc {
    font-size: 15px;
  }
}

/* ---------- Respiro: pausa editorial entre secciones (cita grande + foto pegada) ----------
   Hoja de cuaderno crema con renglones. Variantes: .respiro-flip (foto a la izquierda) y .respiro-solo (sin foto, centrada). */
.respiro {
  position: relative;
  overflow: hidden;
  padding: 88px 56px;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0 39px, rgba(16, 99, 158, 0.08) 39px 40px);
  border-top: 1px dashed var(--paper-line);
  border-bottom: 1px dashed var(--paper-line);
}

.respiro::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: max(24px, calc((100% - 1100px) / 2 - 40px));
  width: 2px;
  background: rgba(221, 13, 58, 0.3);
  pointer-events: none;
}

/* margen rojo del cuaderno */
/* Tres perforaciones de argolla a la izquierda del margen: la hoja se ve arrancada de un cuaderno */
.respiro::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: max(6px, calc((100% - 1100px) / 2 - 80px));
  width: 16px;
  pointer-events: none;
  background: radial-gradient(circle, var(--white) 0 5.5px, rgba(21, 42, 69, 0.22) 6px 7px, transparent 7.5px) 0 14% / 16px 16px no-repeat, radial-gradient(circle, var(--white) 0 5.5px, rgba(21, 42, 69, 0.22) 6px 7px, transparent 7.5px) 0 50% / 16px 16px no-repeat, radial-gradient(circle, var(--white) 0 5.5px, rgba(21, 42, 69, 0.22) 6px 7px, transparent 7.5px) 0 86% / 16px 16px no-repeat;
}

.respiro-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px 72px;
  align-items: center;
}

.respiro-flip .respiro-inner {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.respiro-flip .polaroid {
  order: -1;
  transform: rotate(2deg);
}

.respiro-solo .respiro-inner {
  grid-template-columns: minmax(0, 1fr);
  max-width: 820px;
  text-align: center;
}

.respiro-quote {
  position: relative;
  margin: 0;
}

.respiro-quote::before {
  content: "\201C";
  position: absolute;
  left: -10px;
  top: -62px;
  font-family: var(--font-script);
  font-weight: 700;
  font-size: 150px;
  line-height: 1;
  color: var(--red);
  opacity: 0.85;
  pointer-events: none;
}

.respiro-solo .respiro-quote::before {
  left: 50%;
  top: -74px;
  margin-left: -28px;
}

.respiro-nota {
  margin-bottom: 14px;
  font-family: var(--font-script);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  color: var(--red-ink);
}

.respiro-quote p:not(.respiro-nota) {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(27px, 3.3vw, 42px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--navy-dark);
  text-wrap: balance;
}

.respiro-quote cite {
  display: block;
  margin-top: 22px;
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-ink);
}

/* Foto "pegada": marco blanco, cinta y sombra suave de papel (no la sombra plana de las tarjetas) */
.polaroid {
  position: relative;
  margin: 0 8px;
  padding: 12px 12px 0;
  background: var(--white);
  border: 1px solid var(--card-line);
  border-radius: 3px;
  box-shadow: 0 18px 30px -16px rgba(21, 42, 69, 0.4);
  transform: rotate(-2deg);
}

.polaroid::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -13px;
  left: 50%;
  width: 92px;
  height: 26px;
  margin-left: -46px;
  background: rgba(221, 13, 58, 0.5);
  transform: rotate(-3deg);
}

.respiro-flip .polaroid::before {
  background: rgba(16, 99, 158, 0.45);
  transform: rotate(2deg);
}

.polaroid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.polaroid figcaption {
  padding: 12px 10px 16px;
  font-family: var(--font-script);
  font-weight: 700;
  font-size: 29px;
  line-height: 1.1;
  text-align: center;
  color: var(--navy-dark);
}

/* Nota escrita a mano sobre una foto: etiqueta de papel pegada en la esquina */
.foto-nota {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 2;
  max-width: calc(100% - 44px);
  padding: 3px 14px 6px;
  background: var(--paper);
  border: 1px solid var(--paper-line);
  font-family: var(--font-script);
  font-weight: 700;
  font-size: 25px;
  line-height: 1.15;
  color: var(--navy-dark);
  box-shadow: 2px 3px 0 rgba(21, 42, 69, 0.18);
  transform: rotate(-2deg);
  pointer-events: none;
}

@media (max-width: 900px) {
  .respiro {
    padding: 64px 20px 56px;
  }

  .respiro-inner,
  .respiro-flip .respiro-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .respiro-flip .polaroid {
    order: 0;
  }

  .respiro-quote::before {
    top: -54px;
    font-size: 120px;
  }

  .polaroid {
    max-width: 440px;
    margin: 0 auto;
  }

  .foto-nota {
    left: 14px;
    bottom: 14px;
    font-size: 22px;
  }
}

@media print {
  .respiro {
    display: none;
  }
}

/* ---------- Pulido general: una sola forma de botón ---------- */
.btn,
.btn-outline,
.btn-pill {
  border-radius: 8px 20px 8px 20px;
}

/* la misma esquina asimétrica de las tarjetas y los iconos; antes había rectángulos y píldoras mezclados */
.btn:focus-visible {
  outline: 3px solid var(--focus, var(--navy));
  outline-offset: 3px;
}