/* ==========================================================================
   MÓDULO: ARCHIVO DE NOTICIAS (Filtros, Grilla y Tarjetas)
   ========================================================================== */
.noticias-section {
    padding: 60px 4vw 120px 4vw;
    background-color: var(--color-light, #f8f9fa);
}

/* --------------------------------------------------------------------------
   BARRA DE BÚSQUEDA Y FILTROS UX
   -------------------------------------------------------------------------- */
.noticias-filtros-wrapper {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    background: var(--color-white, #ffffff);
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
}

.noticias-filter-form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 250px;
}

.noticias-filter-form input[type="text"],
.noticias-filter-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dddddd;
    border-radius: 4px;
    font-size: 0.95rem;
    color: var(--color-darker, #111111);
    outline: none;
    transition: var(--transition, border-color 0.3s ease);
    background-color: #fcfcfc;
}

.noticias-filter-form input[type="text"]:focus,
.noticias-filter-form select:focus {
    border-color: var(--color-red, #e3001b);
    background-color: #ffffff;
}

.btn-filtrar {
    background-color: var(--color-darker, #111111);
    color: #ffffff;
    border: none;
    padding: 12px 35px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
}

.btn-filtrar:hover {
    background-color: var(--color-red, #e3001b);
}

.btn-limpiar-filtros {
    color: #999999;
    font-size: 1.2rem;
    text-decoration: none;
    padding: 5px 10px;
    transition: color 0.2s ease;
}

.btn-limpiar-filtros:hover {
    color: var(--color-red, #e3001b);
}

/* --------------------------------------------------------------------------
   GRILLA DE RESULTADOS
   -------------------------------------------------------------------------- */
#noticias-resultados.is-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.noticia-card {
    background-color: var(--color-white, #ffffff);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid #eaeaea;
    border-bottom: 4px solid transparent;
}

.noticia-card:hover,
.noticia-card:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
    border-bottom-color: var(--color-red, #e3001b);
}

.noticia-imagen {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: var(--color-darker, #111111);
}

.noticia-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.noticia-card:hover .noticia-imagen img {
    transform: scale(1.05);
}

.noticia-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--color-red, #e3001b);
    color: var(--color-white, #ffffff);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    z-index: 2;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.noticia-contenido {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.noticia-contenido h2 {
    font-size: 1.15rem;
    line-height: 1.4;
    margin: 0 0 15px 0;
}

.noticia-contenido h2 a {
    color: var(--color-darker, #111111);
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.noticia-contenido h2 a:hover,
.noticia-contenido h2 a:focus {
    color: var(--color-red, #e3001b);
    outline: none;
}

.noticia-extracto {
    font-size: 0.95rem;
    color: var(--color-gray, #555555);
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.noticia-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f1f1;
    padding-top: 15px;
    margin-top: auto;
}

.noticia-leer-mas {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-red, #e3001b);
    text-decoration: none;
    transition: opacity 0.2s ease, color 0.2s ease;
    text-transform: uppercase;
}

.noticia-leer-mas:hover,
.noticia-leer-mas:focus {
    opacity: 0.8;
    color: var(--color-darker, #111111);
}

.noticia-fecha {
    font-size: 0.8rem;
    color: #888888;
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   PAGINACIÓN
   -------------------------------------------------------------------------- */
.noticias-paginacion {
    max-width: 1200px;
    margin: 50px auto 0 auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.noticias-paginacion .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: var(--color-white, #ffffff);
    border: 1px solid #dddddd;
    color: var(--color-darker, #111111);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.noticias-paginacion .page-numbers.current,
.noticias-paginacion .page-numbers:hover,
.noticias-paginacion .page-numbers:focus {
    background-color: var(--color-red, #e3001b);
    border-color: var(--color-red, #e3001b);
    color: #ffffff;
    outline: none;
}


/* ==========================================================================
   RESPONSIVE DESIGN (Móviles y Tablets)
   ========================================================================== */
@media (max-width: 1024px) {
    .noticias-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .noticias-section {
        padding: 50px 5vw 80px 5vw;
    }

    .noticias-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-filtrar {
        width: 100%;
    }

    .btn-limpiar-filtros {
        text-align: center;
        padding-top: 10px;
    }

    .noticias-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .noticia-imagen {
        height: 200px;
    }
}