/* 
==================================================
   NEWS SECTION - PREMIUM LIGHT THEME (FISCUS CORPORATE)
================================================== 
*/

:root {
    --news-bg: #FFFFFF; /* Blanco puro de fondo como inicio */
    --news-card-bg: #FFFFFF;
    --news-card-border: rgba(38, 0, 9, 0.1); /* Burgundy muy suave para bordes */
    --news-text: #1A1A1A; /* Text charcoal */
    --news-muted: #666666;
    
    /* Colores Corporativos de Fiscus */
    --news-primary: #260009; /* Very Dark Burgundy */
    --news-primary-light: #4a0011;
    --news-accent: #D4AF37; /* Oro */
    --news-accent-hover: #b8962c;
    
    /* Etiquetas de colores institucionales pero adaptados a fondo claro */
    --tag-red: rgba(239, 83, 80, 0.1);
    --tag-red-text: #d32f2f;
    --tag-green: rgba(102, 187, 106, 0.1);
    --tag-green-text: #2e7d32;
    --tag-blue: rgba(66, 165, 245, 0.1);
    --tag-blue-text: #1565c0;
    --tag-gold: rgba(212, 175, 55, 0.1);
    --tag-gold-text: #b8962c;
    --tag-neutral: #EDEFF2;
    --tag-neutral-text: #4a4a4a;
}

/* Force light background for the page when using news.css */
body.light-page {
    background-color: var(--news-bg);
    color: var(--news-text);
}

.news-main-container {
    padding-top: 100px;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
}

/* Hero Header */
.news-header {
    text-align: center;
    padding: 60px 20px 40px;
    background: radial-gradient(circle at top, rgba(212, 175, 55, 0.1) 0%, transparent 60%);
}

.news-title {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--news-primary); /* Dark Burgundy */
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.news-subtitle {
    font-size: 1.2rem;
    color: var(--news-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Filters */
.news-filters-section {
    padding: 20px;
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 1000px;
}

.filter-pill {
    background: #FFFFFF;
    border: 1px solid var(--news-card-border);
    color: var(--news-text);
    padding: 10px 20px;
    border-radius: 30px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.filter-pill:hover {
    background: var(--news-primary-light);
    color: #FFFFFF;
    transform: translateY(-2px);
    border-color: var(--news-primary-light);
    box-shadow: 0 4px 15px rgba(38, 0, 9, 0.1);
}

/* Botón activo: Fondo rojo borgoña */
.filter-pill.active {
    background: var(--news-primary);
    color: #FFFFFF;
    border-color: var(--news-primary);
    box-shadow: 0 4px 15px rgba(38, 0, 9, 0.3);
}

.filter-pill.impact-filter {
    background: rgba(239, 83, 80, 0.05);
    color: #d32f2f;
    border-color: rgba(239, 83, 80, 0.2);
}

.filter-pill.impact-filter:hover {
    background: rgba(239, 83, 80, 0.1);
}

.filter-pill.impact-filter.active {
    background: #d32f2f;
    color: #fff;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
    border-color: #d32f2f;
}

/* Grid & Cards */
.news-grid-section {
    padding: 0 40px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: var(--news-muted);
}

.news-card {
    background: var(--news-card-bg);
    border: 1px solid var(--news-card-border);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    /* Para animaciones de filtrado */
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.news-card:hover {
    transform: translateY(-8px);
    /* Animación de brillo dorado intenso al pasar el mouse */
    border-color: var(--news-accent);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 0 20px rgba(212, 175, 55, 0.4);
}

.news-card-image-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

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

.news-source {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(0,0,0,0.05);
    color: var(--news-primary);
}

.news-impact-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.impact-alto {
    background: #d32f2f;
    color: #fff;
}

.impact-medio {
    background: #ffa726;
    color: #fff;
}

.news-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--news-muted);
    margin-bottom: 12px;
    font-weight: 500;
}

.news-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
    color: var(--news-primary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.news-card:hover .news-card-title {
    color: var(--news-accent-hover);
}

.news-card-footer {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.news-tag {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-company {
    background: var(--tag-blue);
    color: var(--tag-blue-text);
}

.tag-general {
    background: var(--tag-neutral);
    color: var(--tag-neutral-text);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 45px;
}

.load-more-btn {
    background: #FFFFFF;
    border: 2px solid var(--news-primary);
    color: var(--news-primary);
    padding: 12px 36px;
    border-radius: 30px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(38, 0, 9, 0.06);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.load-more-btn:hover {
    background: var(--news-primary);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(38, 0, 9, 0.25);
}

.load-more-btn:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .news-title {
        font-size: 2.5rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid-section {
        padding: 0 20px 60px;
    }
}
