/* =============================================================================
   COLEGIO CUDI · Hoja de estilos
   -----------------------------------------------------------------------------
   ÍNDICE
   01. Base: variables, reset y tipografía
   02. Menú de navegación
   03. Intro de pantalla completa (solo inicio)
   04. Decoración y animaciones compartidas (destellos, aviones, ondas)
   05. Hero (inicio)
   06. Nosotros (inicio)
   07. Oferta educativa (inicio)
   08. Convenios y becas (inicio)
   09. Actividades extracurriculares (inicio)
   10. Contacto y formulario (inicio)
   11. Pie de página
   12. Páginas de nivel (Preescolar y Primaria)
   13. Botón y chat de WhatsApp
   14. Ajustes globales y accesibilidad
   15. Botón para volver al inicio
   ============================================================================= */


/* ==========================================================================
   01. BASE: VARIABLES, RESET Y TIPOGRAFÍA
   ========================================================================== */

:root {
    --b: #07589d;
    --b2: #0d4a8a;
    --o: #ed7627;
    --lb: #3a9ad0;
    --sh: 4px 6px 8px rgba(0, 0, 0, .32);
    --nh: 62px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nh);
    scrollbar-gutter: stable;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #222;
    background: #fff;
    overflow-x: hidden;
    font-size: clamp(14px, 1.6vw, 22px);
    padding-top: var(--nh);
}

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

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

.bg {
    background: #fff url(assets/fondo.jpg) center/cover;
}

.sec {
    position: relative;
    padding: clamp(48px, 8vw, 110px) 6%;
}

.wrap {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: auto;
}

h2,
.ot {
    font-family: 'Oswald', 'Arial Narrow', Impact, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.05;
    font-size: clamp(38px, 5.4vw, 74px);
    color: var(--b);
    text-align: center;
}

.o {
    color: var(--o);
}

.w {
    color: #fff;
}

p.j {
    text-align: justify;
    line-height: 1.3;
}

@media (max-width: 600px) {
    body {
        font-size: 15px;
    }

    .sec {
        padding-left: 5%;
        padding-right: 5%;
    }

    p.j {
        text-align: left;
    }

    h2,
    .ot {
        overflow-wrap: anywhere;
        font-size: clamp(30px, 8.4vw, 44px);
    }
}


/* ==========================================================================
   02. MENÚ DE NAVEGACIÓN
   ========================================================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 4%;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(8px);
    transform: none;
    transition: transform .4s, box-shadow .4s;
    height: var(--nh);
    box-shadow: 0 2px 14px rgba(0, 0, 0, .12);
}

.nav.on {
    transform: none;
    box-shadow: 0 2px 14px rgba(0, 0, 0, .12);
}

.nav img {
    height: 42px;
}

.nav nav {
    display: flex;
    gap: clamp(10px, 2vw, 28px);
    font-weight: 600;
    font-size: 14px;
    color: var(--b);
    overflow-x: auto;
}

.nav nav a {
    white-space: nowrap;
    transition: color .2s;
}

.nav nav a:hover {
    color: var(--o);
}

.nav nav a.act {
    color: var(--o);
}

.burger {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: none;
    cursor: pointer;
    position: relative;
}

.burger::before,
.burger::after,
.burger i {
    content: "";
    position: absolute;
    left: 9px;
    right: 9px;
    height: 3px;
    border-radius: 2px;
    background: var(--b);
    transition: .3s;
}

.burger::before {
    top: 13px;
}

.burger i {
    top: 20px;
}

.burger::after {
    top: 27px;
}

.nav.open .burger::before {
    top: 20px;
    transform: rotate(45deg);
}

.nav.open .burger i {
    opacity: 0;
}

.nav.open .burger::after {
    top: 20px;
    transform: rotate(-45deg);
}

@media (max-width: 860px) {
    .burger {
        display: block;
    }

    .nav nav {
        position: absolute;
        top: var(--nh);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: #fff;
        box-shadow: 0 12px 20px rgba(0, 0, 0, .14);
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s;
    }

    .nav.open nav {
        max-height: 380px;
    }

    .nav nav a,
    .nav nav a:nth-child(n+4) {
        display: block;
        padding: 14px 6%;
        font-size: 15px;
        border-top: 1px solid #eef2f7;
    }
}


/* ==========================================================================
   03. INTRO DE PANTALLA COMPLETA (SOLO INICIO)
   ========================================================================== */

.noscroll {
    overflow: hidden!important;
}

.noscroll .hero .rv {
    opacity: 0!important;
    transform: translateY(34px)!important;
}

.intro {
    will-change: transform;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: radial-gradient(circle at 50% 45%, #0c6cb9, #07589d 58%, #054a85);
    transition: transform 1.25s cubic-bezier(.65, 0, .25, 1) .55s;
}

.intro-b {
    will-change: transform;
    position: fixed;
    inset: 0;
    z-index: 99;
    background: var(--o);
    transition: transform 1.25s cubic-bezier(.65, 0, .25, 1) .73s;
}

.intro.out,
.intro-b.out {
    transform: translateY(calc(-100% - clamp(50px, 8vw, 120px) - 8px));
}

.fx {
    position: absolute;
    inset: 0;
    transition: opacity .8s ease-in-out;
}

.intro.out .fx {
    opacity: 0;
}

.intro .td {
    stroke: #fff;
}

.intro .plane path {
    fill: #fff;
    stroke: #fff;
}

.ic {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 6%;
}

.ic img {
    width: clamp(150px, 22vw, 260px);
    aspect-ratio: 1;
    animation: ipop 1s cubic-bezier(.2, 1.4, .4, 1) .2s both;
}

.it {
    font-weight: 800;
    color: #fff;
    font-size: clamp(24px, 4.4vw, 58px);
    line-height: 1.15;
    margin-top: 3vh;
}

.it span {
    display: inline-block;
    opacity: 0;
    animation: iup .7s ease both;
}

.it span:nth-child(1) {
    animation-delay: 1.1s;
}

.it span:nth-child(2) {
    animation-delay: 1.35s;
}

.ic p {
    color: #8fd0f5;
    font-size: clamp(14px, 2.2vw, 28px);
    letter-spacing: .14em;
    margin-top: 1.4vh;
    opacity: 0;
    animation: iup .7s 1.9s ease both;
}

.ib {
    width: min(260px, 60vw);
    height: 5px;
    background: rgba(255, 255, 255, .2);
    border-radius: 5px;
    margin-top: 5vh;
    overflow: hidden;
}

.ib i {
    display: block;
    height: 100%;
    background: var(--o);
    transform-origin: left;
    animation: ibar 4.3s linear .4s both;
}

.skip {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 20px;
    padding: 7px 16px;
    font: 600 13px Poppins;
    cursor: pointer;
    transition: background .2s;
}

.skip:hover {
    background: rgba(255, 255, 255, .3);
}

.iw {
    position: absolute;
    left: 0;
    top: calc(100% - 1px);
    width: 100%;
    height: clamp(50px, 8vw, 120px);
    transform: scaleY(-1);
}

@keyframes ipop {
    from {
        opacity: 0;
        transform: scale(.4) rotate(-25deg);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

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

@keyframes ibar {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}


/* ==========================================================================
   04. DECORACIÓN Y ANIMACIONES COMPARTIDAS (DESTELLOS, AVIONES, ONDAS)
   ========================================================================== */

.sp {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s, 40px);
    aspect-ratio: 1;
    z-index: 1;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0Q54 46 100 50Q54 54 50 100Q46 54 0 50Q46 46 50 0Z' fill='%23ed7627'/%3E%3C/svg%3E") center/contain no-repeat;
    animation: tw 3.2s ease-in-out infinite;
    animation-delay: var(--d, 0s);
}

.flight {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}

.trail {
    fill: none;
    stroke: #0a58a0;
    stroke-width: 3;
    stroke-dasharray: 10 12;
    stroke-linecap: round;
}

.plane path {
    fill: #fff;
    stroke: #0a58a0;
    stroke-width: 3;
    stroke-linejoin: round;
}

.ph {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 2px dashed rgba(7, 88, 157, .45);
    border-radius: 18px;
    background: rgba(7, 88, 157, .06);
    color: var(--b);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    padding: 10px;
}

.ph small {
    display: block;
    font-weight: 400;
    opacity: .75;
}

.float {
    animation: fl 5s ease-in-out infinite;
}

.rv {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity .8s, transform .8s;
}

.rv.in {
    opacity: 1;
    transform: none;
}

.wave {
    position: absolute;
    left: 0;
    width: 100%;
    height: clamp(50px, 8vw, 120px);
    z-index: 3;
    display: block;
}

.wave.t {
    top: calc(clamp(50px, 8vw, 120px) * -1 + 1px);
}

.wave.bt {
    bottom: -1px;
}

.sq {
    position: absolute;
    z-index: 1;
    width: clamp(50px, 8vw, 110px);
    opacity: .9;
}

.dc {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    animation: fl 7s ease-in-out infinite;
}

.deco {
    position: absolute;
    width: clamp(34px, 5.6vw, 82px);
    aspect-ratio: 1;
    z-index: 0;
    fill: none;
    stroke: #e3e3e3;
    color: #e3e3e3;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: rotate(var(--r, 0deg));
    pointer-events: none;
}

.plane .pb {
    animation: pbob 2.4s ease-in-out infinite;
    animation-duration: 3s;
}

.td {
    fill: none;
    stroke: #0a58a0;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes tw {
    50% {
        transform: scale(.7) rotate(25deg);
        opacity: .75;
    }
}

@keyframes fl {
    50% {
        transform: translateY(-12px);
    }
}

@keyframes pbob {
    50% {
        transform: translateY(-3px) rotate(-2deg);
    }
}

@media (max-width: 760px) {
    .sp {
        --s: 26px!important;
    }
}

@media (max-width: 600px) {
    .deco {
        width: 34px;
        opacity: .8;
    }
}


/* ==========================================================================
   05. HERO (INICIO)
   ========================================================================== */

.hero {
    min-height: min(100vh, 1040px);
    padding-top: clamp(40px, 5vw, 70px);
    padding-bottom: 0;
    text-align: center;
    overflow: hidden;
}

.hero .logo {
    width: clamp(120px, 17vw, 230px);
    margin: 0 auto 4vw;
}

.hero h1 {
    font-weight: 800;
    font-size: clamp(24px, 4vw, 54px);
    color: var(--b);
    line-height: 1.15;
}

.hero .sub {
    font-size: clamp(15px, 2.6vw, 35px);
    color: var(--lb);
    letter-spacing: .2px;
    margin-top: 4px;
}

.hero .ph {
    width: min(70%, 780px);
    aspect-ratio: 760/460;
    margin: 3vw auto 0;
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
}

.hero-img {
    width: min(70%, 780px);
    margin: 3vw auto 0;
    position: relative;
    z-index: 2;
    display: block;
    height: auto;
    margin-bottom: 0;
}

@media (max-width: 860px) {
    .hero {
        min-height: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 760px) {
    .hero .ph,
    .hero-img {
        width: 94%;
    }
}


/* ==========================================================================
   06. NOSOTROS (INICIO)
   ========================================================================== */

.nos {
    padding-bottom: 0;
}

.card {
    background: var(--b);
    border-radius: clamp(22px, 3vw, 36px);
    color: #fff;
    padding: clamp(28px, 4vw, 50px) 9%;
    text-align: center;
}

.card .ot {
    color: #fff;
    margin-bottom: .35em;
}

.nos .wrap {
    max-width: 1000px;
}


/* ==========================================================================
   07. OFERTA EDUCATIVA (INICIO)
   ========================================================================== */

.of {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5%;
    max-width: 1000px;
    margin: clamp(30px, 5vw, 70px) auto 0;
}

.lv {
    border-radius: 28px;
    box-shadow: var(--sh);
    padding: clamp(26px, 3.5vw, 44px) 6%;
    text-align: center;
    color: #fff;
    min-height: clamp(220px, 28vw, 380px);
    display: block;
    transition: transform .35s, box-shadow .35s;
}

.lv:hover {
    transform: translateY(-8px) rotate(-.6deg);
    box-shadow: 6px 14px 18px rgba(0, 0, 0, .35);
}

.lv h3 {
    font-family: 'Oswald', 'Arial Narrow', Impact, sans-serif;
    font-weight: 700;
    font-size: clamp(30px, 4.2vw, 58px);
    text-transform: uppercase;
    margin-bottom: .6em;
}

.lv p {
    font-weight: 300;
    line-height: 1.35;
    margin-bottom: 1em;
    font-size: clamp(12px, 1.55vw, 21px);
}

.lv b {
    font-weight: 700;
}

.lv small {
    font-size: .8em;
    display: block;
}

@media (max-width: 860px) {
    .of {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .of {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .lv {
        min-height: 0;
    }

    .lv p {
        font-size: 15px;
    }
}


/* ==========================================================================
   08. CONVENIOS Y BECAS (INICIO)
   ========================================================================== */

.blue {
    background: var(--b);
    color: #fff;
}

.conv {
    padding-top: clamp(40px, 6vw, 90px);
    text-align: center;
}

.conv .wrap {
    max-width: 900px;
}

.conv p {
    margin: clamp(20px, 3vw, 40px) 0;
}

.pc {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3%;
    max-width: 1010px;
    margin: 0 auto;
}

.pc div {
    background: var(--o);
    border-radius: 22px;
    padding: 18px 10px 22px;
    min-height: clamp(120px, 15vw, 200px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.1vw, 16px);
    transition: transform .3s;
}

.pc div:hover {
    transform: translateY(-6px) scale(1.04);
}

.pc strong {
    display: block;
    font-family: 'Oswald', 'Arial Narrow', Impact, sans-serif;
    font-weight: 700;
    font-size: clamp(36px, 5.2vw, 74px);
    line-height: 1;
}

.pc span {
    font-size: clamp(10px, 1.1vw, 15px);
    line-height: 1.3;
    display: block;
    padding: 0 6px;
}

@media (max-width: 760px) {
    .pc {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
}

@media (max-width: 600px) {
    .pc {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .pc div {
        min-height: 0;
    }

    .pc span {
        font-size: 12px;
    }

    .pc strong {
        font-size: 46px;
    }
}


/* ==========================================================================
   09. ACTIVIDADES EXTRACURRICULARES (INICIO)
   ========================================================================== */

.act .wrap {
    max-width: 1150px;
}

.ae {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 3%;
    align-items: center;
}

.ae .ph {
    aspect-ratio: 4/5;
    max-height: 560px;
}

.ae h2 {
    text-align: right;
}

.pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(10px, 1.6vw, 22px);
    margin-top: clamp(20px, 3vw, 40px);
}

.pill {
    background: var(--b2);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    border-radius: 60px;
    box-shadow: var(--sh);
    padding: clamp(10px, 1.6vw, 22px) 10px;
    font-size: clamp(13px, 2.1vw, 30px);
    line-height: 1.1;
    white-space: nowrap;
    display: grid;
    place-items: center;
    min-height: clamp(46px, 6vw, 86px);
    transition: transform .3s, background .3s;
}

.pill:hover {
    transform: translateY(-5px) scale(1.04);
    background: var(--b);
}

.pill small {
    display: block;
    font-weight: 400;
    font-size: .45em;
}

.pills .e {
    visibility: hidden;
}

.dibujo {
    width: 100%;
    max-height: 560px;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

@media (max-width: 860px) {
    .ae {
        grid-template-columns: minmax(0, 1fr);
    }

    .ae h2 {
        text-align: center;
    }

    .ae .ph,
    .dibujo {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 760px) {
    .ae {
        grid-template-columns: 1fr;
    }

    .ae h2 {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .pills {
        grid-template-columns: 1fr 1fr;
    }

    .pills .e {
        display: none;
    }

    .pill {
        font-size: 12px;
        min-height: 52px;
        padding: 10px 6px;
    }

    .ae h2 {
        font-size: clamp(28px, 8.6vw, 40px);
    }
}


/* ==========================================================================
   10. CONTACTO Y FORMULARIO (INICIO)
   ========================================================================== */

.ct {
    padding-bottom: 0;
    overflow: hidden;
}

.ct-g {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 4%;
    align-items: end;
    max-width: 1300px;
    margin: auto;
}

.ct h2 {
    text-align: right;
    font-size: clamp(34px, 4.8vw, 66px);
}

.ct img.vr {
    width: 100%;
    max-width: 620px;
    margin-left: -6%;
}

form {
    background: var(--b);
    border-radius: 30px;
    box-shadow: var(--sh);
    padding: clamp(16px, 2.4vw, 30px);
    margin-top: clamp(18px, 3vw, 40px);
    display: grid;
    gap: clamp(8px, 1.2vw, 14px);
}

form input,
form select,
form textarea {
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 9px 14px;
    font: 600 clamp(11px, 1.15vw, 15px) Poppins;
    color: var(--b);
    background: #fff;
    outline: 0;
    transition: box-shadow .2s;
}

form input:focus,
form select:focus,
form textarea:focus {
    box-shadow: 0 0 0 3px var(--o);
}

form ::placeholder {
    color: var(--b2);
    opacity: 1;
}

form textarea {
    height: clamp(70px, 9vw, 110px);
    resize: none;
}

form button {
    justify-self: end;
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: var(--b);
    font: 800 clamp(11px, 1.2vw, 15px) Poppins;
    padding: 8px 18px;
    cursor: pointer;
    transition: transform .2s, background .2s;
}

form button:hover {
    background: var(--o);
    color: #fff;
    transform: scale(1.08);
}

.soc {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin: clamp(16px, 3vw, 40px) 0 clamp(100px, 11vw, 160px);
    font-weight: 800;
    color: var(--b2);
    font-size: clamp(10px, 1.2vw, 15px);
    text-transform: uppercase;
}

.soc a {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--o);
    transition: transform .25s;
}

.soc a + a {
    background: var(--b);
}

.soc a:hover {
    transform: scale(1.2) rotate(8deg);
}

.soc svg {
    width: 16px;
    fill: #fff;
}

@media (max-width: 860px) {
    .ct-g {
        grid-template-columns: minmax(0, 1fr);
    }

    .ct h2 {
        text-align: center;
    }

    .ct-g > img.vr {
        order: 2;
        margin: 0 auto;
        max-width: 440px;
    }
}

@media (max-width: 760px) {
    .ct-g {
        grid-template-columns: 1fr;
    }

    .ct h2 {
        text-align: center;
    }

    .soc {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .soc {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .ct h2 {
        font-size: clamp(30px, 8.6vw, 44px);
    }
}


/* ==========================================================================
   11. PIE DE PÁGINA
   ========================================================================== */

.ft {
    position: relative;
    background: var(--b);
    color: #fff;
    padding: clamp(40px, 6vw, 80px) 6% 0;
}

.ft-g {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.1fr;
    gap: 3%;
    max-width: 1200px;
    margin: auto;
    align-items: start;
}

.ft h4 {
    font-weight: 600;
    font-size: clamp(14px, 1.9vw, 24px);
    text-transform: uppercase;
    margin-bottom: 1em;
}

.ft p {
    font-weight: 600;
    font-size: clamp(11px, 1.15vw, 15px);
    line-height: 1.9;
}

.ft iframe {
    width: 100%;
    height: clamp(100px, 11vw, 140px);
    border: 0;
    border-radius: 6px;
    margin-top: 10px;
}

.ft .hr {
    text-align: center;
}

.ft .lg {
    width: clamp(110px, 15vw, 200px);
}

.ft .s2 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: clamp(20px, 3vw, 32px) 0;
}

.ft .s2 a {
    display: inline-flex;
    line-height: 0;
}

.ft .s2 svg {
    width: 26px;
    height: 26px;
    fill: #fff;
}

.ft .bar {
    height: 28px;
    background: #064a86;
    margin: 0 -6vw;
}

@media (max-width: 1000px) {
    .ft-g {
        grid-template-columns: 1fr 1fr;
        gap: 30px 4%;
    }

    .ft .lg {
        margin: 0 auto;
    }
}

@media (max-width: 760px) {
    .ft-g {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .ft-g {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ft .hr {
        text-align: center;
    }

    .ft .s2 {
        gap: 26px;
    }
}


/* ==========================================================================
   12. PÁGINAS DE NIVEL (PREESCOLAR Y PRIMARIA)
   ========================================================================== */

.lh {
    background: var(--b);
    min-height: clamp(380px, 46vw, 640px);
    padding: clamp(40px, 6vw, 80px) 6% clamp(110px, 12vw, 170px);
    color: #fff;
    overflow: hidden;
    position: relative;
}

.lh .t {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    min-height: clamp(200px, 28vw, 400px);
}

.lh.r .t {
    justify-content: flex-end;
    text-align: right;
}

.lh h1 {
    font-weight: 800;
    font-size: clamp(34px, 6.4vw, 88px);
    line-height: 1;
}

.lh h1 + p {
    font-size: clamp(14px, 2.2vw, 30px);
    line-height: 1.1;
    margin-top: .3em;
}

.lh b {
    font-weight: 800;
    font-size: clamp(18px, 3.1vw, 42px);
    display: block;
}

.lh .ph {
    position: absolute;
    bottom: 0;
    width: clamp(180px, 30vw, 420px);
    aspect-ratio: 3/4;
    z-index: 2;
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
}

.lh.r .ph {
    left: 6%;
}

.lh:not(.r) .ph {
    right: 6%;
}

.lh .sq {
    stroke: var(--o);
    fill: none;
    stroke-width: 9;
    stroke-linecap: round;
    width: clamp(50px, 7vw, 100px);
    animation: fl 6s ease-in-out infinite;
}

.md {
    padding-top: clamp(20px, 3vw, 40px);
}

.md .wrap {
    max-width: 900px;
}

.md h2 {
    margin-bottom: .6em;
}

.md p + p {
    margin-top: 1.4em;
}

.cf .wrap {
    max-width: 1000px;
}

.cf h2 {
    margin-bottom: clamp(30px, 5vw, 70px);
}

.row {
    display: grid;
    grid-template-columns: clamp(110px, 20%, 200px) 30px 1fr;
    gap: clamp(8px, 1.5vw, 20px);
    align-items: center;
    margin-bottom: clamp(24px, 4.5vw, 64px);
}

.row b {
    background: var(--b);
    color: #fff;
    text-align: center;
    border-radius: 22px;
    padding: clamp(12px, 1.8vw, 24px) 8px;
    font-size: clamp(10px, 1.3vw, 18px);
    line-height: 1.15;
    text-transform: uppercase;
    transition: transform .3s;
}

.row:nth-child(odd) b {
    background: var(--o);
}

.row:hover b {
    transform: scale(1.06);
}

.row i {
    width: clamp(14px, 1.8vw, 24px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--o);
}

.row:nth-child(odd) i {
    background: var(--b);
}

.row p {
    font-size: clamp(11px, 1.3vw, 18px);
    font-weight: 300;
    text-align: justify;
    line-height: 1.35;
}

.val {
    text-align: center;
    padding-bottom: clamp(40px, 6vw, 80px);
}

.val .wrap {
    max-width: 850px;
}

.val p {
    margin: 1.2em 0 2em;
}

.vi {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3%;
    max-width: 1000px;
    margin: auto;
}

.vi div {
    font-family: 'Oswald', 'Arial Narrow', Impact, sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    font-size: clamp(12px, 1.7vw, 24px);
}

.vi img {
    width: min(100%, 160px);
    margin: 0 auto 14px;
    transition: transform .5s;
}

.vi div:hover img {
    transform: rotate(360deg) scale(1.1);
}

.ex .wrap {
    max-width: 1100px;
}

.ex h2 {
    margin-bottom: clamp(30px, 5vw, 70px);
}

.ex .pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(14px, 3vw, 40px);
}

.ex .pill {
    flex: 0 0 clamp(120px, 27%, 300px);
}

.kl {
    background: var(--b2);
    color: #fff;
    border-radius: clamp(30px, 5vw, 70px);
    padding: clamp(30px, 4vw, 56px) 9% clamp(36px, 5vw, 64px);
    max-width: 1050px;
    margin: clamp(40px, 6vw, 90px) auto 0;
}

.kl .ot {
    color: #fff;
    margin-bottom: .4em;
    font-size: clamp(40px, 6.5vw, 90px);
}

.kl p {
    font-size: clamp(12px, 1.45vw, 20px);
    margin-bottom: 1em;
}

.kl b {
    font-weight: 700;
}

.cta {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
    gap: 3%;
    max-width: 1250px;
    margin: auto;
    padding-top: clamp(60px, 9vw, 130px);
    position: relative;
    z-index: 2;
}

.cta h2 {
    text-align: left;
}

.cta .btn {
    display: inline-block;
    margin-top: clamp(30px, 6vw, 90px);
    margin-left: 4%;
    background: var(--o);
    color: #fff;
    font-weight: 700;
    font-size: clamp(14px, 2vw, 28px);
    padding: .6em 1.6em;
    border-radius: 34px;
    box-shadow: var(--sh);
    transition: transform .3s;
}

.cta .btn:hover {
    transform: translateY(-5px) scale(1.06);
}

.circ {
    position: relative;
    width: min(100%, 440px);
    margin-left: auto;
}

.circ::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    aspect-ratio: 1;
    background: #0a5fa5;
    border-radius: 50%;
}

.circ img,
.circ .ph {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    object-position: top;
    clip-path: inset(-50% 0 0 0 round 0 0 999px 999px);
}

.lh .kid {
    position: absolute;
    bottom: calc(-1 * clamp(24px, 4vw, 60px));
    width: clamp(200px, 40vw, 600px);
    z-index: 2;
    height: auto;
}

.lh.r .kid {
    left: 3%;
    width: clamp(200px, 38vw, 560px);
}

.lh:not(.r) .kid {
    right: 3%;
    width: clamp(170px, 29vw, 440px);
}

.lh .wave {
    height: clamp(60px, 10vw, 150px);
}

@media (max-width: 860px) {
    .cta {
        grid-template-columns: minmax(0, 1fr);
    }

    .cta,
    .cta h2 {
        text-align: center;
    }

    .cta .btn {
        margin: 28px 0 10px;
    }

    .circ {
        margin: 30px auto 0;
        width: min(100%, 380px);
    }
}

@media (max-width: 760px) {
    .cta {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .vi {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .row {
        grid-template-columns: 110px 14px 1fr;
    }

    .cta h2 {
        text-align: center;
    }

    .circ {
        margin: 30px auto 0;
    }

    .lh.r .ph,
    .lh:not(.r) .ph {
        display: flex;
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        order: 2;
        margin: 24px auto 0;
        width: min(64%, 270px);
    }

    .lh .t {
        justify-content: center!important;
        text-align: center!important;
        min-height: 0;
        width: 100%;
        order: 1;
    }

    .lh {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 0;
        padding-bottom: clamp(90px, 22vw, 130px);
    }

    .lh.r .kid,
    .lh:not(.r) .kid {
        display: flex;
        position: relative;
        bottom: auto;
        order: 2;
        margin: 24px auto 0;
        width: min(64%, 270px);
    }

    .lh .kid {
        display: block!important;
    }

    .lh .kid,
    .lh.r .kid,
    .lh:not(.r) .kid {
        margin: 20px auto calc(-1 * clamp(86px, 22vw, 126px));
        width: min(66%, 300px);
    }
}

@media (max-width: 600px) {
    .ex .pill {
        flex: 0 0 44%;
    }

    .ex .pills {
        gap: 14px;
    }

    .row {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }

    .row i {
        display: none;
    }

    .row b {
        justify-self: center;
        min-width: 62%;
        font-size: 13px;
    }

    .row p {
        font-size: 14px;
        text-align: center;
    }

    .vi {
        grid-template-columns: 1fr 1fr;
        gap: 22px 12px;
    }

    .vi div {
        font-size: 15px;
    }

    .vi img {
        width: min(100%, 120px);
    }

    .kl p {
        font-size: 14px;
    }

    .ex h2 {
        font-size: clamp(28px, 8.6vw, 40px);
    }

    .kl .ot {
        font-size: clamp(34px, 10vw, 50px);
    }
}


/* ==========================================================================
   13. BOTÓN Y CHAT DE WHATSAPP
   ========================================================================== */

.wa {
    position: fixed;
    right: clamp(14px, 2vw, 26px);
    bottom: clamp(14px, 2vw, 26px);
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    font-family: Poppins, sans-serif;
    /* El contenedor no captura clics: solo el botón y el panel abierto */
    pointer-events: none;
}

.wa-fab {
    pointer-events: auto;
    position: relative;
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 50%;
    background: #25d366;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
    display: grid;
    place-items: center;
    transition: transform .3s, background .3s;
}

.wa-fab svg {
    width: 36px;
    height: 36px;
}

.wa-fab::before,
.wa-fab::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid #25d366;
    animation: wap 2.4s ease-out infinite;
}

.wa-fab::after {
    animation-delay: 1.2s;
}

.wa-fab:hover {
    transform: scale(1.1) rotate(-6deg);
}

.wa.open .wa-fab {
    background: var(--b2);
}

.wa.open .wa-fab::before,
.wa.open .wa-fab::after {
    animation: none;
    opacity: 0;
}

.wa-tip {
    background: #fff;
    color: var(--b);
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
    position: absolute;
    right: 76px;
    bottom: 12px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(14px) scale(.9);
    pointer-events: none;
    transition: .4s;
}

.wa-tip.on {
    opacity: 1;
    transform: none;
    animation: fl 3s ease-in-out infinite;
}

.wa.open .wa-tip {
    display: none;
}

.wa-panel {
    width: min(360px, calc(100vw - 28px));
    background: #ece5dd;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
    transform-origin: bottom right;
    transform: scale(.6) translateY(30px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .35s cubic-bezier(.2, 1.2, .4, 1), opacity .25s, visibility 0s .35s;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 150px);
}

.wa.open .wa-panel {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform .35s cubic-bezier(.2, 1.2, .4, 1), opacity .25s, visibility 0s;
}

/* Cerrado: el panel no ocupa espacio ni tapa la página */
.wa:not(.open) .wa-panel {
    position: absolute;
    right: 0;
    bottom: 0;
}

.wa-h {
    background: var(--b);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
}

.wa-h img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    padding: 3px;
}

.wa-h div {
    flex: 1;
    line-height: 1.25;
}

.wa-h b {
    font-size: 15px;
    display: block;
}

.wa-h small {
    font-size: 12px;
    opacity: .9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wa-h small i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #25d366;
    animation: tw 2s infinite;
}

.wa-x {
    background: none;
    border: 0;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    opacity: .8;
}

.wa-x:hover {
    opacity: 1;
}

.wa-b {
    padding: 16px 14px 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wa-m {
    background: #fff;
    color: #222;
    font-size: 14px;
    line-height: 1.4;
    padding: 9px 13px;
    border-radius: 4px 14px 14px 14px;
    max-width: 88%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
    opacity: 0;
}

.wa.open .wa-m {
    animation: wapop .45s both;
}

.wa.open .wa-m:nth-child(2) {
    animation-delay: .9s;
}

.wa-q {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 4px;
    opacity: 0;
}

.wa.open .wa-q {
    animation: wapop .45s 1.5s both;
}

.wa-q button {
    text-align: left;
    background: #fff;
    border: 2px solid #25d366;
    color: #0b6b3a;
    font: 600 13.5px Poppins;
    padding: 9px 14px;
    border-radius: 22px;
    cursor: pointer;
    transition: background .2s, color .2s, transform .2s;
}

.wa-q button:hover {
    background: #25d366;
    color: #fff;
    transform: translateX(5px);
}

.wa-f {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #f6f6f6;
}

.wa-f input {
    flex: 1;
    min-width: 0;
    border: 0;
    border-radius: 22px;
    padding: 11px 16px;
    font: 400 14px Poppins;
    outline: 0;
    background: #fff;
}

.wa-f input:focus {
    box-shadow: 0 0 0 2px #25d366;
}

.wa-f button {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #25d366;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform .2s;
}

.wa-f button:hover {
    transform: scale(1.1);
}

.wa-f svg {
    width: 20px;
    fill: #fff;
}

@keyframes wap {
    from {
        transform: scale(1);
        opacity: .7;
    }
    to {
        transform: scale(1.8);
        opacity: 0;
    }
}

@keyframes wapop {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.95);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 480px) {
    .wa-tip {
        display: none;
    }

    .wa-fab {
        width: 58px;
        height: 58px;
    }
}


/* ==========================================================================
   14. AJUSTES GLOBALES Y ACCESIBILIDAD
   ========================================================================== */

html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

.sec,
.lh,
.ft,
.hero,
.ct {
    overflow-x: clip;
}

#contacto-form .altcha {
    color: white;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    .rv {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   15. BOTÓN VOLVER AL INICIO
   ========================================================================== */

.totop {
    position: fixed;
    right: clamp(14px, 2vw, 26px);
    /* Queda arriba del botón de WhatsApp, dejando espacio para su efecto de pulso */
    bottom: calc(clamp(14px, 2vw, 26px) + 64px + 40px);
    z-index: 60;
    width: 48px;
    height: 48px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--o);
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity .3s, transform .3s, visibility 0s .3s, background .3s;
}

.totop.show {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .3s, transform .3s, visibility 0s, background .3s;
}

.totop:hover {
    background: var(--b2);
    transform: translateY(-4px);
}

.totop svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 480px) {
    .totop {
        width: 44px;
        height: 44px;
        bottom: calc(clamp(14px, 2vw, 26px) + 58px + 38px);
    }
}