/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* News & Events Section */
.news-events-section {
    padding: 80px 0;
    background: #ffffff;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    position: relative;
}

.news-events-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(0,53,141,0.02)"/><circle cx="75" cy="75" r="1" fill="rgba(0,53,141,0.015)"/><circle cx="50" cy="10" r="0.5" fill="rgba(0,53,141,0.018)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.news-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Header */
.news-header {
    text-align: center;
    margin-bottom: 60px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(0, 53, 141, 0.06);
    border: 1px solid rgba(0, 53, 141, 0.12);
    border-radius: 28px;
    padding: 48px;
    box-shadow: 
        0 12px 40px rgba(0, 53, 141, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    animation: fadeInUp 0.8s ease-out;
}

.news-title {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00358d 0%, #0066cc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.news-description {
    font-size: 1.2rem;
    color: rgba(0, 53, 141, 0.75);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

/* Filter Tabs */
.filter-tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 53, 141, 0.12);
    border-radius: 20px;
    padding: 12px;
    box-shadow: 
        0 8px 32px rgba(0, 53, 141, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.filter-tab {
    background: transparent;
    border: none;
    padding: 12px 24px;
    border-radius: 14px;
    color: rgba(0, 53, 141, 0.7);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.filter-tab i {
    font-size: 1rem;
}

.filter-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 53, 141, 0.08) 0%, rgba(0, 53, 141, 0.04) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.filter-tab:hover::before {
    opacity: 1;
}

.filter-tab:hover {
    color: #00358d;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 53, 141, 0.12);
}

.filter-tab.active {
    background: linear-gradient(135deg, #00358d 0%, #0066cc 100%);
    color: #ffffff;
    box-shadow: 
        0 4px 20px rgba(0, 53, 141, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Featured News Item */
.news-item.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 400px;
}

.news-item.featured .news-image {
    height: 100%;
}

.news-item.featured .news-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Regular News Items */
.news-item {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 53, 141, 0.1);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 32px rgba(0, 53, 141, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    animation: fadeInUp 0.8s ease-out;
    position: relative;
}

.news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 53, 141, 0.03), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.news-item:hover::before {
    left: 100%;
}

.news-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 53, 141, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: rgba(0, 53, 141, 0.2);
}

.news-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-item:hover .news-image img {
    transform: scale(1.1);
}

.news-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #00358d 0%, #0066cc 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 53, 141, 0.3);
    z-index: 2;
}

.featured-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%) !important;
    animation: pulse 2s infinite;
}

.news-category {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.9);
    color: #00358d;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 53, 141, 0.1);
    z-index: 2;
}

.news-content {
    padding: 24px;
    position: relative;
    z-index: 2;
}

.news-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.news-date,
.read-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: rgba(0, 53, 141, 0.6);
    font-weight: 500;
}

.news-date i,
.read-time i {
    color: #00358d;
    font-size: 0.8rem;
}

.news-title-item {
    font-size: 1.3rem;
    font-weight: 600;
    color: #00358d;
    margin-bottom: 12px;
    line-height: 1.4;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item.featured .news-title-item {
    font-size: 1.6rem;
    -webkit-line-clamp: 3;
}

.news-excerpt {
    font-size: 0.95rem;
    color: rgba(0, 53, 141, 0.7);
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item.featured .news-excerpt {
    -webkit-line-clamp: 4;
    font-size: 1rem;
}

.news-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.read-btn {
    background: linear-gradient(135deg, #00358d 0%, #0066cc 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 53, 141, 0.2);
}

.read-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.read-btn:hover::before {
    left: 100%;
}

.read-btn:hover {
    background: linear-gradient(135deg, #0066cc 0%, #00358d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 53, 141, 0.3);
}

.news-stats {
    display: flex;
    gap: 16px;
    align-items: center;
}

.views,
.shares {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: rgba(0, 53, 141, 0.6);
}

.views i,
.shares i {
    color: #00358d;
    font-size: 0.75rem;
}

/* Load More Section */
.load-more-section {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    background: linear-gradient(135deg, #00358d 0%, #0066cc 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 53, 141, 0.25);
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.load-more-btn:hover::before {
    left: 100%;
}

.load-more-btn:hover {
    background: linear-gradient(135deg, #0066cc 0%, #00358d 100%);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 48px rgba(0, 53, 141, 0.35);
}

/* Article Popup */
.article-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.article-popup-overlay.active {
    display: flex;
}

.article-popup {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 53, 141, 0.1);
    border-radius: 24px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 53, 141, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.popup-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 53, 141, 0.08);
    display: flex;
    justify-content: flex-end;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.popup-close {
    background: rgba(0, 53, 141, 0.08);
    border: 1px solid rgba(0, 53, 141, 0.15);
    color: #00358d;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
}

.popup-close:hover {
    background: #00358d;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 53, 141, 0.25);
}

.popup-content {
    padding: 32px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.popup-content::-webkit-scrollbar {
    width: 6px;
}

.popup-content::-webkit-scrollbar-track {
    background: rgba(0, 53, 141, 0.08);
    border-radius: 3px;
}

.popup-content::-webkit-scrollbar-thumb {
    background: rgba(0, 53, 141, 0.25);
    border-radius: 3px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 53, 141, 0.4);
}

.article-header {
    margin-bottom: 24px;
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    color: #00358d;
    margin-bottom: 16px;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-date,
.article-author,
.article-read-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: rgba(0, 53, 141, 0.7);
    font-weight: 500;
}

.article-date i,
.article-author i,
.article-read-time i {
    color: #00358d;
}

.article-image {
    width: 100%;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 53, 141, 0.1);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(0, 53, 141, 0.8);
}

.article-content h3 {
    color: #00358d;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 24px 0 12px 0;
}

.article-content p {
    margin-bottom: 16px;
}

.article-content ul {
    margin: 16px 0;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-tags {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 53, 141, 0.08);
}

.tags-label {
    font-weight: 600;
    color: #00358d;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.tag-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(0, 53, 141, 0.08);
    color: #00358d;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(0, 53, 141, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .news-item.featured {
        grid-column: span 1;
        display: block;
    }
    
    .news-item.featured .news-content {
        padding: 24px;
    }
    
    .filter-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .news-events-section {
        padding: 60px 0;
    }
    
    .news-container {
        padding: 0 16px;
    }
    
    .news-title {
        font-size: 2.5rem;
    }
    
    .news-header {
        padding: 32px 24px;
    }
    
    .filter-tabs {
        flex-direction: column;
        gap: 8px;
        padding: 16px;
    }
    
    .filter-tab {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-item {
        margin: 0 auto;
        max-width: 400px;
    }
    
    .news-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .read-btn {
        justify-content: center;
    }
    
    .news-stats {
        justify-content: center;
    }
    
    .article-popup {
        margin: 10px;
        max-height: 95vh;
    }
    
    .popup-content {
        padding: 24px 20px;
        max-height: calc(95vh - 80px);
    }
    
    .article-title {
        font-size: 1.6rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .news-title {
        font-size: 2rem;
    }
    
    .news-description {
        font-size: 1rem;
    }
    
    .news-header {
        padding: 24px 20px;
    }
    
    .news-content {
        padding: 20px;
    }
    
    .news-title-item {
        font-size: 1.1rem;
    }
    
    .popup-content {
        padding: 20px 16px;
    }
    
    .article-title {
        font-size: 1.4rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
}

/* Focus states for accessibility */
.filter-tab:focus,
.read-btn:focus,
.load-more-btn:focus,
.popup-close:focus {
    outline: 2px solid #00358d;
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Accent color for form elements */
input, button, select, textarea {
    accent-color: #00358d;
}

/* Print styles */
@media print {
    .news-events-section {
        background: white !important;
        box-shadow: none !important;
    }
    
    .news-item {
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .article-popup-overlay {
        position: static !important;
        background: white !important;
    }
}
