/**
 * Estilos para el bloque de noticias de campaña - Versión simple
 */

.rescop-campaign-news-block {
    width: 100%;
    padding: 80px 0;
    background-image: url('/wp-content/themes/rescop-child/assets/images/back_campanas.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

/* Overlay para mejorar legibilidad */
.rescop-campaign-news-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.rescop-campaign-news-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* Título del bloque */
.rescop-campaign-news-title {
    color: black !important;
    font-size: 36px !important;
    font-family: var(--rescop-font-display, 'Anton', sans-serif) !important;
    font-weight: 400 !important;
    line-height: 54px !important;
    text-align: center;
    margin: 0 0 3rem 0 !important;
    padding: 15px 30px !important;
    word-wrap: break-word;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    display: inline-block;
}

.rescop-campaign-news-title .rescop-post-title {
    color: var(--rescop-red-primary, #BE252D) !important;
}

/* Grid de noticias */
.rescop-campaign-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* Card individual */
.rescop-campaign-news-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.rescop-campaign-news-item:hover {
    transform: translateY(-5px);
}

/* Imagen de la noticia */
.rescop-campaign-news-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #e5e5e5;
}

.rescop-campaign-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rescop-campaign-news-item:hover .rescop-campaign-news-image img {
    transform: scale(1.05);
}

/* Contenido de la card */
.rescop-campaign-news-content {
    padding: 1.5rem;
}

/* Fecha */
.rescop-campaign-news-date {
    color: rgba(0, 0, 0, 0.60) !important;
    font-size: 14px !important;
    font-family: var(--rescop-font-ui, 'Montserrat', sans-serif) !important;
    font-weight: 500 !important;
    line-height: 21px !important;
    margin: 0 0 0.5rem 0;
    display: block;
}

/* Título de la noticia */
.rescop-campaign-news-item-title {
    margin: 0 0 1rem 0 !important;
    padding: 0 !important;
}

.rescop-campaign-news-item-title a {
    color: black !important;
    font-size: 20px !important;
    font-family: var(--rescop-font-display, 'Anton', sans-serif) !important;
    font-weight: 400 !important;
    line-height: 30px !important;
    text-decoration: none !important;
    word-wrap: break-word;
    transition: color 0.3s ease;
}

.rescop-campaign-news-item-title a:hover {
    color: var(--rescop-red-primary, #BE252D) !important;
}

/* Extracto */
.rescop-campaign-news-excerpt {
    color: rgba(0, 0, 0, 0.80) !important;
    font-size: 16px !important;
    font-family: var(--rescop-font-primary, 'Merriweather Sans', serif) !important;
    font-weight: 400 !important;
    line-height: 26px !important;
    word-wrap: break-word;
}

/* Estado vacío */
.rescop-campaign-news-empty {
    text-align: center;
    color: rgba(0, 0, 0, 0.80) !important;
    font-size: 18px !important;
    font-family: var(--rescop-font-primary, 'Merriweather Sans', serif) !important;
    font-style: italic;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .rescop-campaign-news-block {
        padding: 60px 0;
        background-attachment: scroll;
    }
    
    .rescop-campaign-news-container {
        padding: 0 1rem;
    }
    
    .rescop-campaign-news-title {
        font-size: 28px !important;
        line-height: 42px !important;
        margin-bottom: 2rem !important;
        padding: 12px 20px !important;
    }
    
    .rescop-campaign-news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .rescop-campaign-news-content {
        padding: 1rem;
    }
    
    .rescop-campaign-news-item-title a {
        font-size: 18px !important;
        line-height: 27px !important;
    }
    
    .rescop-campaign-news-excerpt {
        font-size: 15px !important;
        line-height: 24px !important;
    }
}

@media (max-width: 480px) {
    .rescop-campaign-news-block {
        padding: 40px 0;
    }
    
    .rescop-campaign-news-container {
        padding: 0 0.75rem;
    }
    
    .rescop-campaign-news-title {
        font-size: 24px !important;
        line-height: 36px !important;
        padding: 10px 15px !important;
    }
    
    .rescop-campaign-news-grid {
        gap: 1rem;
    }
    
    .rescop-campaign-news-item {
        margin: 0;
    }
}

/* DEBUG: Estilos para cuando no hay imagen */
.rescop-campaign-news-image.rescop-no-image {
    background: #f8f9fa;
    border: 2px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* DEBUG: Hacer las cards un poco más altas para ver mejor el debug */
.rescop-campaign-news-item {
    position: relative;
    min-height: 300px;
}

/* Asegurar que las imágenes se vean correctamente */
.rescop-campaign-news-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Si la imagen no carga, mostrar placeholder */
.rescop-campaign-news-image img[src=""],
.rescop-campaign-news-image img:not([src]) {
    display: none;
}
