/* News Tablet Styles (768px - 1199px) */
:root {
    --bg-light: #fdfcfb;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-gold: #cba174;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--bg-light);
    color: var(--text-primary);
    font-family: 'Noto Sans SC', sans-serif;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

/* Hero Section */
.news-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
    color: white;
}

.news-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: white;
}

/* Section Header */
.section-header {
    margin-bottom: 40px;
    text-align: center;
    /* Match screenshot centered look */
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    /* Added decoration font */
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1rem;
    color: var(--text-secondary);
}

.news-hero p {
    font-size: 1.1rem;
    color: #cbd5e1;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.news-hero .container {
    margin: 0 50px !important;
    width: auto !important;
    padding: 0;
}

/* Main Container */
.main-container {
    padding: 40px 30px 80px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    /* Stacked by default on tablet < 1024, or grid for larger tablet? */
}

/* For larger tablets (e.g. iPad Pro landspace), we might want grid. 
   But the original CSS broke to 1 col at 1024px. 
   Let's keep the breakpoint logic consistent with original intention but adapted.
   Original: @media (max-width: 1024px) { grid-template-columns: 1fr; }
   So for 768-1024 (Tablet Portrait & some Landscape), it's 1 column layout with stacked sidebar.
   For > 1024 (Large Tablet Landscape), it could be grid.
   However, since we are defining "Tablet" as 768-1199, we have a mix.
   Let's use a media query inside this tablet file to distinguish.
*/

@media (min-width: 1024px) {
    .main-container {
        display: grid;
        grid-template-columns: 240px 1fr;
        gap: 30px;
        max-width: 100%;
    }
}

/* Sidebar */
.filter-sidebar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    box-shadow: var(--card-shadow);
}

@media (min-width: 1024px) {
    .filter-sidebar {
        position: sticky;
        top: 140px;
        height: fit-content;
    }
}

/* Floating Filter Button (Creative Enhanced) */
.filter-trigger {
    display: none;
    /* Hidden by default (for large tablet/desktop), shown in media query below */
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #1e293b;
    padding: 14px 28px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 2000;
    font-weight: 600;
    font-size: 1rem;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Gradient Border/Glow Effect */
.filter-trigger::before {
    content: '';
    position: absolute;
    inset: -2px;
    z-index: -1;
    background: linear-gradient(45deg, var(--accent-gold), transparent, var(--accent-gold));
    border-radius: 50px;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.filter-trigger:hover {
    transform: translateX(-50%) translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(203, 161, 116, 0.25);
    color: #0f172a;
}

.filter-trigger:hover::before {
    opacity: 0.6;
}

.filter-trigger:active {
    transform: translateX(-50%) scale(0.95);
}

.filter-trigger.hide-trigger {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

.filter-trigger svg {
    display: block;
    transition: transform 0.3s;
}

.filter-trigger:hover svg {
    transform: rotate(90deg);
}

.filter-trigger:active {
    transform: translateX(-50%) scale(0.95);
}

/* Overlay */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 2050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.filter-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Sidebar Header (Mobile Only) */
.sidebar-header-mobile {
    display: none;
}

/* Small Tablet / Mobile Layout (< 1019px) */
@media (max-width: 1019px) {
    .main-container {
        display: block;
        /* Stacked layout */
    }

    .filter-trigger {
        display: flex;
    }

    /* Drawer Sidebar */
    .filter-sidebar {
        display: block;
        position: fixed;
        top: 140px !important;
        /* Match events.html tablet drawer offset */
        left: 0;
        bottom: 0;
        width: 320px;
        height: calc(100vh - 140px) !important;
        /* Match events.html tablet drawer height */

        /* Premium Glassmorphism */
        background: linear-gradient(160deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);

        z-index: 10000;
        /* Max Z-Index */
        padding: 25px !important;
        overflow-y: auto;

        /* Slide Logic */
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);

        /* Deep Shadow & Subtle Inner Light */
        box-shadow: 20px 0 50px rgba(15, 23, 42, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.4);
        border-left: none;
        border-radius: 0 16px 16px 0;
        margin-bottom: 0;
    }

    .filter-sidebar.active {
        transform: translateX(0);
    }

    .sidebar-header-mobile {
        display: none !important;
    }

    .sidebar-header-mobile h3 {
        margin: 0;
        font-size: 1.2rem;
        color: #0f172a;
        font-weight: 700;
        font-family: 'Playfair Display', serif;
    }

    .close-filter {
        background: #f1f5f9;
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        color: #64748b;
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
    }

    .close-filter:hover {
        background: #e2e8f0;
        color: #0f172a;
    }

    /* Ensure filter groups stack vertically in drawer */
    .filter-sidebar .filter-group {
        margin-bottom: 30px;
        /* Increased spacing */
    }
}

/* Below 1024 sidebar is static and maybe horizontal flow */
@media (max-width: 1023px) {
    .filter-sidebar {
        margin-bottom: 30px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 40px;
    }

    .filter-group {
        min-width: 200px;
    }
}

/* Filter Groups */
.filter-group {
    margin-bottom: 25px;
}

.filter-group h3 {
    font-family: 'Playfair Display', serif;
    /* Premium Font */
    font-size: 1.25rem;
    /* Consistent large size */
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-gold);
    /* Consistent decoration */
    letter-spacing: 0.5px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Increased gap */
}

.filter-option {
    font-size: 1.05rem;
    /* Larger font */
    padding: 4px 0;
    transition: color 0.2s;
}

.filter-option:hover {
    color: var(--accent-gold);
}

.filter-option input[type="checkbox"] {
    width: 18px;
    /* Larger checkbox */
    height: 18px;
    margin-right: 10px;
    accent-color: var(--accent-gold);
    cursor: pointer;
}

/* Featured News */
.featured-news {
    display: none !important;
}

@media (min-width: 900px) {
    .featured-news {
        grid-template-columns: 1fr 1fr;
    }
}

.featured-image {
    min-height: 300px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-tag {
    display: inline-block;
    background: rgba(203, 161, 116, 0.1);
    color: var(--accent-gold);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
    width: fit-content;
}

.featured-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.featured-excerpt {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 30px;
}

.btn-read-featured {
    background: var(--accent-gold);
    color: white;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    width: fit-content;
}

/* News Grid - Adaptive Cols */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

/* Large Tablet: Keep 2 columns as per user request */
/* @media (min-width: 1000px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
} */

/* News Card */
.news-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
    /* Remove underline */
    color: inherit;
    /* Ensure text color is inherited */
}

.news-card h3,
.news-card p,
.news-card span {
    text-decoration: none !important;
    /* Force remove underline on children */
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.news-image {
    height: 200px;
    position: relative;
}

.news-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.news-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-footer {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    display: flex;
    justify-content: space-between;
}

.read-more {
    color: var(--accent-gold);
    font-weight: 500;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.page-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    color: var(--text-primary);
    font-weight: 500;
}

.page-btn.active {
    background: var(--accent-gold);
    color: white;
    border-color: var(--accent-gold);
}

.page-btn:hover:not(.active):not(:disabled) {
    background: #f8f9fa;
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toast Notification - Premium Transparent Glass */
.toast-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(15, 23, 42, 0.6);
    /* High transparency dark blue */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    padding: 24px 48px;
    /* Larger padding for tablet */
    border-radius: 20px;
    font-size: 1.15rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.15);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
}

.toast-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}