.level_illustration,
.school_banner,
.school_badge {
    display: none;
}
/* PÁGINA LEVELS: diseño propio; la base está en common.css. */
body {
    background-image: url('../assets/levels-vectors.svg?v=20261026-children-cloud');
    /* El marco de Niveles mide 1720: conserva la misma escala que sus textos. */
    background-size: 107.5rem auto;
    background-color: var(--cream);
}

/* Coordenadas proporcionales del apartado Niveles. */
.page_main {
    height: 302.25rem;
}

.page_heading {
    position: absolute;
    left: 7.1875rem;
    top: 15.7384rem;
    width: 48.75rem;
    font-size: 4.6875rem;
}

.page_subtitle {
    position: absolute;
    left: 7.14375rem;
    top: 27.575rem;
    width: 47.5rem;
    font-size: 2.72625rem;
}

.page_main .page_subtitle {
    font-size: 2.72625rem;
}

.level_grid {
    position: absolute;
    left: 0rem;
    top: 0rem;
    width: 108rem;
}

.level_card {
    position: absolute;
    width: 38.55rem;
}

.level_card h2 {
    position: absolute;
    top: -0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 4.649375rem;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 2.8125rem;
    line-height: 1;
}

.level_age {
    position: absolute;
    top: 3.95rem;
    width: 100%;
    text-align: center;
    color: white;
}

.page_main .level_age {
    font-family: 'Fredoka One', sans-serif;
    font-weight: 400;
    font-size: 2.6875rem;
    line-height: 1.21;
}

.level_description {
    position: absolute;
    top: 7.2rem;
    width: 100%;
}

.page_main .level_description {
    line-height: 1.5;
}

.level_card:nth-child(1) {
    position: absolute;
    left: 10.37561rem;
    top: 98.06321rem;
    width: 38.5625rem;
}

.level_card:nth-child(2) {
    position: absolute;
    left: 58.66125rem;
    top: 98.06321rem;
    width: 38.5625rem;
}

.level_card:nth-child(3) {
    position: absolute;
    left: 10.37561rem;
    top: 140.1882rem;
    width: 38.5625rem;
}

.level_card:nth-child(4) {
    position: absolute;
    left: 58.66125rem;
    top: 140.1882rem;
    width: 38.5625rem;
}

.level_card:nth-child(5) {
    position: absolute;
    left: 10.37561rem;
    top: 179.9382rem;
    width: 38.5625rem;
}

.level_card:nth-child(6) {
    position: absolute;
    left: 58.66125rem;
    top: 179.9382rem;
    width: 38.5625rem;
}

.future_heading {
    position: absolute;
    left: 35.0625rem;
    top: 244.19909rem;
    width: 40.625rem;
    font-size: 3.125rem;
}

.enrollment_link {
    position: absolute;
    left: 29.234985rem;
    top: 255.578476rem;
    width: 48.858749rem;
    font-size: 3.125rem;
}

.school_year {
    position: absolute;
    left: 64.542389rem;
    top: 262.890753rem;
    width: 19.70813rem;
    font-size: 2.8125rem;
    --year-angle: -5.76deg;
}

.page_footer {
    top: 281.08763rem;
}

/* Reorganiza los textos y las ilustraciones sin desbordamientos en teléfonos. */
@media (max-width: 40rem) {
    :root {
        font-size: 1rem;
    }

    body {
        background: var(--cream);
    }

    .site_header {
        height: 5.5rem;
        padding: 0.6rem 1.5rem;
        justify-content: space-between;
    }

    .brand {
        position: static;
        width: 4rem;
        height: auto;
    }

    .menu_toggle {
        display: block;
        border: 0;
        border-radius: 2rem;
        padding: 0.6rem 1rem;
        background: var(--yellow);
    }

    .main_navigation {
        display: none;
        left: 1rem;
        right: 1rem;
        top: 5rem;
        padding: 1rem;
        background: var(--cream);
        border-radius: 1rem;
        flex-wrap: wrap;
        gap: 0.7rem;
        box-shadow: 0 0.5rem 1.5rem #0002;
    }

    .main_navigation.is_open {
        display: flex;
    }

    .nav_link {
        font-size: 0.85rem;
    }

    .page_main {
        height: auto;
        padding: 2rem 1.5rem;
    }

    .page_main .page_heading,
    .page_main .page_subtitle,
    .page_main .future_heading,
    .page_main .story,
    .page_main .learning_words,
    .page_main .enrollment_link,
    .page_main .school_year,
    .page_main .contact_section,
    .page_main .level_grid,
    .page_main .video_frame {
        position: static;
        width: 100%;
        height: auto;
        margin: 0 0 1.5rem;
    }

    .page_main .page_heading {
        font-size: clamp(2rem, 7vw, 3rem);
    }

    .page_main .page_heading span {
        padding: 0.2rem 0;
        overflow-wrap: anywhere;
    }

    .page_main .page_subtitle {
        font-size: 1.1rem;
    }

    .page_main .future_heading {
        font-size: 1.5rem;
    }

    .page_main p {
        font-size: 1rem;
        line-height: 1.7;
    }

    .mobile_art,
    .mobile_logo {
        display: block;
        width: 100%;
        margin: 1.5rem 0;
    }

    .mobile_logo {
        width: 13rem;
        margin: 0 auto 2rem;
    }

    .page_main .enrollment_link {
        padding: 0.6rem 1rem;
        border-radius: 3rem;
        background: var(--pink);
        font-size: 1.15rem;
    }

    .page_main .school_year {
        width: max-content;
        max-width: 100%;
        margin: 0 auto 3rem;
        padding: 0.3rem 1rem;
        border-radius: 3rem;
        background: var(--red);
        font-size: 1.1rem;
    }

    .page_footer {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        padding: 2rem 1.5rem;
        gap: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .page_footer p {
        font-size: 0.75rem;
    }
}

/* Respeta la preferencia de reducir el movimiento. */

/* Tarjetas fluidas con textos completos para los seis niveles. */
@media (max-width: 40rem) {
    .page_heading span:nth-child(2) {
        width: fit-content;
        padding: 0.3rem 0.7rem;
        border-radius: 2rem;
        background: var(--blue);
        color: white;
    }

    .level_grid {
        display: grid;
        gap: 1.5rem;
    }

    .level_card,
    .level_card:nth-child(n) {
        position: static;
        width: 100%;
        border-radius: 1.5rem;
        background: var(--pink);
        overflow: hidden;
        padding: 0 1rem 1.5rem;
    }

    .level_card.level_blue {
        background: var(--blue);
    }

    .level_card.level_yellow {
        background: var(--yellow);
    }

    .level_illustration {
        display: block;
        width: calc(100% + 2rem);
        max-width: none;
        height: 12rem;
        margin: 0 -1rem;
        object-fit: cover;
    }

    .level_card h2 {
        position: relative;
        width: fit-content;
        max-width: 100%;
        margin: -0.8rem auto 0.7rem;
        padding: 0.3rem 1rem;
        border-radius: 3rem;
        background: var(--red);
        font-size: 1.25rem;
    }

    .level_card .level_age,
    .level_description {
        position: static;
        font-size: 1rem;
        margin: 0 0 0.7rem;
    }
}

/* Mantiene la línea del título dentro de su cápsula azul. */
.page_heading span:nth-child(2) {
    display: flex;
    align-items: center;
    height: 5.51875rem;
    margin-top: 0.137rem;
    line-height: 1;
    color: white;
    padding-left: 0.8rem;
}

.page_main .page_subtitle {
    font-family: 'Fredoka', sans-serif;
    white-space: nowrap;
    width: auto;
}

/* Permite que el subtítulo se adapte al ancho del teléfono. */
@media (max-width: 40rem) {
    .page_main .page_subtitle {
        white-space: normal;
        font-size: 1.1rem;
    }
}

/* Palabras sobre las cápsulas originales junto a los alumnos. */
.hero_words span {
    position: absolute;
    color: white;
    font-family: 'Fredoka One', sans-serif;
    font-size: 2.1875rem;
    transform-origin: left top;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.744375rem;
    border-radius: 999px;
    line-height: 1;
}

.hero_words span:nth-child(1) {
    left: 69.149414rem;
    top: 13.282859rem;
    width: 17.214378rem;
    background: var(--blue);
    transform: rotate(-4.18deg);
}

.hero_words span:nth-child(2) {
    left: 80.765295rem;
    top: 14.4259rem;
    width: 11.623123rem;
    background: var(--yellow);
    transform: rotate(2.93deg);
}

.hero_words span:nth-child(3) {
    left: 72.805634rem;
    top: 17.717775rem;
    width: 17.825rem;
    background: var(--red);
}

/* Presenta las palabras como cápsulas legibles en el teléfono. */
@media (max-width: 40rem) {
    .hero_words {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 2rem;
    }

    .hero_words span:nth-child(n) {
        position: static;
        padding: 0.3rem 0.7rem;
        border-radius: 2rem;
        background: var(--blue);
        font-size: 1rem;
        transform: none;
    }

    .hero_words span:nth-child(2) {
        background: var(--yellow);
    }

    .hero_words span:nth-child(3) {
        background: var(--red);
    }
}

/* Tamaño de los iconos oficiales del pie de página. */

/* Conserva la mascota asomada junto al pie en teléfonos. */
@media (max-width: 40rem) {
    .footer_mascot {
        display: block;
        position: absolute;
        left: -0.7rem;
        bottom: 1.5rem;
        width: 3.5rem;
    }

    .page_footer {
        padding-left: 4rem;
    }
}

.text_link {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.text_link:hover {
    color: var(--red);
}

/* Nuevos apartados y coordenadas de Niveles, Figma de octubre de 2026. */
.baby_care {
    position: absolute;
    left: 8.125rem;
    top: 61.25rem;
    display: grid;
    grid-template-rows: 4.649375rem 3.25rem minmax(0, 1fr);
    gap: 0.2rem;
    width: 51.8125rem;
    height: 15.1875rem;
    padding: 1.25rem 3.5rem;
    overflow: visible;
    isolation: isolate;
}
/* La foto pasa detrás de las esquinas amarillas, sin borde azul. */
.baby_care::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 4.3208rem / 3.1157rem;
    background: var(--yellow);
}
.baby_care h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    width: 24.549375rem;
    height: 4.649375rem;
    border-radius: 999px;
    background: var(--red);
    font-size: 2.8125rem;
    text-align: center;
    color: white;
    line-height: 1;
}
.baby_care .baby_age {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka One', sans-serif;
    font-weight: 400;
    margin: 0;
    font-size: 2.6875rem;
    line-height: 1;
    text-align: center;
    color: white;
}
.baby_care .baby_description {
    align-self: center;
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.45;
    text-align: center;
}

/* Fotografía dentro de la mitad azul del bloque Baby Care. */
.baby_photo {
    position: absolute;
    top: 0;
    left: 46.5rem;
    width: 44.90625rem;
    z-index: -2;
    max-width: none;
    height: 15.1875rem;
    border-radius: 2.125rem;
    object-fit: cover;
    object-position: center;
    background: #e3f2ff;
}
.school_next {
    position: absolute;
    left: 2.25rem;
    top: 204.9375rem;
    width: 93.625rem;
    height: 18.125rem;
    overflow: visible;
    color: white;
    background: url('../assets/blue-valley-panel.svg?v=20261026-children-cloud') no-repeat 0 0 / 100% 100%;
    /* Amplía foto, logotipo y textos juntos hasta 1668 unidades de ancho. */
    transform: scale(1.113484646);
    transform-origin: left top;
}
.school_next_link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 1.5rem;
}
.school_next_link:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -6px;
}
.school_next h2 {
    position: absolute;
    left: 3.4375rem;
    top: 1.625rem;
    font-size: 2.8125rem;
    display: flex;
    align-items: center;
    height: 3.375rem;
    line-height: 1;
}
.school_next .school_name {
    font-weight: 400;
    position: absolute;
    left: 2.6875rem;
    top: 5.25rem;
    display: flex;
    align-items: center;
    width: 34.0625rem;
    height: 4.625rem;
    padding: 0 1.4375rem;
    border-radius: 999px;
    background: #4ccc00;
    font-size: 2.6875rem;
    font-family: 'Fredoka One', sans-serif;
    line-height: 1;
}
.school_next .school_description {
    position: absolute;
    left: 2.6875rem;
    top: 10rem;
    width: 40.25rem;
    line-height: 1.5;
}

.school_levels {
    font-weight: 600;
}
@media (max-width: 40rem) {
    .baby_care {
        position: static;
        display: block;
        width: 100%;
        height: auto;
        margin: 0 0 1.5rem;
        padding: 1.5rem;
        border-radius: 1.5rem;
        background: var(--yellow);
    }
    .baby_care::before {
        display: none;
    }
    .baby_care h2 {
        width: fit-content;
        height: auto;
        margin: 0 auto;
        padding: 0.3rem 1rem;
        border-radius: 2rem;
        background: var(--red);
        font-size: 1.25rem;
    }
    .baby_care .baby_age {
        margin: 0.75rem 0;
        font-size: 1.2rem;
    }
    .baby_care .baby_description {
        font-size: 1rem;
        line-height: 1.6;
    }
    .baby_photo {
        position: static;
        z-index: auto;
        width: calc(100% + 3rem);
        height: auto;
        margin: 1.25rem -1.5rem -1.5rem;
        border-radius: 0 0 1.5rem 1.5rem;
    }
    .level_card h2,
    .page_heading span:nth-child(2) {
        top: 0;
        height: auto;
        margin-top: 0;
        line-height: 1.2;
    }
    .hero_words span:nth-child(n) {
        width: auto;
        height: auto;
    }
    .level_card.level_orange {
        background: var(--orange);
    }
    .school_next {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        height: auto;
        margin: 2rem 0 4rem;
        padding: 1.5rem;
        border-radius: 1.5rem;
        overflow: hidden;
        background: #003776;
        transform: none;
    }
    .school_next h2,
    .school_next .school_name,
    .school_next .school_description {
        position: static;
        width: auto;
        margin-bottom: 0.8rem;
    }
    .school_next h2 {
        font-size: 1.3rem;
    }
    .school_next .school_name {
        height: auto;
        padding: 0.3rem 0.7rem;
        border-radius: 2rem;
        background: #4ccc00;
        font-size: 1.4rem;
    }
    .school_next h2 {
        height: auto;
    }
    .school_banner {
        display: block;
        width: 100%;
        border-radius: 1rem;
    }
    .school_badge {
        display: block;
        position: absolute;
        left: 1.5rem;
        bottom: 1.75rem;
        width: 4rem;
        height: 4rem;
        border-radius: 50%;
    }
}

.admissions_link {
    background: var(--yellow);
    border-color: var(--yellow);
}
.admissions_link:hover,
.admissions_link:focus-visible {
    background: var(--orange);
    border-color: var(--orange);
}

@media (min-width: 40.001rem) {
    .main_navigation {
        gap: 0.7rem;
    }
    .nav_link {
        padding: 0.2rem 0.6rem;
        font-size: 1.05rem;
    }
}
