/* ===============================================
    🌍 VaaWaa.com — Global Base Styles
    =============================================== */

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fff;
    color: #111;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    overflow-x: hidden; /* nothing should ever cause horizontal page scroll */
}
img { max-width: 100%; }

/* === Wrapper (Desktop 20px, Mobile 12px) === */
.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===============================================
    HEADER
    =============================================== */
header {
    background: #fff;
    z-index: 1000;
    position: sticky;
    top: 0;
    border-bottom: 1px solid #e6e9ee; /* clean separating line instead of a drop shadow */
}

/* No drop shadow on scroll — the bottom line is the separator */
header.sticky-shadow {
    box-shadow: none;
}

/* HEADER FLEX - The main container */
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Vertically centers header items */
    padding: 26px 0 22px 0; /* taller, roomier header (Google News style) */
    white-space: nowrap;
}

/* LEFT: LOGO + TITLE — horizontal brand lockup on every device */
.header-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    min-width: 0; /* allow it to shrink instead of overflowing on tiny screens */
}

.logo {
    height: 30px;
    width: 30px;
    object-fit: contain;   /* square 500x500 source -> crisp, never squished */
    display: block;
    flex-shrink: 0;
    border-radius: 50%;    /* keep the circular badge clean at any size */
}

.headline-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: #111;
    line-height: 1.1;
    white-space: nowrap;
}

.headline-title a {
    color: #444;
    text-decoration: none;
    font-weight: 500;
}

/* CENTER SEARCH */
.header-center {
    flex-grow: 1;
    max-width: 450px;
    margin: 0 20px;
}

.search-form {
    width: 100%;
    position: relative;
}

/* 🔎 Live search suggestions dropdown */
.search-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(16,24,40,0.16);
    z-index: 1300;
    overflow: hidden;
    display: none;
}
.search-suggest.open { display: block; }
.search-suggest a {
    display: block;
    padding: 11px 16px;
    text-decoration: none;
    border-bottom: 1px solid #f2f4f7;
}
.search-suggest a:last-child { border-bottom: 0; }
.search-suggest a.active, .search-suggest a:hover { background: #f4f6f9; }
.search-suggest .ss-title {
    display: block; font-size: 14px; color: #0f1622; line-height: 1.35;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-suggest .ss-src { font-size: 11.5px; color: #98a2b3; }
.search-suggest .ss-all {
    background: #f8fafc;
    font-size: 13px; font-weight: 700; color: #1a6fd6;
}
.search-suggest .ss-all:hover { background: #eef4fe; }
.search-suggest .ss-empty { padding: 14px 16px; font-size: 13px; color: #98a2b3; }

.search-input {
    width: 100%;
    padding: 13px 18px 13px 44px;
    border: 1px solid #e6e9ee;
    border-radius: 26px;
    font-size: 14px;
    color: #1a2230;
    background-color: #f4f6f9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a94a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 15px center;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.search-input::placeholder { color: #9aa3b0; }
.search-input:focus {
    border-color: #1a6fd6;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(26,111,214,0.12);
}

/* RIGHT — DATE + MOBILE MENU */
.header-right {
    display: flex;
    flex-direction: row;      /* date and menu button side by side */
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex-shrink: 0;
    min-height: 48px;
}

.headline-stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.header-date {
    font-size: 0.68rem;
    color: #98a2b3;
    white-space: nowrap;
    line-height: 1;
    margin: 0;
    padding: 0;
    font-weight: 500;
}

/* Hidden by default, shown only in desktop media query */
#desktopDate {
    display: none;
}

/* HAMBURGER (Hidden on desktop, shown on mobile) */
.menu-toggle {
    display: block; /* visible on all screens — opens the side drawer */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 1001; /* Ensure it's above other elements */
}
.menu-toggle .bar {
    display: block;
    width: 100%;
    height: 3px;
    margin: 5px 0;
    background: #333; /* Bar color */
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* MOBILE SEARCH & DATE (Hidden by default) */
.mobile-search-wrapper {
    display: none;
    padding: 0 12px 10px;
}

.mobile-date-container {
    display: none;
    text-align: center;
    padding: 5px 0;
    border-top: 1px solid #eee;
}

/* ===============================================
    CATEGORY NAVIGATION
    =============================================== */
.category-nav-wrapper {
    width: 100%;
    border-top: 1px solid #eef1f4; /* divider between search row and nav */
    text-align: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* smooth momentum scroll if it ever overflows */
    scrollbar-width: none; /* hide scrollbar (Firefox) */
    padding: 0 12px;
    white-space: nowrap;
}
.category-nav-wrapper::-webkit-scrollbar { display: none; } /* hide scrollbar (WebKit) */

/* Tablet / small-laptop range: tighten nav so all 10 items fit without scrolling */
@media (min-width: 769px) and (max-width: 1080px) {
    .category-nav-wrapper a { padding: 10px 10px; font-size: 11.5px; }
    .header-center { max-width: 320px; margin: 0 12px; }
}

.category-nav-wrapper nav {
    display: inline-block;
}

.category-nav-wrapper a {
    display: inline-block;
    padding: 13px 15px;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    color: #475569;
    position: relative;
    transition: color 0.18s ease;
}

.category-nav-wrapper a:hover,
.category-nav-wrapper a:focus { /* IMPROVED: Target both hover and focus for A11Y */
    color: #0f1622;
    text-decoration: none;
}

/* Fix for A11Y: only remove outline if a custom visible focus is provided */
.category-nav-wrapper a:focus {
    outline: none; 
}


/* ⭐ ACTIVE CATEGORY (UNDERLINE ADDED HERE VIA ::AFTER) ⭐ */
.category-nav-wrapper a.active-category {
    color: var(--cat, #1a6fd6);
    font-weight: 700;
    text-decoration: none;
}

.category-nav-wrapper a.active-category::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 3px;
    background: var(--cat, #1a6fd6);
    border-radius: 3px 3px 0 0;
}

/* Utility links (About / Support) — lighter, set apart from categories */
.category-nav-wrapper a.utility-link { color: #64748b; font-weight: 500; }
.category-nav-wrapper a.utility-link:hover { color: #1a6fd6; }

/* Utility links - must disable ::after for these */
.utility-link {
    font-weight: 600;
    color: #2a6496;
}

.utility-link::after {
    content: none !important;
}

.donate-link {
    color: #e74c3c;
}

/* ===============================================
    DESKTOP OVERRIDES (>= 768px)
    =============================================== */
@media (min-width: 768px) {

    /* 1. Logo/Headline Layout — horizontal lockup, vertically centered */
    .header-left {
        align-self: center;
        flex-direction: row;
        align-items: center;
    }

    /* 2. Date Placement (Top Right) */
    #desktopDate {
        display: block;
        margin-top: 0;
        margin-bottom: auto;
    }

    .header-right {
        align-items: flex-end;
        justify-content: flex-start;
        margin-left: 10px;
        min-height: 48px;
    }

    /* Hamburger stays visible on desktop — it opens the side drawer */

    /* Ensure utility links don't have the active underline on desktop nav */
    .category-nav-wrapper a.utility-link::after {
        display: none;
    }
}


/* ===============================================
    MOBILE MENU (FULLSCREEN)
    =============================================== */
@media (max-width: 768px) {

    .wrapper {
        padding: 12px;
    }

    /* Header-left stays a row; logo + title lockup, allowed to shrink */
    .header-left {
        min-height: auto;
        flex: 1 1 auto;
        min-width: 0;
    }
    .logo {
        height: 32px;
        width: 32px;
    }
    .headline-title {
        text-align: left;
        margin: 0;
        font-size: 15px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ADJUSTED: The main flex container for better vertical centering and date fix */
    .header-flex {
        align-items: center;
        position: static; /* Remove relative positioning for date fix */
    }

    /* --- CORE FIX: SHOW HAMBURGER ON MOBILE --- */
    .menu-toggle {
        display: block !important;
    }

    /* HIDE date from the main header-flex on small mobile */
    .header-date {
        display: none;
    }


    /* 2. Adjust the right side container to only hold the menu toggle */
    .header-right {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        min-height: auto;
        flex-grow: 0;
        margin-left: 10px;
    }

    /* 3. Hide desktop search bar */
    .header-center {
        display: none;
    }

    /* 4. Show mobile search bar and dedicated date container */
    .mobile-search-wrapper {
        display: block;
        padding: 0 12px 10px;
    }

    /* NEW: Dedicated date container for consistent placement below the header line */
    .mobile-date-container {
        display: block;
        text-align: center;
        padding: 5px 0 10px;
        font-size: 0.75rem;
        color: #777;
    }


    /* --- Menu styles (No change) --- */
    .category-nav-wrapper {
        position: fixed;
        height: 100%;
        width: 100%;
        left: 0;
        background: #fff;
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
        padding-top: 50px;
        overflow-y: auto;
        border-top: none; /* Removed redundant top border for fixed menu */
    }

    .category-nav-wrapper.nav-open {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .category-nav-wrapper nav {
        display: flex;
        flex-direction: column;
        padding: 0 15px;
    }

    #categoryNav a {
        padding: 12px 0;
        font-size: 1.2rem;
        border-bottom: 1px solid #eee;
        text-align: left;
    }

    /* Remove the underline bar from mobile categories to match full screen menu style */
    .category-nav-wrapper a.active-category::after {
        content: none;
    }

    .utility-link {
        font-size: 1.2rem;
        padding: 12px 0;
    }
}

/* Breathing room between the sticky header and page content */
.main-content { padding-top: 26px; }
@media (max-width: 560px) { .main-content { padding-top: 18px; } }

/* ===============================================
    BREADCRUMB + TOPIC CHIPS
    =============================================== */
.breadcrumb {
    font-size: 12.5px;
    color: #98a2b3;
    margin: 2px 0 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.breadcrumb a { color: #64748b; text-decoration: none; }
.breadcrumb a:hover { color: #1a6fd6; }
.breadcrumb .sep { color: #cbd2db; }
.breadcrumb .current { color: #475569; font-weight: 600; }

/* 🔥 Trending strip */
.trending-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin: 0 0 16px;
    padding: 12px 16px;
    background: linear-gradient(90deg, #fff7ed, #fff);
    border: 1px solid #fee4c8;
    border-radius: 12px;
}
.trending-label {
    font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    color: #c2410c; margin-right: 4px; display: inline-flex; align-items: center; gap: 6px;
}
.tr-flame { animation: flicker 1.6s infinite; }
@keyframes flicker { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:.75;transform:scale(1.12);} }
.trending-strip a {
    font-size: 13px; font-weight: 600; color: #9a3412;
    background: #fff; border: 1px solid #fddcae; border-radius: 999px;
    padding: 6px 13px; text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.trending-strip a:hover { background: #ea580c; border-color: #ea580c; color: #fff; }
@media (max-width: 560px) {
    .trending-strip { padding: 10px 12px; gap: 8px; }
    .trending-strip a { font-size: 12.5px; padding: 5px 11px; }
}

.topic-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 0 26px;
}
.topic-chips > span.chips-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #98a2b3;
    align-self: center;
    margin-right: 2px;
}
.topic-chips a {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 999px;
    padding: 7px 14px;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.topic-chips a:hover {
    background: var(--cat, #1a6fd6);
    border-color: var(--cat, #1a6fd6);
    color: #fff;
}
@media (max-width: 560px) {
    .topic-chips { gap: 8px; margin-bottom: 20px; }
    .topic-chips a { font-size: 12.5px; padding: 6px 12px; }
}

/* Live indicator (CNN / BBC / Al Jazeera style) */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #d92d20;
    margin: 0 0 4px;
}
.live-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #f04438;
    box-shadow: 0 0 0 0 rgba(240,68,56,0.6);
    animation: live-pulse 1.8s infinite;
}
@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(240,68,56,0.55); }
    70%  { box-shadow: 0 0 0 7px rgba(240,68,56,0); }
    100% { box-shadow: 0 0 0 0 rgba(240,68,56,0); }
}

/* ===============================================
    SECTION HEADING + INTRO
    =============================================== */
.section-heading {
    font-size: 32px;
    font-weight: 800;
    color: #0f1622;
    letter-spacing: -0.01em;
    margin: 4px 0 8px;
    line-height: 1.15;
}
.section-intro {
    max-width: 980px;
}

/* ===============================================
    FEATURED LEAD CARD (breaks the uniform grid on category pages)
    =============================================== */
.featured-card {
    display: flex;
    background: #fff;
    border: 1px solid #eef1f4;
    border-radius: 18px;
    overflow: hidden;
    margin: 16px 0 24px;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    min-height: 300px;
}
.featured-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(16,24,40,0.12); }
.featured-card .image-container {
    position: relative;
    width: 56%;
    flex-shrink: 0;
    overflow: hidden;
    background: #f2f4f7;
}
.featured-card .image-container img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.4s ease;
}
.featured-card:hover .image-container img { transform: scale(1.04); }
.featured-card .image-container:not(.image-loading) img { opacity: 1; }
.featured-card .image-loading { background:#e9edf2; }
.featured-card .card-body {
    display: flex; flex-direction: column; justify-content: flex-start;
    padding: 30px 34px;
    flex-grow: 1;
}
.featured-badge {
    display: inline-block;
    font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: #fff; background: var(--cat, #1a6fd6);
    padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; align-self: flex-start;
}
.featured-card h3 {
    font-size: 26px; font-weight: 800; line-height: 1.25; margin: 0 0 12px;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.featured-card h3 a { color: #0f1622; text-decoration: none; }
.featured-card h3 a:hover { color: var(--cat, #1a6fd6); }
.featured-card p {
    font-size: 15px; color: #5a6472; line-height: 1.65; margin: 0 0 16px;
    display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.featured-card .meta { font-size: 12.5px; color: #8a94a3; margin-top: 2px; }
.featured-card .meta .source-name { color: var(--cat, #1a6fd6); font-weight: 600; }

@media (max-width: 680px) {
    .featured-card { flex-direction: column; min-height: 0; margin: 14px 0 20px; }
    .featured-card .image-container { width: 100%; padding-top: 56.25%; }
    .featured-card .card-body { padding: 20px 18px; }
    .featured-card h3 { font-size: 20px; }
    .featured-card p { font-size: 14px; -webkit-line-clamp: 2; }
    .section-heading { font-size: 26px; }
}

.empty-state {
    background: #f8fafc;
    border: 1px solid #eef1f4;
    border-radius: 14px;
    padding: 28px 26px;
    margin: 16px 0 30px;
    color: #667085;
    font-size: 15px;
    line-height: 1.6;
}
.empty-state p { margin: 0; }

/* ===============================================
    HOMEPAGE — per-category sections
    =============================================== */
.home-cat { margin: 8px 0 36px; }
.home-cat-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    margin: 22px 0 16px;
    padding-bottom: 9px;
    border-bottom: 2px solid var(--cat, #1a6fd6);
}
.home-cat-head h2 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.home-cat-head h2 a { color: #0f1622; text-decoration: none; }
.home-cat-head h2 a:hover { color: var(--cat, #1a6fd6); }
.home-cat-head .see-all {
    font-size: 13px; font-weight: 700; color: var(--cat, #1a6fd6);
    text-decoration: none; white-space: nowrap;
}
.home-cat-head .see-all:hover { text-decoration: underline; }
.home-cat .news-grid { margin: 0; }

/* ===============================================
    LEAD BLOCK — big story + ranked "Top stories" list (BBC/CNN style)
    =============================================== */
.lead-block {
    display: grid;
    grid-template-columns: 1.75fr 1fr;
    gap: 22px;
    align-items: stretch;
    margin: 16px 0 30px;
}
.lead-block .featured-card { margin: 0; height: 100%; }

.top-stories {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eef1f4;
    border-radius: 16px;
    padding: 6px 22px 12px;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.top-stories-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #0f1622;
    margin: 0 0 4px;
    padding: 14px 0 12px;
    border-bottom: 2px solid var(--cat, #1a6fd6);
}
.top-stories ol {
    list-style: none;
    margin: 0; padding: 0;
    counter-reset: ts;
    display: flex; flex-direction: column;
    flex-grow: 1;
}
.top-stories li { border-bottom: 1px solid #f0f2f5; }
.top-stories li:last-child { border-bottom: 0; }
.top-stories li a {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding: 13px 0;
    text-decoration: none;
}
.top-stories li a::before {
    counter-increment: ts;
    content: counter(ts);
    font-size: 15px; font-weight: 800; color: #cbd5e1;
    line-height: 1.3; min-width: 16px;
}
.ts-title {
    font-size: 14px; font-weight: 600; color: #0f1622; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.top-stories li a:hover .ts-title { color: var(--cat, #1a6fd6); }
.ts-meta { grid-column: 2; font-size: 11.5px; color: #98a2b3; margin-top: 4px; }
.ts-meta .ts-src { color: var(--cat, #1a6fd6); font-weight: 600; }

@media (max-width: 900px) {
    .lead-block { grid-template-columns: 1fr; gap: 18px; }
}

/* ===============================================
    NEWS GRID
    =============================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin: 16px 0 40px;
}
/* A featured "hero" card placed inside the grid spans the full row */
.news-grid .featured-card {
    grid-column: 1 / -1;
    margin: 6px 0;
}

.news-item {
    background: #fff;
    border: 1px solid #eef1f4;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 2px rgba(16,24,40,0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.news-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 26px rgba(16,24,40,0.10);
}

/* 🖼️ IMAGE + SHIMMER */
.news-item .image-container {
    position: relative;
    display: block;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
    background-color: #f2f4f7;
    flex-shrink: 0;
}
.news-item img {
    opacity: 0;
    will-change: opacity, transform;
    transition: opacity 0.3s ease-in-out, transform 0.4s ease;
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.news-item:hover img { transform: scale(1.06); }

.news-item .image-loading { background-color: #e9edf2; }
.news-item .image-loading::after {
    content: '';
    display: block;
    width: 100%; height: 100%;
    background: linear-gradient(100deg,
        rgba(255,255,255,0) 20%,
        rgba(255,255,255,0.5) 50%,
        rgba(255,255,255,0) 80%);
    will-change: transform;
    animation: loading-pulse 1.5s infinite linear;
    position: absolute;
    top: 0; left: 0;
    z-index: 10;
}
@keyframes loading-pulse {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}
.news-item .image-container:not(.image-loading) img { opacity: 1; }
.news-item .image-container:not(.image-loading)::after { display: none; }

.card-body {
    padding: 15px 16px 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.news-item h3 {
    font-size: 15.5px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-item h3 a { text-decoration: none; color: #0f1622; }
.news-item h3 a:hover { color: var(--cat, #1a6fd6); }

.news-item p {
    font-size: 13.5px;
    color: #5a6472;
    line-height: 1.55;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.meta {
    margin-top: auto;
    font-size: 12px;
    color: #8a94a3;
}
.meta .source-name { color: #1a6fd6; font-weight: 600; }

/* RESPONSIVE GRID */
@media (max-width: 1080px) {
    .news-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 18px; }
}

/* Phones: dense horizontal "feed" cards */
@media (max-width: 560px) {
    .news-grid { grid-template-columns: 1fr; gap: 0; }
    .news-item {
        flex-direction: row;
        align-items: flex-start;
        border: 0;
        border-bottom: 1px solid #eef1f4;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        padding: 14px 2px;
    }
    .news-item:hover { transform: none; box-shadow: none; }
    .news-item:hover img { transform: none; }
    .news-item .image-container {
        width: 118px; min-width: 118px; height: 82px;
        padding-top: 0;
        border-radius: 10px;
    }
    .card-body { padding: 0 0 0 14px; }
    .news-item h3 { font-size: 14.5px; margin: 0 0 6px; -webkit-line-clamp: 3; }
    .news-item p { display: none; }
    .meta { font-size: 11.5px; }
}

/* LEGACY TITLE HIDE */
.page-title {
    display: none;
}
/* ===== Side drawer menu ===== */
.vw-drawer-overlay{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:2000;opacity:0;transition:opacity .2s}
.vw-drawer-overlay.open{opacity:1}
.vw-drawer{position:fixed;top:0;right:0;bottom:0;width:310px;max-width:86vw;background:#fff;z-index:2001;
  box-shadow:-8px 0 40px rgba(0,0,0,.18);transform:translateX(100%);transition:transform .25s ease;overflow-y:auto}
.vw-drawer.open{transform:translateX(0)}
.vw-drawer-head{display:flex;align-items:center;gap:10px;padding:14px 18px;border-bottom:1px solid #eef1f4;
  position:sticky;top:0;background:#fff;z-index:1;font-size:16px}
.vw-drawer-logo{width:26px;height:26px;border-radius:50%}
.vw-drawer-close{margin-left:auto;width:32px;height:32px;border:0;background:#f1f5f9;border-radius:8px;
  color:#64748b;cursor:pointer;font-size:14px}
.vw-drawer-close:hover{color:#1a6fd6}
.vw-drawer-nav{padding:6px 12px 30px}
.vw-drawer-nav h3{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#94a3b8;margin:18px 8px 6px}
.vw-drawer-nav > a{display:block;padding:9px 10px;border-radius:9px;font-weight:600;font-size:14.5px;color:#334155;text-decoration:none}
.vw-drawer-nav > a:hover{background:#eff6ff;color:#1a6fd6}
.vw-drawer-chips{display:flex;flex-wrap:wrap;gap:7px;padding:4px 8px}
.vw-drawer-chips a{background:#f8fafc;border:1px solid #e2e8f0;padding:6px 12px;border-radius:999px;
  font-size:12.5px;font-weight:600;color:#334155;text-decoration:none}
.vw-drawer-chips a:hover{border-color:#1a6fd6;color:#1a6fd6}

/* Homepage: date on the right of the top-stories heading */
.home-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap}
.page-date{font-size:13px;color:#98a2b3;white-space:nowrap;padding-bottom:10px}

/* country CTA banner (homepage, before country cache exists) */
.country-cta{display:block;margin:26px 0;padding:14px 18px;background:#eef7f6;border:1px solid #cfe8e5;border-radius:12px;color:#0b6b62;font-weight:700;font-size:15px;text-decoration:none}
.country-cta:hover{background:#e2f1ef}

/* country-first homepage head */
.country-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.country-pill{display:inline-block;padding:8px 14px;border-radius:999px;background:#0e9488;color:#fff !important;font-weight:600;font-size:13px;text-decoration:none}
.country-pill:hover{background:#0b7d73}
.country-pill.ghost{background:#fff;color:#0e9488 !important;border:1px solid #b9dedb}
.country-pill.ghost:hover{background:#eef7f6}
.country-divider{border:0;border-top:1px solid #e4e9f0;margin:30px 0}

/* header country selector */
.header-right{display:flex;align-items:center;gap:12px}
.country-select{max-width:180px;padding:8px 32px 8px 12px;border:1px solid #dfe5ec;border-radius:10px;background-color:#f7f9fb;color:#25303e;font-size:13px;font-weight:600;outline:none;cursor:pointer;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b7686' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}
.country-select:hover{border-color:#b9c4d2}
@media(max-width:640px){.country-select{max-width:120px;font-size:12px;padding:7px 6px}}

/* custom country dropdown */
.country-dd{position:relative}
.country-dd-btn{display:flex;align-items:center;justify-content:space-between;gap:10px;width:180px;padding:9px 14px;border:1px solid #dfe5ec;border-radius:12px;background:#fff;color:#1c2733;font-size:14px;font-weight:700;cursor:pointer}
.country-dd-btn .cdd-current{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
.country-dd-btn:hover{border-color:#b9c4d2}
.country-dd-btn svg{color:#6b7686;flex-shrink:0}
.country-dd-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:600;width:440px;max-height:72vh;overflow-y:auto;
  background:#fff;border:1px solid #e4e9f0;border-radius:16px;box-shadow:0 18px 46px rgba(16,24,40,.16);padding:10px}
.cdd-head{padding:2px 2px 8px;position:sticky;top:-10px;background:#fff;z-index:2}
.cdd-search{width:100%;box-sizing:border-box;padding:10px 13px;border:1px solid #dfe5ec;border-radius:10px;font-size:14px;color:#1c2733;outline:none;background:#f8fafc}
.cdd-search:focus{border-color:#1a6fd6;background:#fff;box-shadow:0 0 0 3px rgba(26,111,214,.12)}
.cdd-global{display:flex;align-items:center;gap:10px;padding:11px 13px;margin:0 2px 8px;border-radius:11px;
  font-size:15px;font-weight:700;color:#0f1622;text-decoration:none;background:#f2f7ff;border:1px solid #e0ebfb}
.cdd-global:hover{background:#e9f2ff}
.cdd-global .cdd-sub{margin-left:auto;font-size:12px;font-weight:600;color:#8a94a3}
.cdd-global.cdd-active{background:#eef7f6;border-color:#cdeae4;color:#0b6b62}
.cdd-grid{display:grid;grid-template-columns:1fr 1fr;gap:3px}
.cdd-item{display:flex;align-items:center;gap:9px;padding:9px 11px;border-radius:9px;color:#1c2733;
  text-decoration:none;font-size:14px;font-weight:600;overflow:hidden}
.cdd-item .cdd-flag{font-size:18px;flex-shrink:0}
.cdd-item .cdd-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cdd-item:hover{background:#f2f6f8}
.cdd-item.cdd-active{background:#eef7f6;color:#0b6b62}
.cdd-item.cdd-active .cdd-name::after{content:" ✓";color:#0e9488;font-weight:800}
.cdd-empty{padding:18px 8px;text-align:center;color:#8a94a3;font-size:13px}
@media(max-width:640px){
  .country-dd-btn{width:auto;max-width:150px;font-size:12px;padding:8px 10px;gap:6px}
  .country-dd-menu{width:min(92vw,340px)}
}
@media(max-width:400px){.cdd-grid{grid-template-columns:1fr}}

/* country category bar */
.country-cats{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0 20px}
.country-cats a{padding:8px 14px;border-radius:999px;border:1px solid #e2e8f0;background:#fff;font-size:13.5px;font-weight:600;color:#334155;text-decoration:none}
.country-cats a:hover{border-color:#0e9488;color:#0e9488}
.country-cats a.cat-active{background:#0e9488;border-color:#0e9488;color:#fff}

/* ============================================================
   🎨 MODERN HEADER POLISH (2026-07-29)
   ============================================================ */
#mainHeader {
    background: rgba(255,255,255,0.82);
    -webkit-backdrop-filter: saturate(1.8) blur(14px);
    backdrop-filter: saturate(1.8) blur(14px);
    border-bottom: 1px solid #e6e9ee; /* gray separating line, always visible */
    transition: background-color .25s ease;
}
/* On scroll: no shadow — keep the gray line, just a touch more opaque bg */
#mainHeader.sticky-shadow {
    box-shadow: none;
    border-bottom: 1px solid #e6e9ee;
    background: rgba(255,255,255,0.92);
}
.header-flex { padding: 18px 0 14px; }
.headline-title a { letter-spacing: -0.01em; }

/* search — smoother, rounder, refined states */
.search-input {
    padding: 12px 18px 12px 46px;
    border-radius: 30px;
    background-color: #f1f4f8;
    transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.search-input:hover { background-color: #eaeef4; border-color: #dde3ec; }
.search-input:focus {
    border-color: #1a6fd6;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(26,111,214,0.10);
}
.search-suggest { border-radius: 16px; box-shadow: 0 18px 44px rgba(16,24,40,0.14); }

/* category nav — soft hover pill + smoother active underline */
.category-nav-wrapper { border-top-color: #f0f2f6; }
.category-nav-wrapper a {
    border-radius: 9px;
    margin: 4px 1px;
    padding: 9px 14px;
    transition: color .16s ease, background-color .16s ease;
}
.category-nav-wrapper a:hover { background: #f2f5f9; color: #0f1622; }
.category-nav-wrapper a.active-category {
    background: color-mix(in srgb, var(--cat,#1a6fd6) 15%, transparent);
    color: var(--cat,#1a6fd6);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cat,#1a6fd6) 32%, transparent);
}
.category-nav-wrapper a.active-category::after { display: none; } /* filled pill replaces the underline as the selection marker */
.category-nav-wrapper a:focus-visible { outline: 2px solid color-mix(in srgb, var(--cat,#1a6fd6) 55%, transparent); outline-offset: 2px; border-radius: 9px; }

/* country dropdown + hamburger — smoother */
.country-dd-btn { transition: border-color .18s, box-shadow .18s, background .18s; }
.country-dd-btn:hover { box-shadow: 0 2px 10px rgba(16,24,40,0.07); border-color: #cbd3de; }
.menu-toggle { transition: background .18s; border-radius: 9px; }
.menu-toggle:hover { background: #f2f5f9; }
.menu-toggle .bar { transition: transform .2s ease, opacity .2s ease; }

/* footer — slightly warmer link transitions */
footer a { transition: color .15s ease; }

/* ============================================================
   🖋️  DAILY COUNTRY BRIEFING (original hosted content)
   ============================================================ */
.country-brief{
  margin:6px 0 26px;max-width:840px;padding:20px 22px 18px;
  background:linear-gradient(180deg,#fbfcfe,#f5f8fc);
  border:1px solid #e5eaf1;border-left:4px solid var(--cat,#1a6fd6);
  border-radius:14px;
}
.country-brief .cb-head{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.country-brief .cb-kicker{
  font-size:12px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;
  color:var(--cat,#1a6fd6);
}
.country-brief .cb-date{font-size:12.5px;color:#8a94a3;font-weight:600}
.country-brief .cb-body p{
  margin:0 0 11px;color:#28303b;font-size:16px;line-height:1.68;
  font-family:Georgia,'Times New Roman',serif;
}
.country-brief .cb-body p:last-child{margin-bottom:6px}
.country-brief .cb-sources{
  margin:8px 0 0;padding-top:10px;border-top:1px dashed #dbe2ec;
  font-size:12.5px;color:#8a94a3;line-height:1.5;
}
@media(max-width:640px){
  .country-brief{padding:16px 16px 14px;border-radius:12px}
  .country-brief .cb-body p{font-size:15.5px}
}

/* ============================================================
   📱 MOBILE HEADER + DRAWER POLISH (2026-07-30)
   ============================================================ */
@media (max-width: 768px) {
  .header-flex {
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 10px;
    flex-wrap: nowrap;
  }
  .header-left { flex: 0 1 auto; min-width: 0; gap: 8px; align-items: center; }
  .header-left .logo { height: 30px; width: 30px; }
  .header-left .headline-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-right { flex: 0 0 auto; gap: 8px; margin-left: auto; align-items: center; }
  .country-dd-btn { padding: 8px 11px; gap: 6px; }
  .menu-toggle { width: 26px; height: 24px; flex-shrink: 0; }
  .menu-toggle .bar { margin: 4px 0; }

  /* Mobile search: full width, tidy, never overflows */
  .mobile-search-wrapper { display: block; padding: 0 12px 12px; }
  .mobile-search-wrapper .search-form { position: relative; width: 100%; }
  .mobile-search-wrapper .search-input {
    width: 100%; box-sizing: border-box; border-radius: 26px;
    padding: 12px 16px 12px 44px;
  }

  /* Side drawer: comfortable width + tap targets, always scrollable */
  .vw-drawer { width: 330px; max-width: 88vw; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .vw-drawer-nav { padding: 8px 14px 44px; }
  .vw-drawer-nav > a { padding: 11px 12px; font-size: 15.5px; }
  .vw-drawer-nav h3 { margin: 16px 12px 6px; }
  .vw-drawer-chips { padding: 4px 10px; }
}

/* Very small phones — free up room so the dropdown + hamburger never clip */
@media (max-width: 380px) {
  .header-left .headline-title { display: none; }
  .country-dd-btn .cdd-current { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ============================================================
   📱 FIX: off-canvas menus must not create horizontal scroll,
   which mis-positions position:fixed (the drawer) on real mobile.
   Use overflow-x:clip (NOT hidden) so position:sticky keeps working.
   ============================================================ */
html { overflow-x: clip; }
body { overflow-x: clip; }
@media (max-width: 768px) {
  /* the old full-screen category menu is redundant on mobile (the side drawer
     is the nav) and it was sitting off-screen, doubling the page width */
  .category-nav-wrapper { display: none !important; }
}

/* ============================================================
   🎨 Homepage magazine hero (global front page)
   ============================================================ */
.hero-head { display:block; margin: 6px 0 16px; }
.hero-h1 { font-size: 30px; line-height:1.15; font-weight: 800; letter-spacing:-0.02em; color:#0f1622; margin: 8px 0 8px; max-width: 900px; }
.hero-tag { font-size: 15px; line-height:1.6; color:#5a6675; margin:0; max-width: 760px; }

/* HERO: photo mosaic — image cards with the headline overlaid at the bottom */
.vw-hero { display:grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin: 4px 0 26px; }
.vw-photo { position:relative; display:block; border-radius:14px; overflow:hidden; text-decoration:none; background:#0f1622 center/cover no-repeat; box-shadow:0 4px 16px rgba(15,22,34,.14); }
.vw-photo::after { content:""; position:absolute; inset:0; background:rgba(0,0,0,0); transition:background .2s ease; }
.vw-photo:hover::after { background:rgba(0,0,0,.10); }
.vw-photo.lead { min-height: 486px; }
.vw-photo-grid { display:grid; grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; gap:16px; }
.vw-photo.sm { min-height: 235px; }
.vw-photo-shade { position:absolute; inset:0; background:linear-gradient(to top, rgba(6,10,18,.95) 0%, rgba(6,10,18,.6) 32%, rgba(6,10,18,.06) 66%, rgba(6,10,18,0) 100%); }
.vw-photo-cap { position:absolute; left:0; right:0; bottom:0; z-index:1; padding: 15px 16px 14px; display:flex; flex-direction:column; gap:6px; }
.vw-photo.lead .vw-photo-cap { padding: 24px 26px 22px; gap:10px; }
.vw-tag { align-self:flex-start; font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:#fff; background:rgba(217,45,32,.95); padding:5px 10px; border-radius:6px; }
.vw-photo-title { color:#fff; font-weight:800; letter-spacing:-0.01em; line-height:1.24; font-size:15px; text-shadow:0 1px 10px rgba(0,0,0,.55); display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.vw-photo-title.lead-title { font-size:28px; line-height:1.16; -webkit-line-clamp:4; }
.vw-photo-meta { color:#dce3ec; font-size:12px; font-weight:600; text-shadow:0 1px 6px rgba(0,0,0,.6); }

/* MIDDLE: bigger cards */
.vw-mid { display:grid; grid-template-columns: repeat(3,1fr); gap:18px; margin: 4px 0 30px; }
.vw-mid-card { display:block; text-decoration:none; background:#fff; border:1px solid #e7ecf2; border-radius:14px; overflow:hidden; transition: box-shadow .16s ease, transform .16s ease; }
.vw-mid-card:hover { box-shadow:0 8px 22px rgba(15,22,34,.10); transform: translateY(-3px); }
.vw-mid-img { display:block; height: 190px; background-size:cover; background-position:center; }
.vw-mid-body { display:block; padding: 15px 16px 17px; }
.vw-mid-title { display:block; color:#0f1622; font-size:17px; line-height:1.3; font-weight:750; letter-spacing:-0.01em; margin-bottom:8px; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

@media (max-width: 900px) {
  .vw-hero { grid-template-columns: 1fr; }
  .vw-photo.lead { min-height: 300px; }
  .vw-mid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero-h1 { font-size: 23px; }
  .vw-photo-title.lead-title { font-size: 22px; }
  .vw-photo.lead { min-height: 260px; }
  .vw-photo.sm { min-height: 175px; }
  .vw-mid { grid-template-columns: 1fr; }
  .vw-mid-img { height: 200px; }
}
