/* ==========================================================================
   --- Global y Layout ---
   ========================================================================== */

.titulo-seccion {
    margin-top: 4rem;
    margin-bottom: 3rem;
    text-align: center;
    padding: 0 1rem;
}

.titulo-seccion h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    color: #1E3A8A; /* Azul institucional */
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    margin: 0;
}

.titulo-seccion h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: #1976D2;
    border-radius: 2px;
}

h1 {
    font-size: clamp(36px, 4vw, 64px);
    font-weight: bold;
    margin-bottom: .5rem;
    text-align: center;
    margin-top: 0;
}

.introduccion {
    width: 80%;
    display: flex;
    align-self: center;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    margin-bottom: 2rem;
}

.sala-prensa-body {
    background-color: #f4f4f4;
    margin: 0;
    min-height: 100vh;
}

#banner {
    width: 100%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

/* ==========================================================================
   --- Noticia Expandida (Layout Unificado) ---
   ========================================================================== */
#informacion {
    display: none;
    padding: 3rem 1rem;
    background: white;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

.noticia-detalle {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

#detalle-titulo {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    color: #1E3A8A;
    text-align: center;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.periodo-texto-detalle {
    text-align: center;
    color: #1976D2;
    font-weight: bold;
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    margin-top: -5px;
}

.separador-corto {
    width: 60px;
    height: 4px;
    background: #1976D2;
    margin: 1.5rem auto 1.5rem;
}

.noticia-cuerpo-grid {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

/* --- Bloque de Texto --- */
.columna-info {
    width: 100%;
}

#detalle-descripcion {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    text-align: justify;
    word-break: break-word;
    margin-bottom: 1.5rem;
}

/* --- Contenedor del PDF Estándar Computadora --- */
.columna-media {
    width: 100%;
    display: block;
    margin-top: 15px;
}

.detalle-imagen-wrapper {
    width: 100%;
    height: 700px; /* Incrementamos a 900px para un display mucho más imponente */
    background-color: #ffffff; /* Eliminamos el fondo gris de respaldo */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    border: 1px solid #e2e8f0;
}

/* --- Botones de PDF --- */
.docs-container {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn-descarga {
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    color: white;
    transition: 0.3s;
    text-align: center;
}

.btn-descarga.bases {
    background-color: #5C3279;
}

.btn-descarga.resultados {
    background-color: #5C3279;
}

.btn-descarga:hover {
    transform: scale(1.05);
}

/* --- Botón de cerrar --- */
.btn-cerrar {
    display: block;
    margin: 3rem auto 0;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 1rem 3rem;
    background-color: #004EAA;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.btn-cerrar:hover {
    background: #1976D2;
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(30, 58, 138, 0.3);
}

.fade-out {
    opacity: 0 !important;
    transform: translateY(20px) !important;
}

/* ==========================================================================
   --- Rejilla de Boletines Inferior ---
   ========================================================================== */
#boletines {
    padding: 4rem 1rem;
}

.contenedor-boletines {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card-boletin {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    padding: 20px; text-align: center; justify-content: center; min-height: 80px;
}

.card-boletin:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.img-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.imagen-boletin {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-boletin {
    padding: 1.5rem;
}

.fecha-boletin {
    color: #1976D2;
    font-size: 1.1rem;
    font-weight: bold;
}

.titulo-boletin {
    font-size: 1.2rem;
    color: #222;
    line-height: 1.4;
    margin: 0;
    font-weight:bold;
    color:#1E3A8A;
}

/* ==========================================================================
   --- MEDIA QUERIES: AJUSTES PARA PANTALLAS PEQUEÑAS (Responsivo Móvil) ---
   ========================================================================== */

/* Tablets y Laptops Pequeñas */
@media (max-width: 1024px) {
    .noticia-detalle {
        max-width: 90%;
        padding: 1.5rem;
    }

    .detalle-imagen-wrapper {
        height: 650px; /* Reducción ligera para optimizar la proporción vertical */
    }
}

/* Teléfonos Celulares (Modo Vertical y Horizontal Común) */
@media (max-width: 768px) {
    .titulo-seccion {
        margin-top: 2.5rem;
        margin-bottom: 1.5rem;
    }

    .introduccion {
        width: 95%;
        padding: 0 10px;
    }

    #informacion {
        padding: 1.5rem 0.5rem;
    }

    .noticia-detalle {
        width: 100%;
        padding: 1rem 0.5rem; /* Máximo aprovechamiento de los extremos del teléfono */
    }

    #detalle-descripcion {
        font-size: 1.05rem; /* Letra sutilmente más compacta y cómoda para móviles */
        line-height: 1.7;
        text-align: left; /* En pantallas muy pequeñas el justificado genera espacios rotos */
    }

    /* REDUCCIÓN ESTRATÉGICA DEL VISOR: Evita que el usuario quede atrapado en un scroll infinito */
    .detalle-imagen-wrapper {
        height: 650px; /* Altura ideal en celulares para leer con el zoom FitH activo */
        width: 100%;
        background-color: #ffffff;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    }

    .detalle-imagen-wrapper iframe {
        height: 650px !important;
    }

    /* Ajuste de Botones en Celular */
    .docs-container {
        flex-direction: column; /* Se apilan uno arriba del otro */
        gap: 12px;
        width: 100%;
    }

    .btn-descarga {
        width: 100%; /* Botones a lo ancho total de la pantalla táctil para fácil clic */
        box-sizing: border-box;
        padding: 14px;
        font-size: 1.1rem;
    }

    .btn-cerrar {
        width: 100%;
        box-sizing: border-box;
        padding: 1.2rem;
        margin-top: 2rem;
        font-size: 1.1rem;
    }

    #boletines {
        padding: 2rem 1rem;
    }

    .contenedor-boletines {
        gap: 1.5rem;
    }
}

/* Pantallas Extra Pequeñas (Móviles antiguos o compactos) */
@media (max-width: 480px) {
    .detalle-imagen-wrapper {
        height: 420px; /* Altura mínima segura para leer y operar el visor nativo */
    }

    .detalle-imagen-wrapper iframe {
        height: 420px !important;
    }
}