/* ============================================
   IMPROVED NEWS PAGE STYLES - Blog Aligned
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&display=swap');

/* Page Title */
#news-section h1 {
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    color: #1a365d;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    font-weight: 700;
}

/* Intro Section - like blog featured post */
.news-intro-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #d97706;
    border-radius: 8px;
    padding: 1.5em;
    margin: 1.5em 0 2.5em 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.news-intro-section p {
    margin: 0;
    line-height: 1.7;
    color: #1f2937;
    font-size: 1rem;
}

/* Controls Section */
.news-controls-section {
    margin: 2em 0 2.5em 0;
}

/* Filter Section Header */
.filters-label {
    font-family: 'Merriweather', serif;
    font-size: 1.3rem;
    color: #1a365d;
    margin-bottom: 1em;
    font-weight: 700;
}

/* Filter Buttons - aligned with blog.css */
.news-filters {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid #d97706;
    background: white;
    color: #1a365d;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #fbbf24;
    border-color: #d97706;
    color: #1a365d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

.filter-btn:focus {
    outline: 2px solid rgba(217, 119, 6, 0.3);
    outline-offset: 3px;
}

.filter-btn.active {
    border-color: #d97706;
    background: #d97706;
    color: white;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

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

/* Load More Button Special Styling */
.load-more-btn {
    min-width: 180px;
    margin-top: 1rem;
}

/* Archive/Year Section */
.news-archive-wrapper {
    background: #f9fafb;
    border-left: 4px solid #d97706;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.news-archive-wrapper h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.1rem;
    color: #1a365d;
    margin-top: 0;
    font-weight: 700;
}

.news-archive-wrapper ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;  /* Reduced from 1rem */
}

.news-archive-wrapper li {
    padding: 0;
}

.news-archive-wrapper a {
    color: #d97706;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;  /* Reduced from 0.5rem */
    font-size: 0.9rem;       /* Reduced from 0.95rem */
}

.news-archive-wrapper a:hover {
    background: #fbbf24;
    color: #1a365d;
    padding-left: 0.7rem;
}

.news-archive-wrapper a:focus {
    outline: 2px solid rgba(217, 119, 6, 0.3);
    outline-offset: 2px;
}

/* News Feed Container */
.news-feed {
    margin: 2rem 0;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 12px;
}

/* Individual News Items */
.news-item {
    display: flex;
    gap: 20px;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    animation: fadeIn 0.3s ease;
    transition: all 0.3s ease;
}

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

.news-item.hidden {
    display: none;
}

.news-item:hover {
    background: rgba(217, 119, 6, 0.02);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: 4px;
}

/* News Date Styling */
.news-date {
    font-weight: 700;
    color: #d97706;
    min-width: 90px;
    flex-shrink: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    display: block;
}

/* News Content Styling */
.news-content {
    min-width: 0;
    flex: 1;
}

.news-content h3 {
    font-family: 'Merriweather', serif;
    margin: 0 0 0.5rem 0;
    color: #1a365d;
    font-size: 1.2rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-weight: 700;
}

.news-content p {
    margin: 0 0 0.8rem 0;
    line-height: 1.7;
    color: #4b5563;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 0.95rem;
}

.news-content a {
    color: #d97706;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.news-content a:hover {
    color: #1a365d;
    text-decoration: underline;
}

.news-content a:focus {
    outline: 2px solid rgba(217, 119, 6, 0.3);
    outline-offset: 2px;
}

/* News Tags - Blog Styled */
.news-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.5rem;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.news-tag:last-child {
    margin-right: 0;
}

.news-tag.publication {
    background: #fbbf24;
    color: #1a365d;
}

.news-tag.award {
    background: #fbbf24;
    color: #1a365d;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.news-tag.event {
    background: #dbeafe;
    color: #1e40af;
}

.news-tag.review,
.news-tag.service {
    background: #d1fae5;
    color: #065f46;
}

.news-tag.other,
.news-tag.resource,
.news-tag.update {
    background: #f3e8ff;
    color: #6b21a8;
}

/* News Badge (NEW indicator) */
.news-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #d97706;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.2);
}

/* Load More Button Wrapper */
#loadMoreWrapper {
    text-align: center;
    margin: 2.5rem 0;
    padding: 1.5rem 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        gap: 10px;
        padding: 1.2rem 0;
    }

    .news-date {
        order: -1;
        width: 100%;
        margin-bottom: 0.5rem;
        min-width: auto;
        font-weight: 700;
        color: #d97706;
    }

    .news-filters {
        justify-content: center;
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }

    .news-archive-wrapper {
        margin-top: 2rem;
        padding: 1.2rem;
    }

    .news-archive-wrapper ul {
        grid-template-columns: 1fr;
    }

    .news-content h3 {
        font-size: 1.1rem;
    }

    .news-controls-section {
        margin: 1.5em 0 2em 0;
    }

    #news-section h1 {
        font-size: 1.7rem;
    }

    .filters-label {
        font-size: 1.1rem;
        margin-bottom: 0.8em;
    }
}

@media (max-width: 480px) {
    .news-item {
        padding: 1rem 0;
    }

    .news-content p {
        font-size: 0.9rem;
    }

    .news-tag {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        margin-right: 0.4rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    #news-section h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .news-intro-section {
        padding: 1.2rem;
        margin: 1rem 0 1.5rem 0;
    }

    .news-archive-wrapper ul {
        gap: 0.75rem;
    }
}

/* Print Styles */
@media print {
    .news-filters,
    .news-archive-wrapper,
    .filter-btn,
    #loadMoreWrapper,
    .news-controls-section {
        display: none;
    }

    .news-item {
        border: none;
        padding: 0.5rem 0;
        page-break-inside: avoid;
    }

    .news-date {
        color: #000;
    }

    .news-badge {
        display: none;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .news-item,
    .filter-btn,
    .news-archive-wrapper a {
        animation: none;
        transition: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .news-intro-section {
        background: #332800;
        color: #fbbf24;
        border-left-color: #fbbf24;
    }

    .news-intro-section p {
        color: #e0e0e0;
    }

    #news-section h1,
    .filters-label {
        color: #fbbf24;
    }

    .filter-btn {
        background: #1f2937;
        color: #fbbf24;
        border-color: #fbbf24;
    }

    .filter-btn.active {
        background: #d97706;
        color: white;
    }

    .news-archive-wrapper {
        background: #1f2937;
        border-left-color: #fbbf24;
    }

    .news-archive-wrapper h3 {
        color: #fbbf24;
    }

    .news-archive-wrapper a {
        color: #fbbf24;
    }

    .news-item {
        border-bottom-color: #374151;
    }

    .news-item:hover {
        background: rgba(217, 119, 6, 0.1);
    }

    .news-date {
        color: #fbbf24;
    }

    .news-content h3 {
        color: #fbbf24;
    }

    .news-content p {
        color: #d1d5db;
    }

    .news-content a {
        color: #fbbf24;
    }
}