/* ============================================================
   BANNER PRINCIPAL
   Banner con imagen de fondo, gradiente oscuro, título y
   subtítulo. Se usa en Nosotros, Niveles Académicos y
   Propuesta Educativa.
   ============================================================ */

.banner-principal {
    position: relative;
    width: 100%;
    min-height: clamp(360px, 48vh, 680px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
}

/* Gradiente oscuro sobre la imagen para mejorar la legibilidad */
.banner-principal::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(5, 10, 20, 0.55) 0%, rgba(5, 10, 20, 0.45) 30%, rgba(5, 10, 20, 0.45) 70%, rgba(5, 10, 20, 0.55) 100%);
}

.fondo-banner {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: saturate(0.95);
    transform: scale(1.03);
    transition: transform .6s var(--curva-salida);
}

/* Zoom suave del fondo al pasar el mouse (solo escritorio) */
@media (hover: hover) and (pointer: fine) {
    .banner-principal:hover .fondo-banner {
        transform: scale(1.05);
    }
}

.superposicion-banner {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem 1.25rem;
    max-width: 1100px;
    width: 100%;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: .8rem;
    align-items: center;
    justify-content: center;
}

.titulo-banner {
    margin: 0;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    font-size: clamp(2rem, 6vw, 4.5rem);
    text-shadow: 0 6px 18px rgba(2, 6, 12, 0.55);
}

.subtitulo-banner {
    margin: 0;
    max-width: 900px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    opacity: .95;
    text-shadow: 0 4px 12px rgba(2, 6, 12, 0.45);
}

/* Si la imagen no carga, mostrar un fondo plano oscuro */
.fondo-banner--vacio {
    background-color: #0b2340;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .banner-principal {
        min-height: clamp(300px, 40vh, 480px);
        border-radius: 0;
    }

    .superposicion-banner {
        padding: 2.5rem 1rem;
    }

    .titulo-banner {
        font-size: clamp(1.7rem, 7.5vw, 2.6rem);
    }
}

@media (max-width: 480px) {
    .banner-principal {
        min-height: clamp(260px, 36vh, 380px);
    }

    .superposicion-banner {
        padding: 2rem 0.9rem;
    }
}
