/*
Theme Name: Sw Media - Nashwan News Edition
Theme URI: https://senanweb.com
Author: Sw Media Platform
Author URI: https://senanweb.com
Description: ثيم منصة خيام الإعلامية - نظام ألوان نشوان نيوز الاحترافي، متخصص في الإعلام الإنساني وقصص اللاجئين.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sw
Tags: rtl-language, arabic, news, magazine, blog, custom-colors, dark-mode
*/

/* ========================================
   1. CSS CUSTOM PROPERTIES (VARIABLES)
   - تم تحديث الألوان الافتراضية للأزرق الداكن
   - دعم كامل للوضع الداكن والفاتح
   ======================================== */
:root {
    /* ══════════════════════════════════════════
       Brand Colors - Nashwan News Palette
       ══════════════════════════════════════════ */
    --primary:           #1a5490;
    --primary-rgb:       26, 84, 144;
    --primary-dark:      #0f3a5f;
    --primary-light:     #2a7bc8;
    
    --accent:            #2a7bc8;
    --accent-rgb:        42, 123, 200;
    --accent-light:      #4a9be8;
    --accent-dark:       #1a5490;
    --accent-glow:       rgba(42, 123, 200, 0.25);
    
    --secondary:         #e63946;
    --secondary-rgb:     230, 57, 70;
    --secondary-dark:    #c42a35;

    /* ══════════════════════════════════════════
       Backgrounds - Dark Mode Defaults
       ══════════════════════════════════════════ */
    --bg:                #111827;
    --bg-rgb:            17, 24, 39;
    --bg2:               #1f2937;
    --bg3:               #374151;
    --card:              #1f2937;
    --card-rgb:          31, 41, 55;
    --surface:           #374151;

    /* ══════════════════════════════════════════
       Text Colors
       ══════════════════════════════════════════ */
    --text:              #f9fafb;
    --text-rgb:          249, 250, 251;
    --text-secondary:    #e5e7eb;
    --text-muted:        #9ca3af;

    /* ══════════════════════════════════════════
       UI & Borders
       ══════════════════════════════════════════ */
    --border:            #374151;
    --border-light:      #4b5563;
    --breaking:          #e63946;
    
    /* Semantic / Status Colors */
    --success:           #10b981;
    --warning:           #f59e0b;
    --info:              #3b82f6;

    /* ══════════════════════════════════════════
       Typography
       ══════════════════════════════════════════ */
    --font-arabic:  'Noto Kufi Arabic', 'Cairo', sans-serif;
    --font-latin:   'Space Grotesk', sans-serif;

    /* ══════════════════════════════════════════
       Spacing & Sizing
       ══════════════════════════════════════════ */
    --radius-sm:  6px;
    --radius:     8px;
    --radius-md:  10px;
    --radius-lg:  16px;
    --radius-xl:  24px;
    
    --header-height: 70px;
    --footer-padding: 60px;
    
    /* ══════════════════════════════════════════
       Effects
       ══════════════════════════════════════════ */
    --transition:        0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast:   0.15s ease;
    --shadow-sm:         0 1px 3px rgba(0,0,0,0.3);
    --shadow-md:         0 4px 12px rgba(0,0,0,0.25);
    --shadow-lg:         0 10px 25px rgba(0,0,0,0.3);
    --shadow-card:       0 8px 32px rgba(0,0,0,0.45);
    --shadow-glow:       0 0 30px var(--accent-glow);
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT MODE THEME
   يتم تفعيلها عبر data-theme="light" على الـ <html>
   ═══════════════════════════════════════════════════════════════ */
[data-theme="light"],
.theme-light {
    --primary:           #1a5490;
    --primary-rgb:       26, 84, 144;
    --accent:            #2a7bc8;
    --accent-rgb:        42, 123, 200;
    
    --bg:                #ffffff;
    --bg-rgb:            255, 255, 255;
    --bg2:               #f8f9fa;
    --bg3:               #f5f7f9;
    --card:              #ffffff;
    --card-rgb:          255, 255, 255;
    --surface:           #f5f7f9;

    --text:              #1f2937;
    --text-rgb:          31, 41, 55;
    --text-secondary:    #4b5563;
    --text-muted:        #6b7280;

    --border:            #e5e7eb;
    --border-light:      #d1d5db;
    
    --shadow-sm:         0 1px 3px rgba(0,0,0,0.1);
    --shadow-md:         0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg:         0 10px 25px rgba(0,0,0,0.1);
    --shadow-card:       0 8px 32px rgba(0,0,0,0.08);
}

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

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

body {
    font-family: var(--font-arabic);
    background: var(--bg);
    color: var(--text);
    line-height: 1.75;
    overflow-x: hidden;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.4s ease, color 0.4s ease;
}

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

/* Selection */
::selection {
    background: var(--accent);
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ========================================
   3. TYPOGRAPHY SCALE
   ======================================== */
h1, h2, h3, h4, h5, h6 { 
    color: var(--text); 
    font-weight: 800; 
    line-height: 1.3; 
    margin-bottom: 0.5em; 
}

h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; font-weight: 600; }

p { color: var(--text-secondary); margin-bottom: 1em; }

/* ========================================
   4. LAYOUT UTILITIES
   ======================================== */
.container { 
    max-width: 1280px; 
    margin: 0 auto; 
    padding: 0 1.25rem; 
}

.container--sm { max-width: 900px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.grid-main { display: grid; grid-template-columns: 1fr 340px; gap: 2.5rem; }

/* ========================================
   5. BACKGROUND PATTERN & TEXTURE
   ======================================== */
.site-bg-pattern {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    opacity: 0.02;
    background-image:
        linear-gradient(var(--accent) 1px, transparent 1px),
        linear-gradient(90deg, var(--accent) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ========================================
   6. BUTTONS & INTERACTIVE ELEMENTS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: var(--radius);
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-support {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(var(--secondary-rgb), 0.3);
}

.btn-support:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--secondary-rgb), 0.4);
}

/* Icon Button */
.nav-icon-btn {
    width: 40px; height: 40px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.nav-icon-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.1);
}
.nav-icon-btn svg { width: 18px; height: 18px; }

/* ========================================
   7. BREAKING NEWS TICKER
   ======================================== */
.breaking-ticker {
    background: var(--breaking);
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 100;
}
.breaking-ticker__inner { padding: 0.5rem 0; display: flex; align-items: center; }
.breaking-ticker__label {
    background: #fff;
    color: var(--breaking);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    flex-shrink: 0;
    margin-inline: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.breaking-ticker__track {
    display: inline-flex;
    animation: ticker-scroll 50s linear infinite;
}
.breaking-ticker__track:hover { animation-play-state: paused; }
.breaking-ticker__item {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 2.5rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
}
.breaking-ticker__item::before {
    content: '●';
    color: rgba(255,255,255,0.5);
    font-size: 0.5rem;
}
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ========================================
   8. HEADER & NAVIGATION
   ======================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(var(--bg-rgb), 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), border-color var(--transition);
}

.nav-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
    gap: 1rem;
    min-height: var(--header-height);
}

/* Logo */
.site-logo { 
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
    flex-shrink: 0;
}
.site-logo__img { 
    width: 44px; 
    height: 44px; 
    border-radius: 50%; 
    overflow: hidden; 
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.site-logo__img img { width: 100%; height: 100%; object-fit: cover; }
.site-logo__name { font-size: 1.25rem; font-weight: 800; color: var(--text); line-height: 1; }
.site-logo__sub { font-family: var(--font-latin); font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }

/* Nav Menu */
.nav-menu { display: flex; align-items: center; gap: 0.25rem; }
.nav-menu__link {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
}
.nav-menu__link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    right: 1rem; left: 1rem;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform var(--transition);
    border-radius: 99px;
}
.nav-menu__link:hover,
.nav-menu__link.active,
.current-menu-item .nav-menu__link {
    color: var(--text);
}
.nav-menu__link:hover::after,
.nav-menu__link.active::after,
.current-menu-item .nav-menu__link::after {
    transform: scaleX(1);
}

/* Nav Actions */
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

/* Theme Toggle */
.theme-toggle {
    width: 42px; height: 24px;
    background: var(--border);
    border-radius: 99px;
    position: relative;
    transition: background var(--transition);
    cursor: pointer;
    border: none;
}
.theme-toggle::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px; right: 3px;
    transition: right var(--transition), background var(--transition);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.theme-toggle.light { background: var(--accent); }
.theme-toggle.light::after { right: calc(100% - 21px); }

/* Secondary Nav / Filter Bar */
.nav-secondary {
    border-top: 1px solid var(--border);
    background: var(--bg2);
    overflow: hidden;
}
.nav-secondary__inner {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.nav-secondary__inner::-webkit-scrollbar { display: none; }

/* Filter Pills */
.filter-pill {
    padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
    flex-shrink: 0;
}
.filter-pill:hover,
.filter-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Mobile Menu */
.nav-toggle { display: none; }

@media (max-width: 1023px) {
    .nav-menu { display: none; }
    .nav-toggle { display: flex; }
    .nav-menu.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0; left: 0;
        background: var(--bg2);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        gap: 0.25rem;
        animation: slideDown 0.3s ease;
    }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   9. CATEGORY TAGS
   ======================================== */
.cat-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 4px;
    text-transform: uppercase;
    line-height: 1;
    transition: var(--transition);
}
.cat-tag--news     { background: rgba(var(--primary-rgb), 0.15); color: var(--primary-light); }
.cat-tag--report   { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.cat-tag--video    { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.cat-tag--opinion  { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.cat-tag--breaking { background: var(--breaking); color: #fff; animation: pulse-bg 2s infinite; }

@keyframes pulse-bg {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ========================================
   10. ARTICLE CARDS
   ======================================== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    position: relative;
}
.card::after {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition);
}
.card:hover {
    transform: translateY(-5px);
    border-color: var(--border-light);
    box-shadow: var(--shadow-card);
}
.card:hover::after { transform: scaleX(1); }

/* Card thumbnail */
.card__thumb {
    position: relative;
    overflow: hidden;
    background: var(--bg3);
}
.card__thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.65s ease;
}
.card:hover .card__thumb img { transform: scale(1.05); }
.card__thumb-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(var(--bg-rgb), 0.85) 0%, transparent 60%);
    pointer-events: none;
}
.card__thumb--h200 { height: 200px; }
.card__thumb--h180 { height: 180px; }

/* Card body */
.card__body { padding: 1.1rem; }
.card__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}
.card__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card__title a:hover { color: var(--accent); }
.card__excerpt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
    margin-top: 0.75rem;
}

/* Time Badge */
.time-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.time-badge svg { width: 13px; height: 13px; flex-shrink: 0; }

/* Author Mini */
.author-mini {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.author-mini__avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

/* ========================================
   11. FEATURED (HERO) CARD
   ======================================== */
.card--featured {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 460px;
}
.card--featured .card__thumb {
    height: 100%;
    min-height: 460px;
}
.card--featured .card__overlay-body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem 2.5rem;
    background: linear-gradient(to top, rgba(var(--bg-rgb), 0.95) 0%, transparent 70%);
}
.card--featured .card__title { font-size: clamp(1.3rem, 2.5vw, 2rem); -webkit-line-clamp: 3; }
.card--featured .card__excerpt { -webkit-line-clamp: 3; }

/* ========================================
   12. SECTION HEADER
   ======================================== */
.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.section-header__accent {
    width: 4px;
    height: 1.4rem;
    background: linear-gradient(180deg, var(--accent), var(--primary));
    border-radius: 99px;
    flex-shrink: 0;
}
.section-header__title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    flex: 1;
}
.section-header__more {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    display: flex; align-items: center; gap: 0.3rem;
    transition: gap var(--transition);
}
.section-header__more:hover { gap: 0.6rem; }

/* ========================================
   13. STATS BAR
   ======================================== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}
.stat-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1rem;
    text-align: center;
    transition: var(--transition);
}
.stat-item:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.stat-item__num {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.35rem;
    font-family: var(--font-latin);
}
.stat-item__label { font-size: 0.78rem; color: var(--text-secondary); }

/* ========================================
   14. SIDEBAR WIDGETS
   ======================================== */
.widget {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.35rem;
    margin-bottom: 1.5rem;
}
.widget__title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.widget__title svg { width: 18px; height: 18px; color: var(--accent); }

/* Trending */
.trending-item {
    display: flex;
    gap: 0.9rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}
.trending-item:last-child { border-bottom: none; }
.trending-item__num {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    font-family: var(--font-latin);
    min-width: 1.8rem;
}
.trending-item__title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Social Icons */
.social-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
}
.social-link {
    aspect-ratio: 1;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}
.social-link:hover {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
    transform: translateY(-2px);
}
.social-link svg { width: 18px; height: 18px; }

/* Newsletter */
.newsletter-form { display: flex; flex-direction: column; gap: 0.75rem; }
.newsletter-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.875rem;
    outline: none;
    transition: border-color var(--transition);
}
.newsletter-form input:focus { border-color: var(--accent); }

/* ========================================
   15. SINGLE POST
   ======================================== */
.post-hero { position: relative; }
.post-hero__img { height: 480px; }
.post-hero__img img { width: 100%; height: 100%; object-fit: cover; }
.post-hero__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(var(--bg-rgb), 0.98) 0%, rgba(var(--bg-rgb), 0.4) 60%, transparent 100%);
}
.post-hero__content {
    position: absolute; bottom: 0; right: 0; left: 0;
    padding: 2.5rem 2rem;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-secondary);
}
.post-content p { margin-bottom: 1.5rem; }
.post-content h2 { color: var(--text); margin: 2.5rem 0 1rem; font-size: 1.5rem; }
.post-content h3 { color: var(--text); margin: 2rem 0 0.75rem; font-size: 1.2rem; }
.post-content blockquote {
    border-right: 4px solid var(--accent);
    padding: 1.25rem 1.75rem;
    margin: 2rem 0;
    background: var(--bg2);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}
.post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-content img { border-radius: var(--radius-md); margin: 2rem 0; }

/* Post Tags */
.post-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.post-tag {
    padding: 0.35rem 0.75rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition);
}
.post-tag:hover { border-color: var(--accent); color: var(--accent); }

/* ========================================
   16. COMMENTS
   ======================================== */
.comment-list { margin-top: 2rem; }
.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
}
.comment-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--bg3);
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem; color: var(--accent);
    overflow: hidden;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-name { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.comment-date { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.comment-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }

/* Comment Form */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.form-label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.form-input, .form-textarea {
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition);
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); }
.form-textarea { min-height: 130px; resize: vertical; }

/* ========================================
   17. PAGINATION
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}
.page-btn {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}
.page-btn:hover, .page-btn.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ========================================
   18. SEARCH MODAL
   ======================================== */
.search-modal {
    position: fixed; inset: 0;
    background: rgba(var(--bg-rgb), 0.95);
    backdrop-filter: blur(12px);
    z-index: 500;
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 10vh;
    opacity: 0; pointer-events: none;
    transition: opacity var(--transition);
}
.search-modal.open { opacity: 1; pointer-events: all; }
.search-modal__inner { width: 100%; max-width: 700px; padding: 0 1.5rem; }
.search-modal__input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: var(--card);
    border: 2px solid var(--accent);
    border-radius: var(--radius-lg);
    color: var(--text);
    font-size: 1.1rem;
    outline: none;
}
.search-modal__close {
    position: absolute;
    top: 1.5rem; left: 1.5rem;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    border-radius: 50%;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.search-modal__close:hover { color: var(--accent); border-color: var(--accent); }

/* ========================================
   19. FOOTER
   ======================================== */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg2);
    margin-top: 4rem;
    transition: background var(--transition), border-color var(--transition);
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    padding: var(--footer-padding) 0;
}

.footer-brand__logo { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.footer-brand__logo-img { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; background: var(--accent); }
.footer-brand__logo-img img { width: 100%; height: 100%; object-fit: cover; }
.footer-brand__name { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.footer-brand__sub { font-family: var(--font-latin); font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }
.footer-brand__desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.8; max-width: 380px; }

.footer-col__title { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 1.1rem; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { font-size: 0.875rem; color: var(--text-secondary); transition: color var(--transition); display: inline-block; }
.footer-links a:hover { color: var(--accent); transform: translateX(-3px); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.footer-bottom__text { font-size: 0.78rem; color: var(--text-muted); }

/* ========================================
   20. SCROLL TO TOP
   ======================================== */
#scroll-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.4);
    opacity: 0; pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
    z-index: 300;
}
#scroll-top.visible { opacity: 1; pointer-events: all; }
#scroll-top:hover { transform: translateY(-3px); }
#scroll-top svg { width: 20px; height: 20px; }

/* ========================================
   21. ANIMATIONS & UTILITIES
   ======================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: none; }

.stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger.visible > *:nth-child(1) { transition-delay: 0.04s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.22s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.28s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.34s; }
.stagger.visible > * { opacity: 1; transform: none; }

/* ========================================
   22. RESPONSIVE BREAKPOINTS
   ======================================== */

/* ── 1200px ─────────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .container { max-width: 100%; }
}

/* ── 1024px ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .grid-main { grid-template-columns: 1fr !important; }
    .grid-main > aside { display: none; }
    .footer-main { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* ── 768px ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    
    .nav-menu { display: none; }
    .nav-toggle { display: flex; }
    .breaking-ticker { display: none; }
    
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
    .card--featured { grid-column: span 1; min-height: 300px; }
    .card--featured .card__thumb { min-height: 300px; }
    
    .footer-main { grid-template-columns: 1fr; }
    .footer-bottom { justify-content: center; text-align: center; }
    
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ── 480px ──────────────────────────────────────────────────── */
@media (max-width: 480px) {
    body { font-size: 15px; }
    
    .site-logo__sub { display: none; }
    
    .card__body { padding: 0.9rem; }
    .card__title { font-size: 0.95rem; }
    .card__excerpt { display: none; }
    
    .form-row { grid-template-columns: 1fr; }
    
    .post-hero__img { height: 260px; }
    .post-content { font-size: 1rem; }
}