/* ==========================================================================
   CSS Variables (Design System)
   ========================================================================== */
:root {
    /* Colors (Light Mode) */
    --primary-color: #0A192F; /* Deep Navy Blue */
    --secondary-color: #D32F2F; /* News Red */
    --bg-color: #F8F9FA; /* Off-White Background */
    --surface-color: #FFFFFF; /* White Cards */
    --text-dark: #212529; /* Dark Grey */
    --text-muted: #6C757D;
    --border-color: #E9ECEF;
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
    
    /* Layout & Effects */
    --container-max-width: 1200px;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Dark Mode Variables */
body.dark-mode {
    --primary-color: #E6F1FF; /* Light Text for Headings */
    --secondary-color: #FF4B4B; /* Brighter Red for Dark Mode */
    --bg-color: #020C1B; /* Very Dark Navy */
    --surface-color: #112240; /* Darker Surface */
    --text-dark: #8892B0; /* Light Muted Text */
    --text-muted: #64FFDA; /* Accent color */
    --border-color: #233554;
    --box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* ==========================================================================
   Reset & Basics
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.flex-space-between {
    display: flex;
    justify-content: space-between;
}

.flex-start {
    display: flex;
    justify-content: flex-start;
}

.align-center {
    align-items: center;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.flex-center {
    display: flex;
    align-items: center;
}

.theme-toggle-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    margin-left: 20px;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    color: #FFD700; /* Gold for Moon/Sun */
    transform: scale(1.1);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.top-bar {
    background-color: var(--primary-color);
    color: white;
    font-size: 12px;
    padding: 8px 0;
}

.social-links a {
    color: white;
    margin-left: 15px;
}

.social-links a:hover {
    color: var(--secondary-color);
}

.header-main {
    background-color: var(--surface-color);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.logo h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    color: var(--primary-color);
}

.logo span {
    color: var(--secondary-color);
}

.main-nav {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

body.dark-mode .main-nav {
    background-color: rgba(17, 34, 64, 0.85);
}

.nav-links {
    display: flex;
}

.nav-links li a {
    display: block;
    padding: 15px 20px;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    font-size: 14px;
}

.nav-links li a:hover, .nav-links li a.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

.country-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
}

.country-selector select {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
}

/* ==========================================================================
   Breaking News Ticker
   ========================================================================== */
.breaking-news-ticker {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.ticker-label {
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 15px;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.ticker-content {
    flex-grow: 1;
    padding: 0 15px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

/* ==========================================================================
   Ad Spaces (Optimized for AdSense)
   ========================================================================== */
.ad-space {
    background-color: #f1f3f5;
    border: 1px dashed #ced4da;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    margin: 20px 0;
    overflow: hidden;
}

.ad-leaderboard {
    width: 728px;
    height: 90px;
    margin: 0;
}

.ad-in-article {
    width: 100%;
    height: 150px;
}

.ad-sidebar {
    width: 300px;
    height: 250px;
    margin: 0 auto 30px auto;
}

.sticky-ad {
    position: sticky;
    top: 80px;
}

/* ==========================================================================
   Main Layout Grid
   ========================================================================== */
.main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
}

/* ==========================================================================
   News Components
   ========================================================================== */
.section-title {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.section-title h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-color);
}

/* Hero News */
.hero-news-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 20px;
    cursor: pointer;
    box-shadow: var(--box-shadow);
}

.hero-news-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: var(--transition);
}

.hero-news-card:hover img {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 30px 20px;
    color: white;
}

.news-category {
    background-color: var(--secondary-color);
    color: white;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 10px;
}

.hero-overlay h3 {
    font-family: var(--font-heading);
    font-size: 28px;
    margin-bottom: 10px;
    line-height: 1.3;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.news-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.news-img {
    height: 200px;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-img img {
    transform: scale(1.05);
}

.news-content {
    padding: 15px;
}

.news-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
}

.news-card .news-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}
.news-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--text-color);
}
.news-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-meta-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}
.news-meta-footer .news-meta {
    margin-top: 0;
}
.bookmark-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bookmark-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
}
.bookmark-btn.saved {
    background: var(--primary);
    color: #fff;
}

.news-title {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-card:hover .news-title {
    color: var(--secondary-color);
}

.news-excerpt {
    font-size: 14px;
    color: var(--text-muted);
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */
.widget {
    background: var(--surface-color);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.trending-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.trending-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.trending-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.trending-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trending-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dark);
}

.trending-list li:hover .trending-title {
    color: var(--secondary-color);
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */
.loading-spinner {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer {
    background-color: var(--primary-color);
    color: white;
    padding: 50px 0 20px 0;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about h2 {
    font-family: var(--font-heading);
    margin-bottom: 15px;
}

.footer-about span {
    color: var(--secondary-color);
}

.footer-about p {
    color: #a0aec0;
    font-size: 14px;
}

.footer-links h3, .footer-newsletter h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #a0aec0;
    font-size: 14px;
}

.footer-links ul li a:hover {
    color: white;
}

.footer-newsletter p {
    color: #a0aec0;
    font-size: 14px;
    margin-bottom: 15px;
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 10px;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.newsletter-form button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    color: #a0aec0;
    font-size: 14px;
}

/* ==========================================================================
   CATEGORY MARQUEE RIBBON
   ========================================================================== */
.category-marquee-container {
    background: #1e293b;
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    border-bottom: 2px solid var(--primary-color);
}

.category-marquee {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
}

.category-marquee:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0%   { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

.category-pill {
    display: inline-flex;
    align-items: center;
    background: var(--primary-color);
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    margin-right: 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.category-pill:hover, .category-pill.active {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.category-pill i, .category-pill span.emoji {
    margin-right: 8px;
    font-size: 16px;
}

.category-pill.blue { background: #2563eb; }
.category-pill.orange { background: #f97316; }
.category-pill.green { background: #16a34a; }
.category-pill.purple { background: #9333ea; }
.category-pill.red { background: #dc2626; }

/* ==========================================================================
   SIDEBAR TABS
   ========================================================================== */
.sidebar-tabs {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    background: #f1f5f9;
    color: var(--text-dark);
    border: none;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

body.dark-mode .tab-btn {
    background: #334155;
    color: #cbd5e1;
}

.tab-btn:hover {
    background: #e2e8f0;
}

body.dark-mode .tab-btn:hover {
    background: #475569;
}

.tab-btn.active {
    background: #fff;
    color: var(--primary-color);
    border-top: 3px solid var(--primary-color);
}

body.dark-mode .tab-btn.active {
    background: var(--surface-color);
}

.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .ad-sidebar {
        display: none; /* Hide large sidebar ads on tablet if needed, or reformat */
    }
}

@media (max-width: 768px) {
    .ad-leaderboard {
        width: 100%;
        height: auto;
        min-height: 50px;
    }
    
    .nav-links {
        display: none; /* Mobile menu hidden by default */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--surface-color);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ==========================================================================
   READING PROGRESS BAR
   ========================================================================== */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, #D32F2F, #FF6B35, #FFD700);
    z-index: 9999;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(211,47,47,0.6);
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--secondary-color);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(211,47,47,0.4);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}
#back-to-top:hover {
    background: #b71c1c;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(211,47,47,0.5);
}

/* ==========================================================================
   SEARCH BAR
   ========================================================================== */
.search-bar-container {
    position: relative;
    flex: 1;
    max-width: 340px;
    margin: 0 20px;
}
#search-input {
    width: 100%;
    padding: 10px 18px;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: var(--surface-color);
    color: var(--text-dark);
    transition: var(--transition);
}
#search-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(211,47,47,0.1);
}
.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 500;
    max-height: 360px;
    overflow-y: auto;
    display: none;
}
.search-dropdown.open { display: block; }
.search-result-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #f8f9fa; }
body.dark-mode .search-result-item:hover { background: #1e3a5f; }
.search-result-item img {
    width: 55px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.search-result-item span {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dark);
}
.search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ==========================================================================
   NEWSLETTER POPUP MODAL
   ========================================================================== */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(4px);
}
.popup-overlay.show {
    opacity: 1;
    pointer-events: all;
}
.popup-box {
    background: white;
    border-radius: 20px;
    padding: 40px 35px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
}
body.dark-mode .popup-box { background: #112240; }
@keyframes popIn {
    from { transform: scale(0.7); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
.popup-close {
    position: absolute;
    top: 14px; right: 18px;
    background: none; border: none;
    font-size: 26px; cursor: pointer;
    color: #999; line-height: 1;
}
.popup-close:hover { color: #D32F2F; }
.popup-icon { font-size: 48px; margin-bottom: 10px; }
.popup-box h2 { font-family: 'Playfair Display', serif; font-size: 26px; color: #0A192F; margin-bottom: 8px; }
body.dark-mode .popup-box h2 { color: #e6f1ff; }
.popup-box p  { color: #666; font-size: 15px; margin-bottom: 20px; line-height: 1.6; }
.popup-form   { display: flex; flex-direction: column; gap: 12px; }
.popup-form input {
    padding: 13px 18px; border: 2px solid #e0e0e0;
    border-radius: 10px; font-size: 15px;
    outline: none; font-family: inherit;
    transition: border 0.3s;
}
.popup-form input:focus { border-color: #D32F2F; }
.popup-form button {
    background: linear-gradient(135deg, #D32F2F, #ff5252);
    color: white; border: none; padding: 13px;
    border-radius: 10px; font-size: 16px;
    font-weight: 700; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.popup-form button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(211,47,47,0.4); }
.popup-box small { color: #aaa; font-size: 12px; margin-top: 10px; display: block; }

/* ==========================================================================
   BREAKING NEWS POPUP
   ========================================================================== */
.breaking-popup-overlay {
    position: fixed;
    bottom: 30px; left: 30px;
    z-index: 8000;
    opacity: 0; transform: translateX(-120%);
    transition: all 0.5s cubic-bezier(0.34,1.56,0.64,1);
    pointer-events: none;
}
.breaking-popup-overlay.show {
    opacity: 1; transform: translateX(0);
    pointer-events: all;
}
.breaking-popup-box {
    background: #0A192F;
    color: white;
    border-radius: 14px;
    padding: 18px 20px;
    max-width: 320px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    border-left: 5px solid #D32F2F;
}
.breaking-popup-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #D32F2F;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.breaking-popup-header button {
    margin-left: auto; background: none;
    border: none; color: #aaa;
    font-size: 18px; cursor: pointer;
    line-height: 1;
}
.breaking-popup-header button:hover { color: white; }
#breaking-popup-content {
    font-size: 14px; line-height: 1.5;
    color: #e2e8f0; margin-bottom: 14px;
}
.breaking-popup-btn {
    display: inline-block;
    background: #D32F2F; color: white;
    padding: 8px 16px; border-radius: 8px;
    font-size: 13px; font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.breaking-popup-btn:hover { background: #b71c1c; }

/* ==========================================================================
   SHARE BUTTONS (on news cards)
   ========================================================================== */
.share-bar {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
    border: none; cursor: pointer;
}
.share-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.share-btn.whatsapp { background: #25D366; color: white; }
.share-btn.facebook { background: #1877F2; color: white; }
.share-btn.twitter  { background: #1DA1F2; color: white; }

/* ==========================================================================
   INFINITE SCROLL LOADER
   ========================================================================== */
.infinite-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px;
    color: var(--text-muted);
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.infinite-loader.visible { 
    opacity: 1; 
    pointer-events: auto;
}
.loader-spinner {
    width: 36px; height: 36px;
    border: 4px solid var(--border-color);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   WEATHER WIDGET
   ========================================================================== */
.weather-widget { margin-bottom: 25px; }
.weather-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.weather-main {
    display: flex;
    align-items: center;
    gap: 15px;
}
.weather-icon { font-size: 52px; line-height: 1; }
.weather-temp { font-size: 38px; font-weight: 700; color: var(--primary-color); }
.weather-desc { font-size: 13px; color: var(--text-muted); text-transform: capitalize; }
.weather-city { font-weight: 700; font-size: 16px; color: var(--primary-color); }
.weather-extras {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 5px;
}
.weather-extra-item {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}
body.dark-mode .weather-extra-item { background: #1e3a5f; }
.weather-extra-item i { color: var(--secondary-color); }

/* ==========================================================================
   TODAY IN HISTORY WIDGET
   ========================================================================== */
.history-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-dark);
}
.history-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.history-event {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    border-left: 3px solid var(--secondary-color);
    font-size: 13px;
    line-height: 1.6;
}
body.dark-mode .history-event { background: #1e3a5f; }
.history-year {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 14px;
}

/* ==========================================================================
   POLL WIDGET
   ========================================================================== */
.poll-widget { }
.poll-question {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 14px;
    line-height: 1.5;
}
.poll-options { display: flex; flex-direction: column; gap: 10px; }
.poll-option {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    font-family: inherit;
    color: var(--text-dark);
}
.poll-option:hover {
    border-color: var(--secondary-color);
    background: rgba(211,47,47,0.05);
    transform: translateX(4px);
}
.poll-results { display: flex; flex-direction: column; gap: 10px; }
.poll-result-bar { }
.poll-result-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-dark);
}
.poll-bar-track {
    background: var(--border-color);
    border-radius: 6px;
    height: 10px;
    overflow: hidden;
}
.poll-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #D32F2F, #ff7043);
    border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.poll-total {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
}

/* ==========================================================================
   PUSH NOTIFICATION BUTTON
   ========================================================================== */
.push-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #0A192F, #1e3a5f);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.push-btn:hover {
    background: linear-gradient(135deg, #D32F2F, #ff5252);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211,47,47,0.3);
}

/* ==========================================================================
   MOBILE: Search bar responsive
   ========================================================================== */
@media (max-width: 768px) {
    .search-bar-container { display: none; }
    #back-to-top { bottom: 20px; right: 20px; width: 42px; height: 42px; font-size: 16px; }
    .breaking-popup-overlay { left: 15px; right: 15px; bottom: 15px; }
    .breaking-popup-box { max-width: 100%; }
    .popup-box { padding: 30px 20px; }
}
@media (max-width: 992px) {
    .search-bar-container { max-width: 200px; }
}

/* ==========================================================================
   HERO SLIDER / CAROUSEL
   ========================================================================== */
.hero-slider-wrapper {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    background: #000;
}
.hero-slide-loading {
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}
.hero-slider {
    display: flex;
    transition: transform 0.7s cubic-bezier(0.77,0,0.175,1);
    will-change: transform;
}
.hero-slide {
    min-width: 100%;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
.hero-slide img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    transition: transform 8s ease;
}
.hero-slide:hover img { transform: scale(1.04); }

.hero-slide-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    padding: 40px 28px 28px;
    color: white;
}
.hero-slide-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--secondary-color);
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}
.hero-slide-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    line-height: 1.35;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.hero-slide-meta {
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}
.hero-slide-video { min-width: 100%; position: relative; background: #000; }
.hero-slide-video iframe { width: 100%; height: 420px; border: none; display: block; }
.hero-video-label {
    position: absolute;
    top: 14px; left: 14px;
    background: #ff0000;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
}
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    width: 46px; height: 46px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider-arrow:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
}
.slider-prev { left: 16px; }
.slider-next { right: 16px; }

.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.slider-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}
.slider-dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}
.slider-progress {
    position: absolute;
    bottom: 0; left: 0;
    height: 3px;
    background: var(--secondary-color);
    z-index: 10;
    animation: sliderProgress 5s linear infinite;
}
@keyframes sliderProgress { from { width:0% } to { width:100% } }

@media (max-width: 768px) {
    .hero-slide img,
    .hero-slide-video iframe,
    .hero-slide-loading { height: 240px; }
    .hero-slide-title { font-size: 17px; }
    .slider-arrow { width: 34px; height: 34px; font-size: 13px; }
}

/* ==========================================================================
   SKELETON LOADING ANIMATION
   ========================================================================== */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 768px) { .skeleton-grid { grid-template-columns: 1fr; } }

.skeleton-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}
.skeleton-img {
    height: 180px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f5f5f5 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}
.skeleton-body { padding: 15px; }
.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #e0e0e0 25%, #f5f5f5 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    margin-bottom: 10px;
}
.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }
.skeleton-line.long { width: 100%; }
.skeleton-hero {
    height: 420px;
    border-radius: var(--border-radius);
    background: linear-gradient(90deg, #e0e0e0 25%, #f5f5f5 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    margin-bottom: 20px;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
body.dark-mode .skeleton-img,
body.dark-mode .skeleton-line,
body.dark-mode .skeleton-hero {
    background: linear-gradient(90deg, #1e3a5f 25%, #2a4a7f 50%, #1e3a5f 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}
