/* =========================================
   THEME 2 — بوابة الأخبار العربية
   =========================================
   1.  CSS Variables (Light + Dark)
   2.  Reset & Base
   3.  Typography & Utilities
   4.  Accessibility
   5.  Top Bar
   6.  Header & Search
   7.  Navigation & Dropdowns
   8.  Breaking News Ticker
   9.  Hero / Featured Section
   10. Section Headers
   11. News Cards & Grid
   12. Video Section
   13. Sidebar Widgets
   14. Content Layout
   15. Pagination
   16. Footer
   17. Back-to-Top
   18. Article Page
   19. Comments
   20. Sub-Page Header
   21. Contact Page
   22. Search Page
   23. Live Page
   24. Print Styles
   25. Responsive 1024px
   26. Responsive 768px
   27. Responsive 480px
========================================= */

/* =========================================
   1. CSS Variables
========================================= */
:root {
    /* Brand */
    --primary-color:   #1a5276;
    --primary-dark:    #154360;
    --primary-light:   #2e86ab;
    --accent-color:    #c0392b;
    --accent-hover:    #a93226;

    /* Text */
    --text-primary:    #2c3e50;
    --text-secondary:  #5d6d7e;
    --text-muted:      #85929e;

    /* Backgrounds */
    --bg-primary:      #ffffff;
    --bg-secondary:    #f8f9fa;
    --bg-dark:         #1a252f;

    /* UI */
    --border-color:    #e5e8e8;
    --shadow-sm:       0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:       0 4px 12px rgba(0,0,0,0.10);
    --shadow-lg:       0 10px 30px rgba(0,0,0,0.12);

    /* Shape */
    --radius-sm:       4px;
    --radius-md:       8px;
    --radius-lg:       12px;
    --transition:      all 0.3s ease;

    /* Typography */
    --font-main:       'Cairo', sans-serif;
    --font-size-xs:    0.75rem;
    --font-size-sm:    0.875rem;
    --font-size-base:  1.125rem;
    --font-size-lg:    1.25rem;
    --font-size-xl:    1.5rem;
    --font-size-2xl:   2rem;
    --font-size-3xl:   2.5rem;

    /* Leading */
    --leading-tight:   1.4;
    --leading-normal:  1.7;
    --leading-relaxed: 1.9;

    /* Spacing */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.25rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
}

/* Dark Mode */
[data-theme="dark"] {
    --text-primary:   #e2e8f0;
    --text-secondary: #a0aec0;
    --text-muted:     #718096;
    --bg-primary:     #1a202c;
    --bg-secondary:   #2d3748;
    --bg-dark:        #0d1117;
    --border-color:   #2d3748;
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.3);
    --shadow-md:      0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg:      0 10px 30px rgba(0,0,0,0.5);
}
[data-theme="dark"] .main-header  { background-color: #1a202c; }
[data-theme="dark"] .news-card    { background-color: #2d3748; border-color: #3d4a5a; }
[data-theme="dark"] .sidebar-widget { background-color: #2d3748; border-color: #3d4a5a; }
[data-theme="dark"] .bg-secondary { background-color: var(--bg-secondary); }
[data-theme="dark"] .comment      { background-color: #2d3748; border-color: #3d4a5a; }
[data-theme="dark"] .contact-form-wrapper { background-color: #2d3748; border-color: #3d4a5a; }
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea { background-color: #1a202c; color: var(--text-primary); border-color: #3d4a5a; }
[data-theme="dark"] .search-box input { background-color: #2d3748; color: var(--text-primary); border-color: #3d4a5a; }
[data-theme="dark"] .tag { background-color: #3d4a5a; color: var(--text-secondary); }

/* =========================================
   2. Reset & Base
========================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

::selection { background-color: var(--primary-light); color: white; }

::-webkit-scrollbar       { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }
a   { text-decoration: none; color: inherit; transition: var(--transition); }
ul  { list-style: none; }
button, input, textarea, select { font-family: var(--font-main); }

/* =========================================
   3. Typography & Utilities
========================================= */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: var(--leading-tight); color: var(--text-primary); }
h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl);  }
h4 { font-size: var(--font-size-lg);  }

.container  { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--space-6); }
.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.items-center     { align-items: center; }
.justify-between  { justify-content: space-between; }
.justify-center   { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.text-center { text-align: center; }
.hidden      { display: none !important; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--space-2); padding: var(--space-3) var(--space-6);
    font-family: var(--font-main); font-size: var(--font-size-base); font-weight: 600;
    border: none; border-radius: var(--radius-md); cursor: pointer;
    transition: var(--transition); text-align: center; line-height: 1;
}
.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); color: white; }
.btn-accent  { background-color: var(--accent-color); color: white; }
.btn-accent:hover  { background-color: var(--accent-hover); transform: translateY(-2px); color: white; }
.btn-outline { background-color: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); }
.btn-outline:hover { background-color: var(--primary-color); color: white; }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--font-size-sm); }

/* Badges */
.badge {
    display: inline-block; padding: var(--space-1) var(--space-3);
    font-size: var(--font-size-xs); font-weight: 700; border-radius: var(--radius-sm);
    letter-spacing: 0.5px;
}
.badge-breaking  { background-color: var(--accent-color); color: white; animation: pulse 2s infinite; }
.badge-category  { background-color: var(--primary-color); color: white; }

@keyframes pulse  { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
@keyframes blink  { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* =========================================
   4. Accessibility
========================================= */
.skip-link {
    /* FIX: was position:absolute + inset-inline-start:0 which in RTL
       = right side, and -40px wasn't enough to hide the element height.
       Now: fixed (viewport-relative) + physical left:0 + -100px top   */
    position: fixed;
    top: -100px;
    left: 0;
    background: var(--primary-color); color: white;
    padding: 10px 20px; z-index: 10001; transition: top 0.3s;
    border-radius: 0 0 8px 0; font-weight: 600; white-space: nowrap;
}
.skip-link:focus { top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
:focus-visible { outline: 3px solid var(--primary-color); outline-offset: 2px; }

/* =========================================
   5. Top Bar
========================================= */
.top-bar { background-color: var(--bg-dark); color: var(--text-muted); padding: var(--space-2) 0; font-size: var(--font-size-sm); }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar-left, .top-bar-right { display: flex; align-items: center; gap: var(--space-4); }
.top-bar a { color: var(--text-muted); }
.top-bar a:hover { color: white; }
.date-display { display: flex; align-items: center; gap: var(--space-2); }

/* Top bar social links */
.top-bar .social-links { display: flex; gap: var(--space-3); }
.top-bar .social-links a {
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background-color: rgba(255,255,255,0.1); transition: var(--transition);
}
.top-bar .social-links a:hover { background-color: var(--primary-color); color: white; transform: translateY(-2px); }

/* Dark mode toggle in top bar */
#theme-toggle-btn {
    background: rgba(255,255,255,0.1); color: var(--text-muted); border: none;
    width: 28px; height: 28px; border-radius: 50%; cursor: pointer; transition: var(--transition);
    display: flex; align-items: center; justify-content: center; font-size: var(--font-size-sm);
}
#theme-toggle-btn:hover { background: var(--primary-color); color: white; }

/* =========================================
   6. Header & Search
========================================= */
/* FIX: sticky wrapper holds header + nav together so the dropdown
        always has a visible anchor regardless of scroll position   */
.sticky-header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.sticky-header-wrapper.scrolled { box-shadow: var(--shadow-lg); }
[data-theme="dark"] .sticky-header-wrapper { background-color: var(--bg-primary); }

.main-header {
    background-color: transparent; /* colour comes from sticky-header-wrapper */
    transition: var(--transition);
}
.main-header.scrolled { box-shadow: none; } /* shadow on wrapper, not header */
.header-inner { display: flex; justify-content: space-between; align-items: center; padding: var(--space-4) 0; gap: var(--space-4); }

/* Logo */
.logo { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; flex-shrink: 0; }
.logo-icon {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center;
    color: white; font-size: var(--font-size-xl); flex-shrink: 0;
}
.logo-text h1 { font-size: var(--font-size-xl); color: var(--primary-color); margin-bottom: 0; line-height: 1.2; }
.logo-text span { font-size: var(--font-size-xs); color: var(--text-muted); display: block; }

/* Search Box */
.search-box { position: relative; width: 300px; flex-shrink: 0; }
.search-box input {
    width: 100%; padding: var(--space-3) var(--space-4); padding-inline-start: 40px;
    border: 2px solid var(--border-color); border-radius: var(--radius-lg);
    font-family: var(--font-main); font-size: var(--font-size-sm);
    transition: var(--transition); background-color: var(--bg-secondary); color: var(--text-primary);
}
.search-box input:focus {
    outline: none; border-color: var(--primary-color);
    background-color: var(--bg-primary); box-shadow: 0 0 0 3px rgba(26,82,118,0.1);
}
.search-box button {
    position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: var(--font-size-base);
}
.search-box button:hover { color: var(--primary-color); }

/* =========================================
   7. Navigation & Dropdowns
========================================= */
.main-nav { background-color: var(--primary-color); position: relative; z-index: 100; }
.nav-inner { display: flex; justify-content: space-between; align-items: center; min-height: 52px; }
.nav-menu { display: flex; list-style: none; gap: 0; }
.nav-menu > li { position: relative; }
.nav-menu > li > a {
    display: block; padding: var(--space-4) 14px; /* reduced from 20px to fit 10 items */
    color: white; font-weight: 600; font-size: 0.95rem;
    position: relative; transition: var(--transition); white-space: nowrap;
}
.nav-menu > li > a::after {
    content: ''; position: absolute; bottom: 0;
    /* FIX: inset-inline-start:50% in RTL = right:50% which wrongly anchors
       the underline to the right edge. Physical left:50% always centers correctly. */
    left: 50%; transform: translateX(-50%);
    width: 0; height: 4px;
    background-color: white; transition: var(--transition); border-radius: 4px 4px 0 0;
}
.nav-menu > li:hover > a::after,
.nav-menu > li.active > a::after { width: 70%; }           /* was 60% */
.nav-menu > li:hover > a,
.nav-menu > li.active > a { background-color: rgba(0,0,0,0.25); } /* was primary-dark — more contrast */

/* Tighten further on viewports narrower than 1280px */
@media (max-width: 1280px) {
    .nav-menu > li > a { padding: var(--space-4) 10px; font-size: 0.88rem; }
}

/* Dropdown */
.dropdown {
    position: absolute; top: 100%; inset-inline-start: 0;
    background-color: var(--bg-primary); min-width: 220px;
    box-shadow: var(--shadow-lg); border-radius: var(--radius-md);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: var(--transition); z-index: 200; list-style: none; padding: var(--space-2) 0;
}
.nav-menu > li:hover .dropdown,
.nav-menu > li.dropdown-open .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown li a {
    display: block; padding: var(--space-3) var(--space-5);
    color: var(--text-primary); font-size: var(--font-size-sm);
    border-inline-start: 3px solid transparent; transition: var(--transition);
}
.dropdown li a:hover {
    background-color: var(--bg-secondary); color: var(--primary-color);
    border-inline-start-color: var(--primary-color);
    padding-inline-start: calc(var(--space-5) + 5px);
}
.dropdown li a i { margin-inline-end: var(--space-2); width: 20px; text-align: center; }

/* Mobile toggle */
.mobile-toggle {
    display: none; background: none; border: none; color: white;
    font-size: var(--font-size-xl); cursor: pointer; padding: var(--space-3);
}

/* Live indicator */
.live-indicator {
    display: flex; align-items: center; gap: var(--space-2);
    background-color: var(--accent-color); color: white;
    padding: var(--space-2) var(--space-4); border-radius: var(--radius-md);
    font-weight: 700; font-size: var(--font-size-sm);
    cursor: pointer; transition: var(--transition); white-space: nowrap;
    border: none; font-family: var(--font-main); text-decoration: none;
}
.live-indicator:hover { background-color: var(--accent-hover); color: white; }
.live-dot { width: 8px; height: 8px; background-color: white; border-radius: 50%; animation: blink 1.5s infinite; flex-shrink: 0; }

/* =========================================
   8. Breaking News Ticker
========================================= */
.breaking-ticker { background-color: var(--accent-color); color: white; padding: var(--space-3) 0; overflow: hidden; }
.ticker-wrapper { display: flex; align-items: center; gap: var(--space-4); }
.ticker-label {
    background-color: white; color: var(--accent-color);
    padding: var(--space-1) var(--space-4); font-weight: 800;
    font-size: var(--font-size-sm); border-radius: var(--radius-sm);
    white-space: nowrap; flex-shrink: 0;
}
.ticker-content { flex: 1; overflow: hidden; position: relative; }
.ticker-items {
    display: flex; gap: var(--space-8); animation: ticker 30s linear infinite; white-space: nowrap;
}
.ticker-items:hover, .ticker-items.paused { animation-play-state: paused; }
.ticker-item { display: flex; align-items: center; gap: var(--space-2); font-weight: 600; cursor: pointer; }
.ticker-item:hover { text-decoration: underline; }
.ticker-item .time { font-size: var(--font-size-xs); opacity: 0.8; font-weight: 400; }

/* =========================================
   9. Hero / Featured Section
========================================= */
.hero-section { padding: var(--space-8) 0; background-color: var(--bg-secondary); }
.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-6); }

.featured-main {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    height: 500px; box-shadow: var(--shadow-lg); display: block;
}
.featured-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.featured-main:hover img { transform: scale(1.05); }
.featured-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: var(--space-8); color: white;
}
.featured-overlay .badge { align-self: flex-start; margin-bottom: var(--space-3); }
.featured-overlay h2 { color: white; font-size: var(--font-size-2xl); margin-bottom: var(--space-3); line-height: var(--leading-normal); }
.featured-overlay p  { font-size: var(--font-size-base); opacity: 0.9; margin-bottom: var(--space-4); line-height: var(--leading-relaxed); }
.featured-meta { display: flex; align-items: center; gap: var(--space-4); font-size: var(--font-size-sm); opacity: 0.8; flex-wrap: wrap; }
.featured-meta span { display: flex; align-items: center; gap: var(--space-2); }

.featured-side { display: flex; flex-direction: column; gap: var(--space-4); }
.side-article {
    position: relative; border-radius: var(--radius-md); overflow: hidden;
    height: calc((500px - 2 * var(--space-4)) / 3); box-shadow: var(--shadow-md); display: block;
}
.side-article img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.side-article:hover img { transform: scale(1.08); }
.side-article .overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: var(--space-4); color: white;
}
.side-article h4 { color: white; font-size: var(--font-size-base); margin-bottom: var(--space-2); line-height: var(--leading-normal); }
.side-article .meta { font-size: var(--font-size-xs); opacity: 0.8; display: flex; align-items: center; gap: var(--space-2); }

/* =========================================
   10. Section Headers
========================================= */
.category-section { padding: var(--space-12) 0; }
.category-section:nth-child(even) { background-color: var(--bg-secondary); }

.section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: var(--space-6); padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--border-color); position: relative;
}
.section-header::after {
    content: ''; position: absolute; bottom: -2px; inset-inline-start: 0;
    width: 80px; height: 2px; background-color: var(--primary-color);
}
.section-title { display: flex; align-items: center; gap: var(--space-3); font-size: var(--font-size-xl); color: var(--text-primary); }
.section-title i { color: var(--primary-color); }
.view-all { display: flex; align-items: center; gap: var(--space-2); color: var(--primary-color); font-weight: 600; font-size: var(--font-size-sm); }
.view-all:hover { color: var(--accent-color); gap: var(--space-3); }

/* =========================================
   11. News Cards & Grid
========================================= */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-6); }

.news-card {
    background-color: var(--bg-primary); border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid var(--border-color);
    display: flex; flex-direction: column;
}
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.news-card-image { position: relative; height: 200px; overflow: hidden; flex-shrink: 0; }
.news-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; display: block; }
.news-card:hover .news-card-image img { transform: scale(1.08); }
.news-card-image .badge { position: absolute; top: var(--space-3); inset-inline-start: var(--space-3); }

.news-card-content { padding: var(--space-5); flex: 1; display: flex; flex-direction: column; }
.news-card-content h3 {
    font-size: var(--font-size-lg); margin-bottom: var(--space-3); line-height: var(--leading-normal);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-content h3 a:hover { color: var(--primary-color); }
.news-card-excerpt {
    color: var(--text-secondary); font-size: var(--font-size-sm); line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4); flex: 1;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-meta {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: var(--space-4); border-top: 1px solid var(--border-color);
    font-size: var(--font-size-xs); color: var(--text-muted); margin-top: auto;
}
.news-card-meta span { display: flex; align-items: center; gap: var(--space-2); }

/* =========================================
   12. Video Section
========================================= */
.video-section { background-color: var(--bg-dark); color: white; padding: var(--space-12) 0; }
.video-section .section-title { color: white; }
.video-section .view-all { color: rgba(255,255,255,0.7); }
.video-section .view-all:hover { color: white; }
.video-section .section-header::after { background-color: var(--accent-color); }
.video-section .section-header { border-bottom-color: rgba(255,255,255,0.1); }

.video-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--space-6); }
.main-video { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16/9; }
.main-video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play-button {
    position: absolute; top: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%);
    width: 80px; height: 80px; background-color: rgba(192,57,43,0.9);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: white; font-size: var(--font-size-xl); cursor: pointer; transition: var(--transition);
    border: 3px solid white;
}
.play-button:hover { background-color: var(--accent-color); transform: translate(-50%, -50%) scale(1.1); }

.video-list { display: flex; flex-direction: column; gap: var(--space-4); }
.video-item { display: flex; gap: var(--space-4); cursor: pointer; padding: var(--space-3); border-radius: var(--radius-md); transition: var(--transition); }
.video-item:hover { background-color: rgba(255,255,255,0.06); }
.video-thumb { position: relative; width: 160px; height: 90px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-duration {
    position: absolute; bottom: var(--space-2); inset-inline-start: var(--space-2);
    background-color: rgba(0,0,0,0.8); color: white;
    padding: 2px var(--space-2); font-size: var(--font-size-xs); border-radius: var(--radius-sm);
}
.video-info h4 { color: white; font-size: var(--font-size-base); margin-bottom: var(--space-2); line-height: var(--leading-normal); }
.video-info span { font-size: var(--font-size-xs); color: var(--text-muted); display: flex; align-items: center; gap: var(--space-2); }

/* =========================================
   13. Sidebar Widgets
   FIX: .sidebar was used but never defined
========================================= */
.sidebar { min-width: 0; }  /* FIX: prevents overflow in grid */

.sidebar-widget {
    background-color: var(--bg-primary); border-radius: var(--radius-lg);
    padding: var(--space-6); margin-bottom: var(--space-6);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-color);
}
.widget-title {
    font-size: var(--font-size-lg); margin-bottom: var(--space-5);
    padding-bottom: var(--space-3); border-bottom: 2px solid var(--border-color); position: relative;
}
.widget-title::after {
    content: ''; position: absolute; bottom: -2px; inset-inline-start: 0;
    width: 50px; height: 2px; background-color: var(--primary-color);
}

/* Trending List */
.trending-list { padding: 0; }
.trending-item { display: flex; gap: var(--space-4); padding: var(--space-4) 0; border-bottom: 1px solid var(--border-color); transition: var(--transition); cursor: pointer; }
.trending-item:last-child { border-bottom: none; }
.trending-item:hover { padding-inline-start: var(--space-2); }
.trending-rank { font-size: var(--font-size-2xl); font-weight: 800; color: var(--border-color); line-height: 1; min-width: 40px; flex-shrink: 0; }
.trending-content h4 { font-size: var(--font-size-sm); margin-bottom: var(--space-2); line-height: var(--leading-normal); }
.trending-content h4 a:hover { color: var(--primary-color); }
.trending-meta { font-size: var(--font-size-xs); color: var(--text-muted); display: flex; align-items: center; gap: var(--space-2); }

/* Tags Cloud */
.tags-cloud { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tag { display: inline-block; padding: var(--space-2) var(--space-4); background-color: var(--bg-secondary); border-radius: var(--radius-sm); font-size: var(--font-size-sm); color: var(--text-secondary); transition: var(--transition); }
.tag:hover { background-color: var(--primary-color); color: white; }

/* Newsletter Widget */
.newsletter-widget { background: linear-gradient(135deg, var(--primary-color), var(--primary-light)); color: white; text-align: center; }
.newsletter-widget .widget-title { color: white; border-bottom-color: rgba(255,255,255,0.2); }
.newsletter-widget .widget-title::after { background-color: white; }
.newsletter-widget p { margin-bottom: var(--space-4); opacity: 0.9; }
.newsletter-form { display: flex; flex-direction: column; gap: var(--space-3); }
.newsletter-form input {
    width: 100%; padding: var(--space-3) var(--space-4); border: none;
    border-radius: var(--radius-md); font-family: var(--font-main); text-align: right;
    background-color: rgba(255,255,255,0.95); color: var(--text-primary);
}
.newsletter-form input:focus { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,0.3); }
.newsletter-form .btn { width: 100%; background-color: var(--accent-color); }
.newsletter-form .btn:hover { background-color: var(--accent-hover); }

/* =========================================
   14. Content Layout (Category + Article Pages)
   FIX: .main-column was used but never defined
========================================= */
.content-layout { display: grid; grid-template-columns: 1fr 350px; gap: var(--space-8); padding: var(--space-12) 0; }
.main-column { min-width: 0; }  /* FIX: prevents overflow in grid context */

/* =========================================
   15. Pagination
========================================= */
.pagination { display: flex; justify-content: center; align-items: center; gap: var(--space-2); margin-top: var(--space-10); flex-wrap: wrap; }
.pagination a, .pagination span {
    display: flex; align-items: center; justify-content: center;
    min-width: 44px; height: 44px; padding: 0 var(--space-3);
    border-radius: var(--radius-md); font-weight: 600; transition: var(--transition);
}
.pagination a { background-color: var(--bg-primary); color: var(--text-primary); border: 1px solid var(--border-color); }
.pagination a:hover { background-color: var(--primary-color); color: white; border-color: var(--primary-color); }
.pagination .current { background-color: var(--primary-color); color: white; border: 1px solid var(--primary-color); }
.pagination .prev, .pagination .next { width: auto; padding-inline: var(--space-4); }
.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* =========================================
   16. Footer
   FIX: .footer-links-col was used but never defined
========================================= */
.main-footer { background-color: var(--bg-dark); color: var(--text-muted); padding-top: var(--space-16); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-10); margin-bottom: var(--space-12); }

.footer-brand .logo { margin-bottom: var(--space-4); }
.footer-brand .logo-text h1 { color: white; font-size: var(--font-size-xl); }
.footer-brand p { line-height: var(--leading-relaxed); margin-bottom: var(--space-4); font-size: var(--font-size-sm); }
.footer-brand .social-links { display: flex; gap: var(--space-3); margin-top: var(--space-4); }
.footer-brand .social-links a {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background-color: rgba(255,255,255,0.08); transition: var(--transition);
}
.footer-brand .social-links a:hover { background-color: var(--primary-color); color: white; transform: translateY(-2px); }

/* FIX: .footer-links-col was used in HTML but never defined */
.footer-links-col {}  /* Column handled by grid; class exists for targeting/specificity */

.footer-title {
    color: white; font-size: var(--font-size-lg); margin-bottom: var(--space-5);
    position: relative; padding-bottom: var(--space-3);
}
.footer-title::after { content: ''; position: absolute; bottom: 0; inset-inline-start: 0; width: 40px; height: 2px; background-color: var(--primary-color); border-radius: 2px; }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: var(--space-3); }
.footer-links a { display: flex; align-items: center; gap: var(--space-2); transition: var(--transition); color: var(--text-muted); }
.footer-links a::before { content: '\f104'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: var(--font-size-xs); color: var(--primary-color); }
.footer-links a:hover { color: white; padding-inline-start: var(--space-2); }

.footer-contact li { display: flex; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-4); }
.footer-contact i { color: var(--primary-color); margin-top: 4px; flex-shrink: 0; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1); padding: var(--space-6) 0;
    display: flex; justify-content: space-between; align-items: center; font-size: var(--font-size-sm);
}
.footer-bottom-links { display: flex; gap: var(--space-6); }
.footer-bottom-links a:hover { color: white; }

/* =========================================
   17. Back-to-Top
========================================= */
.back-to-top {
    position: fixed; bottom: var(--space-6); inset-inline-start: var(--space-6);
    width: 48px; height: 48px; background-color: var(--primary-color); color: white;
    border: none; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: var(--font-size-lg);
    box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden;
    transform: translateY(20px); transition: var(--transition); z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background-color: var(--primary-dark); transform: translateY(-3px); }

/* =========================================
   18. Article Page
========================================= */
.article-header { padding: var(--space-12) 0 var(--space-8); background-color: var(--bg-secondary); }
.article-category { display: inline-block; margin-bottom: var(--space-4); }
.article-title { font-size: var(--font-size-3xl); margin-bottom: var(--space-4); line-height: var(--leading-normal); }
.article-lead { color: var(--text-secondary); font-size: var(--font-size-lg); margin-top: var(--space-4); line-height: var(--leading-relaxed); }

.article-meta-bar {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: var(--space-4);
    padding: var(--space-4) 0; border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color); margin-top: var(--space-6);
}
.article-author { display: flex; align-items: center; gap: var(--space-3); }
.author-avatar   { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-info h4  { font-size: var(--font-size-sm); margin-bottom: 2px; }
.author-info span { font-size: var(--font-size-xs); color: var(--text-muted); }

.article-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.action-btn {
    display: flex; align-items: center; gap: var(--space-2);
    padding: var(--space-2) var(--space-4); background-color: var(--bg-primary);
    border: 1px solid var(--border-color); border-radius: var(--radius-md);
    font-family: var(--font-main); font-size: var(--font-size-sm); cursor: pointer; transition: var(--transition);
    color: var(--text-primary);
}
.action-btn:hover { background-color: var(--bg-secondary); border-color: var(--primary-color); color: var(--primary-color); }

.article-featured-image { width: 100%; height: 500px; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: var(--space-8); display: block; }
.article-content { font-size: var(--font-size-lg); line-height: var(--leading-relaxed); color: var(--text-primary); }
.article-content p  { margin-bottom: var(--space-6); }
.article-content h2 { font-size: var(--font-size-xl); margin: var(--space-8) 0 var(--space-4); color: var(--primary-color); }
.article-content blockquote {
    border-inline-start: 4px solid var(--primary-color); padding-inline-start: var(--space-6);
    margin: var(--space-8) 0; font-style: italic; color: var(--text-secondary); font-size: var(--font-size-xl);
}
.article-tags { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); padding-top: var(--space-6); border-top: 2px solid var(--border-color); }

/* =========================================
   19. Comments
========================================= */
.comments-section { margin-top: var(--space-12); padding-top: var(--space-12); border-top: 2px solid var(--border-color); }
.comment-form { background-color: var(--bg-secondary); padding: var(--space-8); border-radius: var(--radius-lg); margin-bottom: var(--space-8); }
.form-group { margin-bottom: var(--space-5); }
.form-group label { display: block; margin-bottom: var(--space-2); font-weight: 600; color: var(--text-primary); }
.form-group input, .form-group textarea {
    width: 100%; padding: var(--space-3) var(--space-4);
    border: 2px solid var(--border-color); border-radius: var(--radius-md);
    font-family: var(--font-main); font-size: var(--font-size-base);
    transition: var(--transition); background-color: var(--bg-primary); color: var(--text-primary);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(26,82,118,0.1); }
.form-group textarea { resize: vertical; min-height: 150px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }

.comment-list { display: flex; flex-direction: column; gap: var(--space-6); }
.comment { display: flex; gap: var(--space-4); padding: var(--space-6); background-color: var(--bg-primary); border-radius: var(--radius-lg); border: 1px solid var(--border-color); }
.comment-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-content { flex: 1; min-width: 0; }
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-3); flex-wrap: wrap; gap: var(--space-2); }
.comment-author { font-weight: 700; color: var(--text-primary); }
.comment-date   { font-size: var(--font-size-xs); color: var(--text-muted); }
.comment-text   { color: var(--text-secondary); line-height: var(--leading-relaxed); }
.comment-reply  { margin-top: var(--space-3); color: var(--primary-color); font-weight: 600; font-size: var(--font-size-sm); cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-2); background: none; border: none; font-family: var(--font-main); transition: var(--transition); }
.comment-reply:hover { color: var(--accent-color); }

/* =========================================
   20. Sub-Page Header (gradient banner)
========================================= */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white; padding: var(--space-12) 0; text-align: center;
}
.page-header h1 { color: white; font-size: var(--font-size-3xl); margin-bottom: var(--space-3); }
.page-header p  { opacity: 0.9; margin-top: var(--space-3); font-size: var(--font-size-base); }
.breadcrumb { display: flex; justify-content: center; align-items: center; gap: var(--space-3); font-size: var(--font-size-sm); opacity: 0.9; flex-wrap: wrap; margin-bottom: var(--space-4); }
.breadcrumb a { color: rgba(255,255,255,0.85); }
.breadcrumb a:hover { color: white; text-decoration: underline; }
.breadcrumb .separator { opacity: 0.6; }

/* =========================================
   21. Contact Page
   FIX: .contact-info was used but never defined
========================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-10); padding: var(--space-12) 0; }
.contact-info {}  /* FIX: wrapper class now intentionally exists */
.contact-info h2 { margin-bottom: var(--space-6); color: var(--text-primary); }

.contact-info-card {
    display: flex; align-items: flex-start; gap: var(--space-4);
    padding: var(--space-6); background-color: var(--bg-secondary);
    border-radius: var(--radius-lg); margin-bottom: var(--space-4); transition: var(--transition);
}
.contact-info-card:hover { background-color: var(--primary-color); color: white; }
.contact-info-card:hover h4, .contact-info-card:hover i { color: white; }
.contact-info-card:hover p { color: rgba(255,255,255,0.8); }
.contact-info-card i { font-size: var(--font-size-xl); color: var(--primary-color); margin-top: 4px; flex-shrink: 0; }
.contact-info-card h4 { margin-bottom: var(--space-2); color: var(--text-primary); }
.contact-info-card p  { color: var(--text-secondary); font-size: var(--font-size-sm); }
.contact-social { display: flex; gap: var(--space-4); margin-top: var(--space-4); flex-wrap: wrap; }
.contact-social a {
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background-color: var(--primary-color); color: white;
    font-size: var(--font-size-lg); transition: var(--transition);
}
.contact-social a:hover { background-color: var(--primary-dark); transform: translateY(-3px); color: white; }

.contact-form-wrapper { background-color: var(--bg-primary); padding: var(--space-8); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); border: 1px solid var(--border-color); }
.contact-form-wrapper h2 { margin-bottom: var(--space-6); color: var(--text-primary); }

/* =========================================
   22. Search Page
========================================= */
.search-results-header { padding: var(--space-8) 0; background-color: var(--bg-secondary); text-align: center; }
.search-form-large { max-width: 600px; margin: var(--space-6) auto 0; position: relative; }
.search-form-large input {
    width: 100%; padding: var(--space-5) var(--space-6); padding-inline-start: 60px;
    font-size: var(--font-size-lg); border: 2px solid var(--border-color);
    border-radius: var(--radius-lg); font-family: var(--font-main); color: var(--text-primary);
    background-color: var(--bg-primary);
}
.search-form-large input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(26,82,118,0.1); }
.search-form-large button { position: absolute; top: 50%; inset-inline-start: 20px; transform: translateY(-50%); background: none; border: none; color: var(--primary-color); font-size: var(--font-size-xl); cursor: pointer; }
.search-filters { display: flex; justify-content: center; gap: var(--space-3); margin-top: var(--space-4); flex-wrap: wrap; }
.filter-chip {
    padding: var(--space-2) var(--space-4); background-color: var(--bg-primary);
    border: 1px solid var(--border-color); border-radius: 100px;
    font-family: var(--font-main); font-size: var(--font-size-sm); cursor: pointer; transition: var(--transition);
    color: var(--text-primary);
}
.filter-chip:hover, .filter-chip.active { background-color: var(--primary-color); color: white; border-color: var(--primary-color); }
.search-count { color: var(--text-secondary); margin-bottom: var(--space-6); }
.search-count strong { color: var(--text-primary); }

/* =========================================
   23. Live Broadcast Page
========================================= */
.live-page-header { background: linear-gradient(135deg, var(--accent-color), #922b21); }
.live-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-6); padding: var(--space-12) 0; }
.live-player {
    aspect-ratio: 16/9; background: linear-gradient(135deg, #1a252f, #2c3e50);
    border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.live-player-inner { text-align: center; color: white; padding: var(--space-8); }
.live-broadcast-icon {
    width: 100px; height: 100px; background-color: rgba(192,57,43,0.9);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto var(--space-6); animation: pulse 2s infinite;
    font-size: var(--font-size-3xl); color: white;
}
.live-stats { display: flex; align-items: center; justify-content: center; gap: var(--space-4); margin-top: var(--space-4); }
.live-badge { display: flex; align-items: center; gap: var(--space-2); }
.live-badge-dot { width: 10px; height: 10px; background-color: #e74c3c; border-radius: 50%; animation: blink 1.5s infinite; }

.live-events-panel {
    background-color: var(--bg-primary); border-radius: var(--radius-lg);
    padding: var(--space-6); box-shadow: var(--shadow-md); border: 1px solid var(--border-color);
}
.live-events-title { font-size: var(--font-size-lg); margin-bottom: var(--space-4); padding-bottom: var(--space-3); border-bottom: 2px solid var(--border-color); display: flex; align-items: center; gap: var(--space-2); }
.live-events-title i { color: var(--primary-color); }
.live-event-item { padding: var(--space-4); background-color: var(--bg-secondary); border-radius: var(--radius-md); margin-bottom: var(--space-4); border-inline-start: 3px solid var(--border-color); }
.live-event-item.done { border-inline-start-color: var(--accent-color); }
.live-event-item.current { border-inline-start-color: var(--primary-color); }
.live-event-time { font-size: var(--font-size-xs); color: var(--text-muted); margin-bottom: var(--space-2); }
.live-event-text { font-weight: 600; color: var(--text-primary); }
.live-event-item.upcoming .live-event-text { color: var(--text-muted); }

/* =========================================
   XX. News Grid 2-column variant (category page)
       Collapses to 1 col on mobile unlike inline style
========================================= */
.news-grid-2col { grid-template-columns: repeat(2, 1fr) !important; }

/* =========================================
   XX. RSS Icon
========================================= */
.top-bar .rss-icon i { color: #f26522; }
.top-bar .rss-icon:hover { background-color: #f26522 !important; }
.top-bar .rss-icon:hover i { color: white; }
.footer-brand .social-links .rss-icon { background-color: rgba(242, 101, 34, 0.15) !important; }
.footer-brand .social-links .rss-icon i { color: #f26522; }
.footer-brand .social-links .rss-icon:hover { background-color: #f26522 !important; }
.footer-brand .social-links .rss-icon:hover i { color: white; }

/* =========================================
   XX. Team (Authors) Page
========================================= */
.team-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 28px; padding: 48px 0;
}
.team-member-card {
    background: var(--bg-primary); border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-color);
    transition: var(--transition); display: flex; flex-direction: column;
}
.team-member-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.team-member-image { height: 240px; overflow: hidden; flex-shrink: 0; }
.team-member-image img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.5s ease; display: block; }
.team-member-card:hover .team-member-image img { transform: scale(1.06); }
.team-member-info { padding: 24px; text-align: center; flex: 1; display: flex; flex-direction: column; }
.team-member-info h3 { font-size: 1.2rem; margin-bottom: 6px; color: var(--text-primary); }
.team-member-role { color: var(--primary-color); font-weight: 700; font-size: 0.88rem; display: block; margin-bottom: 14px; }
.team-member-bio { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; margin-bottom: 18px; flex: 1; }
.team-member-social { display: flex; justify-content: center; gap: 10px; margin-top: auto; }
.team-member-social a {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--bg-secondary); color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem; transition: var(--transition); border: 1px solid var(--border-color);
}
.team-member-social a:hover { background: var(--primary-color); color: white; border-color: var(--primary-color); transform: translateY(-2px); }
.team-articles-count { display: inline-block; background: var(--bg-secondary); color: var(--text-muted); font-size: 0.8rem; padding: 4px 12px; border-radius: 20px; margin-bottom: 14px; }

/* =========================================
   XX. About Us Page
========================================= */
.about-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 48px 0; }
.about-intro-text h2 { font-size: 2rem; margin-bottom: 20px; color: var(--text-primary); }
.about-intro-text p  { color: var(--text-secondary); line-height: 1.9; margin-bottom: 16px; }
.about-intro-image   { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-intro-image img { width: 100%; height: 360px; object-fit: cover; display: block; }
.about-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 40px 0; background: var(--bg-secondary); border-radius: var(--radius-lg); margin: 0 0 48px; text-align: center; }
.stat-item { padding: 24px 16px; }
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--primary-color); display: block; line-height: 1; margin-bottom: 8px; }
.stat-label { font-size: 0.9rem; color: var(--text-secondary); }
.about-values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 0 0 48px; }
.value-card {
    background: var(--bg-primary); border-radius: var(--radius-lg);
    padding: 32px 24px; text-align: center;
    border: 1px solid var(--border-color); box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.value-card:hover { border-color: var(--primary-color); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.value-icon {
    width: 68px; height: 68px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white; display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; margin: 0 auto 20px;
}
.value-card h3 { font-size: 1.1rem; margin-bottom: 12px; color: var(--text-primary); }
.value-card p  { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }

/* Responsive for new pages */
@media (max-width: 1024px) {
    .team-grid       { grid-template-columns: 1fr 1fr; }
    .about-intro     { grid-template-columns: 1fr; gap: 28px; }
    .about-stats     { grid-template-columns: repeat(2, 1fr); }
    .about-values-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .team-grid       { grid-template-columns: 1fr; gap: 20px; padding: 24px 0; }
    .team-member-image { height: 200px; }
    .about-intro     { padding: 24px 0; gap: 20px; }
    .about-intro-image img { height: 220px; }
    .about-stats     { grid-template-columns: repeat(2, 1fr); margin-bottom: 24px; }
    .stat-number     { font-size: 1.8rem; }
    .about-values-grid { grid-template-columns: 1fr; gap: 16px; padding-bottom: 24px; }
}

/* =========================================
   24. Print Styles
========================================= */
@media print {
    .top-bar, .main-nav, .breaking-ticker, .sidebar,
    .comments-section, .main-footer, .back-to-top { display: none !important; }
    .article-content { font-size: 12pt; line-height: 1.6; }
    a { text-decoration: underline; }
}

/* =========================================
   25. Reduced Motion
========================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================
   26. Responsive — 1024px (Tablet)
========================================= */
@media (max-width: 1024px) {
    .hero-grid        { grid-template-columns: 1fr; }
    .featured-main    { height: 400px; }
    .featured-side    { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
    .side-article     { height: 200px; }
    .content-layout   { grid-template-columns: 1fr; }
    .video-grid       { grid-template-columns: 1fr; }
    .footer-grid      { grid-template-columns: 1fr 1fr; gap: 32px; }
    .contact-grid     { grid-template-columns: 1fr; }
    .live-grid        { grid-template-columns: 1fr; }
    .search-box       { width: 240px; }
}

/* =========================================
   27. Responsive — 768px (Mobile)
   NOTE: All critical values use px NOT CSS vars
         so browser cache of old variables can't break layout
========================================= */
@media (max-width: 768px) {

    /* ── Fonts ───────────────────────────────── */
    :root {
        --font-size-base: 1rem;
        --font-size-lg:   1.125rem;
        --font-size-xl:   1.25rem;
        --font-size-2xl:  1.5rem;
        --font-size-3xl:  1.75rem;
    }

    /* ── Container ───────────────────────────── */
    .container { padding-inline: 16px; }
    .top-bar   { display: none !important; }

    /* ── Header ──────────────────────────────── */
    .header-inner {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
    }
    .logo         { order: 1; flex-shrink: 0; }
    .logo-icon    { width: 38px; height: 38px; font-size: 18px; border-radius: 8px; }
    .logo-text h1 { font-size: 1.2rem !important; margin-bottom: 0; }
    .logo-text span { display: none; }
    .search-box   { width: 100%; order: 3; }
    .search-box input { font-size: 0.9rem; padding: 10px 14px; padding-inline-start: 36px; }

    /* ── Mobile Nav Toggle ───────────────────── */
    .mobile-toggle { display: flex !important; order: 2; }

    /* ── Nav Menu: HIDDEN by default on mobile ─ */
    .nav-menu {
        display: none !important;               /* ← force hidden; .active overrides below */
        position: absolute;
        top: 100%;
        inset-inline-start: 0;
        inset-inline-end: 0;
        background-color: #154360;
        flex-direction: column;
        z-index: 999;
        box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    }
    .nav-menu.active { display: flex !important; } /* ← JS adds .active to show */
    .nav-menu > li > a {
        padding: 14px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 1rem;
    }
    .live-indicator { display: none !important; }

    /* ── Dropdown on mobile ───────────────────── */
    .dropdown {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        background-color: rgba(0,0,0,0.2);
        border-radius: 0;
        display: none;                          /* JS adds .dropdown-open to parent li */
    }
    .nav-menu > li.dropdown-open > .dropdown { display: block !important; }
    .dropdown li a {
        color: rgba(255,255,255,0.9) !important;
        padding-inline-start: 48px !important;
        font-size: 0.9rem;
    }
    .dropdown li a:hover {
        background-color: rgba(255,255,255,0.08) !important;
        border-inline-start-color: white !important;
        padding-inline-start: 48px !important;
    }

    /* ── Ticker ──────────────────────────────── */
    .ticker-wrapper { font-size: 0.85rem; }
    .ticker-label   { padding: 2px 10px; font-size: 0.75rem; }

    /* ── PAGE HEADER (the big blue banner on sub-pages) ─────────────
       WAS: padding: 3rem 0 (= 96px!) → FIXED: 20px top/bottom
    ───────────────────────────────────────────────────────────────── */
    .page-header         { padding: 20px 0 !important; }
    .page-header h1      { font-size: 1.3rem !important; margin-bottom: 6px !important; color: white !important; }
    .page-header > .container > p,
    .page-header p       { font-size: 0.85rem !important; margin-top: 4px !important; opacity: 0.85; }
    .breadcrumb          { gap: 8px; margin-bottom: 8px; font-size: 0.8rem; }
    .live-page-header    { padding: 20px 0 !important; }

    /* ── Hero Section ────────────────────────── */
    .hero-section       { padding: 16px 0; }
    .featured-main      { height: 250px !important; max-height: 250px !important; }
    .featured-overlay   { padding: 16px !important; }
    .featured-overlay h2 { font-size: 1.1rem; margin-top: 6px; margin-bottom: 6px; }
    .featured-overlay p  { font-size: 0.85rem; margin-bottom: 8px; }
    .featured-meta      { gap: 12px; font-size: 0.75rem; }
    /* FIX: 3 × 160px dark-overlay cards stacked = ~500px of dark blocks.
       Hide featured-side on mobile; show only the main featured article. */
    .featured-side      { display: none !important; }

    /* ── Mobile Nav active/hover indicator ──────
       Bottom underline (::after) doesn't work in a vertical nav —
       replace with an inline-start border + indent.               */
    .nav-menu > li > a::after   { display: none !important; }
    .nav-menu > li.active > a   { background-color: rgba(0,0,0,0.35) !important; border-inline-start: 4px solid rgba(255,255,255,0.9) !important; padding-inline-start: 24px !important; }
    .nav-menu > li > a:hover    { background-color: rgba(0,0,0,0.2) !important; border-inline-start: 4px solid rgba(255,255,255,0.5) !important; padding-inline-start: 24px !important; }

    /* ── News Grid ───────────────────────────── */
    .news-grid           { grid-template-columns: 1fr !important; gap: 16px; }
    .news-grid-2col      { grid-template-columns: 1fr !important; }

    /* ── Category Sections ───────────────────── */
    .category-section    { padding: 32px 0; }
    .section-header      { margin-bottom: 16px; }
    .section-title       { font-size: 1.1rem; }

    /* ── Video Section ───────────────────────── */
    .video-thumb         { width: 110px; height: 62px; }
    .video-info h4       { font-size: 0.9rem; }
    .video-item          { padding: 10px; }

    /* ── Content Layout ──────────────────────── */
    .content-layout      { padding: 24px 0; gap: 24px; }

    /* ── Footer ──────────────────────────────── */
    .footer-grid         { grid-template-columns: 1fr; gap: 32px; }
    .main-footer         { padding-top: 40px; }
    .footer-bottom       { flex-direction: column; gap: 16px; text-align: center; }
    .footer-bottom-links { flex-wrap: wrap; justify-content: center; gap: 12px; }
    .footer-title        { font-size: 1.1rem; }

    /* ── Article Page ────────────────────────── */
    .article-header          { padding: 20px 0 16px; }
    .article-title           { font-size: 1.4rem !important; }
    .article-lead            { font-size: 1rem; }
    .article-featured-image  { height: 220px; }
    .article-meta-bar        { flex-direction: column; align-items: flex-start; gap: 12px; }
    .article-actions         { flex-wrap: wrap; gap: 8px; }
    .action-btn              { padding: 8px 12px; font-size: 0.8rem; }
    .article-content         { font-size: 1rem; }
    .article-content blockquote { font-size: 1rem; padding-inline-start: 16px; }
    .form-row                { grid-template-columns: 1fr; }
    .comment-form            { padding: 20px; }
    .comment                 { flex-direction: column; gap: 12px; padding: 16px; }
    .comment-avatar          { width: 40px; height: 40px; }

    /* ── Contact ─────────────────────────────── */
    .contact-grid        { padding: 24px 0; gap: 24px; }
    .contact-form-wrapper { padding: 20px; }
    .contact-info-card   { padding: 16px; }

    /* ── Search ──────────────────────────────── */
    .search-results-header  { padding: 24px 0; }
    .search-form-large input { font-size: 1rem; padding: 14px 16px; padding-inline-start: 48px; }
    .search-filters          { gap: 8px; }
    .filter-chip             { padding: 6px 12px; font-size: 0.8rem; }

    /* ── Live ────────────────────────────────── */
    .live-player        { min-height: 200px; }
    .live-grid          { padding: 24px 0; gap: 24px; }

    /* ── Pagination ──────────────────────────── */
    .pagination         { gap: 4px; flex-wrap: wrap; }
    .pagination a, .pagination span { min-width: 36px; height: 36px; font-size: 0.85rem; padding: 0 10px; }
}

/* =========================================
   28. Responsive — 480px (Small Mobile)
========================================= */
@media (max-width: 480px) {
    .container           { padding-inline: 12px; }
    .logo-icon           { width: 32px; height: 32px; font-size: 15px; }
    .logo-text h1        { font-size: 1.05rem !important; }

    /* Page header even more compact */
    .page-header         { padding: 14px 0 !important; }
    .page-header h1      { font-size: 1.1rem !important; margin-bottom: 4px !important; }
    .page-header p       { display: none !important; }
    .breadcrumb          { margin-bottom: 6px; font-size: 0.75rem; }

    .featured-main       { height: 200px; }
    .featured-overlay    { padding: 12px; }
    .featured-overlay h2 { font-size: 0.95rem; }
    .featured-overlay p  { display: none; }
    .featured-meta       { display: none; }
    .side-article        { height: 140px; }

    .news-card-content   { padding: 14px; }
    .news-card-content h3 { font-size: 1rem; }
    .news-card-excerpt   { display: none; }     /* more content above fold */

    .article-title       { font-size: 1.2rem !important; }
    .comment-form        { padding: 14px; }

    .action-btn span     { display: none; }      /* icons only */
    .article-actions     { gap: 6px; }

    .live-stats          { flex-direction: column; gap: 8px; }
    .live-player         { min-height: 170px; }
    .live-broadcast-icon { width: 70px; height: 70px; font-size: 1.5rem; }
}

.video-item .video-info h4, .video-item .video-info a { color: red !important; }
[data-theme="dark"] .video-item .video-info h4, [data-theme="dark"] .video-item .video-info a { color: #ffffff !important; }