/* ============================================
   NEWS PAGE — WorldSleep-style Layout
   Left sidebar filter + Right content area
   ============================================ */

/* ---- Page section wrapper ---- */
.news-content-section {
    padding: 3rem 0 5rem;
    background: #f5f5f0;
}

/* ---- Two-column layout: sidebar + main ---- */
.news-layout {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

/* ---- LEFT SIDEBAR ---- */
.news-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 8px;
    padding: 1.8rem 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid #e8e8e8;
    position: sticky;
    top: 80px;
}

.sidebar-filter-group {
    margin-bottom: 1.8rem;
}

.sidebar-filter-group:last-child {
    margin-bottom: 0;
}

.sidebar-group-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-primary, #1a2744);
    margin-bottom: 0.9rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--color-accent, #c8a97e);
    letter-spacing: 0.02em;
}

.sidebar-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0;
    cursor: pointer;
    font-size: 0.9rem;
    color: #444;
    transition: color 0.2s;
}

.sidebar-checkbox-item:hover {
    color: var(--color-primary, #1a2744);
}

.sidebar-checkbox-item input[type="checkbox"] {
    accent-color: var(--color-accent, #c8a97e);
    width: 15px;
    height: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ---- RIGHT CONTENT AREA ---- */
.news-main {
    flex: 1;
    min-width: 0;
}

/* ---- FEATURED CARD (横排大卡) ---- */
.news-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 3rem;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #e8e8e8;
}

.news-hero-img {
    min-height: 360px;
    background: url('https://images.unsplash.com/photo-1576086213369-97a306d36557?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80') center/cover;
    position: relative;
}

.news-hero-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 60%, rgba(255,255,255,0.6));
}

.news-hero-content {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-tag {
    color: var(--color-accent, #c8a97e);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.featured-tag::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--color-accent, #c8a97e);
    border-radius: 50%;
}

.news-hero-content h2 {
    font-size: 1.7rem;
    color: var(--color-primary, #1a2744);
    line-height: 1.3;
    margin-bottom: 1.2rem;
}

.news-hero-content p {
    font-size: 1rem;
    color: var(--color-text-muted, #666);
    line-height: 1.65;
    margin-bottom: 2rem;
}

.read-more-btn {
    align-self: flex-start;
    padding: 0.7rem 1.8rem;
    background: var(--color-accent, #c8a97e);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.3s, transform 0.2s;
}

.read-more-btn:hover {
    background: #a6834f;
    transform: translateY(-1px);
}

/* ---- SECTION TITLE (居中标题区) ---- */
.news-section-heading {
    text-align: center;
    margin-bottom: 2rem;
}

.news-section-heading h3 {
    font-size: 1.6rem;
    color: var(--color-primary, #1a2744);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.news-section-heading .section-subtitle-en {
    font-size: 0.85rem;
    color: #999;
    letter-spacing: 0.04em;
}

/* ---- NEWS GRID (3列卡片) ---- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

/* ---- CARD ---- */
.news-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid #e8e8e8;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.09);
    border-color: var(--color-accent, #c8a97e);
}

.news-card-img {
    height: 150px;
    background: #e8eaf0;
    position: relative;
    overflow: hidden;
}

.news-card-img.has-image {
    background-image: var(--news-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.news-card-img.has-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--news-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(14px);
    opacity: 0.55;
    transform: scale(1.08);
}

.news-card-img.has-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--news-image);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.news-category {
    position: absolute;
    z-index: 2;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(255,255,255,0.88);
    color: var(--color-primary, #1a2744);
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-category::before {
    content: '🏷';
    font-size: 0.7rem;
}

.news-card-body {
    padding: 1.2rem 1.3rem 1rem;
    flex: 1;
    min-height: 230px;
    display: flex;
    flex-direction: column;
}

.news-date {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-date::before {
    content: '📅';
    font-size: 0.75rem;
}

.news-card-body h3 {
    font-size: 1rem;
    color: var(--color-primary, #1a2744);
    margin-bottom: 0.7rem;
    line-height: 1.45;
    display: block;
    overflow: visible;
    font-weight: 600;
}

.news-card-body p {
    color: var(--color-text-muted, #666);
    font-size: 0.875rem;
    line-height: 1.55;
    display: block;
    overflow: visible;
    margin-bottom: 0.9rem;
}

.news-read-link {
    font-size: 0.85rem;
    color: var(--color-accent, #c8a97e);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
    margin-top: auto;
}

.news-read-link:hover {
    gap: 8px;
}

/* ---- PAGINATION ---- */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding-top: 1rem;
}

.page-link, .page-prev, .page-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: var(--color-primary, #1a2744);
    background: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.page-link:hover, .page-prev:hover, .page-next:hover {
    border-color: var(--color-accent, #c8a97e);
    color: var(--color-accent, #c8a97e);
}

/* ---- FLOATING FILTER TRIGGER (Mobile) ---- */
.filter-trigger {
    display: none;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--color-primary, #1a2744);
    padding: 12px 24px;
    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: 0.95rem;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-trigger::before {
    content: '';
    position: absolute;
    inset: -2px;
    z-index: -1;
    background: linear-gradient(45deg, var(--color-accent, #c8a97e), transparent, var(--color-accent, #c8a97e));
    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(200, 169, 126, 0.25);
}

.filter-trigger:hover::before {
    opacity: 0.6;
}

.filter-trigger.hide-trigger {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

.filter-trigger svg {
    display: block;
}

/* ---- FILTER 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;
}

/* ---- RESPONSIVE ---- */
.sidebar-header-mobile {
    display: none;
}

@media (max-width: 1100px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1023px) {
    .news-layout {
        flex-direction: column;
    }

    .news-hero {
        grid-template-columns: 1fr;
    }

    .news-hero-img {
        min-height: 220px;
    }

    .news-hero-content {
        padding: 1.8rem;
    }
    
    .filter-trigger {
        display: flex;
    }

    /* Sidebar Drawer Style */
    .news-sidebar {
        position: fixed;
        top: 56px !important;
        left: 0;
        bottom: 0;
        width: 85%;
        max-width: 320px;
        height: calc(100vh - 56px) !important;
        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;
        padding: 25px !important;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        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;
        display: block;
    }

    .news-sidebar.active {
        transform: translateX(0);
    }

    .sidebar-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
    }

    .sidebar-header-mobile h3 {
        margin: 0;
        font-size: 1.2rem;
        color: var(--color-primary, #1a2744);
        font-weight: 700;
    }

    .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;
    }
}

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Force exactly 3 items per row on news page (which has a sidebar) */
@media (min-width: 1200px) {
    .news-layout .news-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Force exactly 4 items per row on homepage (which is full-width) */
@media (min-width: 1200px) {
    .news-section .news-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}
