/* ==========================================================================
   HOJA DE ESTILOS PERSONALIZADA: PRENSA POR AÑOS Y CATEGORÍAS DE NOTICIAS
   Diseñado para la ONG Héroes de 4 Patas
   ========================================================================== */

/* 1. CONTENEDOR GENERAL DE PRENSA (DIRECTORIO DE AÑOS) */
.prensa-years-wrapper {
    max-width: 1200px;
    margin: 4rem auto 6rem;
    padding: 0 2rem;
}

.prensa-header {
    text-align: center;
    margin-bottom: 5rem;
}

.prensa-title {
    font-size: 3.8rem;
    color: #004a83;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    position: relative;
    display: inline-block;
    padding-bottom: 1.5rem;
}

.prensa-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #004a83, #007732);
    border-radius: 2px;
}

.prensa-subtitle {
    font-size: 1.8rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 2. REJILLA DE TARJETA DE AÑOS */
.prensa-years-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3.5rem;
}

.prensa-year-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    text-decoration: none !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.prensa-year-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #004a83, #007732);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.prensa-year-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 74, 131, 0.08);
    border-color: rgba(0, 74, 131, 0.15);
}

.prensa-year-card:hover::before {
    opacity: 1;
}

.prensa-year-card-content {
    padding: 4rem 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.prensa-year-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: rgba(0, 74, 131, 0.06);
    color: #004a83;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    margin-bottom: 2.5rem;
    transition: all 0.3s ease;
}

.prensa-year-card:hover .prensa-year-icon {
    background-color: #004a83;
    color: #fff;
    transform: scale(1.1);
}

.prensa-year-number {
    font-size: 3.2rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 1rem 0;
    transition: color 0.3s ease;
}

.prensa-year-card:hover .prensa-year-number {
    color: #004a83;
}

.prensa-year-badge {
    display: inline-block;
    padding: 0.6rem 1.6rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: #007732;
    background-color: rgba(0, 119, 50, 0.07);
    border-radius: 50px;
    margin-bottom: 3rem;
}

.prensa-year-button {
    font-size: 1.4rem;
    font-weight: 600;
    color: #004a83;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: auto;
    transition: gap 0.3s ease;
}

.prensa-year-card:hover .prensa-year-button {
    color: #007732;
    gap: 1.2rem;
}

.prensa-empty {
    text-align: center;
    padding: 6rem 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #eee;
}

.prensa-empty i {
    font-size: 4rem;
    color: #004a83;
    margin-bottom: 2rem;
}

.prensa-empty p {
    font-size: 1.8rem;
    color: #555;
    margin-bottom: 1rem;
}

.prensa-hint {
    font-size: 1.4rem !important;
    color: #888 !important;
}

/* 3. REJILLA DE NOTICIAS DE ARCHIVO (LISTADO POR AÑO) */
.noticias-archive-wrapper {
    max-width: 1200px;
    margin: 4rem auto 6rem;
    padding: 0 2rem;
}

.noticia-meta-header {
    text-align: center;
    margin-bottom: 5rem;
}

.noticia-category-title {
    font-size: 3.8rem;
    color: #004a83;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    position: relative;
    display: inline-block;
    padding-bottom: 1.5rem;
}

.noticia-category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #004a83, #007732);
    border-radius: 2px;
}

.noticia-category-desc {
    font-size: 1.8rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 4rem 3rem;
    margin-bottom: 5rem;
}

.noticia-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.noticia-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 74, 131, 0.08);
    border-color: rgba(0, 74, 131, 0.15);
}

.noticia-card-link {
    text-decoration: none !important;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.noticia-card-image {
    position: relative;
    padding-bottom: 56.25%; /* Relación 16:9 */
    background-color: #f0f0f0;
    overflow: hidden;
    flex-shrink: 0;
}

.noticia-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.noticia-card:hover .noticia-card-image img {
    transform: scale(1.05);
}

.noticia-card-sin-foto {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 4rem;
    background: #f8f9fa;
}

.noticia-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: linear-gradient(90deg, #004a83, #007732);
    color: #fff;
    padding: 0.5rem 1.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.noticia-card-info {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.noticia-card-date {
    font-size: 1.3rem;
    color: #888;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
}

.noticia-card-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin: 0 0 1.2rem 0;
    transition: color 0.2s ease;
    /* Limitar a dos líneas con puntos suspensivos */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.noticia-card:hover .noticia-card-title {
    color: #004a83;
}

.noticia-card-excerpt {
    font-size: 1.4rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
    /* Limitar a tres líneas */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.noticia-card-button {
    font-size: 1.3rem;
    font-weight: 600;
    color: #004a83;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: auto;
    transition: gap 0.2s ease;
}

.noticia-card:hover .noticia-card-button {
    color: #007732;
    gap: 1rem;
}

/* 4. PAGINACIÓN */
.noticias-archive-wrapper .archive-pagination {
    text-align: center;
    margin-top: 5rem;
    border-top: 1px solid #eee;
    padding-top: 3rem;
}

.noticias-archive-wrapper .archive-pagination ul li {
    display: inline-block;
    margin: 0 0.4rem;
}

.noticias-archive-wrapper .archive-pagination ul li a,
.noticias-archive-wrapper .archive-pagination ul li.active a {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: 4px;
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none !important;
}

.noticias-archive-wrapper .archive-pagination ul li a {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.noticias-archive-wrapper .archive-pagination ul li a:hover {
    background-color: #004a83;
    color: #fff;
    border-color: #004a83;
}

.noticias-archive-wrapper .archive-pagination ul li.active a {
    background-color: #004a83;
    color: #fff;
    border-color: #004a83;
    cursor: default;
}

/* 5. RESPONSIVE */
@media only screen and (max-width: 768px) {
    .prensa-title, .noticia-category-title {
        font-size: 3rem;
    }
    
    .prensa-subtitle, .noticia-category-desc {
        font-size: 1.6rem;
    }
    
    .prensa-years-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 2.5rem;
    }

    .noticias-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 3rem 2rem;
    }
}

@media only screen and (max-width: 480px) {
    .prensa-title, .noticia-category-title {
        font-size: 2.6rem;
    }

    .prensa-years-grid, .noticias-grid {
        grid-template-columns: 1fr;
    }

    .prensa-year-card-content {
        padding: 3rem 2rem;
    }
}
