@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Nunito:wght@400;700;900&family=Pacifico&display=swap');

/* ============================================================
   VARIABLES GLOBALES
   ============================================================ */
:root {
    --rojo:       #c91717;
    --azul:       #1a2a4a;
    --amarillo:   #f5c800;
    --rojo-hover: #b71c1c;
}

/* ============================================================
   BASE
   ============================================================ */
body {
    font-family: 'Nunito', Arial, sans-serif;
    background-color: #f4f4f4;
    text-align: center;
}

h1, h2, h3,
.niveles-titulo,
.stat-numero {
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    letter-spacing: 1px;
    font-weight: 400;
}

/* ============================================================
   BARRA SUPERIOR
   ============================================================ */
.topbar {
    background: var(--rojo);
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.logo-topbar img {
    height: 70px;
}

.telefono-topbar {
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.telefono-link {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.telefono-link:hover {
    opacity: 0.8;
}

/* ============================================================
   PRIMERA SECCIÓN
   ============================================================ */
.primera-principal {
    height: 500px;
    background-image:
            linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
            url("../res/primeraSeccion.jpg");
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px;
}

.primeraprincipal-text {
    color: white;
    max-width: 450px;
    text-align: left;
}

.primeraprincipal-text h1 {
    font-size: 38px;
    line-height: 1.2;
    margin-bottom: 25px;
}

.btn-registro {
    background: var(--rojo);
    color: white;
    border: none;
    padding: 15px 30px;
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-registro:hover {
    background: var(--rojo-hover);
}

.primeraprincipal-img img {
    height: 300px;
}

/* ============================================================
   SECCIÓN ESTADÍSTICAS
   ============================================================ */
.estadisticas {
    background: #ffffff;
    padding: 70px 40px;
    border-top: 4px solid #f0f0f0;
    border-bottom: 4px solid #f0f0f0;
}

.stats-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 60px;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto;
}

/* Ítem */
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.stat-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-item:nth-child(1) { transition-delay: 0s; }
.stat-item:nth-child(2) { transition-delay: 0.15s; }
.stat-item:nth-child(3) { transition-delay: 0.3s; }
.stat-item:nth-child(4) { transition-delay: 0.45s; }

/* Círculos */
.stat-circle {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.5);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-item.visible .stat-circle {
    transform: scale(1);
}

.stat-item:nth-child(1) .stat-circle { width: 140px; height: 140px; }
.stat-item:nth-child(2) .stat-circle { width: 110px; height: 110px; }
.stat-item:nth-child(3) .stat-circle { width: 190px; height: 190px; }
.stat-item:nth-child(4) .stat-circle { width: 100px; height: 100px; }

.stat-circle.rojo     { background: var(--rojo); }
.stat-circle.amarillo { background: var(--amarillo); }
.stat-circle.azul     { background: var(--azul); }

/* Números */
.stat-numero {
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    color: white;
    line-height: 1;
    text-align: center;
}

.stat-item:nth-child(1) .stat-numero { font-size: 42px; }
.stat-item:nth-child(2) .stat-numero { font-size: 38px; color: var(--azul); }
.stat-item:nth-child(3) .stat-numero { font-size: 44px; }
.stat-item:nth-child(4) .stat-numero { font-size: 34px; color: var(--azul); }

/* Etiquetas */
.stat-label {
    font-size: 14px;
    font-weight: bold;
    color: var(--azul);
    text-align: center;
    max-width: 130px;
    line-height: 1.4;
    margin: 0;
}

/* ============================================================
   SECCIÓN NIVELES EDUCATIVOS
   ============================================================ */
.niveles-educativos {
    background: #ffffff;
    padding: 70px 40px 80px;
}

/* Encabezado */
.niveles-header {
    text-align: center;
    margin-bottom: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateX(120px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.niveles-header.visible {
    opacity: 1;
    transform: translateX(0);
}

.niveles-titulo {
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    font-size: 46px;
    color: var(--azul);
    margin-bottom: 16px;
}

.niveles-subtitulo {
    font-size: 18px;
    color: #444;
    line-height: 1.6;
}

/* Grid */
.niveles-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    max-width: 1800px;
    margin: 0 auto;
}

/* Tarjeta */
.nivel-card {
    text-decoration: none;
    color: inherit;
    border-radius: 0;
    overflow: visible;
    width: 280px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.nivel-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.nivel-card:nth-child(1) { transition-delay: 0.05s; }
.nivel-card:nth-child(2) { transition-delay: 0.15s; }
.nivel-card:nth-child(3) { transition-delay: 0.25s; }
.nivel-card:nth-child(4) { transition-delay: 0.35s; }
.nivel-card:nth-child(5) { transition-delay: 0.45s; }

.nivel-card:hover {
    box-shadow: 0 16px 40px rgba(0,0,0,0.2);
    transform: translateY(-8px);
}

/* Imagen */
.nivel-imagen {
    position: relative;
    height: auto;
    overflow: visible;
}

.nivel-imagen img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
    transform-origin: bottom center;
}

.nivel-card:hover .nivel-imagen img {
    transform: scale(1.08);
}

/* Ocultar etiqueta HTML (ya viene en la imagen) */
.nivel-etiqueta {
    display: none;
}

/* Recuadro de texto */
.nivel-info {
    flex: 1;
    padding: 50px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    border-radius: 0 0 16px 16px;
}

.nivel-rojo .nivel-info { background: var(--rojo); }
.nivel-azul .nivel-info { background: var(--azul); }

.nivel-info h3 {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0;
    color: white;
    margin: 0;
}

.nivel-info p {
    font-size: 13px;
    color: rgba(255,255,255,0.88);
    margin: 0;
    line-height: 1.4;
}

/* ============================================================
   SECCIÓN CASOS DE ÉXITO
   ============================================================ */
.casos-exito {
    background: #ffffff;
    padding-bottom: 70px;
}

/* Banner */
.casos-banner {
    position: relative;
    width: 100%;
    height: 480px;
    background-image: url('../res/backgroundCasosExito.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.casos-banner.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Logo */
.casos-logo {
    position: relative;
    z-index: 2;
    height: 400px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.35));
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.casos-banner.visible .casos-logo {
    opacity: 1;
    transform: scale(1);
}

/* Grid de videos */
.casos-videos {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 36px;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 50px auto 0;
    padding: 0 40px;
}

/* Tarjeta de video */
.caso-video {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 300px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.caso-video.visible {
    opacity: 1;
    transform: translateY(0);
}

.caso-video:nth-child(1) { transition-delay: 0.1s; }
.caso-video:nth-child(2) { transition-delay: 0.25s; }
.caso-video:nth-child(3) { transition-delay: 0.4s; }

/* Wrapper 16:9 */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.video-wrapper:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
    transform: translateY(-4px);
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Nombre y puesto */
.caso-nombre {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--azul);
    margin: 4px 0 0;
    text-align: left;
}

.caso-puesto {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 13px;
    font-style: italic;
    color: #666;
    margin: 0;
    text-align: left;
}

/* ============================================================
   SECCIÓN FORMACIÓN INTEGRAL
   ============================================================ */
.formacion-integral {
    background: #ffffff;
    padding: 80px 0 90px;
}

/* ── Encabezado ── */
.formacion-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 70px;
    padding: 0 30px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.formacion-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.formacion-titulo {
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    font-size: 46px;
    color: var(--rojo);
    margin-bottom: 18px;
    line-height: 1.1;
}

.formacion-intro {
    font-size: 16px;
    color: #444;
    line-height: 1.7;
    margin: 0;
}

/* ── Bloques alternados ── */
.formacion-bloque {
    display: flex;
    align-items: center;          /* centrado vertical */
    gap: 60px;
    max-width: 1100px;            /* contenedor limitado */
    margin: 0 auto 80px;          /* separación entre bloques */
    padding: 0 60px;              /* respira en los lados */
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.formacion-bloque:last-of-type {
    margin-bottom: 0;
}

/* imagen izquierda */
.formacion-izq {
    flex-direction: row;
    transform: translateX(-60px);
}

/* imagen derecha: imagen va al final visualmente */
.formacion-der {
    flex-direction: row-reverse;
    transform: translateX(60px);
}

.formacion-bloque.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ── Imagen cuadrada fija ── */
.formacion-img {
    flex: 0 0 420px;              /* ancho fijo */
    height: 420px;                /* igual que el ancho = cuadrado */
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.formacion-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.formacion-bloque:hover .formacion-img img {
    transform: scale(1.04);
}

/* ── Lado texto ── */
.formacion-texto {
    flex: 1;                      /* ocupa el espacio restante */
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.formacion-subtitulo {
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    font-size: 34px;
    line-height: 1.15;
    margin-bottom: 20px;
}

.formacion-subtitulo.color-rojo { color: var(--rojo); }
.formacion-subtitulo.color-azul { color: var(--azul); }

.formacion-texto p {
    font-size: 15px;
    color: #444;
    line-height: 1.75;
    margin: 0 0 14px;
}

.formacion-texto p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   SECCIÓN TABLA COMPARATIVA
   ============================================================ */
.comparativa {
    background: #ffffff;
    padding: 70px 40px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.comparativa.visible {
    opacity: 1;
    transform: translateY(0);
}

.comparativa-img {
    width: 100%;
    max-width: 1200px;
    height: auto;
    display: block;
    margin-top: 20px;
}

/* ============================================================
   SECCIÓN INGENIATURA DEL APRENDIZAJE
   ============================================================ */
.ingeniatura {
    background: #ffffff;
    padding: 80px 120px 90px;
    width: 100%;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.ingeniatura.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Título grande */
.ingeniatura-header {
    text-align: center;
    margin-bottom: 60px;
}

.ingeniatura-titulo {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 52px;
    font-weight: 900;
    color: var(--azul);
    line-height: 1.1;
    margin: 0;
}

.ing-rojo {
    color: var(--rojo);
}

/* Dos columnas */
.ingeniatura-columnas {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    text-align: left;
}

.ing-col {
    flex: 1;
}

.ing-pregunta {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: var(--azul);
    margin: 0 0 14px;
    line-height: 1.3;
}

.ing-texto {
    font-size: 15px;
    color: #444;
    line-height: 1.75;
    margin: 0;
}

/* Grid de pilares numerados */
.ing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 50px;
    padding: 20px 0 0 20px;
}

.ing-item {
    background: var(--azul);
    border-radius: 12px;
    padding: 30px 28px 30px 28px;
    display: flex;
    align-items: center;
    position: relative;
    text-align: left;
    margin-top: 16px;
    margin-left: 16px;
    min-height: 90px;
}

.ing-num {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    background: var(--amarillo);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    font-size: 24px;
    color: var(--azul);
    line-height: 1;
    position: absolute;
    top: -16px;
    left: -16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.ing-item p {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.4;
    padding-left: 8px;
}

/* ============================================================
   SECCIÓN 7+3 PRINCIPIOS PEDAGÓGICOS
   ============================================================ */
.principios {
    background: #ffffff;
    padding: 70px 120px 80px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.principios.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Encabezado */
.principios-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.principios-intro {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 18px;
    color: var(--azul);
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.4;
}

.principios-destacado {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: var(--rojo);
    margin: 0;
    line-height: 1.4;
}

/* Cuerpo: imagen + lista */
.principios-cuerpo {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
}

.principios-img {
    flex: 0 0 300px;
}

.principios-img img {
    width: 100%;
    height: auto;
    display: block;
}

/* Lista */
.principios-lista {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.principios-lista li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 15px;
    color: #333;
    line-height: 1.5;
}

.principio-icono {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
}

/* Botón amarillo */
.principios-footer {
    text-align: center;
    margin-top: 50px;
}

.btn-principios {
    display: inline-block;
    background: var(--amarillo);
    color: var(--azul);
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1px;
    padding: 16px 36px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.btn-principios:hover {
    background: #e6bb00;
    transform: translateY(-2px);
}

/* ============================================================
   SECCIÓN INSTALACIONES
   ============================================================ */
.instalaciones {
    background: #ffffff;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    min-height: 380px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.instalaciones.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Lado texto */
.instalaciones-texto {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    padding: 60px 60px 60px 80px;
    text-align: left;
}

.instalaciones-titulo {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: var(--azul);
    line-height: 1.25;
    margin: 0;
}

.inst-rojo {
    color: var(--rojo);
}

/* Botones rojos */
.btn-instalacion {
    display: block;
    width: 200px;
    background: var(--rojo);
    color: #ffffff;
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    padding: 16px 24px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, transform 0.2s;
}

.btn-instalacion:hover {
    background: var(--rojo-hover);
    transform: translateY(-2px);
}

/* Lado imagen */
.instalaciones-img {
    flex: 1;
    overflow: hidden;
    align-self: stretch;
}

.instalaciones-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.instalaciones:hover .instalaciones-img img {
    transform: scale(1.03);
}

/* ============================================================
   SECCIÓN VIVE UN DÍA SIMÓN
   ============================================================ */
.dia-simon {
    position: relative;
    background-color: var(--rojo);
    background-image: url('../res/diaSimonBg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 340px;
    padding: 60px 80px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.dia-simon.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Lado texto */
.dia-simon-texto {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    max-width: 480px;
    position: relative;
    z-index: 2;
}

.dia-simon-label {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.dia-simon-frase {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 28px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.3;
    margin: 0;
    text-align: left;
}

/* Botón amarillo */
.btn-dia-simon {
    display: inline-block;
    background: var(--amarillo);
    color: var(--azul);
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1.5px;
    padding: 14px 30px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.btn-dia-simon:hover {
    background: #e6bb00;
    transform: translateY(-2px);
}

/* Logo derecha */
.dia-simon-logo {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.dia-simon-logo img {
    height: 260px;
    width: auto;
    display: block;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3));
}

/* ============================================================
   RESPONSIVE — MEDIA QUERIES
   ============================================================ */

/* Tablets grandes (≤ 1400px) */
@media (max-width: 1400px) {
    .nivel-card { width: 230px; }
}

/* Tablets (≤ 1100px) */
@media (max-width: 1100px) {
    .nivel-card { width: 190px; }

    .formacion-bloque {
        gap: 40px;
        padding: 0 40px;
    }
    .formacion-img {
        flex: 0 0 340px;
        height: 340px;
    }
    .formacion-subtitulo {
        font-size: 28px;
    }
}

/* Tablets chicas (≤ 900px) */
@media (max-width: 900px) {
    .niveles-grid { gap: 14px; }
    .nivel-card   { width: 160px; }

    /* Bloques se apilan verticalmente */
    .formacion-bloque,
    .formacion-izq,
    .formacion-der {
        flex-direction: column !important;
        transform: translateY(40px) !important;
        padding: 0 30px;
        gap: 28px;
        margin-bottom: 60px;
    }

    /* En mobile la imagen siempre va arriba */
    .formacion-der .formacion-img { order: -1; }

    .formacion-img {
        flex: none;
        width: 100%;
        height: 300px;
    }

    .formacion-texto {
        flex: none;
    }
}

/* Móviles grandes (≤ 768px) */
@media (max-width: 768px) {
    /* Estadísticas */
    .stats-container                      { gap: 35px; }
    .stat-item:nth-child(1) .stat-circle  { width: 110px; height: 110px; }
    .stat-item:nth-child(3) .stat-circle  { width: 150px; height: 150px; }
    .stat-item:nth-child(1) .stat-numero  { font-size: 34px; }
    .stat-item:nth-child(3) .stat-numero  { font-size: 34px; }

    /* Casos de éxito */
    .casos-banner { height: 200px; }
    .casos-logo   { height: 140px; }
    .casos-videos { gap: 24px; padding: 0 20px; }
    .caso-video   { width: 100%; max-width: 420px; }

    /* Formación integral */
    .formacion-titulo    { font-size: 36px; }
    .formacion-intro     { font-size: 15px; }
    .formacion-img       { height: 260px; }
    .formacion-subtitulo { font-size: 26px; }

    /* Ingeniatura */
    .ingeniatura           { padding: 60px 40px 70px; }
    .ingeniatura-titulo    { font-size: 38px; }
    .ingeniatura-columnas  { flex-direction: column; gap: 36px; }
    .ing-grid              { grid-template-columns: repeat(2, 1fr); }
    .ing-item:nth-child(5),
    .ing-item:nth-child(10) { grid-column: span 1; }

    /* Principios */
    .principios            { padding: 60px 30px 70px; }
    .principios-cuerpo     { flex-direction: column; gap: 36px; }
    .principios-img        { flex: none; max-width: 260px; margin: 0 auto; }

    /* Instalaciones */
    .instalaciones         { flex-direction: column; }
    .instalaciones-texto   { flex: none; width: 100%; padding: 50px 30px 30px; align-items: center; text-align: center; }
    .instalaciones-titulo  { font-size: 26px; }
    .btn-instalacion       { width: 240px; }
    .instalaciones-img     { flex: none; width: 100%; height: 280px; }

    /* Día Simón */
    .dia-simon             { flex-direction: column; padding: 50px 30px; gap: 36px; text-align: center; }
    .dia-simon-texto       { align-items: center; max-width: 100%; }
    .dia-simon-frase       { text-align: center; font-size: 22px; }
    .dia-simon-logo img    { height: 180px; }
}

/* Móviles (≤ 700px) */
@media (max-width: 700px) {
    /* Primera sección */
    .primera-principal      { flex-direction: column; height: auto; padding: 40px 20px; }
    .primeraprincipal-img   { display: none; }

    /* Niveles */
    .niveles-educativos  { padding: 50px 20px; }
    .niveles-titulo      { font-size: 34px; }
    .niveles-subtitulo   { font-size: 15px; }
    .niveles-grid        { gap: 10px; }
    .nivel-card          { width: 140px; }
    .nivel-info h3       { font-size: 15px; }
    .nivel-info p        { font-size: 11px; }

    /* Formación integral */
    .formacion-integral  { padding: 60px 0 70px; }
    .formacion-bloque    { padding: 0 20px; }
    .formacion-titulo    { font-size: 30px; }
    .formacion-subtitulo { font-size: 22px; }
    .formacion-img       { height: 220px; }
}

/* ============================================================
   MODAL FORMULARIO DE REGISTRO
   ============================================================ */

/* Fondo oscuro */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.modal-overlay.activo {
    display: flex;
}

/* Caja del modal */
.modal-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 48px 40px 40px;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: modalEntrar 0.3s ease;
}

@keyframes modalEntrar {
    from { opacity: 0; transform: translateY(-20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Botón cerrar */
.modal-cerrar {
    position: absolute;
    top: 16px;
    right: 18px;
    background: none;
    border: none;
    font-size: 18px;
    color: #888;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-cerrar:hover {
    color: var(--rojo);
}

/* Título */
.modal-titulo {
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    font-size: 36px;
    color: var(--azul);
    margin: 0 0 8px;
    letter-spacing: 1px;
}

.modal-subtitulo {
    font-size: 15px;
    color: #666;
    margin: 0 0 28px;
    line-height: 1.5;
}

/* Campos */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.modal-campo {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.modal-campo label {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--azul);
}

.modal-campo input,
.modal-campo select {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 15px;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.2s;
    background: #fafafa;
}

.modal-campo input:focus,
.modal-campo select:focus {
    border-color: var(--rojo);
    background: #fff;
}

/* Botón enviar */
.modal-btn-enviar {
    margin-top: 8px;
    background: var(--rojo);
    color: #fff;
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 16px;
    font-weight: 900;
    border: none;
    border-radius: 6px;
    padding: 16px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.modal-btn-enviar:hover {
    background: var(--rojo-hover);
    transform: translateY(-2px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--rojo);
    padding: 40px 40px 32px;
    text-align: center;
}

.footer-linea {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    margin: 0 0 6px;
    line-height: 1.6;
}

.footer-legal {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.footer-link {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    text-decoration: underline;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #ffffff;
}

.footer-sep {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}

/* ============================================================
   BOTÓN FLOTANTE CIRCULAR
   ============================================================ */
.btn-flotante {
    position: fixed;
    top: 110px;
    left: 24px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--amarillo);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
    z-index: 900;
    padding: 0;
    opacity: 0;
    transform: scale(0.6);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.2s;
}

.btn-flotante.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.btn-flotante:hover {
    box-shadow: 0 10px 32px rgba(0,0,0,0.35);
    transform: scale(1.06);
}

/* SVG con texto curvo — ocupa todo el círculo */
.btn-flotante-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: girarTexto 12s linear infinite;
}

.btn-flotante-texto {
    font-family: 'Nunito', Arial, sans-serif;
    font-size: 13.5px;
    font-weight: 900;
    fill: var(--azul);
    letter-spacing: 1px;
}

@keyframes girarTexto {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Logo centrado */
.btn-flotante-logo {
    position: relative;
    z-index: 2;
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 50%;
}