/* ==========================================================================
   CEIPC · Diseño de la página
   Colores de la escuela: azul, vino y dorado.
   Letras: Cormorant Garamond para los títulos y Manrope para los textos.
   ========================================================================== */

/* ---------- 0. Letras (están en la carpeta fuentes/, así se ven bien aunque no haya internet) ----------
   Cormorant Garamond y Manrope son letras gratuitas, las mismas de Google Fonts. */
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500 600; font-display: swap; src: url("fuentes/cormorant-garamond-italica-latin-ext.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500 600; font-display: swap; src: url("fuentes/cormorant-garamond-italica-latin.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500 700; font-display: swap; src: url("fuentes/cormorant-garamond-latin-ext.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500 700; font-display: swap; src: url("fuentes/cormorant-garamond-latin.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fuentes/manrope-latin-ext.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fuentes/manrope-latin.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- 1. Colores, medidas y velocidades que se usan en toda la página ---------- */
:root {
    /* Colores de la escuela */
    --navy: #13254F;
    --navy-deep: #0C1A3A;
    --navy-ink: #081229;
    --crimson: #B3122E;
    --crimson-dark: #8F0E24;
    --wine: #9B1C2C;
    --gold: #C49A2C;
    --gold-soft: #E2C377;
    --white: #FFFFFF;
    --bg: #F2F0EB;
    --surface: #E9E6E0;
    --line: #D9D5CD;
    --text: #26303F;
    --muted: #5B6677;

    --f-display: 'Cormorant Garamond', 'Times New Roman', serif;
    --f-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --wrap: 1240px;
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --header-h: 84px;
    --radius: 18px;
    --radius-sm: 10px;

    --ease: cubic-bezier(.22, 1, .36, 1);       /* movimiento que termina suave */
    --ease-io: cubic-bezier(.65, 0, .35, 1);    /* movimiento que empieza y termina suave */

    --shadow: 0 30px 60px -30px rgba(8, 18, 41, .45);
    --shadow-sm: 0 10px 30px -18px rgba(8, 18, 41, .35);
}

/* ---------- 2. Lo básico de toda la página ---------- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--f-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

a { color: inherit; }
em { font-style: italic; }
::selection { background: var(--gold); color: var(--navy-ink); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: fixed; top: 1rem; left: 1rem; z-index: 200;
    padding: .7rem 1.1rem; border-radius: 99px;
    background: var(--gold); color: var(--navy-ink); font-weight: 700; text-decoration: none;
    transform: translateY(-160%); transition: transform .3s var(--ease);
}
.skip-link:focus { transform: none; }

main:focus { outline: none; }

/* ---------- 3. Títulos y textos ---------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: .85rem;
    font-size: .78rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
    color: var(--crimson);
    margin-bottom: 1.2rem;
}
.eyebrow__line { width: 2.6rem; height: 1px; background: currentColor; display: inline-block; }
.eyebrow--light { color: var(--gold-soft); }
.eyebrow--center { justify-content: center; }

.title {
    font-family: var(--f-display);
    font-weight: 600;
    font-size: clamp(2.5rem, 5.2vw, 4.4rem);
    line-height: 1.02;
    letter-spacing: -.01em;
    color: var(--navy);
}
.title em { color: var(--crimson); font-weight: 500; }
.title--light { color: var(--white); }
.title--light em { color: var(--gold-soft); }

.section { padding-block: clamp(5rem, 11vw, 9rem); position: relative; }
.section--dark { background: var(--navy-deep); color: rgba(255, 255, 255, .78); }
.section--soft { background: var(--surface); }

.head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.head--split { display: grid; gap: 1.5rem 3rem; align-items: end; grid-template-columns: 1.2fr 1fr; }
.head--center { text-align: center; max-width: 46rem; margin-inline: auto; }
.head__lead { color: var(--muted); font-size: 1.12rem; max-width: 34rem; }
.head--center .head__lead { margin: 1.4rem auto 0; }
.section--dark .head__lead { color: rgba(255, 255, 255, .7); }
.head__side { display: grid; gap: 1.5rem; justify-items: start; }

/* ---------- 4. Botones ---------- */
.btn {
    --bx: 0px; --by: 0px;
    position: relative; isolation: isolate; overflow: hidden;
    display: inline-flex; align-items: center; gap: .7rem;
    padding: 1rem 1.7rem; border-radius: 99px;
    font-weight: 700; font-size: .95rem; letter-spacing: .02em; text-decoration: none;
    border: 1px solid transparent; cursor: pointer;
    transform: translate(var(--bx), var(--by));
    transition: transform .35s var(--ease), color .4s var(--ease), border-color .4s, box-shadow .4s;
}
.btn::before {     /* relleno que sube al pasar el mouse */
    content: ""; position: absolute; inset: 0; z-index: -1;
    border-radius: inherit;
    transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn:hover::before { transform: none; }
.btn--sm { padding: .62rem 1.2rem; font-size: .85rem; }
.btn--crimson { background: var(--crimson); color: var(--white); box-shadow: 0 14px 30px -14px rgba(179, 18, 46, .8); }
.btn--crimson::before { background: var(--crimson-dark); }
.btn--gold { background: var(--gold); color: var(--navy-ink); }
.btn--gold::before { background: var(--gold-soft); }
.btn--ghost { color: var(--white); border-color: rgba(255, 255, 255, .45); background: rgba(8, 18, 41, .22); }
.btn--ghost::before { background: var(--white); }
.btn--ghost:hover { color: var(--navy); border-color: var(--white); }
.btn__arrow { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .4s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.round-btn {
    display: grid; place-items: center;
    width: 3rem; height: 3rem; border-radius: 50%;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .35);
    color: var(--white); cursor: pointer;
    transition: background .3s, border-color .3s, transform .3s var(--ease);
}
.round-btn svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2; }
.round-btn:hover { background: var(--white); color: var(--navy); border-color: var(--white); transform: scale(1.06); }

.chip {
    display: inline-block; vertical-align: middle;
    padding: .18rem .65rem; border-radius: 99px;
    font-family: var(--f-body); font-size: .72rem; font-weight: 700; letter-spacing: .06em;
    background: rgba(196, 154, 44, .16); color: var(--gold);
}

.link-arrow {
    display: inline-flex; align-items: center; gap: .6rem;
    font-weight: 700; color: var(--crimson); text-decoration: none;
    background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
    padding-bottom: 2px; transition: background-size .45s var(--ease);
}
.link-arrow svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .4s var(--ease); }
.link-arrow:hover { background-size: 100% 1px; }
.link-arrow:hover svg { transform: translateX(5px); }

/* ---------- 5. Escudo animado ---------- */
/* El escudo está partido en dos: el anillo con el nombre (que gira)
   y el centro con la antorcha (que aparece y brilla). */
.crest { position: relative; display: block; aspect-ratio: 1; }
.crest img { position: absolute; inset: 0; width: 100%; height: 100%; }
.crest__ring {
    -webkit-mask: radial-gradient(circle closest-side, transparent 69%, #000 69.6%);
            mask: radial-gradient(circle closest-side, transparent 69%, #000 69.6%);
}
.crest__core {
    -webkit-mask: radial-gradient(circle closest-side, #000 69.4%, transparent 70%);
            mask: radial-gradient(circle closest-side, #000 69.4%, transparent 70%);
}
.crest__orbit {
    position: absolute; inset: -14%; width: 128%; height: 128%;
    fill: none; overflow: visible;
}
.crest__orbit-line { stroke: var(--gold); stroke-width: .6; stroke-dasharray: 610; stroke-dashoffset: 610; }
.crest__orbit-dash { stroke: rgba(196, 154, 44, .55); stroke-width: .5; stroke-dasharray: 1 4.5; transform-origin: center; }
.crest__shine {     /* destello que cruza el escudo */
    position: absolute; inset: 0; border-radius: 50%; overflow: hidden; pointer-events: none;
}
.crest__shine::after {
    content: ""; position: absolute; top: -20%; bottom: -20%; width: 35%; left: -60%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent);
    transform: skewX(-18deg);
}

/* Escudo del encabezado: el anillo gira al pasar el mouse */
.crest--brand { width: 50px; flex: none; }
/* Sombra del escudo: un círculo debajo de la imagen */
.crest--brand::before, .crest--about::before { content: ""; position: absolute; inset: .6%; border-radius: 50%; }
.crest--brand::before { box-shadow: 0 4px 20px rgba(0, 0, 0, .25); }
.crest--brand .crest__ring { transition: transform 1.2s var(--ease); }
.brand:hover .crest--brand .crest__ring { transform: rotate(360deg); }
.crest--brand .crest__core { transition: transform .6s var(--ease); }
.brand:hover .crest--brand .crest__core { transform: scale(1.06); }

/* Escudo de Nosotros: el anillo gira lento y la órbita dorada se dibuja */
.crest--about .crest__ring { animation: girar 60s linear infinite; }
.crest--about .crest__orbit--giro { animation: girar 90s linear infinite reverse; }
.crest--about.is-in .crest__orbit-line { stroke-dashoffset: 0; transition: stroke-dashoffset 2.4s var(--ease) .3s; }
.crest--about.is-in .crest__shine::after { animation: destello 1.6s var(--ease) 1s; }

.crest--footer { width: 74px; }
.crest--footer .crest__ring { animation: girar 40s linear infinite; }

@keyframes girar { to { transform: rotate(360deg); } }
@keyframes destello { to { transform: translateX(542.857%) skewX(-18deg); } }   /* el destello cruza todo el escudo de lado a lado */

/* ---------- 6. Entrada con el escudo ---------- */
.intro {
    position: fixed; inset: 0; z-index: 150;
    display: grid; place-items: center;
    pointer-events: none;
}
.no-js .intro, .intro.is-done { display: none; }
.intro__curtain {
    position: absolute; inset: 0; z-index: -1;
    background: var(--navy-ink);
    transition: transform 1.1s var(--ease-io);
}
.intro__curtain--a { background: radial-gradient(ellipse at center, var(--navy) 0%, var(--navy-ink) 70%); }
.intro__curtain--b { background: var(--crimson); z-index: -2; transition-delay: .12s; }
.intro.is-leaving .intro__curtain { transform: translateY(-100%); }

.intro__stage { display: grid; justify-items: center; text-align: center; gap: 1.6rem; transition: opacity .5s, transform 1s var(--ease-io); }
.intro.is-leaving .intro__stage { opacity: 0; transform: translateY(-6vh) scale(.96); }

.crest--intro { width: clamp(150px, 22vw, 210px); }
.crest--intro .crest__ring { opacity: 0; transform: rotate(-200deg) scale(.7); animation: anilloEntra 1.6s var(--ease) .2s forwards; }
.crest--intro .crest__core { opacity: 0; transform: translateY(14%) scale(.6); animation: centroEntra 1.2s var(--ease) .75s forwards; }
.crest--intro .crest__orbit-line { animation: trazo 1.8s var(--ease) .5s forwards; }
.crest--intro .crest__orbit--giro { opacity: 0; animation: aparece .8s 1.2s forwards, girar 30s linear infinite; }
.crest--intro .crest__shine::after { animation: destello 1.1s var(--ease) 1.65s forwards; }

@keyframes anilloEntra { to { opacity: 1; transform: none; } }
@keyframes centroEntra { to { opacity: 1; transform: none; } }
@keyframes trazo { to { stroke-dashoffset: 0; } }
@keyframes aparece { to { opacity: 1; } }

.intro__name { font-family: var(--f-display); color: var(--white); font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.1; font-weight: 600; }
.intro__line { display: block; overflow: hidden; }
.intro__line > span { display: inline-block; transform: translateY(110%); animation: subir 1s var(--ease) 1.25s forwards; }
.intro__line--accent > span { font-style: italic; color: var(--gold-soft); animation-delay: 1.4s; }
.intro__motto { overflow: hidden; }
.intro__motto span {
    display: inline-block; color: rgba(255, 255, 255, .6);
    font-size: .74rem; letter-spacing: .32em; text-transform: uppercase; font-weight: 600;
    transform: translateY(110%); animation: subir .9s var(--ease) 1.7s forwards;
}
@keyframes subir { to { transform: none; } }

/* ---------- 7. Barra de arriba que se llena al bajar ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; }
.progress__bar { display: block; height: 100%; background: linear-gradient(90deg, var(--crimson), var(--gold)); transform-origin: left; transform: scaleX(0); }

/* ---------- 8. Encabezado ---------- */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    color: var(--white);
    transition: transform .6s var(--ease), background .5s, box-shadow .5s;
}
.header__inner { height: var(--header-h); display: flex; align-items: center; gap: 1.5rem; transition: height .5s var(--ease); }
.header.is-solid {
    background: rgba(12, 26, 58, .96);   /* fondo sin difuminar, porque eso hacía lenta la página */
    box-shadow: 0 1px 0 rgba(196, 154, 44, .35), 0 20px 40px -30px rgba(0, 0, 0, .6);
}
.header.is-solid .header__inner { height: 68px; }
.header.is-hidden { transform: translateY(-100%); }

.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; margin-right: auto; }
.brand__text { display: grid; line-height: 1.15; }
.brand__name { font-family: var(--f-display); font-size: 1.3rem; font-weight: 700; letter-spacing: .01em; }
.brand__sub { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; opacity: .7; }

.header::before {     /* sombra suave arriba, para que el menú se lea sobre la portada */
    content: ""; position: absolute; inset: 0 0 -40px; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, rgba(8, 18, 41, .7) 0%, rgba(8, 18, 41, 0) 100%);
    transition: opacity .5s;
}
.header.is-solid::before { opacity: 0; }

/* Menú: cápsula azul para que se lea sobre las fotos de la portada */
.nav {
    position: relative;
    padding: .35rem .5rem; border-radius: 999px;
    background: rgba(12, 26, 58, .8);
    border: 1px solid rgba(226, 195, 119, .35);
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .55);
    transition: background .5s, border-color .5s, box-shadow .5s;
}
.header.is-solid .nav { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); box-shadow: none; }
.nav__list { display: flex; gap: .2rem; }
.nav__link {
    display: block; padding: .5rem .85rem;
    font-size: .92rem; font-weight: 600; letter-spacing: .03em; text-decoration: none;
    opacity: .95; text-shadow: 0 1px 8px rgba(5, 12, 30, .6); transition: opacity .3s;
}
.nav__link:hover, .nav__link.is-active { opacity: 1; color: #F2D58C; }
.nav__marker {     /* raya dorada debajo de la sección activa */
    position: absolute; bottom: .35rem; left: 0; height: 2px; width: 0;
    background: var(--gold); border-radius: 2px;
    transition: transform .55s var(--ease), width .55s var(--ease), opacity .3s;
    opacity: 0;
}

.burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06); cursor: pointer; position: relative; z-index: 2; }
.burger__lines, .burger__lines::before, .burger__lines::after {
    position: absolute; left: 50%; width: 18px; height: 2px; margin-left: -9px; background: currentColor; border-radius: 2px;
    transition: transform .45s var(--ease), opacity .3s;
}
.burger__lines { top: 50%; margin-top: -1px; }
.burger__lines::before, .burger__lines::after { content: ""; left: 0; margin: 0; }
.burger__lines::before { transform: translateY(-6px); }
.burger__lines::after { transform: translateY(6px); }
.burger[aria-expanded="true"] .burger__lines { background: transparent; }
.burger[aria-expanded="true"] .burger__lines::before { transform: rotate(45deg); background: var(--white); }
.burger[aria-expanded="true"] .burger__lines::after { transform: rotate(-45deg); background: var(--white); }

/* Barra de secciones del celular: siempre a la vista debajo del nombre de la escuela */
.nav-movil { display: none; position: relative; }
.nav-movil__lista {
    display: flex; gap: .45rem; overflow-x: auto; overscroll-behavior-x: contain;
    padding: .5rem var(--gutter) .6rem; scrollbar-width: none;
}
.nav-movil__lista::-webkit-scrollbar { display: none; }
.nav-movil__lista a {
    display: block; white-space: nowrap; padding: .42rem .95rem; border-radius: 999px;
    font-size: .86rem; font-weight: 600; letter-spacing: .02em; line-height: 1.3; text-decoration: none;
    color: var(--white); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .22);
    transition: background .3s, color .3s, border-color .3s;
}
.nav-movil__lista a.nav-movil__admision { border-color: var(--gold); color: var(--gold-soft); }
.nav-movil__lista a.is-active { background: var(--gold); border-color: var(--gold); color: var(--navy-ink); }
/* sombra en el borde derecho que avisa que hay más secciones al deslizar */
.nav-movil::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 2.2rem; pointer-events: none;
    background: linear-gradient(90deg, rgba(12, 26, 58, 0), rgba(12, 26, 58, .95));
}

/* Menú a pantalla completa */
.menu { position: fixed; inset: 0; z-index: 90; color: var(--white); }
.menu__bg { position: absolute; inset: 0; background: var(--navy-deep); clip-path: circle(0 at calc(100% - 3rem) 2.6rem); transition: clip-path .8s var(--ease-io); }
.menu.is-open .menu__bg { clip-path: circle(150% at calc(100% - 3rem) 2.6rem); }
.menu__inner { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 2.5rem; padding-top: 4rem; }
.menu__list li { overflow: hidden; }
.menu__list a {
    display: flex; align-items: baseline; gap: 1rem;
    font-family: var(--f-display); font-size: clamp(2rem, 9vw, 3rem); font-weight: 600; line-height: 1.25; text-decoration: none;
    transform: translateY(110%); transition: transform .7s var(--ease), color .3s;
}
.menu__list a:hover { color: var(--gold-soft); }
.menu.is-open .menu__list a { transform: none; }
.menu__num { font-family: var(--f-body); font-size: .75rem; color: var(--gold); letter-spacing: .1em; }
.menu__foot { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .9rem; opacity: 0; transition: opacity .6s .5s; }
.menu.is-open .menu__foot { opacity: .75; }
.menu__foot a { text-decoration: none; }

/* ---------- 9. Portada ---------- */
.hero {
    position: relative; min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column; justify-content: flex-end;
    color: var(--white); overflow: hidden; background: var(--navy-ink);
    padding-top: var(--header-h);
}
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
    position: absolute; inset: 0; overflow: hidden;
    translate: 100% 0;
    transition: translate 1.4s var(--ease-io);
}
.hero__slide.is-active { translate: none; z-index: 2; }
.hero__slide.is-leaving { translate: none; z-index: 1; }
.hero__slide img {
    width: 100%; height: 100%; object-fit: cover;
    translate: -100% 0;   /* la foto nueva entra de lado, como una cortina */
    transform: scale(1.18); transition: transform 8s linear, translate 1.4s var(--ease-io);
}
.hero__slide.is-active img, .hero__slide.is-leaving img { translate: none; }
.hero__slide.is-active img { transform: scale(1.02); }
.hero__slide.is-leaving img { transform: scale(1); transition: transform 1.4s var(--ease-io), translate 1.4s var(--ease-io); }
.hero__slide--top img { object-position: center 25%; }

.hero__shade {     /* sombra sobre la foto para que los textos se lean bien */
    position: absolute; inset: 0; z-index: 3;
    background:
        radial-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 3px 3px,
        linear-gradient(180deg, rgba(8, 18, 41, .55) 0%, rgba(8, 18, 41, 0) 25%),
        linear-gradient(90deg, rgba(8, 18, 41, .93) 0%, rgba(12, 26, 58, .72) 45%, rgba(12, 26, 58, .15) 100%),
        linear-gradient(0deg, rgba(8, 18, 41, .9) 0%, rgba(8, 18, 41, 0) 45%);
}
.hero__content { position: relative; z-index: 4; padding-bottom: clamp(2rem, 5vh, 3.5rem); }
.hero__title {
    font-family: var(--f-display); font-weight: 600;
    font-size: clamp(2.9rem, 6.4vw, 6.2rem); line-height: .96; letter-spacing: -.015em;
    margin-bottom: 1.6rem;
    text-shadow: 0 2px 24px rgba(5, 12, 30, .45);
}
.hero__title em { color: var(--gold-soft); font-weight: 500; }
/* Textos de la portada más grandes y con más contraste sobre las fotos */
.hero__eyebrow { font-size: .92rem; color: #F2D58C; text-shadow: 0 1px 10px rgba(5, 12, 30, .7); }
.hero__lead strong { color: #F2D58C; font-weight: 700; }
/* Espacio abajo para que no se corten letras como la g o la p, sin separar más las líneas */
.split-line { display: block; overflow: hidden; padding-bottom: .2em; margin-bottom: -.14em; }
.split-line > span { display: inline-block; }
.hero__lead { font-size: clamp(1.18rem, 1.75vw, 1.45rem); line-height: 1.6; font-weight: 500; max-width: 40rem; color: var(--white); text-shadow: 0 1px 14px rgba(5, 12, 30, .75); margin-bottom: 2.2rem; }
/* Lema de la escuela, debajo del nombre */
.hero__motto {
    display: flex; align-items: center; gap: .9rem;
    font-family: var(--f-display); font-style: italic; font-weight: 600;
    font-size: clamp(1.6rem, 2.8vw, 2.3rem); line-height: 1.1; letter-spacing: .02em;
    color: var(--gold-soft); text-shadow: 0 2px 18px rgba(5, 12, 30, .7);
    margin: .2rem 0 1.1rem;
}
.hero__motto::before { content: ""; width: 2.6rem; height: 2px; background: var(--gold); flex: none; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.hero__bar {
    position: relative; z-index: 4;
    display: flex; align-items: center; justify-content: flex-end; gap: 2rem;
    padding-block: 1.6rem 2rem; border-top: 1px solid rgba(255, 255, 255, .18);
}
.hero__arrows { display: flex; gap: .6rem; }

.scroll-cue {
    position: absolute; z-index: 4; right: var(--gutter); top: 50%;
    width: 28px; height: 46px; border-radius: 99px; border: 1.5px solid rgba(255, 255, 255, .55);
}
.scroll-cue span { position: absolute; left: 50%; top: 9px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px; background: var(--gold); animation: rueda 2s var(--ease) infinite; }
@keyframes rueda { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(16px); opacity: 0; } 100% { opacity: 0; } }

/* Los textos de la portada aparecen después de la entrada con el escudo */
[data-hero-in] { opacity: 0; transform: translateY(40px); }
.split-line > [data-hero-in] { opacity: 1; transform: translateY(105%); }
.is-ready [data-hero-in] { opacity: 1; transform: none; transition: transform 1.2s var(--ease), opacity 1s var(--ease); transition-delay: calc(var(--d, 0) * 1ms); }
.no-js [data-hero-in] { opacity: 1; transform: none; }

/* ---------- 10. Franja en movimiento ---------- */
.marquee {
    background: var(--crimson); color: var(--white);
    overflow: hidden; padding-block: 1.15rem;
    border-block: 1px solid rgba(196, 154, 44, .55);
}
.marquee__track { display: flex; width: max-content; animation: desliza 45s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
    display: inline-flex; align-items: center; gap: 2.2rem; padding-right: 2.2rem;
    font-family: var(--f-display); font-size: clamp(1.4rem, 2.6vw, 2.1rem); font-weight: 500; font-style: italic; white-space: nowrap;
}
.marquee__item::after { content: "✦"; font-style: normal; font-size: .8em; color: var(--gold-soft); }
@keyframes desliza { to { transform: translateX(-50%); } }

/* ---------- 11. Nosotros ---------- */
.about__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.statement {
    font-family: var(--f-display); font-size: clamp(1.5rem, 2.4vw, 2.05rem); line-height: 1.3; font-weight: 500;
    color: var(--navy); margin-block: 2rem 1.5rem;
}
.statement .w { opacity: .16; transition: opacity .3s; }
.statement .w.on { opacity: 1; }
.about__p { color: var(--muted); max-width: 36rem; }

.about__visual { position: relative; aspect-ratio: 1 / 1.05; }
.about__photo { position: absolute; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__photo .about__next { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.about__photo .about__next.is-in { opacity: 1; }
.about__photo--a { inset: 0 22% 26% 0; }
.about__photo--b { inset: 46% 0 0 34%; border: 6px solid var(--bg); }
.crest--about { position: absolute; z-index: 2; width: 30%; left: -3%; bottom: 6%; }
.crest--about::before { box-shadow: 0 20px 60px rgba(8, 18, 41, .35); }

.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: clamp(4rem, 8vw, 6.5rem); }
.pillar {
    position: relative; overflow: hidden; isolation: isolate;
    padding: clamp(2rem, 4vw, 3rem); border-radius: var(--radius);
    background: var(--white); border: 1px solid var(--line);
    transition: transform .6s var(--ease), box-shadow .6s var(--ease), color .6s;
}
.pillar::before {     /* fondo azul que entra desde abajo */
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
    transform: translateY(101%); transition: transform .7s var(--ease);
}
.pillar::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--crimson), var(--gold)); transition: width .8s var(--ease); }
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow); color: rgba(255, 255, 255, .82); }
.pillar:hover::before { transform: none; }
.pillar:hover::after { width: 100%; }
.pillar__num { font-family: var(--f-display); font-size: 4.2rem; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--gold); display: block; margin-bottom: .8rem; }
.pillar__title { font-family: var(--f-display); font-size: 2.3rem; font-weight: 600; color: var(--navy); margin-bottom: .9rem; transition: color .6s; }
.pillar:hover .pillar__title { color: var(--white); }
.pillar p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }

/* ---------- 12. Oferta ---------- */
.oferta { overflow: hidden; }
.oferta::before {     /* resplandor decorativo */
    content: ""; position: absolute; width: 60vw; aspect-ratio: 1; right: -20vw; top: -20vw; border-radius: 50%;
    background: radial-gradient(circle, rgba(179, 18, 46, .28), transparent 65%);
    pointer-events: none;
}
.oferta__grid { display: grid; grid-template-columns: .85fr 1.6fr; gap: 1.5rem; position: relative; }
.nivel {
    position: relative; overflow: hidden;
    padding: clamp(1.8rem, 3.5vw, 2.8rem); border-radius: var(--radius);
    background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .12);
}
.nivel--basica { background: linear-gradient(170deg, var(--crimson) 0%, var(--wine) 55%, var(--crimson-dark) 100%); border-color: transparent; color: rgba(255, 255, 255, .88); }
.nivel__crest { position: absolute; width: 62%; right: -18%; top: -14%; opacity: .1; pointer-events: none; }
.nivel__crest img { animation: girar 70s linear infinite; }
.nivel__tag { font-size: .74rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 1rem; }
.nivel__title { font-family: var(--f-display); font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1.05; color: var(--white); font-weight: 600; margin-bottom: 1rem; }
.nivel__text { max-width: 36rem; }
.ciclos { margin-top: 2rem; display: grid; }
.ciclos li { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1rem; border-top: 1px solid rgba(255, 255, 255, .22); }
.ciclos li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .22); }
.ciclos__name { font-weight: 700; color: var(--white); }
.ciclos__grades { font-family: var(--f-display); font-size: 1.2rem; font-style: italic; color: var(--gold-soft); }

.modalidades { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1.8rem; }
.modalidad { border-radius: var(--radius-sm); overflow: hidden; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); display: flex; flex-direction: column; }
.modalidad__img { aspect-ratio: 3 / 2; overflow: hidden; }     /* foto de grupo de cada bachillerato */
.modalidad__img img { width: 100%; height: 100%; object-fit: cover; }
.modalidad__body { padding: 1.4rem; }
.modalidad__title { font-family: var(--f-display); font-size: 1.5rem; line-height: 1.15; color: var(--white); font-weight: 600; margin-bottom: .9rem; }
.link-list li { border-top: 1px solid rgba(255, 255, 255, .1); }
.link-list a {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding-block: .7rem; text-decoration: none; color: rgba(255, 255, 255, .85); font-weight: 600; font-size: .95rem;
    transition: color .3s, padding .45s var(--ease);
}
.link-list a::after { content: "→"; color: var(--gold); transition: transform .45s var(--ease); }
.link-list a:hover { color: var(--white); padding-left: .5rem; }
.link-list a:hover::after { transform: translateX(4px); }

/* ---------- 13. Especialidades ---------- */
.tabs { position: relative; display: inline-flex; padding: .3rem; border-radius: 99px; background: var(--white); border: 1px solid var(--line); }
.tabs__btn {
    position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
    padding: .55rem 1.2rem; border-radius: 99px; font-weight: 700; font-size: .88rem; color: var(--muted);
    transition: color .4s;
}
.tabs__btn.is-active { color: var(--white); }
.tabs__pill { position: absolute; top: .3rem; bottom: .3rem; left: 0; border-radius: 99px; background: var(--navy); transition: transform .55s var(--ease), width .55s var(--ease); }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.card {
    --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
    position: relative; overflow: hidden; isolation: isolate;
    aspect-ratio: 3 / 4; border-radius: var(--radius);
    color: var(--white); text-decoration: none; background: var(--navy);
    transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .5s var(--ease), box-shadow .5s, opacity .5s, scale .5s;
    box-shadow: var(--shadow-sm);
}
.card:hover { box-shadow: var(--shadow); }
/* Las tarjetas que no son del filtro elegido se esconden siempre, también las de afiche */
.card.is-filtered { display: none !important; }
.card__img { position: absolute; inset: 0; z-index: -2; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.card__img--poster img { object-position: 80% center; }
.card:hover .card__img img { transform: scale(1.08); }
.card::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(8, 18, 41, 0) 30%, rgba(8, 18, 41, .92) 100%);
    transition: background .5s;
}
.card::after {     /* brillo que sigue al mouse */
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
    background: radial-gradient(400px circle at var(--mx) var(--my), rgba(226, 195, 119, .28), transparent 45%);
}
.card:hover::after { opacity: 1; }
.card__tag {
    position: absolute; top: 1rem; left: 1rem;
    padding: .3rem .75rem; border-radius: 99px;
    font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    background: rgba(8, 18, 41, .78); border: 1px solid rgba(255, 255, 255, .25);
}
.card__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem; }
.card__title, .card__text { display: block; }
.card__title { font-family: var(--f-display); font-size: 1.75rem; line-height: 1.05; font-weight: 600; }
.card__text {
    font-size: .9rem; color: rgba(255, 255, 255, .8); line-height: 1.5;
    max-height: 0; opacity: 0; overflow: hidden;
    transition: max-height .6s var(--ease), opacity .5s, margin .6s var(--ease);
}
.card:hover .card__text, .card:focus-visible .card__text { max-height: 6rem; opacity: 1; margin-top: .6rem; }
/* Siempre visible, también en celular */
.card__more { display: flex; align-items: center; gap: .5rem; margin-top: .9rem; font-size: .82rem; font-weight: 700; color: var(--gold-soft); letter-spacing: .04em; }
.card__more svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .4s var(--ease); }
.card:hover .card__more svg { transform: translateX(5px); }


/* Tarjetas con afiche: el afiche se ve completo, sin cortar.
   Arriba va el afiche y abajo el texto, sobre azul. */
.card.card--poster { aspect-ratio: auto; display: flex; flex-direction: column; }
.card.card--poster::before { display: none; }
.card--poster .card__img--poster { position: relative; inset: auto; z-index: 0; aspect-ratio: 1 / 1; }
.card--poster .card__img--poster img { object-fit: contain; object-position: center; }
.card.card--poster:hover .card__img img { transform: none; }
.card--poster .card__tag { position: static; align-self: flex-start; margin: 1rem 1.3rem 0; }
.card--poster .card__body { position: relative; flex: 1; padding: .6rem 1.3rem 1.3rem; }
.card--poster .card__title { font-size: 1.5rem; }
.card--poster .card__text { max-height: none; opacity: 1; margin-top: .45rem; }

/* ---------- 15. Galería ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.chips__btn {
    padding: .55rem 1.1rem; border-radius: 99px; cursor: pointer;
    border: 1px solid var(--line); background: var(--white);
    font-weight: 600; font-size: .88rem; color: var(--text);
    transition: background .35s, color .35s, border-color .35s, transform .35s var(--ease);
}
.chips__btn:hover { border-color: var(--navy); transform: translateY(-2px); }
.chips__btn.is-active { background: var(--navy); color: var(--white); border-color: var(--navy); }

.albums { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 15rem; grid-auto-flow: dense; gap: 1rem; }
.album {
    position: relative; overflow: hidden; border-radius: var(--radius);
    border: 0; padding: 0; cursor: pointer; text-align: left; color: var(--white);
    background: var(--navy);
    animation: entraAlbum .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms);
}
.album--big { grid-column: span 2; grid-row: span 2; }
.album--wide { grid-column: span 2; }
.album img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; transition: transform 1.1s var(--ease); }   /* la foto se corta desde abajo para no cortar cabezas */
.album picture { display: contents; }
.album:hover img { transform: scale(1.07); }
.album::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(8, 18, 41, .85)); }
.album__info { position: absolute; z-index: 1; left: 1.2rem; right: 1.2rem; bottom: 1.1rem; }
.album__cat { font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
.album__title { display: block; font-family: var(--f-display); font-size: 1.45rem; line-height: 1.1; font-weight: 600; margin-top: .2rem; }
.album--big .album__title { font-size: 2.1rem; }
.album__count {
    position: absolute; z-index: 1; top: 1rem; right: 1rem;
    padding: .25rem .7rem; border-radius: 99px; font-size: .72rem; font-weight: 700;
    background: rgba(255, 255, 255, .92); color: var(--navy);
    transform: translateY(-6px); opacity: 0; transition: .4s var(--ease);
}
.album:hover .album__count, .album:focus-visible .album__count { transform: none; opacity: 1; }
.album__badge {
    position: absolute; z-index: 1; top: 1rem; left: 1rem;
    padding: .3rem .8rem; border-radius: 99px; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    background: var(--gold); color: var(--navy-ink); box-shadow: 0 4px 14px rgba(8, 18, 41, .35);
}
.album--soon { cursor: default; background: linear-gradient(150deg, var(--navy) 0%, var(--navy-deep) 100%); }
.album--soon::before {
    content: ""; position: absolute; width: 70%; aspect-ratio: 1; right: -15%; top: -18%;
    background: url("multimedia/escudo.png") center / contain no-repeat; opacity: .08;
}
.album--soon::after { display: none; }
.album__soon { font-size: .8rem; color: rgba(255, 255, 255, .6); display: block; margin-top: .3rem; }
@keyframes entraAlbum { from { opacity: 0; transform: translateY(30px) scale(.97); } }
/* "Todas" en computadora: la banda en grande, a la par las especialidades y abajo lo demás,
   en tarjetas de distintos tamaños. El tamaño de cada álbum se pone en datos.js. */
@media (min-width: 1101px) {
    .albums--todas { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 6rem; grid-auto-flow: row; }
    .albums--todas .album { grid-column: span var(--c, 2); grid-row: span var(--r, 2); }
    .albums--todas .album:not(.album--grande):not(.album--big) .album__title { font-size: 1.15rem; }
    .albums--todas .album:not(.album--grande):not(.album--big) .album__info { left: .9rem; right: .9rem; bottom: .9rem; }
    .albums--todas .album:not(.album--grande):not(.album--big) .album__cat { font-size: .6rem; letter-spacing: .1em; }
    .albums--todas .album--grande .album__title, .albums--todas .album--big .album__title { font-size: 1.9rem; }
}

/* ---------- 16. Admisión ---------- */
.admision { position: relative; overflow: hidden; color: rgba(255, 255, 255, .85); padding-block: clamp(5rem, 11vw, 9rem); background: var(--navy-ink); }
.admision__bg { position: absolute; inset: -10% 0; }
.admision__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.admision::before {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(110deg, rgba(143, 14, 36, .95) 0%, rgba(155, 28, 44, .82) 40%, rgba(12, 26, 58, .9) 100%);
}
.admision__inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.admision__lead { font-size: 1.15rem; margin-block: 1.4rem 2.2rem; max-width: 30rem; }
.admision__actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.faq { background: rgba(255, 255, 255, .97); color: var(--text); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.4rem); box-shadow: var(--shadow); }
.faq__title { font-family: var(--f-display); font-size: 2rem; color: var(--navy); font-weight: 600; margin-bottom: 1rem; }
.faq__item { border-top: 1px solid var(--line); }
.faq__item summary {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding-block: 1.1rem; font-weight: 700; color: var(--navy); cursor: pointer; list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__icon { position: relative; width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1px solid var(--line); transition: background .35s, border-color .35s, transform .5s var(--ease); }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; margin: -.75px 0 0 -5px; background: var(--crimson); transition: transform .5s var(--ease), background .3s; }
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon { background: var(--crimson); border-color: var(--crimson); transform: rotate(180deg); }
.faq__item[open] .faq__icon::before, .faq__item[open] .faq__icon::after { background: var(--white); }
.faq__item[open] .faq__icon::after { transform: rotate(0); }
.faq__body { overflow: hidden; }
.faq__body p { padding-bottom: 1.1rem; color: var(--muted); }

/* ---------- 17. Contacto ---------- */
.contacto__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: stretch; }
.info { margin-top: 2.4rem; }
.info__row { display: grid; grid-template-columns: 13rem 1fr; gap: 1rem; padding-block: 1.05rem; border-top: 1px solid var(--line); }
.info__row:last-child { border-bottom: 1px solid var(--line); }
.info dt { display: flex; align-items: center; gap: .7rem; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.info dt svg { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: var(--crimson); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.info dd { font-weight: 600; color: var(--navy); }
.info dd a { text-decoration: none; background: linear-gradient(var(--gold), var(--gold)) left bottom / 100% 1px no-repeat; transition: color .3s; }
.info dd a:hover { color: var(--crimson); }
.pending { font-style: italic; color: var(--muted) !important; font-weight: 500 !important; }
.map { border-radius: var(--radius); overflow: hidden; min-height: 26rem; box-shadow: var(--shadow); background: var(--surface); }
.map { position: relative; }
.map iframe { position: relative; width: 100%; height: 100%; min-height: 26rem; border: 0; display: block; }
/* Si no hay internet, en lugar del mapa se ve la dirección con un botón */
.map__aviso { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; padding: 2rem; text-align: center; background: var(--navy); color: rgba(255, 255, 255, .78); }
.map__aviso svg { width: 2.6rem; height: 2.6rem; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.map__nombre { font-family: var(--f-display); font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; font-weight: 600; color: #fff; }
.map__nombre em { color: var(--gold); }
.map__dir { max-width: 26rem; font-size: .95rem; text-wrap: balance; }
.map__aviso .btn { margin-top: .6rem; }

/* ---------- 18. Pie ---------- */
.footer { background: var(--navy-ink); color: rgba(255, 255, 255, .7); padding-top: clamp(4rem, 8vw, 6rem); overflow: hidden; position: relative; }
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--crimson) 0 70%, var(--gold) 70% 100%); }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 3rem; }
.footer__name { font-family: var(--f-display); font-size: 1.8rem; line-height: 1.1; color: var(--white); font-weight: 600; margin-block: 1.2rem .8rem; }
.footer__name em { color: var(--gold-soft); }
.footer__text { max-width: 22rem; font-size: .95rem; }
.footer__heading { font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.2rem; font-weight: 700; }
.footer__list li { margin-bottom: .55rem; font-size: .95rem; }
.footer__list a { text-decoration: none; transition: color .3s; }
.footer__list a:hover { color: var(--white); }
.footer__giant {
    font-family: var(--f-display); font-style: italic; font-weight: 500;
    font-size: clamp(3rem, 11vw, 10.5rem); line-height: 1; white-space: nowrap; text-align: center;
    margin-top: clamp(3rem, 6vw, 5rem);
    color: transparent; -webkit-text-stroke: 1px rgba(196, 154, 44, .45);
}
.footer__giant span { display: inline-block; background: linear-gradient(90deg, var(--gold-soft), var(--gold)) 0 0 / 0% 100% no-repeat; -webkit-background-clip: text; background-clip: text; transition: background-size 2.2s var(--ease);
    padding-bottom: .18em;   /* espacio para las letras que bajan de la línea (la "y" y la "f" del lema) */
}
.footer__giant.is-in span { background-size: 100% 100%; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.6rem; margin-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .82rem; }

/* ---------- 19. Ventana con la información de cada especialidad ---------- */
.detail {
    position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
    margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden;
    color: var(--text); color-scheme: light;   /* así el texto se lee aunque el navegador esté en modo oscuro */
}
.detail::backdrop { background: rgba(8, 18, 41, 0); transition: background .6s; }
.detail.is-open::backdrop { background: rgba(8, 18, 41, .74); }
.detail__panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(100%, 980px);
    background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(100%); transition: transform .8s var(--ease-io);
}
.detail.is-open .detail__panel { transform: none; }
.detail__close { position: fixed; top: 1.2rem; right: 1.2rem; z-index: 3; background: rgba(8, 18, 41, .78); }
/* Arriba la foto completa, sin que ocupe toda la pantalla para que se vea la información,
   y debajo el nombre en una franja azul, sin tapar la foto. */
.detail__hero { position: relative; background: var(--navy); color: var(--white); }
.detail__slides {
    position: relative; aspect-ratio: 16 / 10; width: min(100%, calc(52vh * 1.6)); max-width: 100%; margin-inline: auto;
    overflow: hidden; background: var(--navy-deep);
}
.detail__slides::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 18, 41, .35), transparent 22%); pointer-events: none; }
.detail__slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity 1s, transform 6s linear; }
.detail__slides img.is-active { opacity: 1; transform: scale(1); }
.detail__slides img.is-contain { object-fit: contain; background: var(--navy-deep); }
/* Flechas para pasar las fotos más rápido */
.detail__arrow { position: absolute; top: calc(50% - 1.5rem); z-index: 2; background: rgba(8, 18, 41, .7); }
.detail__arrow--prev { left: .8rem; }
.detail__arrow--next { right: .8rem; }
@media (hover: none) { .detail__arrow:hover { background: rgba(8, 18, 41, .7); color: var(--white); border-color: rgba(255, 255, 255, .35); transform: none; } }
.detail__heading { padding: clamp(.9rem, 2vw, 1.3rem) clamp(1.4rem, 4vw, 3rem); border-bottom: 3px solid var(--gold); }
.detail__heading .eyebrow { margin-bottom: .3rem; }
.detail__title { font-family: var(--f-display); font-size: clamp(2.2rem, 4.4vw, 3.3rem); line-height: .98; font-weight: 600; }
.detail__dots { display: flex; gap: .4rem; margin-top: .7rem; }
.detail__dot { width: 26px; height: 3px; border: 0; padding: 0; border-radius: 3px; background: rgba(255, 255, 255, .35); cursor: pointer; transition: background .3s, width .4s var(--ease); }
.detail__dot.is-active { background: var(--gold); width: 44px; }
.detail__body { padding: clamp(1.8rem, 4vw, 3rem); display: grid; gap: 2.2rem; }
.detail__lead { font-family: var(--f-display); font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.35; color: var(--navy); font-weight: 500; }
.detail__meta { display: flex; flex-wrap: wrap; gap: .6rem; }
.detail__meta span { padding: .4rem .9rem; border-radius: 99px; background: var(--white); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; }
.detail__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.detail__box { background: var(--white); border-radius: var(--radius-sm); padding: 1.6rem; border: 1px solid var(--line); }
.detail__box--wide { grid-column: 1 / -1; }     /* "Es para ti si…": a lo ancho, con la lista en columnas */
.detail__box--wide .checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); column-gap: 1.6rem; }
.detail__box--wide .checklist li { border-top: 0; }
.detail__sub { font-family: var(--f-display); font-size: 1.6rem; color: var(--navy); font-weight: 600; margin-bottom: .8rem; }
.checklist li { position: relative; padding: .45rem 0 .45rem 1.8rem; border-top: 1px solid var(--surface); }
.checklist li:first-child { border-top: 0; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .95rem; width: .8rem; height: .45rem; border-left: 2px solid var(--crimson); border-bottom: 2px solid var(--crimson); transform: rotate(-45deg); }
.detail__poster { display: grid; grid-template-columns: 9rem 1fr; gap: 1.4rem; align-items: center; background: var(--navy); color: rgba(255, 255, 255, .8); border-radius: var(--radius-sm); padding: 1.2rem; }
.detail__poster button { border: 0; padding: 0; cursor: zoom-in; border-radius: 8px; overflow: hidden; background: none; }
.detail__poster img { transition: transform .6s var(--ease); }
.detail__poster button:hover img { transform: scale(1.05); }
.detail__poster strong { display: block; font-family: var(--f-display); color: var(--white); font-size: 1.4rem; font-weight: 600; }
.detail__actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.detail__actions .btn--ghost { color: var(--navy); border-color: var(--navy); background: transparent; }   /* sin el fondo gris sobre el blanco */
.detail__actions .btn--ghost::before { background: var(--navy); }
.detail__actions .btn--ghost:hover { color: var(--white); }
.detail__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.6rem; }
.detail__nav a { text-decoration: none; padding: 1rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid var(--line); transition: background .35s, border-color .35s, transform .35s var(--ease); }
.detail__nav a:hover { background: var(--white); border-color: var(--gold); transform: translateY(-3px); }
.detail__nav a:last-child { text-align: right; }
.detail__nav small { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.detail__nav span { font-family: var(--f-display); font-size: 1.35rem; color: var(--navy); font-weight: 600; }
.detail__body > * { opacity: 0; transform: translateY(24px); }
.detail.is-open .detail__body > * { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(350ms + var(--i, 0) * 80ms); }

/* ---------- 20. Visor de fotos ---------- */
.lightbox {
    width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
    background: rgba(8, 18, 41, .96); color: var(--white); color-scheme: light;
}
.lightbox[open] { display: grid; place-items: center; animation: aparece .4s; }
.lightbox::backdrop { background: transparent; }
.lightbox__figure { display: grid; justify-items: center; gap: .9rem; max-width: 92vw; }
/* Todas las fotos ocupan el mismo espacio en el visor, aunque el archivo sea pequeño */
.lightbox__img { width: 88vw; height: 78vh; object-fit: contain; }
.lightbox__img.is-in { animation: fotoEntra .6s var(--ease); }
@keyframes fotoEntra { from { opacity: 0; transform: scale(.96); } }
.lightbox__caption { text-align: center; display: grid; }
.lightbox__title { font-family: var(--f-display); font-size: 1.4rem; }
.lightbox__meta { font-size: .82rem; opacity: .6; letter-spacing: .1em; }
.lightbox__close { position: absolute; top: 1.2rem; right: 1.2rem; }
.lightbox__nav { position: absolute; top: 50%; margin-top: -1.5rem; }
.lightbox__nav--prev { left: 1.2rem; }
.lightbox__nav--next { right: 1.2rem; }

/* ---------- 21. Volver arriba ---------- */
.to-top {
    position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 80;
    width: 54px; height: 54px; border-radius: 50%;
    background: var(--navy); box-shadow: var(--shadow-sm);
    opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none;
    transition: opacity .4s, transform .5s var(--ease), background .3s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--crimson); }
.to-top svg { width: 100%; height: 100%; fill: none; }
.to-top__track { stroke: rgba(255, 255, 255, .15); stroke-width: 2; }
.to-top__ring { stroke: var(--gold); stroke-width: 2; stroke-dasharray: 132; stroke-dashoffset: 132; transform: rotate(-90deg); transform-origin: center; }
.to-top__arrow { stroke: var(--white); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 22. Cosas que aparecen al ir bajando ---------- */
.js [data-reveal] { opacity: 0; translate: 0 46px; transition: opacity 1s var(--ease), translate 1.2s var(--ease), scale 1.2s var(--ease); transition-delay: calc(var(--d, 0) * 1ms); }
.js [data-reveal="up"] { translate: 0 80px; }
.js [data-reveal="zoom"] { translate: none; scale: .92; }
.js [data-reveal="wipe"] { opacity: 1; translate: none; position: relative; }
/* Efecto cortina: una tapa del color del fondo sube y va dejando ver la foto. */
.js [data-reveal="wipe"]::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: var(--surface);
    transition: transform 1.4s var(--ease-io);
}
.js [data-reveal="wipe"].is-in::after { transform: translateY(-100%); }
.js [data-reveal="lines"] { opacity: 1; translate: none; }
.js [data-reveal="lines"] .split-line > span { transform: translateY(105%); transition: transform 1.2s var(--ease); transition-delay: calc(var(--d, 0) * 1ms + var(--l, 0) * 110ms); }
.js [data-reveal].is-in { opacity: 1; translate: none; scale: none; }
.js .card[data-reveal] { transition: opacity 1s var(--ease), translate 1.2s var(--ease), transform .5s var(--ease), box-shadow .5s; }
.js [data-reveal="lines"].is-in .split-line > span { transform: none; }
/* Lo que se mueve todo el tiempo se detiene cuando no se ve, para que la página no se ponga lenta */
.anim-pausada, .anim-pausada * { animation-play-state: paused !important; }
[data-parallax] { will-change: translate; }

/* ---------- 23. Cómo se acomoda en tablet y celular ---------- */
@media (max-width: 1100px) {
    .nav, .header__cta { display: none; }
    .burger { display: block; }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .card { aspect-ratio: 4 / 4.4; }
    .oferta__grid { grid-template-columns: 1fr; }
    .albums { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
    :root { --header-h: 72px; }
    .head--split, .about__grid, .pillars, .admision__inner, .contacto__grid, .footer__top, .detail__cols { grid-template-columns: 1fr; }
    .about__visual { max-width: 560px; width: 100%; margin-inline: auto; }
    .modalidades { grid-template-columns: 1fr; }
    .albums { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 12rem; }
    .info__row { grid-template-columns: 1fr; gap: .3rem; }
    .scroll-cue { display: none; }
}
@media (max-width: 560px) {
    body { font-size: 1rem; }
    .brand__sub { display: none; }
    .brand__name { font-size: 1.12rem; }
    .crest--brand { width: 42px; }
    .cards { grid-template-columns: 1fr; }
    .card { aspect-ratio: 4 / 3.6; }
    .card__text { max-height: 6rem; opacity: 1; margin-top: .5rem; }
    .albums { grid-template-columns: 1fr 1fr; grid-auto-rows: 10rem; }
    .album--big { grid-row: span 2; }
    .album__title { font-size: 1.15rem; }
    .footer__giant { white-space: normal; font-size: 3.2rem; padding-inline: 1rem; }
    .album--big .album__title { font-size: 1.5rem; }
    .round-btn { width: 2.6rem; height: 2.6rem; }
    .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
    .detail__poster { grid-template-columns: 6rem 1fr; }
    .detail__nav { grid-template-columns: 1fr; }
    .detail__nav a:last-child { text-align: left; }
    .lightbox__nav { top: auto; bottom: 1.2rem; margin: 0; }
    .tabs__btn { padding: .5rem .95rem; }
    .map, .map iframe { min-height: 20rem; }
}

/* Barra de secciones: solo en teléfonos (pantalla angosta y de tocar con el dedo).
   En computadora y tablet se queda el menú de siempre. */
@media (max-width: 760px) and (hover: none) and (pointer: coarse) {
    :root { --tira-h: 3.1rem; }
    .nav-movil { display: block; background: rgba(12, 26, 58, .96); border-top: 1px solid rgba(226, 195, 119, .25); }
    .menu-abierto .nav-movil { display: none; }
    .hero { padding-top: calc(var(--header-h) + var(--tira-h) + .75rem); }
    body:not([data-vista="inicio"]) #contenido { padding-top: var(--tira-h); }
    html { scroll-padding-top: calc(70px + var(--tira-h)); }
}

/* ---------- 24. Las animaciones se ven siempre, aunque la computadora tenga las animaciones apagadas ---------- */

/* ---------- 25. Fotos que se acomodan para que se vea lo importante ---------- */
/* Banda 9: lo más importante es la estudiante de la izquierda, así que la foto se centra en ella. */
.hero__slide img[src$="/banda-9.jpg"],
.album img[src$="/banda-9.jpg"],
.about__photo img[src$="/banda-9.jpg"] { object-position: 16% 40%; transform-origin: 24% 50%; }
.hero__slide img[src$="/banda-9.jpg"] { transform: scale(1); }
.hero__slide.is-active img[src$="/banda-9.jpg"],
.hero__slide.is-leaving img[src$="/banda-9.jpg"] { transform: scale(1.22); }
/* Portadas de álbum con enfoque propio, para que las personas salgan completas */
.album[data-album="spelling-bee"] img { object-position: center 22%; }
.album[data-album="maestros"] img { object-position: center 62%; }
.album[data-album="practicas-salud"] img { object-position: center 15%; }

/* En Admisiones, la Oferta y el Contacto salen debajo de la parte de admisión */
body[data-vista="admision"] #contenido { display: flex; flex-direction: column; }
body[data-vista="admision"] #oferta { order: 1; }
body[data-vista="admision"] #contacto { order: 2; }

/* Ciclos de Educación Básica: cada uno abre un cuadro pequeño con su información */
.ciclos li { display: block; padding: 0; }
.ciclos__btn {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem; width: 100%;
    padding: 1rem 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.ciclos__btn:hover .ciclos__name, .ciclos__btn:focus-visible .ciclos__name { color: var(--gold-soft); }
.ciclos__mas {
    display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; margin-left: .6rem; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .45); font-family: var(--f-body, inherit); font-style: normal; font-size: .9rem; line-height: 1; color: var(--white);
    vertical-align: middle; transition: background .3s, color .3s;
}
.ciclos__btn:hover .ciclos__mas { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.ciclo-info {
    width: min(40rem, calc(100% - 2rem)); margin: auto; padding: clamp(2rem, 4vw, 3rem) clamp(1.6rem, 4vw, 3rem); border: 0; border-top: 4px solid var(--gold);
    border-radius: var(--radius-sm); background: var(--white); color: var(--navy); color-scheme: light; box-shadow: var(--shadow);
}
/* Animación ligera al abrir: el cuadro sube un poco y aparece; el fondo se oscurece suavemente */
.ciclo-info[open] { animation: cicloEntra .45s cubic-bezier(.22, 1, .36, 1); }
.ciclo-info[open]::backdrop { background: rgba(8, 18, 41, .6); animation: cicloFondo .45s ease; }
@keyframes cicloEntra { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes cicloFondo { from { background: rgba(8, 18, 41, 0); } }
.ciclo-info__close {
    position: absolute; top: .7rem; right: .7rem; display: grid; place-items: center; width: 2.2rem; height: 2.2rem;
    border: 1px solid rgba(12, 26, 58, .2); border-radius: 50%; background: none; color: var(--navy); cursor: pointer;
}
.ciclo-info__close svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; }
.ciclo-info__tag { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--crimson, #9b1b30); }
.ciclo-info__title { margin-top: .3rem; font-family: var(--f-display); font-size: clamp(2.2rem, 4vw, 2.8rem); line-height: 1.05; font-weight: 600; }
.ciclo-info__grades { margin-top: .2rem; font-family: var(--f-display); font-style: italic; font-size: 1.4rem; color: var(--gold); }
.ciclo-info__text { margin-top: 1.1rem; font-size: 1.12rem; line-height: 1.6; color: var(--text); }
.ciclo-info__list { margin-top: 1.3rem; display: grid; gap: .65rem; font-size: 1.08rem; }
.ciclo-info__list li { position: relative; padding-left: 1.2rem; color: var(--text); }
.ciclo-info__list li::before { content: ""; position: absolute; left: 0; top: .55em; width: .45rem; height: .45rem; border-radius: 50%; background: var(--gold); }

/* ---------- Actividades recientes (en Inicio) ---------- */
.actividades__link {
    display: inline-flex; align-items: center; gap: .5rem;
    color: var(--crimson); font-weight: 700; text-decoration: none;
    border-bottom: 2px solid var(--gold); padding-bottom: .2rem;
}
.actividades__link svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .4s var(--ease); }
.actividades__link:hover svg { transform: translateX(4px); }
.actividades__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.actividad {
    position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--radius);
    border: 0; padding: 0; cursor: pointer; text-align: left; color: var(--white); background: var(--navy);
}
.actividad img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; transition: transform 1.1s var(--ease); }
.actividad:hover img { transform: scale(1.06); }
.actividad::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(8, 18, 41, .9)); }
.actividad::before { content: ""; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 4px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.actividad:hover::before, .actividad:focus-visible::before { transform: scaleX(1); }
.actividad__info { position: absolute; z-index: 1; left: 1.4rem; right: 1.4rem; bottom: 1.4rem; display: grid; gap: .3rem; }
.actividad__cat { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
.actividad__title { font-family: var(--f-display); font-size: 1.6rem; line-height: 1.1; font-weight: 600; }
.actividad__ver { font-size: .85rem; font-weight: 600; color: rgba(255, 255, 255, .8); margin-top: .3rem; }
@media (max-width: 860px) {
    .actividades__grid { grid-template-columns: 1fr; }
    .actividad { aspect-ratio: 16 / 10; }
}
