/* VARIABLES FIBONACCI */
:root {
    --fib-61: 61.8%;
    --fib-38: 38.2%;
    --fib-23: 23.6%;
    --fib-14: 14.6%;
    --fib-9: 9%;
    --fib-5: 5.6%;
    --fib-3: 3.5%;
    --fib-2: 2.1%;
}

/* VARIABLES DE COLORES */
:root {
    --morado: rgb(79, 40, 80); /* Morado intenso */
    --verde-complementario: #CFFF9D; /* Verde complementario */
    --gris-claro: #f9f9f9;
    --gris-oscuro: #333;
}

/* ESTILOS GENERALES */
body {
    /* Tipografía clásica serif para cuerpo y títulos */
    font-family: 'Garamond', 'Georgia', 'Times', serif; /* Tipografía serif clásica */
    font-size: 20px; /* Tamaño de fuente aumentado para noticias y títulos */
    line-height: 1.6; /* Interlineado ligeramente mayor para legibilidad */
    color: var(--gris-oscuro); /* Color general del texto */
    background: url('../img/pues.jpg') no-repeat center center fixed; /* Imagen centrada */
    background-size: cover; /* Escala la imagen para cubrir todo el ancho y alto */
    margin: 0;
    padding: 0; /* Elimina cualquier padding del body */
}

.titulo-dorado {
    font-family: 'Garamond', 'Georgia', 'Times', serif; /* Mantener serif en el título principal */
    font-weight: 700; /* Grosor para destacar */
    font-size: 2.2rem; /* Ligeramente mayor para destacar */
    text-align: center;
    color: white;
    background: var(--morado);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.titulo-imagen {
    display: block;
    margin: 0 auto; /* Centra la imagen horizontalmente */
    max-width: 70%; /* Reduce el ancho máximo al 70% del contenedor */
    height: auto; /* Mantiene la proporción de la imagen */
}

.archivo-footer {
    text-align: center;
    margin: 3rem auto 2rem;
    padding: 2rem;
    max-width: 1200px;
}

.btn-archivo {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--morado);
    color: white;
    text-decoration: none;
    font-family: 'Garamond', 'Georgia', 'Times', serif;
    font-weight: 700;
    font-size: 1.2rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(79, 40, 80, 0.3);
    border: 2px solid var(--morado);
}

.btn-archivo:hover {
    background: #5a2a5b;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(79, 40, 80, 0.5);
}

h2, h3, h4 {
    /* Usar la familia serif para todos los encabezados para coherencia */
    font-family: 'Garamond', 'Georgia', 'Times', serif;
    font-weight: 700;
}

/* Ajustes de tamaño de encabezados relativos al tamaño base (20px) */
h2 { font-size: 1.8rem; } /* ~36px */
h3 { font-size: 1.4rem; } /* ~28px */
h4 { font-size: 1.15rem; } /* ~23px */

/* DISEÑO PORTADA FIBONACCI */
.contenedor-fibonacci {
    display: grid;
    grid-template-areas:
        "principal secundaria1"
        "principal secundaria2"
        "terciarias terciarias";
    grid-template-columns: var(--fib-61) var(--fib-38);
    gap: 15px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 2rem;
    position: relative; /* Asegura que el overlay-asociacion se posicione respecto a este contenedor */
}

.noticia-principal {
    grid-area: principal;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 5px solid var(--morado); /* Detalle morado */
}

.noticia-principal:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border-left: 5px solid var(--verde-complementario); /* Cambia a verde al pasar el mouse */
}

.noticia-secundaria {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid var(--morado); /* Detalle morado */
}

.noticia-secundaria:nth-child(2) {
    grid-area: secundaria1;
}

.noticia-secundaria:nth-child(3) {
    grid-area: secundaria2;
}

.noticia-secundaria:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--verde-complementario); /* Cambia a verde al pasar el mouse */
}

.noticia-terciaria {
    background: white;
    padding: 0.8rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid var(--morado); /* Detalle morado */
}

.noticia-terciaria:nth-child(4) {
    grid-area: terciaria1;
    width: var(--fib-23);
}

.noticia-terciaria:nth-child(5) {
    grid-area: terciaria2;
    width: var(--fib-14);
}

.noticia-terciaria:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border-left: 3px solid var(--verde-complementario); /* Cambia a verde al pasar el mouse */
}

/* Asegurar que el contenido dentro de las noticias use la tipografía serif y tamaño aumentado */
.noticia-principal,
.noticia-secundaria,
.noticia-terciaria,
.noticia-principal *,
.noticia-secundaria *,
.noticia-terciaria * {
    font-family: 'Garamond', 'Georgia', 'Times', serif;
    /* Tamaño relativo al base (20px) para legibilidad */
    font-size: 1.05rem; /* aprox 21px */
    line-height: 1.6;
}

/* Modal y contenido del modal: aseguramos tipografía y tamaño */
.modal-contenido,
.modal-cuerpo,
.modal-contenido * {
    font-family: 'Garamond', 'Georgia', 'Times', serif;
    font-size: 1rem; /* 20px */
}

/* Anuncio temporal: forzar también la tipografía dentro del overlay */
.contenido-anuncio,
.mensaje-anuncio,
.contenido-anuncio *,
.mensaje-anuncio * {
    font-family: 'Garamond', 'Georgia', 'Times', serif;
    font-size: 1rem;
}

/* Estilos para imágenes dentro de noticias (responsive y accesible) */
.noticia-imagen,
.noticia-principal img,
.noticia-secundaria img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 0 1rem 0;
    border-radius: 6px;
    object-fit: cover;
}

.fila-terciarias .noticia-terciaria img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    object-fit: cover;
}

/* Miniaturas: limitar altura y mantener aspecto */
.noticia-terciaria img.thumbnail {
    max-height: 120px;
    width: 100%;
    object-fit: cover;
}

/* Saltos de página y marcadores visuales */
.page-break {
    width: 100%;
    height: 1px;
    margin: 1.5rem 0;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.08), transparent);
}

/* Para impresión: forzar salto de página donde aparezca .page-break */
@media print {
    .page-break { display: block; page-break-after: always; break-after: page; }
    /* Opcional: limpiar elementos no deseados al imprimir */
    .overlay-asociacion, .modal-noticia, .cerrar-anuncio, .cerrar-modal { display: none !important; }
}

/* EFECTOS HOVER */
.noticia-principal:hover,
.noticia-secundaria:hover,
.noticia-terciaria:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* MODAL DE NOTICIA COMPLETA */
.modal-noticia {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    overflow-y: auto;
}

.modal-contenido {
    background: white;
    width: 85%;
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 8px;
    font-family: 'Georgia', serif;
    line-height: 1.7;
    border: 3px solid var(--morado); /* Borde morado */
}

/* Corrección clave: Usar ID en lugar de clase para el título */
#modal-titulo {
    font-family: 'Garamond', 'Georgia', 'Times', serif; /* Usar serif coherente con el resto */
    font-size: 2.6rem; /* Mayor tamaño para destacar en modal */
    text-align: center;
    margin-bottom: 1rem;
    color: var(--morado); /* Título en morado */
    font-weight: 700;
    line-height: 1.05;
}

/* Subtítulos */
.modal-subtitulo {
    font-family: 'Garamond', 'Georgia', 'Times', serif; /* Subtítulo en serif para armonía */
    font-weight: 400; /* Peso normal */
    font-size: 1.3rem;
    text-align: center;
    color: black; /* Cambiamos el color a negro */
    margin-bottom: 2rem;
    line-height: 1.5;
}

.modal-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

/* Estilos para el cuerpo - más específicos */
.modal-cuerpo {
    font-family: 'Garamond', 'Georgia', 'Times', serif;
    font-size: 1.25rem; /* Aumentado para mejor lectura (~25px) */
    font-weight: normal;
    line-height: 1.9;
    color: #333;
}

.modal-cuerpo p {
    font-size: 1.1rem;
    font-weight: normal;
    margin-bottom: 1.5rem;
}

.modal-cuerpo ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
    list-style-type: disc;
}

.modal-cuerpo li {
    margin-bottom: 0.75rem;
    font-weight: normal;
}

.cerrar-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--morado); /* Botón cerrar en morado */
}

.cerrar-modal:hover {
    color: var(--verde-complementario); /* Cambia a verde al pasar el mouse */
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .contenedor-fibonacci {
        grid-template-areas:
            "principal"
            "secundaria1"
            "secundaria2"
            "terciaria1"
            "terciaria2";
        grid-template-columns: 1fr;
    }
    
    .modal-contenido {
        width: 95%;
        padding: 1rem;
    }
}
/* CORRECCIONES FINALES PARA EL MODAL */
#modal-titulo {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.modal-cuerpo {
    font-size: 1rem !important;
    font-weight: normal !important;
}

.modal-cuerpo p,
.modal-cuerpo ul,
.modal-cuerpo li {
    font-size: inherit;
    font-weight: normal;
}

.modal-cuerpo p {
    margin: 1rem 0;
    line-height: 1.6;
}

.modal-cuerpo ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

/* ==========================================================================
   ESTILOS ESPECÍFICOS PARA PÁGINAS DE NOTICIAS INDIVIDUALES
   ========================================================================== */

.noticia-page {
    background: url('../img/pues.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
}

.noticia-contenedor {
    width: 85%;
    max-width: 750px;
    margin: 0 auto;
    padding: 2rem 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(79, 40, 80, 0.2);
    backdrop-filter: blur(12px);
}

.noticia {
    padding: 2rem;
    position: relative;
}

.noticia-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(79, 40, 80, 0.1);
}

.noticia-titulo {
    font-family: 'Garamond', 'Georgia', 'Times', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--morado);
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.noticia-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Garamond', 'Georgia', 'Times', serif;
    font-size: 1.1rem;
}

.noticia-fecha {
    color: var(--morado);
    font-weight: 600;
}

.noticia-separador {
    color: var(--verde-complementario);
    font-weight: bold;
    font-size: 1.2rem;
}

.noticia-categoria {
    color: var(--gris-oscuro);
    font-weight: 500;
}

.noticia-contenido {
    font-family: 'Garamond', 'Georgia', 'Times', serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #2c2c2c;
    text-align: justify;
    max-width: 100%;
    margin: 0 auto;
}

.noticia-contenido p {
    margin-bottom: 1.5rem;
    text-indent: 0;
}

.noticia-contenido p:first-child {
    text-indent: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--morado);
    margin-bottom: 2rem;
}

.noticia-contenido h2,
.noticia-contenido h3,
.noticia-contenido h4 {
    color: var(--morado);
    margin: 2rem 0 1rem 0;
    font-weight: 700;
}

.noticia-contenido h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--verde-complementario);
    padding-bottom: 0.5rem;
}

.noticia-contenido h3 {
    font-size: 1.5rem;
}

.noticia-contenido h4 {
    font-size: 1.3rem;
}

.noticia-contenido ul,
.noticia-contenido ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.noticia-contenido li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.noticia-contenido blockquote {
    border-left: 4px solid var(--verde-complementario);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--morado);
    background: rgba(207, 255, 157, 0.1);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.noticia-contenido img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.noticia-contenido .page-break {
    margin: 3rem 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--verde-complementario) 20%,
        var(--morado) 50%,
        var(--verde-complementario) 80%,
        transparent 100%);
    border-radius: 1px;
}

.noticia-footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(79, 40, 80, 0.2);
}

.noticia-footer a {
    color: var(--morado);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--morado);
    border-radius: 25px;
    transition: all 0.3s ease;
    display: inline-block;
}

.noticia-footer a:hover {
    background: var(--morado);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 40, 80, 0.3);
}

/* ==========================================================================
   ESTILOS PARA NOTICIAS DESTACADAS - SOLO FONDO SUTIL
   ========================================================================== */

.noticia-destacada-page {
    background: linear-gradient(135deg,
        rgba(245, 245, 220, 0.3) 0%,
        rgba(255, 255, 255, 0.2) 100%),
        url('../img/pues.jpg') no-repeat center center fixed;
    background-size: cover;
}


.fila-terciarias {
    grid-area: terciarias;
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.noticia-terciaria {
    flex: 1;
    min-width: 0; /* Permite que los textos no desborden */
    /* Hereda automáticamente hover/bordes de tu CSS actual */
}

/* Asignamos proporciones Fibonacci */
.noticia-terciaria:nth-child(1) { flex: var(--fib-23); }
.noticia-terciaria:nth-child(2) { flex: var(--fib-14); }
.noticia-terciaria:nth-child(3) { flex: var(--fib-9); }
.noticia-terciaria:nth-child(4) { flex: var(--fib-5); }
.noticia-terciaria:nth-child(5) { flex: var(--fib-3); }
/* INICIO: ESTILOS PARA EL ANUNCIO TEMPORAL DE LA ASOCIACIÓN */
.overlay-asociacion {
    position: absolute; /* Mantiene la posición relativa al contenedor padre */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(79, 40, 80, 0.95); /* Fondo morado semitransparente */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100; /* Mayor que el contenido debajo pero no tan alto como el modal */
}

.contenido-anuncio {
    background-color: white;
    width: 80%;
    max-width: 700px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    padding: 30px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.cerrar-anuncio {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    background: none;
    border: none;
    color: var(--morado);
    cursor: pointer;
}

.cerrar-anuncio:hover {
    color: var(--verde-complementario);
}

.cabecera-anuncio {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--morado);
    padding-bottom: 15px;
}

.logo-anuncio {
    max-width: 100px;
    height: auto;
    margin-right: 20px;
}

.cabecera-anuncio h2 {
    color: var(--morado);
    margin: 0;
    font-size: 1.8rem;
}

.mensaje-anuncio p {
    margin-bottom: 15px;
    line-height: 1.6;
    text-align: justify;
}

.mensaje-anuncio a {
    color: var(--morado);
    text-decoration: none;
    font-weight: bold;
}

.mensaje-anuncio a:hover {
    color: var(--verde-complementario);
}

.mensaje-anuncio ul {
    margin: 15px 0;
    padding-left: 20px;
}

.mensaje-anuncio li {
    margin-bottom: 8px;
}
