﻿:root {
    --primary-color: #e60023;
    /* News Red */
    --secondary-color: #0d1117;
    /* Dark Background */
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f4f4f4;
    --white: #ffffff;
    --border-color: #ddd;
    --font-family: 'Inter', sans-serif;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Article Page Layout */
.article-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
}

@media (min-width: 992px) {
    .article-layout-grid {
        grid-template-columns: 3fr 1fr;
        align-items: start;
    }
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: var(--font-family);
}

.top-header {
    background-color: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid #f1f1f1;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Left: Weather Widget */
.header-left {
    flex: 1;
    display: flex;
    align-items: center;
}

.weather-widget {
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.weather-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    /* Slightly larger base size */
    margin-bottom: 4px;
    /* Space before time */
}

.country-name {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #555;
    letter-spacing: 0.5px;
}

.weather-icon i {
    font-size: 1.2rem;
    /* Larger icon */
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

.temperature {
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.country-time {
    /* Container for time */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Align left to match country name */
    justify-content: center;
}

.country-text {
    font-weight: 800;
    color: #0047AB;
    /* Dark Blue */
    text-transform: uppercase;
    font-size: 0.85rem;
}

.city-text {
    font-weight: 600;
    color: #4a5568;
    /* Dark Grey */
    text-transform: uppercase;
    font-size: 0.85rem;
}

.time-text {
    font-weight: 800;
    line-height: 1;
    color: #d32f2f;
    /* Red */
    font-size: 1.6rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}

.date-text {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #718096;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

/* Center: Logo */
.header-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    color: #D4AF37;
    text-transform: uppercase;
    letter-spacing: -1px;
    line-height: 1;
    text-decoration: none;
}

.logo span {
    color: #D4AF37;
}

.tagline {
    font-family: 'cursive', sans-serif;
    color: #D4AF37;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Right: Socials & Actions */
.header-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    /* Slightly increased gap */
}

.socials {
    display: flex;
    gap: 15px;
    margin-bottom: 5px;
}

.socials a {
    color: #333;
    font-size: 1rem;
    transition: color 0.2s;
}

.socials a:hover {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    /* More breathing room */
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
}

.btn-subscribe-new,
.btn-signin-new {
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn-subscribe-new:hover,
.btn-signin-new:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-subscribe-new i,
.btn-signin-new i,
.btn-notification i {
    color: #D4AF37;
    /* Consistent gold accent */
}

.divider {
    color: #ddd;
    font-weight: 300;
}

/* Notifications */
.notification-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.btn-notification {
    color: #333;
    font-size: 1.1rem;
    position: relative;
    padding: 5px;
    transition: color 0.2s;
}

.btn-notification:hover {
    color: var(--primary-color);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    background-color: var(--primary-color);
    /* Red */
    color: white;
    border-radius: 50%;
    border: 2px solid white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Notification Modal */
.notification-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.notification-modal.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.notif-modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.notif-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-close {
    cursor: pointer;
    font-size: 1.2rem;
    color: #adb5bd;
    transition: color 0.2s;
}

.notif-close:hover {
    color: #495057;
}

.notif-body {
    max-height: 70vh;
    overflow-y: auto;
}

.welcome-msg {
    padding: 25px;
    text-align: center;
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-bottom: 1px solid #f1f1f1;
}

.welcome-msg i {
    font-size: 2.5rem;
    color: #D4AF37;
    margin-bottom: 15px;
    display: block;
}

.welcome-msg h4 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #212529;
}

.welcome-msg p {
    font-size: 1rem;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 0;
}

.trending-header {
    padding: 15px 25px 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #888;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.trending-list {
    padding-bottom: 10px;
}

.notif-news-item {
    display: flex;
    padding: 15px 25px;
    gap: 15px;
    border-bottom: 1px solid #f8f9fa;
    transition: background 0.1s;
    text-decoration: none;
    align-items: center;
}

.notif-news-item:hover {
    background: #f8f9fa;
}

.notif-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notif-content {
    flex: 1;
}

.notif-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    margin-bottom: 5px;
}

.notif-time {
    font-size: 0.8rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 5px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* ═══════════════════════════════════════════════════════
   Category Nav Bar  –  Modern, scrollable, mobile-friendly
   ═══════════════════════════════════════════════════════ */

.blue-nav-bar {
    /* Deep blue gradient matching screenshot */
    background: linear-gradient(90deg, #003399 0%, #0047cc 50%, #003399 100%);
    position: relative;
    overflow: hidden;
    /* Subtle bottom shimmer line */
    border-bottom: 2px solid rgba(100, 160, 255, 0.35);
    box-shadow: 0 2px 12px rgba(0, 50, 160, 0.4);
}

/* Animated shimmer particle in background */
.blue-nav-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 200% at 50% -80%, rgba(100, 180, 255, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Main flex container ── */
.nav-container {
    display: flex;
    align-items: stretch;
    height: 46px;
    padding: 0;
    position: relative;
    /* keep z above ::before */
    z-index: 1;
}

/* ── Scrollable category strip ── */
.nav-links-wrap {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-left: 20px;
    display: flex;
    align-items: center;
}

.nav-links-wrap::-webkit-scrollbar {
    display: none;
}

/* Category list */
.nav-links {
    display: flex;
    list-style: none;
    height: 46px;
    align-items: stretch;
    width: max-content;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-links li {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
}

/* Individual tab link */
.nav-links a {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.90) !important;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    white-space: nowrap;
    padding: 0 18px;
    text-decoration: none;
    position: relative;
    border-bottom: 3px solid transparent;
    transition: color 0.18s ease, border-color 0.18s ease;
}

/* Hover state */
.nav-links a:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

/* Active / selected tab */
.nav-links a.active,
.nav-links li.active>a {
    color: #fff;
    font-weight: 700;
    border-bottom-color: #fff;
}

/* Thin separator between tabs on hover — optional flair */
.nav-links li+li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: rgba(255, 255, 255, 0.12);
}

/* ── Right: search icon ── */
.nav-search-area {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0 18px 0 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.20);
}

/* Simple anchor search button */
.nav-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    text-decoration: none;
    transition: color 0.18s, background 0.18s;
    /* no border / background by default */
    background: transparent;
    border: none;
    cursor: pointer;
    /* match .nav-links a colour exactly */
}

.nav-search-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

/* ── Theme-aware background ── */
html[data-theme="ocean"] .blue-nav-bar {
    background: linear-gradient(90deg, #004799, #0066cc, #004799) !important;
}

html[data-theme="forest"] .blue-nav-bar {
    background: linear-gradient(90deg, #0e5c2a, #16a34a, #0e5c2a) !important;
}

html[data-theme="royal"] .blue-nav-bar {
    background: linear-gradient(90deg, #5b21b6, #7c3aed, #5b21b6) !important;
}

html[data-theme="sunset"] .blue-nav-bar {
    background: linear-gradient(90deg, #9a3412, #ea580c, #9a3412) !important;
}

html[data-theme="rose"] .blue-nav-bar {
    background: linear-gradient(90deg, #9f1239, #e11d48, #9f1239) !important;
}

html[data-theme="cyber"] .blue-nav-bar {
    background: linear-gradient(90deg, #0a5752, #0d9488, #0a5752) !important;
}

html[data-theme="hotpink"] .blue-nav-bar {
    background: linear-gradient(90deg, #9d174d, #db2777, #9d174d) !important;
}

html[data-theme="aurora"] .blue-nav-bar {
    background: linear-gradient(90deg, #065f46, #059669, #065f46) !important;
}

html[data-theme="mocha"] .blue-nav-bar {
    background: linear-gradient(90deg, #78350f, #b45309, #78350f) !important;
}

html[data-theme="candy"] .blue-nav-bar {
    background: linear-gradient(90deg, #1e3a8a, #2563eb, #1e3a8a) !important;
}

/* ── Legacy compat — hide old elements ── */
.nav-right {
    display: none;
}

.search-trigger {
    display: none;
}

.nav-search {
    display: none;
}

.nav-search-toggle {
    display: none;
}

.nav-search-box {
    display: none;
}

.nav-search-form {
    display: none;
}

.search-bar input {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
}






/* Hero Section Grid */
.hero {
    margin: 30px 0;
}

.hero-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
    }
}

/* Consolidated with definition below */

/* Sidebar Styling */
.hero-sidebar {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #edf2f7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.sidebar-item:last-child {
    margin-bottom: 0;
}

.sidebar-item:hover {
    transform: translateX(5px);
}

/* Increased Sidebar Thumb Size */
.sidebar-thumb {
    width: 110px;
    /* Increased from 80px */
    height: 80px;
    /* Increased from 60px */
    border-radius: 6px;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sidebar-item:hover .sidebar-thumb img {
    transform: scale(1.1);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: #2d3748;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-meta {
    font-size: 0.75rem;
    margin-top: 5px;
}

/* Modern Running Light Effect */
@keyframes borderRotate {
    100% {
        transform: rotate(1turn);
    }
}

.news-card,
.featured-article {
    position: relative;
    z-index: 0;
    overflow: hidden;
    /* Contain the light */
}

/* The Glowing Line */
.news-card::before,
.featured-article::before {
    content: '';
    position: absolute;
    z-index: -2;
    left: -50%;
    top: -50%;
    width: 200%;
    height: 200%;
    background-color: transparent;
    background-repeat: no-repeat;
    background-size: 50% 50%, 50% 50%;
    background-position: 0 0, 100% 0, 100% 100%, 0 100%;
    /* Gradient Cone for "running" effect */
    background-image: conic-gradient(transparent, transparent, transparent, #0047AB);
    animation: borderRotate 4s linear infinite;
    opacity: 0;
    /* Hidden by default */
    transition: opacity 0.3s;
}

/* Show on Hover */
.news-card:hover::before,
.featured-article:hover::before {
    opacity: 1;
}

/* Inner Overlay to hide the center of the gradient (making it a border) */
.news-card::after,
.featured-article::after {
    content: '';
    position: absolute;
    z-index: -1;
    left: 2px;
    /* Border Width */
    top: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    background: white;
    border-radius: 6px;
    /* Slightly less than parent */
}

/* Article Sidebar Layout */
.article-layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

@media (max-width: 900px) {
    .article-layout-grid {
        grid-template-columns: 1fr;
    }
}

.featured-article {
    background: var(--white);
    /* Light Background */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    /* Stacked Layout */
    cursor: pointer;
    transition: transform 0.2s;
    height: 100%;
    min-height: 400px;
}

@media (max-width: 768px) {
    .featured-article {
        flex-direction: column;
    }

    .featured-image {
        height: 250px !important;
        width: 100% !important;
    }
}

.featured-article:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.featured-image {
    width: 100%;
    height: 350px;
    /* Fixed height for top image */
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-article:hover .featured-image img {
    transform: scale(1.05);
}

.badge {
    /* Keeping badge definition but might be removed in HTML */
    position: absolute;
    top: 15px;
    left: 15px;
    background: #DC2626;
    color: var(--white);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.featured-content {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-top: 1px solid #f7fafc;
    color: inherit;
}

/* Featured Article Typography - Light Theme */
.featured-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
    color: #1a202c;
    /* Dark text */
}

.featured-content .meta {
    color: #718096;
    /* Gray text */
    margin-bottom: 15px;
    /* Tighter spacing */
}

.featured-content .meta i {
    color: #A0AEC0;
}

.featured-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #4a5568;
    /* Dark gray text */
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-content .read-more {
    color: #63b3ed;
    /* Light blue link */
    font-weight: 600;
}

.featured-content .read-more:hover {
    color: #90cdf4;
}

.meta {
    font-size: 0.85rem;
    color: #718096;
    /* Gray text */
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.meta i {
    margin-right: 5px;
    color: #A0AEC0;
}

.card-title {
    font-size: 1.15rem;
    margin: 0 0 10px 0;
    font-weight: 700;
    line-height: 1.4;
    color: #1a202c;
}

.card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.card-title a:hover {
    color: var(--primary-color);
}

.card-excerpt {
    font-size: 0.95rem;
    color: #4A5568;
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.read-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4A5568;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    margin-top: auto;
    transition: color 0.2s;
}

.read-more:hover {
    color: var(--primary-color);
}

.read-more i {
    margin-left: 5px;
    transition: transform 0.2s;
}

.read-more:hover i {
    transform: translateX(3px);
}

.news-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-image {
    height: 220px;
    /* Adjusted for 3-col layout */
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .card-image img {
    transform: scale(1.05);
    /* Slight zoom on hover */
}

.share-btn-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10;
    color: #4a5568;
}

.news-card:hover .share-btn-overlay {
    opacity: 1;
    transform: translateY(0);
}

.share-btn-overlay:hover {
    background: #fff;
    color: #0047AB;
    transform: scale(1.1);
}

.card-content {
    padding: 20px;
}

/* Styles moved up */

/* Article Page */
.article-container {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    margin-top: 30px;
    margin-bottom: 50px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.article-header {
    margin-bottom: 30px;
    text-align: center;
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.article-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #222;
    max-width: 800px;
    margin: 0 auto;
}

.article-body p {
    margin-bottom: 20px;
}

/* ── Images inside article body (from TinyMCE editor) ── */
.article-body img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    object-fit: contain;
}

/* Inline images (e.g. width/height attributes set by TinyMCE) still stay responsive */
.article-body img[width],
.article-body img[style*="width"] {
    max-width: 100% !important;
    height: auto !important;
}

/* Figure / figcaption support */
.article-body figure {
    margin: 24px auto;
    text-align: center;
}

.article-body figcaption {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 8px;
    font-style: italic;
}

/* Tables */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
    overflow-x: auto;
    display: block;
}

.article-body table th,
.article-body table td {
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    text-align: left;
}

.article-body table th {
    background: #f7fafc;
    font-weight: 700;
    color: #2d3748;
}

.article-body table tr:nth-child(even) {
    background: #f7fafc;
}

/* Blockquotes */
.article-body blockquote {
    border-left: 4px solid #0047AB;
    margin: 24px 0;
    padding: 12px 20px;
    background: #f0f4ff;
    border-radius: 0 8px 8px 0;
    color: #2d3748;
    font-style: italic;
}

/* Code blocks */
.article-body pre,
.article-body code {
    background: #1a202c;
    color: #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    padding: 4px 8px;
}

.article-body pre {
    padding: 16px 20px;
    overflow-x: auto;
    margin: 20px 0;
}

/* Headings inside body */
.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
    margin: 30px 0 15px;
    line-height: 1.3;
    color: #1a202c;
    font-weight: 700;
}

/* Lists */
.article-body ul,
.article-body ol {
    padding-left: 25px;
    margin-bottom: 20px;
}

.article-body li {
    margin-bottom: 8px;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #aaa;
}

.footer-col ul li a:hover {
    color: var(--white);
}

.copyright {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
    color: #777;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .featured-article {
        grid-template-columns: 1fr;
    }

    .featured-image {
        height: 250px;
    }

    /* nav-links are now always visible as a scrollable strip — no hide needed */

    .article-title {
        font-size: 1.8rem;
    }

    .article-image {
        height: 300px;
    }
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.news-grid .ad-banner-full {
    grid-column: 1 / -1;
}

/* Advertisement Styles */
.ad-banner-full {
    width: 100%;
    max-width: 728px;
    height: 90px;
    background-color: #f0f0f0;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-size: 0.8rem;
    border: 1px dashed #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-sidebar {
    width: 100%;
    max-width: 300px;
    height: 250px;
    /* Default to rectangle for safer mobile fit, or 600 for vertical */
    background-color: #f0f0f0;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-size: 0.8rem;
    border: 1px dashed #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (min-width: 992px) {
    .ad-sidebar {
        height: 600px;
        /* Taller on desktop */
    }
}

/* Search Bar Update */
.search-bar-wrapper {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2px 10px;
    display: flex;
    align-items: center;
}

.search-bar-wrapper input {
    border: none;
    outline: none;
    padding: 6px;
    font-size: 0.9rem;
    background: transparent;
    width: 200px;
}

.search-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    font-size: 0.9rem;
}

.search-btn:hover {
    color: var(--primary-color);
}

/* Subscribe Modal */
/* Subscribe Modal */
.subscribe-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.subscribe-content {
    background-color: #fff;
    padding: 50px 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #cbd5e0;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #4a5568;
}

.subscribe-content h2 {
    margin-bottom: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: #1a202c;
    letter-spacing: -0.5px;
}

.subscribe-content p {
    color: #718096;
    margin-bottom: 30px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.subscribe-content input[type="email"],
.subscribe-content input[type="text"] {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    background-color: #f7fafc;
    transition: all 0.2s;
}

.subscribe-content input:focus {
    outline: none;
    border-color: #4299e1;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

.subscribe-content button {
    width: 100%;
    padding: 16px;
    background-color: #3182ce;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    margin-top: 5px;
}

.subscribe-content button:hover {
    background-color: #2b6cb0;
    transform: translateY(-1px);
}

.subscribe-content button:active {
    transform: translateY(1px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination-btn:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
    color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn i {
    font-size: 0.9rem;
}

/* =========================================
   Modern Comment Section
   ========================================= */
.comment-interactions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
}

.interaction-group {
    display: flex;
    gap: 20px;
    align-items: center;
    color: #4a5568;
    font-weight: 500;
}

.interaction-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.2s;
}

.interaction-item:hover {
    color: #0056b3;
    /* Blue hover */
}

.comment-sort-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    font-size: 1rem;
    color: #2d3748;
}

.sort-label {
    font-weight: 700;
    margin-right: 5px;
}

.sort-dropdown-container {
    position: relative;
    cursor: pointer;
}

.current-sort {
    color: #0056b3;
    /* Blue Text */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sort-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 10;
    width: 140px;
    /* Slightly wider */
    overflow: hidden;
}

.sort-menu.active {
    display: block;
    animation: fadeIn 0.2s;
}

.sort-option {
    padding: 10px 15px;
    display: block;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.1s;
}

.sort-option:hover {
    background: #f7fafc;
    color: #0056b3;
}

.sort-option.active {
    background: #edf2f7;
    font-weight: 600;
    color: #0056b3;
}

/* Post Opinion Area */
.post-opinion-area {
    margin-bottom: 40px;
}

.post-opinion-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 15px;
}

.signin-prompt-box {
    background: transparent;
    /* Cleaner look */
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.prompt-text {
    color: #718096;
    font-size: 1rem;
}

.btn-signin-blue {
    background-color: #0047AB;
    /* Match Header Blue */
    color: white;
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-signin-blue:hover {
    background-color: #003380;
}

.user-comment-form textarea {
    width: 100%;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 15px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.user-comment-form textarea:focus {
    border-color: #0047AB;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.1);
}

.btn-post-comment {
    background: #2d3748;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
}

/* Lightbox (Full Size Image View) */
.lightbox-modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    cursor: zoom-out;
    animation: fadeIn 0.3s;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    max-width: 95%;
    max-height: 95vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
    cursor: default;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 2001;
    line-height: normal;
}

.lightbox-close:hover {
    color: #e60023;
}

/* Make article images clickable */
.article-image {
    cursor: zoom-in;
    transition: opacity 0.2s;
}

.article-image:hover {
    opacity: 0.95;
}

/* Interaction Bar Styles */
.comment-interactions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
    padding: 15px 0;
    margin-bottom: 30px;
}

.interaction-group {
    display: flex;
    gap: 20px;
}

.interaction-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #4a5568;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 30px;
    background: transparent;
}

.interaction-item:hover {
    background: #f7fafc;
    color: #2d3748;
}

.interaction-item i {
    transition: transform 0.2s;
}

.interaction-item:hover i {
    transform: scale(1.1);
}

/* Active State for Like/Save */
.interaction-item.active {
    color: #3182ce;
    background: #ebf8ff;
    font-weight: 600;
}

.interaction-item.active i {
    color: #3182ce;
}

/* Footer Layout Update */
.footer-content {
    grid-template-columns: repeat(4, 1fr) !important;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr !important;
    }
}


/* =========================================
   DARK THEME FOOTER (Updated)
   ========================================= */
footer {
    background-color: #0d1117 !important;
    /* Dark background */
    color: #a0aec0 !important;
    /* Light gray text */
    padding: 60px 0 30px !important;
    font-family: 'Inter', sans-serif;
    border-top: 1px solid #1f2937;
}

.footer-content {
    display: grid !important;
    grid-template-columns: 2fr 1fr 1fr 1.5fr !important;
    /* 4 Columns: 1st wider */
    gap: 40px !important;
    margin-bottom: 50px !important;
}

.footer-col h3 {
    color: white !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin-bottom: 25px !important;
    letter-spacing: 0.5px !important;
    text-transform: none !important;
    /* Title Case */
}

/* Brand Specifics */
.footer-col:first-child h3 {
    font-size: 1.5rem !important;
    margin-bottom: 15px !important;
}

.footer-col p {
    line-height: 1.6 !important;
    font-size: 0.95rem !important;
    max-width: 300px !important;
    color: #a0aec0 !important;
}

.footer-col ul {
    list-style: none !important;
    padding: 0 !important;
}

.footer-col ul li {
    margin-bottom: 12px !important;
}

.footer-col ul li a {
    color: #a0aec0 !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
    font-size: 0.95rem !important;
}

.footer-col ul li a:hover {
    color: white !important;
}

.footer-col ul li i {
    margin-right: 10px !important;
    color: white !important;
    /* White icons */
    width: 20px !important;
    text-align: center !important;
}

.copyright {
    text-align: center !important;
    border-top: 1px solid #2d3748 !important;
    padding-top: 30px !important;
    color: #718096 !important;
    font-size: 0.9rem !important;
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
}

/* Feature 4: Modern Animated Ad Border (Running Light Effect) */
.banner-ad-container {
    position: relative;
    padding: 4px;
    /* Border Thickness */
    border-radius: 12px;
    /* Outer Radius */
    overflow: hidden;
    /* Clips the rotating glow */
    display: inline-block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    /* No background on parent, we use ::before */
    background: #fff;
    max-width: 100%;
    z-index: 1;
}

.banner-ad-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    z-index: -1;
    background: conic-gradient(transparent,
            transparent,
            transparent,
            #ff0000,
            #ff7f00,
            #ffff00,
            #00ff00,
            #0000ff,
            #4b0082,
            #8f00ff,
            #ff0000);
    animation: rotateBorder 4s linear infinite;
}

.banner-ad-container img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    /* Inner Radius */
    background: white;
    position: relative;
    z-index: 2;
    /* Sits on top of the spinner */
}

@keyframes rotateBorder {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }

}

/* Enlarged Images on Mobile */
@media (max-width: 768px) {
    .card-image {
        height: 280px;
        /* Increased from 220px */
    }
}

/* =====================================================
   MOBILE RESPONSIVE FIXES — Header, Article, Footer
   ===================================================== */

/* ── Mobile Header: Keep full size, compact layout ── */
@media (max-width: 768px) {

    /* Prevent viewport zoom caused by wide content.
       NOTE: only apply to body — applying to html clips position:sticky
       and breaks inner scrollable containers like nav-links-wrap */
    body {
        overflow-x: hidden;
    }

    /* Top header section: stack logo center, hide secondary sections */
    .top-header {
        padding: 8px 0;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 4px;
        padding: 0 12px;
        position: relative;
    }

    /* Hide weather widget on mobile to save space */
    .header-left {
        display: none;
    }

    /* Logo: center and full width */
    .header-center {
        flex: 1 0 100%;
        order: 1;
        align-items: center;
        padding: 4px 0 2px;
    }

    .logo {
        font-size: 1.9rem;
        letter-spacing: -0.5px;
    }

    .tagline {
        font-size: 0.72rem;
        margin-top: 2px;
    }

    /* Actions row: full width, scrollable */
    .header-right {
        flex: 1 0 100%;
        order: 2;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding-bottom: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .header-right::-webkit-scrollbar {
        display: none;
    }

    .socials {
        display: none;
        /* Hide socials on mobile — saves space */
    }

    .header-actions {
        gap: 10px;
        font-size: 0.78rem;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .btn-subscribe-new,
    .btn-signin-new {
        font-size: 0.78rem;
        gap: 4px;
    }

    /* Theme toggle button: smaller on mobile */
    .th-toggle-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
        gap: 5px;
    }

    .th-dot {
        width: 6px;
        height: 6px;
    }

    /* Nav bar — ensure categories are always visible & scrollable */
    .nav-container {
        height: 40px;
        overflow: visible;
    }

    /* Force the scrollable strip to be visible */
    .nav-links-wrap {
        display: flex !important;
        visibility: visible !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        min-width: 0;
    }

    .nav-links {
        display: flex !important;
        height: 40px;
        width: max-content;
    }

    .nav-links li {
        display: flex !important;
    }

    .nav-links a {
        display: flex !important;
        color: rgba(255, 255, 255, 0.90) !important;
        font-size: 0.78rem;
        padding: 0 14px;
    }
}

/* ── Article Container: reduce padding on mobile ── */
@media (max-width: 768px) {
    .article-container {
        padding: 20px 16px;
        margin-top: 0;
    }

    .article-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .article-image {
        height: 220px;
        border-radius: 6px;
    }

    .article-body {
        font-size: 1rem;
        line-height: 1.7;
    }

    /* Article layout: single column, no gap waste */
    .article-layout-grid {
        margin-top: 16px;
        gap: 20px;
    }

    /* Article header meta: wrap nicely */
    .article-header .meta {
        flex-wrap: wrap;
        justify-content: center !important;
        gap: 8px !important;
        font-size: 0.8rem;
    }

    /* Interaction bar: smaller on mobile */
    .comment-interactions-bar {
        padding: 10px 0;
    }

    .interaction-item {
        padding: 6px 10px;
        font-size: 0.85rem;
        gap: 5px;
    }

    /* Banner ads: full width, no overflow */
    .banner-ad-container {
        width: 100% !important;
        display: block !important;
        box-sizing: border-box;
    }

    .banner-ad-container img,
    .banner-ad-container video {
        width: 100% !important;
        height: auto !important;
    }
}

/* ── Modern Compact Footer — Mobile ── */
@media (max-width: 768px) {
    footer {
        padding: 32px 0 16px !important;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr !important;
        gap: 24px !important;
        margin-bottom: 24px !important;
    }

    /* Brand column: full width */
    .footer-col:first-child {
        grid-column: 1 / -1;
    }

    .footer-col:first-child h3 {
        font-size: 1.25rem !important;
        margin-bottom: 8px !important;
    }

    .footer-col p {
        font-size: 0.85rem !important;
        max-width: 100% !important;
    }

    .footer-col h3 {
        font-size: 0.95rem !important;
        margin-bottom: 12px !important;
    }

    .footer-col ul li {
        margin-bottom: 8px !important;
    }

    .footer-col ul li a {
        font-size: 0.85rem !important;
    }

    .footer-col ul li {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }

    /* Contact Info: keep address readable */
    .footer-col ul li i {
        font-size: 0.8rem !important;
        margin-right: 6px !important;
    }

    .copyright {
        padding-top: 16px !important;
        font-size: 0.78rem !important;
    }
}

/* Very small screens (< 400px) */
@media (max-width: 400px) {
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .logo {
        font-size: 1.65rem;
    }

    .article-container {
        padding: 14px 12px;
    }

    .article-title {
        font-size: 1.3rem;
    }
}

/* =====================================================================
   ARTICLE HTML CONTENT — FULL MEDIA & TYPOGRAPHY NORMALIZER
   Fixes images/videos added via TinyMCE that use Tailwind CSS classes
   (h-auto, max-h-[90vh], w-auto, max-w-[90vw], object-contain etc.)
   which collapse media because this site doesn't use Tailwind CSS.
   ===================================================================== */

.article-html-content {
    font-family: 'Inter', 'Georgia', sans-serif;
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-color, #2d3748);
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ── Images: override any Tailwind/external class that collapses them ── */
.article-html-content img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    /* Override Tailwind collapse classes */
    max-height: none !important;
    object-fit: contain;
    border-radius: 10px;
    margin: 24px auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* Inline images inside <p> tags */
.article-html-content p img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
}

/* ── Videos: full-width, aspect-ratio preserved ── */
.article-html-content video {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    border-radius: 10px;
    margin: 24px auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: #000;
}

/* ── iframes (YouTube embeds etc.): responsive wrapper ── */
.article-html-content iframe {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 320px;
    border-radius: 10px;
    margin: 24px auto;
    border: none;
}

/* ── Figure & figcaption ── */
.article-html-content figure {
    margin: 28px 0;
    padding: 0;
    text-align: center;
}

.article-html-content figure img {
    margin: 0 auto 12px;
}

.article-html-content figcaption {
    font-size: 0.82rem;
    color: #718096;
    font-style: italic;
    text-align: center;
    margin-top: 8px;
}

/* ── Paragraphs ── */
.article-html-content p {
    margin: 0 0 16px;
    line-height: 1.85;
}

/* ── Headings ── */
.article-html-content h1,
.article-html-content h2,
.article-html-content h3,
.article-html-content h4,
.article-html-content h5 {
    font-weight: 700;
    color: var(--heading-color, #1a202c);
    margin: 28px 0 14px;
    line-height: 1.3;
}

.article-html-content h2 {
    font-size: 1.55rem;
}

.article-html-content h3 {
    font-size: 1.3rem;
}

.article-html-content h4 {
    font-size: 1.1rem;
}

/* ── Lists ── */
.article-html-content ul,
.article-html-content ol {
    padding-left: 1.6rem;
    margin: 0 0 16px;
    line-height: 1.8;
}

.article-html-content li {
    margin-bottom: 6px;
}

/* ── Blockquote ── */
.article-html-content blockquote {
    border-left: 4px solid var(--primary-color, #2B6CB0);
    background: rgba(43, 108, 176, 0.06);
    margin: 24px 0;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #4a5568;
}

/* ── Tables: scrollable, never overflow ── */
.article-html-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.92rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.article-html-content th,
.article-html-content td {
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
}

.article-html-content th {
    background: #f7fafc;
    font-weight: 700;
    color: #2d3748;
}

.article-html-content tr:nth-child(even) td {
    background: #fafafa;
}

/* ── Horizontal rules ── */
.article-html-content hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 28px 0;
}

/* ── Code blocks ── */
.article-html-content pre,
.article-html-content code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.88rem;
    background: #f1f5f9;
    border-radius: 6px;
}

.article-html-content pre {
    padding: 16px 20px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-html-content code {
    padding: 2px 6px;
}

/* ── Separation from article-body above ── */
.article-html-content {
    margin-top: 28px;
    padding-top: 4px;
}

/* ── Mobile: ensure everything still fits ── */
@media (max-width: 768px) {
    .article-html-content {
        font-size: 0.97rem;
    }

    .article-html-content h2 {
        font-size: 1.3rem;
    }

    .article-html-content h3 {
        font-size: 1.1rem;
    }

    .article-html-content img,
    .article-html-content video {
        border-radius: 8px;
        margin: 16px auto;
    }
}

/* ── Placeholder for broken/expired images (before JS replaces them) ── */
.article-html-content img:-moz-broken,
.article-html-content img[alt]:not([src]),
.article-html-content img[src=""] {
    min-height: 200px;
    background: #f1f5f9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 24 24' fill='%23cbd5e0'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E") center/60px no-repeat;
    border-radius: 10px;
    display: block;
}

.article-image[data-fallback-applied],
.article-html-content img[data-fallback-applied] {
    /* Ensure fallback image is always fully visible */
    display: block !important;
    width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
}


/* =====================================================================
   CRITICAL: ARTICLE PAGE OVERFLOW LOCKDOWN — MOBILE
   Stops wide ad/HTML content from pushing the page beyond the viewport,
   which caused the header & footer to appear narrow/small on mobile.
   ===================================================================== */
@media (max-width: 768px) {

    /* Use 'clip' not 'hidden' — clip doesn't create a scroll context
       so position:sticky on the header still works correctly */
    html {
        overflow-x: clip !important;
    }

    /* ── All wrappers: never wider than the screen ── */
    body,
    .container {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* ── Article layout: single column & clipped ── */
    .article-layout-grid {
        overflow-x: hidden !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* ── Article sidebar: hide on mobile (stacks below & causes white box) ── */
    .article-sidebar {
        display: none !important;
    }

    /* ── Article container: always full width, padded properly ── */
    .article-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* ── Article body text: break long words, no bleed ── */
    .article-body,
    .article-html-content {
        max-width: 100% !important;
        overflow-x: hidden !important;
        word-break: break-word !important;
        box-sizing: border-box !important;
    }

    /* ── All media inside article body: never overflow ── */
    .article-body img,
    .article-body video,
    .article-body iframe,
    .article-body embed,
    .article-body object,
    .article-html-content img,
    .article-html-content video,
    .article-html-content iframe,
    .article-html-content embed,
    .article-html-content object {
        max-width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    /* ── Tables inside article: scrollable, not wider than screen ── */
    .article-body table,
    .article-html-content table {
        max-width: 100% !important;
        display: block !important;
        overflow-x: auto !important;
        white-space: normal !important;
        box-sizing: border-box !important;
    }

    /* ── Ad banners: always block, full width ── */
    .banner-ad-container {
        width: 100% !important;
        max-width: 100vw !important;
        display: block !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .banner-ad-container img,
    .banner-ad-container video {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* ── Footer: always fills the full viewport width ── */
    footer {
        width: 100vw !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        /* Stretch to edge even if body has padding */
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
    }

    /* ── Hero sidebar on home page: limit width ── */
    .hero-sidebar {
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /* ── News grid cards: never overflow their column ── */
    .news-card,
    .featured-article {
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
}

/* Very tiny screens — ensure nothing overflows */
@media (max-width: 400px) {

    html,
    body {
        overflow-x: clip !important;
    }

    .container {
        padding: 0 10px !important;
    }
}