/* --- Estilos para el Banner de Oferta Académica MODIFICADOS --- */
*{
    font-family: 'Montserrat', sans-serif;
}
.academic-offer-banner {
    /* Fondo azul oscuro base */
    background-color: #132959; 
    
    /* 1. Imagen Parcial (60% del ancho) */
    background-image: url('imagenes/foto_estudiante.jpg');
   
    /* Tamaño de la imagen: 60% del ancho, 100% de la altura */
    background-size: 60% 100%; 
    
    /* Centrar la imagen horizontalmente (50%) */
    background-position: 50% 50%; 
    
    background-repeat: no-repeat;
    
    /* Tamaño vertical reducido */
    min-height: 20vh; 
    
    display: flex;
    align-items: center; 
    justify-content: center;
    position: relative;
    z-index: 5; 
    padding: 15px 0;
}

/* Overlay oscuro para la legibilidad del texto */
.academic-offer-banner::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%;
    background-image: linear-gradient(to right, 
        #132959 0%, 
        #132959 20%, 
        rgba(0, 0, 0, 0.4) 20%, 
        rgba(0, 0, 0, 0.4) 80%, 
        #132959 80%, 
        #132959 100%
    );
    z-index: 1; 
}

/* Estilos para el contenido y el texto */
.academic-offer-content {
    position: relative;
    z-index: 2; 
    width: 100%;
}

.academic-offer-banner h1 {
    font-size: 2.5rem; 
    font-family: 'Montserrat', sans-serif;
    
    margin: 0;
}

/* Ajuste para pantallas pequeñas */
@media (max-width: 768px) {
    .academic-offer-banner {
        min-height: 15vh;
        background-size: cover; 
    }
    .academic-offer-banner::after {
        width: 100%; 
        background-image: linear-gradient(to right, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)); 
    }
    .academic-offer-banner h1 {
        font-size: 2rem;
        font-family: 'Montserrat', sans-serif;
    }
}

/* =========================================================================
   ESTILOS ESPECÍFICOS DEL COLLAGE (Basado en image_51e610.jpg)
   ========================================================================= */

.collage-wrapper {
    position: relative;
    width: 100%;
    height: 380px; 
    overflow: hidden;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* ⭐ Ajuste adicional para el collage pedido ⭐ */
    transition: box-shadow 1.5s ease-in-out;
}

/* La cuadrícula de 11 fotos */
.collage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.collage-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6); 
}

/* Diseño irregular para las 11 fotos */
.collage-grid img:nth-child(1) { grid-column: span 2; }
.collage-grid img:nth-child(5) { grid-row: span 2; }
.collage-grid img:nth-child(11) { grid-column: span 2; }

/* Overlay central con el texto y el número 11 */
.collage-overlay {
    position: relative;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5); 
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    color: white;
}

.collage-overlay h2 {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: 2px;
}

.collage-overlay p {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* El recuadro blanco del número 11 */
#contadorCarreras {
    background-color: white;
    color: #dc3545; 
    font-size: 3rem;
    font-weight: 800;
    padding: 10px 30px;
    border-radius: 12px;
    display: inline-block;
    min-width: 100px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* --- Colores de las secciones de contenido --- */

.display-4, .border-success h3, .bi-check-circle-fill,
.border-success {
  color: #1e3a8a !important; 
  border-color: #1e3a8a !important;
}

.border-primary {
  border-color: #3b5998 !important; 
}

.border-primary h3 {
  color: #3b5998 !important;
}

/* --- 1. Definición de Tamaños y Estructura Flexbox --- */

.row.g-2 {
    display: flex; 
    gap: 10px; 
    justify-content: center;
    align-items: stretch; 
}

.flex-item {
    flex-grow: 1; 
    flex-shrink: 1; 
    flex-basis: 200px; 
    max-width: 250px;
    position: relative;
    overflow: hidden; 
    border-radius: 0.75rem; 
    transition: flex-basis 0.4s ease-in-out, max-width 0.4s ease-in-out; 
}

.image-card {
    display: block;
    position: relative; 
    overflow: hidden; 
    border-radius: 0.375rem; 
    height: 280px;
    width: 290px;
    z-index: 1; 
}

.modalidad-img {
    display: block;
    width: 100%;
    height: 100%; 
    object-fit: cover;
    transition: transform 0.3s ease-in-out; 
    z-index: 1; 
    object-fit: contain;
}

/* --- 2. Elementos de Overlay y Contenido --- */

.image-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0); 
    transition: background 0.3s ease-in-out; 
    z-index: 2; 
}

.overlay-content {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%; 
    padding: 15px 10px; 
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    color: white;
    opacity: 1;
    visibility: visible;
    z-index: 3;
}

.overlay-content h4 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: left;
    background: #1e40af;
}

.overlay-content .arrow-circle-icon {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.image-card:hover .overlay-content .arrow-circle-icon {
    opacity: 1;
    visibility: visible;
}

.overlay-content h4 {
    font-size: 1.2rem; 
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 10px; 
    font-weight: 500;
}

/* --- 3. Estilo del Círculo de la Flecha --- */

.arrow-circle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border: 2px solid white; 
    border-radius: 50%; 
    background-color: transparent;
    color: white; 
    font-size: 18px; 
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease-in-out; 
}

/* --- 4. Efectos al pasar el cursor (HOVER) --- */

.flex-item:hover {
    flex-basis: 350px; 
    max-width: 300px; 
}

.image-card:hover::before {
    background: rgba(0, 0, 0, 0.6); 
}

.arrow-circle-icon:hover {
    background-color: #1e40af ; 
    color: white; 
    border-color: #1e40af;
}

/* --- 5. Responsividad --- */

@media (max-width: 992px) {
    .flex-item { flex-basis: 180px; }
    .flex-item:hover { flex-basis: 300px; }
}

@media (max-width: 768px) {
    .row.g-2 { flex-wrap: wrap; justify-content: space-around; }
    .flex-item { flex-basis: calc(50% - 20px); max-width: none; }
    .flex-item:hover { flex-basis: calc(50% - 10px); }
}

@media (max-width: 576px) {
    .row.g-2 { flex-direction: column; align-items: center; }
    .flex-item { width: 90%; max-width: 350px; flex-basis: auto; }
}

/* --- Tipografía y Títulos --- */

.display-4.fw-bold {
    color: #1e3a8a; 
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
}

.lead.text-secondary {
    color: #000000; 
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
}

.d-flex.align-items-start h3 {
    color: #1e3a8a; 
    font-family: 'Montserrat', sans-serif;
    font-size: 4rem;
    margin-bottom: 0.25rem; 
}

.text-secondary.small.m-0 {
    color: #1e3a8a; 
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    margin: 0 !important;
}

/* Estado inicial de los textos */
.animated-content {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

/* Estado cuando el JS detecta el scroll */
.animated-content.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================================
   NUEVA RESPONSIVIDAD ADICIONAL (Agregada para completar el diseño)
   ========================================================================= */

@media (max-width: 768px) {
    .collage-wrapper {
        height: 300px; /* Reducimos altura en tablet/móvil */
    }
    
    .collage-overlay h2 {
        font-size: 1.8rem;
    }
    
    .collage-overlay p {
        font-size: 1.1rem;
    }
    
    #contadorCarreras {
        font-size: 2.2rem;
        padding: 8px 20px;
    }

    .display-4.fw-bold {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .collage-grid {
        grid-template-columns: repeat(2, 1fr); /* Menos columnas para que las fotos se vean */
        grid-template-rows: auto;
    }
    
    .collage-overlay {
        padding: 15px;
        width: 90%;
    }
    
    .collage-overlay h2 {
        font-size: 1.4rem;
    }

    .d-flex.align-items-start h3 {
        font-size: 2.8rem; /* El número gigante de la estadística se ajusta */
    }
    
    .image-card {
        width: 100%; /* Las tarjetas de modalidad ocupan el ancho total */
        height: 250px;
    }
}