/* --- Estilos para la página de Noticias --- */

/* Asegurar espacio para el header fijo (90px) */
.noticias-page-content {
    padding-top: 120px; 
    min-height: 100vh;
    background-color: var(--bg-color); 
    transition: background-color 0.3s;
}

/* --- SECCIÓN PRINCIPAL: CARRUSEL (SLIDER-CONTAINER) --- */
.noticias-header.slider-container { 
    padding: 0; 
    text-align: center;
    position: relative;
    overflow: hidden; 
    height: 450px; 
    width: 100%; 
    margin: 0; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.slider-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000; 
    opacity: 0.6; 
    display: none; 
}

.header-banner-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.prev-arrow { left: 20px; }
.next-arrow { right: 20px; }


/* --- SECCIÓN DEL BLOG / FEED (Las tarjetas) --- */
.blog-feed {
    padding-top: 60px;
    padding-bottom: 60px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px;
    justify-items: center;
}

.article-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: #1a1a1a; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    min-height: 380px; 
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    text-decoration: none; 
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s;
    width: 100%;
    max-width: 360px;
}

/* Modo claro para tarjetas de noticias */
body.light-mode .article-card {
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.article-card:hover {
    transform: translateY(-5px);
    /* CAMBIO (Opción 2): Brillo verde tecnológico al pasar el ratón */
    box-shadow: 0 10px 25px rgba(171, 225, 28, 0.3); 
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.7; 
    transition: opacity 0.3s ease;
}

.article-card:hover .card-image {
    opacity: 0.9;
}

.card-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.1)); 
    color: #fff;
}

.card-content h3 {
    margin: 5px 0 10px 0;
    font-size: 1.4em;
    line-height: 1.3;
    color: #fff;
}

.card-meta {
    font-size: 0.8em;
    color: #aaa;
    margin-bottom: 5px;
}

.card-meta-bottom {
    font-size: 0.75em;
    color: var(--accent-color); /* CAMBIO: Naranja Principal */
    display: flex;
    gap: 15px;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .blog-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
    .noticias-header { height: 350px; }
}

@media (max-width: 768px) {
    .blog-grid { grid-template-columns: 1fr 1fr; }
    .noticias-header { height: 300px; }
}

@media (max-width: 480px) {
    .blog-grid { grid-template-columns: 1fr; }
    .noticias-header { height: 250px; }
}


/* --- ESTILOS PARA EL MODAL DE NOTICIAS --- */

.noticias-modal {
    display: none; 
    position: fixed;
    z-index: 1001; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.9); 
    padding-top: 0; 
}

.modal-content {
    background-color: #000; 
    margin: 5vh auto; 
    padding: 20px;
    border: 1px solid var(--accent-color); /* CAMBIO: Naranja Principal */
    border-radius: 8px;
    width: 90%;
    max-width: 800px; 
    position: relative;
    /* CAMBIO: Sombra adaptada al nuevo Naranja (RGB: 233, 93, 10) */
    box-shadow: 0 5px 15px rgba(233, 93, 10, 0.4);
    max-height: 90vh; 
    overflow-y: auto; 
    transition: background-color 0.3s;
}

/* Modo claro para el contenido del modal */
body.light-mode .modal-content {
    background-color: #ffffff;
    border: 1px solid var(--accent-color); 
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}

/* --- ESTILOS PARA EL BOTÓN DE CERRAR DEL MODAL --- */

.close-btn {
    color: var(--accent-color); /* CAMBIO: Naranja Principal */
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff; 
    border-radius: 50%; 
    width: 30px; 
    height: 30px; 
    line-height: 30px; 
    text-align: center; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4); 
}

body.light-mode .close-btn {
    background-color: #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.close-btn:hover,
.close-btn:focus {
    color: #000; 
    /* CAMBIO (Opción 2): Al cerrar, el botón se ilumina con el degradado fresco */
    background: linear-gradient(135deg, var(--accent-yellow-light) 0%, var(--accent-green) 100%);
    text-decoration: none;
    cursor: pointer;
    transform: scale(1.1);
}

#modal-imagen {
    width: 100%;
    height: auto;
    object-fit: contain; 
    border-radius: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-color); /* CAMBIO */
}

.modal-body {
    padding: 10px;
    color: var(--text-secondary); 
}

.modal-body h2 {
    color: var(--accent-green-text); /* CAMBIO */
    font-size: 2em;
    margin-top: 0;
    margin-bottom: 10px;
}

.modal-meta {
    font-size: 0.9em;
    color: var(--text-secondary); 
    border-bottom: 1px dashed #333;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

body.light-mode .modal-meta {
    border-bottom: 1px dashed #ddd;
}

/* Responsividad modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5vh auto; 
        max-height: 95vh;
    }
}

/* Caja de Sabías Qué */
.sabias-que-box {
    background-color: #2a2a2a; 
    border-left: 4px solid var(--accent-color); /* CAMBIO */
    padding: 15px;
    margin-top: 20px;
    margin-bottom: 15px;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #e0e0e0;
    transition: background-color 0.3s, color 0.3s;
}

body.light-mode .sabias-que-box {
    background-color: #f9f9f9; 
    color: #333; 
    border-left: 4px solid var(--accent-color); /* CAMBIO */
}

.sabias-que-title {
    color: var(--accent-yellow-dark); /* CAMBIO: Usamos el Amarillo Oscuro para que destaque más dentro de la caja gris */
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-size: 0.9em;
}

/* Estilo para la fuente */
.modal-source {
    font-size: 0.85em;
    color: #888;
    text-align: right;
    margin-top: 10px;
    font-weight: 300;
}