/* Use main style.css variables - do not redefine :root here */

.news-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-surface) 100%);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-subtle);
}

.hero-banner h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--brand-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filter-btn:hover {
    background: var(--bg-card);
    border-color: var(--brand-red);
    color: var(--text-primary);
    box-shadow: var(--shadow-glow);
}

.filter-btn.active {
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: white;
    box-shadow: var(--shadow-glow);
}

.search-input:focus {
    border-color: var(--brand-red);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-glow);
}

.section-header h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--brand-blue);
    border-radius: 2px;
    box-shadow: var(--shadow-glow-blue);
}

.featured-news-section .section-header h2::before {
    background: linear-gradient(180deg, var(--brand-blue) 0%, var(--brand-red) 100%);
    box-shadow: var(--shadow-glow);
}

.featured-grid .news-card {
    border-color: rgba(220, 20, 60, 0.3);
}

.featured-grid .news-card:hover {
    border-color: var(--brand-red);
    box-shadow: var(--shadow-glow);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(220, 20, 60, 0.25);
    border-color: var(--brand-blue);
}

.hero-banner p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Filters Section */
.filters-section {
    margin-bottom: 2.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border-subtle);
}

.filters-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.filter-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.625rem 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: var(--bg-card);
    border-color: var(--brand-blue);
    color: var(--text-primary);
    box-shadow: var(--shadow-glow-blue);
}

.filter-btn.active {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: white;
    box-shadow: var(--shadow-glow-blue);
}

/* Search Container */
.search-container {
    position: relative;
    width: 280px;
    flex-shrink: 0;
}

.search-input {
    width: 100%;
    padding: 0.625rem 2.25rem 0.625rem 2.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: var(--brand-blue);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-glow-blue);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    background: var(--border-subtle);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.search-clear:hover {
    background: var(--brand-red);
    color: white;
}

/* Section Headers */
.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--brand-blue);
    border-radius: 2px;
    box-shadow: var(--shadow-glow-blue);
}

/* Featured News Section */
.featured-news-section {
    margin-bottom: 3rem;
}

.featured-news-section .section-header h2::before {
    background: linear-gradient(180deg, var(--brand-blue) 0%, var(--brand-red) 100%);
    box-shadow: var(--shadow-glow);
}

.featured-grid .news-card {
    border-color: rgba(0, 56, 147, 0.3);
}

.featured-grid .news-card:hover {
    border-color: var(--brand-blue);
    box-shadow: var(--shadow-glow-blue);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.featured-grid .news-card {
    border-color: rgba(240, 136, 62, 0.3);
}

.featured-grid .news-card:hover {
    border-color: #F0883E;
    box-shadow: 0 12px 40px rgba(240, 136, 62, 0.15);
}

.featured-grid .news-card .news-image {
    aspect-ratio: 16 / 10;
}

/* News Grid Section */
.news-grid-section {
    min-height: 400px;
}

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

/* News Cards */
.news-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-blue);
}

.news-card-large {
    grid-column: span 2;
}

.news-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--bg-surface);
}

.news-card-large .news-image {
    aspect-ratio: 16 / 9;
}

.news-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.news-category {
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category colors are now set dynamically via JavaScript inline styles */

.news-date {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.news-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.news-excerpt {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-results svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results p {
    font-size: 1rem;
}

/* ============================================
   NEWS MODAL - SCROLLABLE
   ============================================ */

.news-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 2rem;
}

.news-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.news-modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    position: relative;
    margin: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.news-modal-overlay.active .news-modal {
    transform: scale(1);
}

.news-modal-image {
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.news-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(33, 38, 45, 0.9);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-subtle);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.news-modal-close:hover {
    background: var(--brand-red);
    border-color: var(--brand-red);
    transform: rotate(90deg);
    box-shadow: var(--shadow-glow);
}

.news-modal-scrollable {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem 2rem;
}

.news-modal-overlay.active .news-modal {
    transform: scale(1);
}

.news-modal-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.news-modal-meta .news-category {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.news-modal-meta .news-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.news-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.news-modal-body {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.news-modal-body p {
    margin-bottom: 1rem;
}

.news-modal-body p:last-child {
    margin-bottom: 0;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .news-page {
        padding: 1.5rem 1rem;
    }
    
    .hero-banner {
        padding: 2.5rem 1.5rem;
    }
    
    .hero-banner h1 {
        font-size: 2.25rem;
    }
    
    .filters-container {
        gap: 1.5rem;
    }
    
    .search-container {
        width: 260px;
    }
    
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.25rem;
    }
    
    .news-card-large {
        grid-column: span 2;
    }
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .news-page {
        padding: 1.5rem 1rem;
    }
    
    .hero-banner {
        padding: 2.5rem 1.5rem;
    }
    
    .hero-banner h1 {
        font-size: 2.25rem;
    }
    
    .filters-container {
        gap: 1.5rem;
    }
    
    .search-container {
        width: 260px;
    }
    
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.25rem;
    }
    
    .news-card-large {
        grid-column: span 2;
    }
    
    /* Tablet Modal */
    .news-modal {
        max-width: 700px;
        max-height: 85vh;
    }
    
    .news-modal-image {
        height: 280px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .news-page {
        padding: 1rem 0.75rem;
    }
    
    .hero-banner {
        padding: 2rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-banner h1 {
        font-size: 1.75rem;
    }
    
    .hero-banner p {
        font-size: 1rem;
    }
    
    .filters-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .filter-buttons {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.25rem;
    }
    
    .filter-buttons::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
    
    .search-container {
        width: 100%;
    }
    
    .search-input {
        padding: 0.625rem 2.25rem 0.625rem 2.5rem;
    }
    
    .section-header h2 {
        font-size: 1.25rem;
    }
    
    .featured-news-section {
        margin-bottom: 2rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .featured-grid .news-card .news-image {
        aspect-ratio: 16 / 9;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .news-card-large {
        grid-column: span 1;
    }
    
    .news-image {
        aspect-ratio: 16 / 9;
    }
    
    .news-card-large .news-image {
        aspect-ratio: 16 / 9;
    }
    
    .news-content {
        padding: 1rem;
    }
    
    .news-title {
        font-size: 1rem;
    }
    
    .news-excerpt {
        font-size: 0.875rem;
    }
    
    /* Mobile Modal - Centered for better visibility */
    .news-modal-overlay {
        padding: 1rem;
        align-items: center;
    }
    
    .news-modal {
        max-width: 100%;
        width: 100%;
        border-radius: var(--radius-lg);
        max-height: 90vh;
        margin: auto;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    .news-modal-image {
        width: 100%;
        height: 220px;
        flex-shrink: 0;
    }
    
    .news-modal-scrollable {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1.5rem;
    }
    
    .news-modal-title {
        font-size: 1.375rem;
    }
    
    .news-modal-close {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
        background: rgba(0, 0, 0, 0.6);
        z-index: 10001;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .hero-banner {
        padding: 1.5rem 1rem;
    }
    
    .hero-banner h1 {
        font-size: 1.5rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }
    
    .search-icon {
        width: 16px;
        height: 16px;
    }
    
    /* Mobile Small Modal */
    .news-modal-overlay {
        padding: 0.5rem;
    }
    
    .news-modal {
        max-height: 92vh;
    }
    
    .news-modal-image {
        height: 180px;
    }
    
    .news-modal-scrollable {
        padding: 1.25rem;
    }
    
    .news-modal-title {
        font-size: 1.25rem;
    }
    
    .news-modal-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .news-modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 32px;
        height: 32px;
        font-size: 1.125rem;
    }
}
