@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@700&family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #334155;
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse at 0% 18%, rgba(91, 177, 245, 0.18), transparent 38%),
        radial-gradient(ellipse at 100% 38%, rgba(101, 190, 52, 0.13), transparent 35%),
        radial-gradient(ellipse at 0% 75%, rgba(105, 190, 240, 0.15), transparent 35%),
        radial-gradient(ellipse at 100% 90%, rgba(102, 190, 48, 0.14), transparent 35%),
        linear-gradient(180deg, #EAF6FF 0%, #FFFFFF 35%, #F4FAFF 65%, #F3FAEC 100%);
    background-attachment: fixed;
}

.pagina-niveles,
.hero-niveles,
.niveles,
.detalle-nivel {
    background: transparent;
}

.contenedor {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
}

.img-fluida {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =====================================================
   HEADER & NAVEGACIÓN LLAMATIVA
===================================================== */
.encabezado {
    position: sticky;
    top: 0;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 25px rgba(15, 42, 86, 0.06);
    transition: all 0.3s ease;
}

.encabezado-contenido {
    min-height: 85px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.03);
}

.logo-img {
    width: 58px !important;
    height: 58px !important;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.logo-texto strong {
    display: block;
    color: #0f2a56;
    font-size: 22px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-texto small {
    display: block;
    color: #4caf2a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 5px;
    margin-top: 3px;
}

.menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.menu > a, .nivel-menu-link {
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}



.menu > a:hover, .nivel-menu-link:hover {
    color: #4caf2a;
}

/* =====================================================
   1. HERO PRINCIPAL VIBRANTE
===================================================== */
.hero-niveles {
    padding: 60px 0 70px;
    position: relative;
    background: transparent;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 50px;
    align-items: center;
}

.subtitulo-manuscrito {
    font-family: 'Caveat', cursive;
    font-size: 48px;
    color: #0f2a56;
    line-height: 0.9;
    display: block;
    margin-bottom: 12px;
    text-shadow: 2px 2px 0px rgba(76, 175, 42, 0.15);
    animation: pulseText 3s infinite alternate ease-in-out;
}

@keyframes pulseText {
    0% { transform: rotate(-1deg) scale(1); }
    100% { transform: rotate(1deg) scale(1.03); }
}

.hero-texto h1 {
    font-size: 46px;
    color: #0f172a;
    font-weight: 800;
    margin: 0 0 18px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-texto .texto-verde {
    background: linear-gradient(120deg, #4caf2a, #2f8f22);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.hero-texto p {
    font-size: 16px;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 30px;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #4caf2a 0%, #2f8f22 100%);
    color: #ffffff !important;
    padding: 12px 28px 12px 16px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 16px;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(76, 175, 42, 0.35);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-hero .icono-btn {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.btn-hero:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(76, 175, 42, 0.45);
}

.hero-imagen {
    position: relative;
}

.hero-imagen img {
    border-radius: 32px;
    box-shadow: 0 20px 40px rgba(15, 42, 86, 0.15);
    border: 6px solid #ffffff;
    animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* =====================================================
   2. TARJETAS DE NIVELES (IMPACTANTES)
===================================================== */
.niveles {
    padding: 30px 0 70px;
}

.niveles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.nivel-card {
    border-radius: 24px;
    padding: 36px 28px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.nivel-card:hover {
    transform: translateY(-10px);
}

/* Tarjeta Azul */
.card-azul {
    background: linear-gradient(145deg, #0f2a56 0%, #091c3d 100%);
    color: #ffffff;
    box-shadow: 0 15px 35px rgba(15, 42, 86, 0.25);
}

.card-azul h2, .card-azul p, .card-azul .nivel-edad {
    color: #ffffff;
}

/* Tarjetas Blancas */
.card-blanca {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
}

.card-blanca:hover {
    border-color: #4caf2a;
    box-shadow: 0 20px 40px rgba(76, 175, 42, 0.12);
}

/* Destellos superiores decorativos */
.destellos {
    position: absolute;
    top: 25px;
    right: 25px;
    display: flex;
    gap: 4px;
}

.destellos span {
    width: 4px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
    transform: rotate(25deg);
    animation: blink 1.5s infinite alternate;
}

.destellos span:nth-child(2) { animation-delay: 0.2s; }
.destellos span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0% { opacity: 0.3; transform: rotate(25deg) scaleY(0.8); }
    100% { opacity: 1; transform: rotate(25deg) scaleY(1.2); }
}

.destellos-blancos span { background-color: #a8e68a; }
.destellos-verdes span { background-color: #4caf2a; }

.icono-card {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 22px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.nivel-card:hover .icono-card {
    transform: rotate(8deg) scale(1.1);
}

.icono-azul { background: linear-gradient(135deg, #1a6fc9, #0a5bb0); color: #ffffff; }
.icono-verde { background: linear-gradient(135deg, #4caf2a, #2f8f22); color: #ffffff; }

.nivel-card h2 {
    font-size: 24px;
    margin: 0 0 6px;
    font-weight: 800;
}

.nivel-card .nivel-edad {
    font-size: 13px;
    font-weight: 800;
    color: #64748b;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-azul .nivel-edad {
    color: #c5f0a8;
}

.nivel-card p {
    font-size: 14.5px;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 28px;
    flex-grow: 1;
}

.btn-card {
    background: linear-gradient(135deg, #4caf2a, #2f8f22);
    color: #ffffff !important;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 6px 15px rgba(76, 175, 42, 0.25);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-card:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 20px rgba(76, 175, 42, 0.4);
}

/* =====================================================
   3. SECCIONES DE DETALLE (ELEGANTES Y DINÁMICAS)
===================================================== */
.detalle-nivel {
    padding: 25px 0;
    margin-bottom: 30px;
}

.detalle-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 45px;
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 32px;
    padding: 35px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.detalle-grid:hover {
    box-shadow: 0 20px 45px rgba(15, 42, 86, 0.08);
}

.detalle-grid.reverse {
    grid-template-columns: 1.2fr 1fr;
}

.badge-edad {
    display: inline-block;
    background: linear-gradient(135deg, #4caf2a, #2f8f22);
    color: #ffffff;
    font-weight: 800;
    font-size: 12px;
    padding: 6px 18px;
    border-radius: 30px;
    margin-bottom: 14px;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(76, 175, 42, 0.25);
}

.badge-azul {
    background: linear-gradient(135deg, #0f2a56, #091c3d);
    box-shadow: 0 4px 12px rgba(15, 42, 86, 0.25);
}

.detalle-texto h2 {
    font-size: 32px;
    color: #0f2a56;
    margin: 0 0 6px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.detalle-texto h3 {
    font-size: 17px;
    color: #4caf2a;
    margin: 0 0 14px;
    font-weight: 700;
}

.detalle-texto p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Lista en 2 Columnas estilo Píldoras Interactivas */
.lista-pildoras {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.lista-pildoras li {
    background: #f1fae9;
    color: #2b6a17;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 13.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(76, 175, 42, 0.15);
    transition: all 0.25s ease;
}

.lista-pildoras li:hover {
    background: #4caf2a;
    color: #ffffff;
    transform: translateY(-2px);
}

.lista-pildoras li i {
    color: #4caf2a;
    font-size: 16px;
    transition: color 0.25s ease;
}

.lista-pildoras li:hover i {
    color: #ffffff;
}

/* Marcos con borde e iluminación */
.marco-verde img, .marco-azul img {
    border-radius: 24px;
    transition: transform 0.4s ease;
}

.marco-verde img {
    border: 5px solid #4caf2a;
    box-shadow: 0 12px 30px rgba(76, 175, 42, 0.2);
}

.marco-azul img {
    border: 5px solid #0f2a56;
    box-shadow: 0 12px 30px rgba(15, 42, 86, 0.2);
}

.detalle-grid:hover .marco-verde img,
.detalle-grid:hover .marco-azul img {
    transform: scale(1.02);
}

/* =====================================================
   4. BANNER PILARES (FOOTER MODERNO)
===================================================== */
.banner-pilares {
    background: linear-gradient(135deg, #0f2a56 0%, #091c3d 100%);
    color: #ffffff;
    padding: 35px 0;
    margin-top: 40px;
    position: relative;
    box-shadow: 0 -10px 30px rgba(15, 42, 86, 0.1);
}

.pilares-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pilar-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.pilar-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.pilar-item i {
    font-size: 28px;
    color: #7ed957;
}

.pilar-item strong {
    display: block;
    font-size: 14px;
    color: #ffffff;
}

.pilar-item p {
    margin: 0;
    font-size: 12px;
    color: #cbd5e1;
}

.pilar-frase span {
    font-family: 'Caveat', cursive;
    font-size: 32px;
    color: #7ed957;
    line-height: 0.95;
    display: block;
    text-shadow: 0 2px 10px rgba(126, 217, 87, 0.3);
}


/* =========================================
   FOOTER NEWTON SCHOOL
========================================= */

.footer {
    position: relative;
    isolation: isolate;
    margin-top: 0;
    padding-top: 105px;
    overflow: hidden;
    background: #65b332;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
}

/* Onda blanca superior */

.footer-onda {
    position: absolute;
    z-index: -1;
    top: 0;
    left: -2%;
    width: 104%;
    height: 65px;
    background: #fff;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
}

/* Tres columnas */

.footer-contenido {
    display: grid;
    grid-template-columns: 1.25fr 0.8fr 1fr;
    gap: 65px;
    align-items: start;
    padding-bottom: 75px;
}

.footer-columna {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.footer-columna h3 {
    margin-bottom: 18px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
}

.footer-columna > a {
    margin-bottom: 10px;
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    transition: opacity .2s ease;
}

.footer-columna > a:hover {
    opacity: .75;
    text-decoration: underline;
}

/* Marca */

.footer-marca {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
}

.footer-logo {
    width: 65px;
    height: 65px;
    flex-shrink: 0;
    object-fit: contain;
    background: transparent;
    border: none;
    border-radius: 0;
}

.footer-marca h2 {
    margin: 0;
    color: #fff;
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 1px;
}

.footer-marca span {
    display: block;
    margin-top: 7px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 7px;
}

/* Descripción */

.footer-descripcion {
    max-width: 340px;
    margin-bottom: 24px;
    color: #fff;
    font-size: 14px;
    line-height: 1.65;
}

/* Redes sociales */

.redes-sociales {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
}

.red-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: #65b332;
    font-size: 20px;
    transition: transform .25s ease, background .25s ease;
}

.red-social:hover {
    transform: translateY(-4px);
    background: #eff8e9;
}

/* Datos de contacto */

.footer-contacto .contacto-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    margin-bottom: 22px;
}

.footer-contacto .contacto-icono {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 25px;
    flex-shrink: 0;
    padding-top: 2px;
    color: #fff;
    font-size: 19px;
}

.footer-contacto .contacto-item strong {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
}

.footer-contacto .contacto-item p {
    margin: 0 0 5px;
    color: #fff;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* WhatsApp flotante */

.whatsapp-flotante {
    position: absolute;
    right: 30px;
    bottom: 70px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #20d366;
    color: #fff;
    font-size: 32px;
    box-shadow: 0 7px 18px rgba(0, 0, 0, .16);
    transition: transform .25s ease;
}

.whatsapp-flotante:hover {
    transform: scale(1.08);
}

.whatsapp-flotante i {
    color: #fff;
}

/* Franja inferior */

.footer-copyright {
    padding: 19px 15px;
    background: #559c28;
    text-align: center;
}

.footer-copyright p {
    margin: 0;
    color: #fff;
    font-size: 13px;
    line-height: 1.6;
}

/* =========================================
   TABLETS
========================================= */

@media (max-width: 900px) {
    .footer-contenido {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        padding-bottom: 65px;
    }

    .footer-colegio {
        grid-column: 1 / -1;
    }

    .footer-descripcion {
        max-width: 480px;
    }

    .whatsapp-flotante {
        right: 22px;
    }
}

/* =========================================
   CELULARES
========================================= */

@media (max-width: 600px) {
    .footer {
        padding-top: 85px;
    }

    .footer-onda {
        height: 45px;
    }

    .footer-contenido {
        grid-template-columns: 1fr;
        gap: 35px;
        padding-bottom: 75px;
    }

    .footer-colegio {
        grid-column: auto;
    }

    .footer-columna h3 {
        margin-bottom: 14px;
        font-size: 21px;
    }

    .footer-logo {
        width: 58px;
        height: 58px;
    }

    .footer-marca h2 {
        font-size: 29px;
    }

    .footer-descripcion {
        max-width: 100%;
        font-size: 14px;
    }

    .footer-contacto .contacto-item {
        margin-bottom: 18px;
    }

    .whatsapp-flotante {
        right: 16px;
        bottom: 75px;
        width: 50px;
        height: 50px;
        font-size: 28px;
    }

    .footer-copyright {
        padding: 17px 55px 17px 15px;
    }

    .footer-copyright p {
        font-size: 12px;
    }
}

/* Reduce animaciones si el usuario lo solicita */

@media (prefers-reduced-motion: reduce) {
    .red-social,
    .whatsapp-flotante {
        transition: none;
    }
}

/* ===== MENÚ NEWTON SCHOOL ===== */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: #ffffff;
    border-top: 3px solid #3f3b24;
    box-shadow: 0 4px 18px rgba(16, 38, 77, 0.06);
}

.header-contenido {
    width: min(1060px, 92%);
    min-height: 75px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

/* Logo */

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
}

.logo-imagen {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.logo-nombre h2 {
    margin: 0;
    color: #10264d;
    font-size: 27px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.5px;
}

.logo-nombre span {
    display: block;
    margin-top: 6px;
    color: #65b332;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 7px;
}

/* Enlaces */

.menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 17px;
    border-radius: 30px;

    color: #172842;
    background: #ffffff;

    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;

    box-shadow: 0 3px 14px rgba(16, 38, 77, 0.05);

    transition:
        color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}

.menu a:hover {
    color: #0878d1;
    background: #edf8ff;
    transform: translateY(-1px);
}

/* Página activa */

.menu a.activo {
    color: #0878d1;
    background: #ffffff;
}

/* Botón móvil */

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;

    width: 42px;
    height: 42px;
    border: none;
    border-radius: 10px;
    background: #edf8ff;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: #10264d;
}

/* ===== TABLETS Y CELULARES ===== */

@media (max-width: 950px) {
    .header-contenido {
        gap: 12px;
    }

    .menu {
        gap: 3px;
    }

    .menu a {
        padding: 10px 11px;
        font-size: 12px;
    }
}

@media (max-width: 760px) {
    .header-contenido {
        position: relative;
        min-height: 70px;
    }

    .logo-imagen {
        width: 44px;
        height: 44px;
    }

    .logo-nombre h2 {
        font-size: 23px;
    }

    .logo-nombre span {
        font-size: 10px;
        letter-spacing: 6px;
    }

    .menu-toggle {
        display: flex;
        flex-shrink: 0;
    }

    .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: -4.35%;
        right: -4.35%;

        flex-direction: column;
        align-items: stretch;
        gap: 5px;

        padding: 15px 5%;
        background: #ffffff;
        box-shadow: 0 12px 18px rgba(16, 38, 77, 0.10);
    }

    .menu.abierto {
        display: flex;
    }

    .menu a {
        justify-content: flex-start;
        padding: 13px 16px;
        font-size: 14px;
    }
}
