/* assets/css/news.css - Updated with offloaded styles */

/* ===========================================
   EXISTING STYLES (keeping all your current styles)
   =========================================== */

.news-section {
    border-left: 4px solid var(--primary);
}
   
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.filter-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
    text-decoration: none;
}

.filter-btn.active {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.news-item {
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #ffffff;
    transition: all 0.2s ease;
}

.news-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.news-item:last-child {
    border-bottom: none;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.news-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-title a:hover {
    color: #3b82f6;
    text-decoration: none;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #64748b;
    align-items: center;
}

.news-source {
    font-weight: 500;
}

.news-date {
    font-style: italic;
}

.news-summary {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #374151;
    font-size: 0.9rem;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.news-category {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
    text-transform: capitalize;
    font-size: 0.75rem;
}

.news-category.monetary_policy {
    background: #dbeafe;
    color: #1d4ed8;
}

.news-category.economic_data {
    background: #d1fae5;
    color: #059669;
}
.news-category.general {
    background: #f3f4f6;
    color: #374151;
}

.news-category.speeches { background: #7c3aed; }

.relevance-score {
    color: #64748b;
    font-weight: 500;
}

.news-loading, .news-error, .news-empty {
    text-align: center;
    padding: 2rem;
    color: #64748b;
    font-style: italic;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.news-error {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.news-empty {
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.news-container {
    max-height: 600px;
    overflow-y: auto;
}

/* ===========================================
   NEW STYLES OFFLOADED FROM INDEX.HTML
   =========================================== */

/* News Summary Section */
.news-summary-section {
    background: var(--light);
    padding: 2rem 0;
    margin: 2rem 0;
    border-radius: 12px;
}

.news-summary-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    height: 100%;
    transition: all 0.3s ease;
    overflow: hidden;
}

.news-summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Bank-specific news card colors */
.fed-news {
    border-left: 4px solid #059669;
}

.ecb-news {
    border-left: 4px solid #0284c7;
}

.boe-news {
    border-left: 4px solid #7c3aed;
}

/* News Card Header */
.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem 1rem 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.news-card-header h5 {
    font-family: 'Roboto Slab', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bank-flag {
    font-size: 1.25rem;
}

.news-count {
    background: var(--navy);
    color: var(--white);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* News Items Preview */
.news-items-preview {
    min-height: 120px;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.news-item-mini {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.news-item-mini:last-child {
    border-bottom: none;
}

.news-title-mini {
    margin-bottom: 4px;
}

.news-title-mini a {
    text-decoration: none;
    color: var(--navy, #1a365d);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    display: block;
}

.news-title-mini a:hover {
    color: var(--primary, #0066cc);
    text-decoration: underline;
}

.news-meta-mini {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    color: #666;
    align-items: center;
}

.news-source {
    font-weight: 500;
}

.news-time {
    color: #888;
}

.news-relevance {
    background: #e3f2fd;
    color: #1976d2;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 0.7rem;
}

.news-loading-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.news-loading-mini i {
    margin-right: 6px;
}

/* News Card Footer */
.news-card-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
}

.news-view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.news-view-all:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Coming Soon Card */
.coming-soon-card {
    background: linear-gradient(135deg, var(--light) 0%, var(--lighter) 100%);
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.coming-soon-card h4 {
    font-family: 'Roboto Slab', serif;
    color: var(--navy);
    margin-bottom: 1rem;
}

.coming-soon-card .icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.coming-soon-card p {
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Section Header with Toggle */
.section-header {
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 1rem 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.section-header:hover {
    border-bottom-color: var(--primary);
}

.section-header-content h3 {
    font-family: 'Roboto Slab', serif;
    color: var(--white);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header-content h3 i {
    color: var(--white);
}

.section-subtitle {
    color: var(--white);
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
}

.section-toggle {
    color: var(--primary);
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.section-toggle.collapsed {
    transform: rotate(180deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .news-summary-section {
        padding: 1rem 0;
        margin: 1rem 0;
    }
    
    .news-card-header h5 {
        font-size: 0.9rem;
    }
    
    .bank-flag {
        font-size: 1rem;
    }
    
    .news-count {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
    
    .news-title-mini a {
        font-size: 0.8rem;
    }
    
    .news-meta-mini {
        font-size: 0.7rem;
    }
    
    .news-items-preview {
        min-height: 100px;
    }
}