/* ==============================================
   PORTAL BERITA - MODERN CSS 2026 v2
   ==============================================
   Improved: Better dark/light contrast
   Design: Refined glassmorphism + clean modern
   ==============================================
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ==============================================
   1. CSS VARIABLES
   ============================================== */
:root {
    /* Background System */
    --color-bg: #ffffff;
    --color-bg-elevated: #ffffff;
    --color-bg-soft: #f8fafc;
    --color-bg-muted: #f1f5f9;
    --color-bg-dark: #0f172a;        /* Always dark elements */
    --color-bg-dark-soft: #1e293b;

    /* Border System */
    --color-border: #e2e8f0;
    --color-border-strong: #cbd5e1;

    /* Text System */
    --color-text: #0f172a;
    --color-text-soft: #475569;
    --color-text-muted: #94a3b8;
    --color-text-on-dark: #ffffff;
    --color-text-on-dark-soft: rgba(255, 255, 255, 0.75);
    --color-text-on-dark-muted: rgba(255, 255, 255, 0.5);

    /* Primary - Can be overridden by admin theme setting */
    --color-primary: #dc2626;
    --color-primary-hover: #b91c1c;
    --color-primary-soft: #fef2f2;
    --color-primary-rgb: 220, 38, 38;

    /* Accent */
    --color-accent: #0891b2;
    --color-accent-soft: #ecfeff;

    /* Status Colors */
    --color-success: #059669;
    --color-success-soft: #d1fae5;
    --color-warning: #d97706;
    --color-warning-soft: #fef3c7;
    --color-error: #dc2626;
    --color-error-soft: #fee2e2;
    --color-info: #0284c7;
    --color-info-soft: #e0f2fe;

    /* Layout */
    --container-max: 1280px;
    --container-narrow: 760px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Typography */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Shadows - light mode */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-xl: 0 24px 56px rgba(15, 23, 42, 0.16);

    /* Transitions */
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-index scale */
    --z-ticker: 100;
    --z-header: 200;
    --z-navbar: 300;
    --z-sidebar: 400;
    --z-overlay: 900;
    --z-cookie: 950;
    --z-toast: 1000;
}

/* ==============================================
   DARK MODE - Improved Contrast
   ============================================== */
[data-theme="dark"] {
    --color-bg: #0c1322;
    --color-bg-elevated: #161f33;
    --color-bg-soft: #111a2c;
    --color-bg-muted: #1c2740;
    --color-bg-dark: #0a0f1e;
    --color-bg-dark-soft: #161f33;

    --color-border: #28344e;
    --color-border-strong: #3a4965;

    --color-text: #f1f5f9;
    --color-text-soft: #cbd5e1;
    --color-text-muted: #7d8aa3;
    --color-text-on-dark: #ffffff;
    --color-text-on-dark-soft: rgba(255, 255, 255, 0.8);
    --color-text-on-dark-muted: rgba(255, 255, 255, 0.55);

    --color-primary-soft: rgba(220, 38, 38, 0.15);
    --color-accent-soft: rgba(8, 145, 178, 0.15);

    --color-success-soft: rgba(5, 150, 105, 0.18);
    --color-warning-soft: rgba(217, 119, 6, 0.18);
    --color-error-soft: rgba(220, 38, 38, 0.18);
    --color-info-soft: rgba(2, 132, 199, 0.18);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 24px 56px rgba(0, 0, 0, 0.6);
}

/* ==============================================
   2. BASE STYLES
   ============================================== */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

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

.skip-link {
    position: absolute; top: -40px; left: 0;
    background: var(--color-primary); color: #fff;
    padding: 8px 16px; z-index: var(--z-toast);
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; }

/* ==============================================
   3. LAYOUT
   ============================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}
.main { min-height: 60vh; }

.layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    padding: 32px 0;
    align-items: start;
}
.layout--article { display: block; padding: 24px 0; }
.layout--narrow {
    display: block;
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 36px 0;
}
@media (max-width: 968px) {
    .layout { grid-template-columns: 1fr; gap: 24px; }
}

/* ==============================================
   4. TOPBAR - Always Dark (consistent)
   ============================================== */
.topbar {
    background: var(--color-bg-dark);
    color: var(--color-text-on-dark);
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.topbar__date {
    font-weight: 500;
    color: var(--color-text-on-dark-soft);
    display: flex;
    align-items: center;
    gap: 6px;
}
.topbar__links { display: flex; gap: 18px; }
.topbar__links a {
    color: var(--color-text-on-dark-soft);
    font-weight: 500;
}
.topbar__links a:hover { color: var(--color-text-on-dark); }

.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    width: 34px; height: 34px;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text-on-dark);
    transition: all var(--transition);
}
.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(15deg);
}
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

@media (max-width: 640px) {
    .topbar__date { display: none; }
    .topbar__links { gap: 12px; }
}

/* ==============================================
   5. HEADER - Improved
   ============================================== */
.header {
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background-color: color-mix(in srgb, var(--color-bg-elevated) 92%, transparent);
}
@supports not (backdrop-filter: blur(16px)) {
    .header { background-color: var(--color-bg-elevated); }
}

.header__inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.logo__icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 60%, #ea580c));
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.35);
    overflow: hidden;
}
.logo__icon svg { width: 28px; height: 28px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.logo__text strong {
    font-size: 22px;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.02em;
}
.logo__text small {
    font-size: 11px;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.search-box {
    flex: 1;
    max-width: 480px;
    margin-left: auto;
    display: flex;
    align-items: center;
    background: var(--color-bg-muted);
    border-radius: var(--radius-full);
    padding: 4px 4px 4px 18px;
    border: 2px solid transparent;
    transition: all var(--transition);
}
.search-box:focus-within {
    border-color: var(--color-primary);
    background: var(--color-bg-elevated);
    box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.12);
}
.search-box input {
    flex: 1;
    border: none;
    background: none;
    padding: 10px 0;
    color: var(--color-text);
    outline: none;
    font-size: 14px;
}
.search-box input::placeholder { color: var(--color-text-muted); }
.search-box button {
    background: var(--color-primary);
    color: #fff;
    width: 38px; height: 38px;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}
.search-box button:hover {
    background: var(--color-primary-hover);
    transform: scale(1.05);
}

.search-box--lg {
    max-width: 100%;
    padding: 6px 6px 6px 20px;
    margin-bottom: 16px;
}
.search-box--lg input { font-size: 16px; padding: 14px 0; }
.search-box--lg button { width: 52px; height: 52px; }

.menu-toggle {
    display: none;
    width: 42px; height: 42px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.menu-toggle:hover { background: var(--color-bg-muted); }
.menu-toggle span {
    display: block;
    height: 2.5px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition);
}
.menu-toggle.is-active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .search-box { max-width: none; }
    .logo__text small { display: none; }
    .logo__icon { width: 40px; height: 40px; }
    .logo__text strong { font-size: 18px; }
}

/* ==============================================
   6. NAVBAR
   ============================================== */
.navbar {
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 78px;
    z-index: var(--z-navbar);
    box-shadow: var(--shadow-sm);
    transition: top 0.3s ease;
}

.navbar__menu {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 10px 0;
}
.navbar__menu::-webkit-scrollbar { display: none; }

.navbar__menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    transition: all var(--transition);
    color: var(--color-text-soft);
}
.navbar__menu a:hover {
    background: var(--color-bg-muted);
    color: var(--color-primary);
}
.navbar__menu a.active {
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary);
}

.cat-dot {
    width: 8px; height: 8px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .navbar { top: 70px; }
    .navbar__menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--color-bg-elevated);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        transform: translateX(-100%);
        transition: transform var(--transition);
        z-index: var(--z-sidebar);
        box-shadow: var(--shadow-xl);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    .navbar__menu.is-open { transform: translateX(0); }
    .navbar__menu a { padding: 14px 18px; font-size: 15px; }
}

/* ==============================================
   7. BREAKING NEWS TICKER
   ============================================== */
.ticker {
    background: linear-gradient(90deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 70%, #000));
    color: #fff;
    overflow: hidden;
    padding: 10px 0;
    position: relative;
}
.ticker__inner {
    display: flex;
    align-items: center;
    gap: 16px;
}
.ticker__label {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}
.pulse-dot {
    width: 8px; height: 8px;
    background: #fff;
    border-radius: var(--radius-full);
    animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
    50% { transform: scale(1.3); opacity: 0.7; box-shadow: 0 0 0 6px rgba(255,255,255,0); }
}

.ticker__content {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.ticker__content::before,
.ticker__content::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 30px;
    z-index: 2;
    pointer-events: none;
}
.ticker__content::before {
    left: 0;
    background: linear-gradient(90deg, var(--color-primary), transparent);
}
.ticker__content::after {
    right: 0;
    background: linear-gradient(-90deg, color-mix(in srgb, var(--color-primary) 70%, #000), transparent);
}

.ticker__track {
    display: flex;
    gap: 40px;
    white-space: nowrap;
    animation: tickerScroll 40s linear infinite;
    width: max-content;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.95;
    display: inline-flex;
    align-items: center;
}
.ticker__item:hover { opacity: 1; text-decoration: underline; }
.ticker__item::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    margin-right: 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
}

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

@media (max-width: 640px) {
    .ticker__label { font-size: 10px; padding: 4px 10px; }
    .ticker__item { font-size: 13px; }
}

/* ==============================================
   8. HERO SLIDER
   ============================================== */
.hero-slider {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-soft);
    margin-bottom: 36px;
    aspect-ratio: 16 / 7;
    box-shadow: var(--shadow-lg);
}
.hero-slider__track {
    position: relative;
    width: 100%;
    height: 100%;
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
}
.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}
.hero-slide__link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}
.hero-slide__image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-bg-muted), var(--color-bg-soft));
}
.hero-slide__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 8s ease;
}
.hero-slide.is-active .hero-slide__image img { transform: scale(1.15); }
.hero-slide__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 30%, rgba(0,0,0,0.85) 100%);
}
.hero-slide__content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 36px;
    color: #fff;
    z-index: 2;
}
.hero-slide__title {
    font-size: clamp(22px, 3.2vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    margin: 12px 0 10px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    max-width: 720px;
    letter-spacing: -0.02em;
}
.hero-slide__excerpt {
    font-size: 14px;
    opacity: 0.95;
    max-width: 600px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-slide__meta {
    display: flex;
    gap: 18px;
    margin-top: 14px;
    font-size: 13px;
    opacity: 0.9;
}

.hero-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px; height: 46px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    z-index: 3;
    transition: all var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.hero-slider__nav:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.05);
}
.hero-slider__nav--prev { left: 18px; }
.hero-slider__nav--next { right: 18px; }

.hero-slider__dots {
    position: absolute;
    bottom: 18px;
    right: 28px;
    display: flex;
    gap: 8px;
    z-index: 3;
}
.hero-slider__dot {
    width: 8px; height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-full);
    transition: all var(--transition);
    border: none;
}
.hero-slider__dot.is-active {
    background: #fff;
    width: 26px;
}

@media (max-width: 768px) {
    .hero-slider { aspect-ratio: 4 / 3; }
    .hero-slide__content { padding: 22px; }
    .hero-slider__nav { width: 38px; height: 38px; }
    .hero-slider__dots { display: none; }
}

/* ==============================================
   9. SECTION HEADER
   ============================================== */
.section { margin-bottom: 44px; }

.section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.section__title {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 24px;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.01em;
}
.section__title-bar {
    display: inline-block;
    width: 5px;
    height: 26px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-primary-hover));
    border-radius: 3px;
}

.section__more {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap var(--transition);
}
.section__more:hover { gap: 8px; }

/* ==============================================
   10. POST CARD GRID - Refined
   ============================================== */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.post-grid--sm {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.post-card {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    position: relative;
}
.post-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.post-card__image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-bg-muted);
}
.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.post-card:hover .post-card__image img { transform: scale(1.08); }

.post-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.2));
    opacity: 0;
    transition: opacity var(--transition);
}
.post-card:hover .post-card__image::after { opacity: 1; }

.post-card__body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.post-card__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--color-text);
    letter-spacing: -0.01em;
}
.post-card__title a:hover { color: var(--color-primary); }

.post-card__excerpt {
    font-size: 13px;
    color: var(--color-text-soft);
    margin-bottom: 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.post-card--sm .post-card__title { font-size: 15px; }
.post-card--sm .post-card__body { padding: 14px; }

/* ==============================================
   11. CATEGORY BADGE
   ============================================== */
.cat-badge {
    display: inline-flex;
    align-items: center;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.4;
}
.cat-badge--xs { font-size: 10px; padding: 3px 8px; }
.cat-badge--lg { font-size: 13px; padding: 6px 14px; }

.post-card__image .cat-badge {
    position: absolute;
    top: 12px; left: 12px;
    z-index: 2;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ==============================================
   12. SIDEBAR WIDGETS
   ============================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.widget {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 22px;
    transition: border-color var(--transition);
}
.widget:hover { border-color: var(--color-border-strong); }
.widget--sticky { position: sticky; top: 160px; }

.widget__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--color-text);
    padding-bottom: 14px;
    border-bottom: 2px solid var(--color-border);
}
.widget__title svg { color: var(--color-primary); }

/* Popular List */
.popular-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
}
.popular-item:last-child { border: none; padding-bottom: 0; }
.popular-item:first-child { padding-top: 0; }
.popular-item__num {
    flex-shrink: 0;
    width: 30px; height: 30px;
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 14px;
}
.popular-item__link {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.popular-item__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.35;
}
.popular-item__link:hover .popular-item__title { color: var(--color-primary); }
.popular-item__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--color-text-muted);
}

/* Category List */
.category-list li { padding: 6px 0; }
.category-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--color-text-soft);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
}
.category-list a:hover {
    background: var(--color-bg-muted);
    color: var(--color-text);
    transform: translateX(4px);
}
.category-list__count {
    margin-left: auto;
    background: var(--color-bg-muted);
    color: var(--color-text-muted);
    font-size: 11px;
    padding: 2px 9px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

/* Follow Social */
.follow-social {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.follow-social a {
    width: 42px; height: 42px;
    background: var(--color-bg-muted);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text-soft);
    transition: all var(--transition);
}
.follow-social a:hover {
    background: var(--brand, var(--color-primary));
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

/* ==============================================
   13. AD CONTAINERS
   ============================================== */
.ad-container {
    text-align: center;
    margin: 24px 0;
    padding: 16px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}
.ad-header, .ad-footer { margin: 20px 0; }
.ad-inarticle { margin: 36px 0; }
.widget--ad {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ad-label {
    display: block;
    font-size: 10px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    font-weight: 700;
}
.ad-placeholder {
    background: repeating-linear-gradient(
        45deg,
        var(--color-bg-muted),
        var(--color-bg-muted) 10px,
        var(--color-bg-soft) 10px,
        var(--color-bg-soft) 20px
    );
    border: 2px dashed var(--color-border-strong);
    border-radius: var(--radius-md);
}
.ad-placeholder-text {
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 600;
}

/* ==============================================
   14. ARTICLE PAGE
   ============================================== */
.article {
    max-width: 800px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 28px;
    padding: 10px 16px;
    background: var(--color-bg-soft);
    border-radius: var(--radius-sm);
}
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb__sep { opacity: 0.5; }
.breadcrumb__current { color: var(--color-text-soft); font-weight: 600; }

.article__header { margin-bottom: 28px; }
.article__title {
    font-size: clamp(28px, 4.5vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    margin: 16px 0 24px;
    color: var(--color-text);
    letter-spacing: -0.025em;
}

.article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}
.article__author {
    display: flex;
    align-items: center;
    gap: 12px;
}
.article__avatar {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #fff;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 18px;
}
.article__author span { font-weight: 600; display: block; color: var(--color-text); }
.article__author small { color: var(--color-text-muted); font-size: 12px; }
.article__stats {
    display: flex;
    gap: 18px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.article__featured {
    margin: 28px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.article__featured img { width: 100%; }

.article__excerpt {
    font-size: 19px;
    line-height: 1.6;
    color: var(--color-text-soft);
    font-weight: 500;
    padding: 20px 24px;
    background: rgba(var(--color-primary-rgb), 0.06);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-sm);
    margin-bottom: 32px;
}

.article__content {
    font-size: 17px;
    line-height: 1.85;
    color: var(--color-text);
}
.article__content p { margin-bottom: 20px; }
.article__content h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 40px 0 18px;
    color: var(--color-text);
    letter-spacing: -0.02em;
}
.article__content h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 30px 0 14px;
}
.article__content ul, .article__content ol {
    margin: 18px 0;
    padding-left: 26px;
}
.article__content li { margin-bottom: 10px; }
.article__content ul { list-style: disc; }
.article__content ol { list-style: decimal; }
.article__content a { color: var(--color-primary); text-decoration: underline; font-weight: 500; }
.article__content img { border-radius: var(--radius-md); margin: 24px 0; }
.article__content blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 18px 24px;
    margin: 24px 0;
    background: var(--color-bg-soft);
    font-style: italic;
    color: var(--color-text-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article__content pre {
    background: var(--color-bg-dark);
    color: #e2e8f0;
    padding: 22px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 22px 0;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
}
.article__content code {
    background: var(--color-bg-muted);
    padding: 2px 7px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--color-text);
}
.article__content pre code { background: none; padding: 0; color: inherit; }

.article__footer {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--color-border);
}

.article__share {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.article__share-label {
    font-weight: 700;
    color: var(--color-text-soft);
    margin-right: 6px;
}
.share-btn {
    width: 42px; height: 42px;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    transition: all var(--transition);
}
.share-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(0,0,0,0.2); }
.share-btn--facebook { background: #1877f2; }
.share-btn--twitter { background: #1da1f2; }
.share-btn--whatsapp { background: #25d366; }
.share-btn--copy { background: var(--color-text-soft); }
.share-btn--copy.copied { background: var(--color-success); }

.related { margin-top: 52px; }

/* ==============================================
   15. PAGINATION
   ============================================== */
.pagination {
    margin-top: 36px;
    display: flex;
    justify-content: center;
}
.pagination ul {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text-soft);
    transition: all var(--transition);
}
.pagination li a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.05);
}
.pagination li.active span {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.pagination li.disabled span { opacity: 0.4; cursor: not-allowed; }
.pagination li.ellipsis span { background: none; border: none; }

/* ==============================================
   16. PAGE HEADER
   ============================================== */
.page-header {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08), transparent);
    padding: 32px;
    border-radius: var(--radius-lg);
    border-left: 6px solid var(--cat-color, var(--color-primary));
    margin-bottom: 36px;
}
.page-header__icon span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px; height: 68px;
    color: #fff;
    border-radius: var(--radius-md);
    font-size: 30px;
    font-weight: 800;
    box-shadow: var(--shadow-md);
}
.page-header__title { font-size: 32px; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.02em; }
.page-header__desc { color: var(--color-text-soft); margin-bottom: 6px; }
.page-header__count {
    display: inline-block;
    background: var(--color-bg-elevated);
    padding: 3px 11px;
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--color-text-soft);
    font-weight: 700;
}

.page-title {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

/* ==============================================
   17. SEARCH SECTION
   ============================================== */
.search-section { margin-bottom: 36px; }
.search-section__result {
    color: var(--color-text-soft);
    font-size: 15px;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.post-list__item {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}
.post-list__item:hover {
    box-shadow: var(--shadow-md);
    border-color: transparent;
    transform: translateY(-2px);
}
.post-list__image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-bg-muted);
}
.post-list__image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.post-list__item:hover .post-list__image img { transform: scale(1.08); }
.post-list__body { padding: 18px 22px 18px 0; }
.post-list__title {
    font-size: 19px;
    font-weight: 700;
    margin: 8px 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.post-list__excerpt {
    color: var(--color-text-soft);
    font-size: 14px;
    margin-bottom: 12px;
}
.post-list__meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--color-text-muted);
}

@media (max-width: 640px) {
    .post-list__item { grid-template-columns: 120px 1fr; gap: 14px; }
    .post-list__body { padding: 12px 14px 12px 0; }
    .post-list__title { font-size: 15px; }
    .post-list__excerpt { display: none; }
}

/* ==============================================
   18. STATIC PAGE
   ============================================== */
.static-page {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-lg);
    padding: 44px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}
.static-page__header {
    text-align: center;
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 2px solid var(--color-border);
}
.static-page__title {
    font-size: 36px;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.025em;
}
.static-page__subtitle {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-top: 10px;
}
.static-page__content {
    font-size: 16px;
    line-height: 1.85;
    color: var(--color-text);
}
.static-page__content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 36px 0 14px;
    color: var(--color-text);
    letter-spacing: -0.01em;
}
.static-page__content h3 {
    font-size: 19px;
    font-weight: 700;
    margin: 26px 0 10px;
}
.static-page__content p { margin-bottom: 16px; color: var(--color-text-soft); }
.static-page__content ul, .static-page__content ol {
    margin: 14px 0;
    padding-left: 26px;
    color: var(--color-text-soft);
}
.static-page__content li { margin-bottom: 8px; }
.static-page__content ul { list-style: disc; }
.static-page__content ol { list-style: decimal; }
.static-page__content a { color: var(--color-primary); text-decoration: underline; font-weight: 500; }
.static-page__content code {
    background: var(--color-bg-muted);
    padding: 2px 7px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--color-text);
}
.static-page__content strong { font-weight: 700; color: var(--color-text); }

@media (max-width: 640px) {
    .static-page { padding: 28px 22px; }
    .static-page__title { font-size: 26px; }
}

/* ==============================================
   19. CONTACT PAGE
   ============================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 36px;
}
.contact-info h3,
.contact-form h3 { font-size: 19px; margin-bottom: 22px; }

.contact-info__list li {
    display: flex;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid var(--color-border);
}
.contact-info__icon {
    width: 44px; height: 44px;
    background: rgba(var(--color-primary-rgb), 0.12);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.contact-info__list strong { display: block; font-size: 14px; margin-bottom: 3px; color: var(--color-text); }
.contact-info__list a, .contact-info__list span {
    color: var(--color-text-soft);
    font-size: 14px;
    word-break: break-word;
}
.contact-info__list a:hover { color: var(--color-primary); }

@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* ==============================================
   20. FORMS
   ============================================== */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    transition: all var(--transition);
    font-size: 14px;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.12);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-hint { font-size: 12px; color: var(--color-text-muted); margin-top: 6px; }
.form-input--lg { font-size: 18px !important; padding: 14px 18px !important; }

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500 !important;
}
.checkbox-label input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ==============================================
   21. BUTTONS
   ============================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
}
.btn:hover {
    background: var(--color-primary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(var(--color-primary-rgb), 0.3);
}
.btn-primary { background: var(--color-primary); }
.btn-outline {
    background: transparent;
    border-color: var(--color-border-strong);
    color: var(--color-text);
}
.btn-outline:hover {
    background: var(--color-bg-muted);
    color: var(--color-text);
    box-shadow: none;
}
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 16px; }

/* ==============================================
   22. ALERTS
   ============================================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid transparent;
}
.alert-success { background: var(--color-success-soft); color: var(--color-success); border-color: rgba(5, 150, 105, 0.3); }
.alert-error { background: var(--color-error-soft); color: var(--color-error); border-color: rgba(220, 38, 38, 0.3); }
.alert-warning { background: var(--color-warning-soft); color: var(--color-warning); border-color: rgba(217, 119, 6, 0.3); }
.alert-info { background: var(--color-info-soft); color: var(--color-info); border-color: rgba(2, 132, 199, 0.3); }
[data-theme="dark"] .alert-success { color: #6ee7b7; }
[data-theme="dark"] .alert-error { color: #fca5a5; }
[data-theme="dark"] .alert-warning { color: #fcd34d; }
[data-theme="dark"] .alert-info { color: #7dd3fc; }

/* ==============================================
   23. NEWSLETTER
   ============================================== */
.newsletter {
    background: linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 50%, #000));
    color: #fff;
    padding: 52px 0;
    margin-top: 44px;
    position: relative;
    overflow: hidden;
}
.newsletter::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
}
.newsletter__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.newsletter__text h2 { font-size: 28px; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.02em; }
.newsletter__text p { opacity: 0.9; }
.newsletter__form {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 6px;
    border-radius: var(--radius-full);
    min-width: 360px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.newsletter__form input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 12px 18px;
    outline: none;
    font-size: 14px;
}
.newsletter__form input::placeholder { color: rgba(255, 255, 255, 0.7); }
.newsletter__form button {
    background: #fff;
    color: var(--color-primary);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 700;
    transition: all var(--transition);
    font-size: 14px;
}
.newsletter__form button:hover { transform: scale(1.03); }

@media (max-width: 640px) {
    .newsletter__form { min-width: 100%; }
}

/* ==============================================
   24. FOOTER - Always Dark
   ============================================== */
.footer {
    background: var(--color-bg-dark);
    color: var(--color-text-on-dark-soft);
    padding: 60px 0 0;
    margin-top: auto;
}
.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 36px;
    padding-bottom: 44px;
}
.footer__logo {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}
.footer__logo .logo__icon { width: 40px; height: 40px; border-radius: 10px; }
.footer__about p { color: var(--color-text-on-dark-soft); font-size: 14px; margin-bottom: 18px; line-height: 1.7; }
.footer__social { display: flex; gap: 10px; }
.footer__social a {
    width: 38px; height: 38px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
    color: var(--color-text-on-dark-soft);
}
.footer__social a:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-3px);
}

.footer__col h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #fff;
    letter-spacing: 0.01em;
}
.footer__links li,
.footer__contact li {
    padding: 7px 0;
    color: var(--color-text-on-dark-soft);
    font-size: 14px;
}
.footer__links a:hover { color: #fff; }
.footer__contact li {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer__contact a:hover { color: #fff; }
.footer__contact svg { color: var(--color-text-on-dark-muted); flex-shrink: 0; }

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 22px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-on-dark-muted);
}
.footer__credit a { color: var(--color-primary); }

@media (max-width: 768px) {
    .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .footer__grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ==============================================
   25. BACK TO TOP
   ============================================== */
.back-to-top {
    position: fixed;
    bottom: 26px;
    right: 26px;
    width: 48px; height: 48px;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: var(--z-toast);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
}
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--color-primary-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* ==============================================
   26. ERROR 404
   ============================================== */
.error-404 {
    text-align: center;
    padding: 80px 20px;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.error-404__code {
    font-size: clamp(80px, 15vw, 180px);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 20px;
    letter-spacing: -0.04em;
}
.error-404__title {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}
.error-404__desc {
    color: var(--color-text-soft);
    max-width: 500px;
    margin: 0 auto 30px;
}
.error-404__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.error-404__suggested { margin-top: 60px; max-width: 800px; }
.error-404__suggested h3 { font-size: 18px; margin-bottom: 22px; }

/* ==============================================
   27. EMPTY STATE
   ============================================== */
.empty-state {
    text-align: center;
    padding: 70px 20px;
}
.empty-state__icon { font-size: 64px; margin-bottom: 18px; }
.empty-state h3 { font-size: 24px; margin-bottom: 10px; }
.empty-state p { color: var(--color-text-soft); margin-bottom: 22px; }

/* ==============================================
   28. COOKIE CONSENT
   ============================================== */
.cookie-consent {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    max-width: 820px;
    margin: 0 auto;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-cookie);
    padding: 22px;
    transform: translateY(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cookie-consent--show {
    transform: translateY(0);
    opacity: 1;
}
.cookie-consent__content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.cookie-consent__text { flex: 1; min-width: 240px; }
.cookie-consent__text strong { display: block; margin-bottom: 6px; color: var(--color-text); }
.cookie-consent__text p { font-size: 13px; color: var(--color-text-soft); }
.cookie-consent__text a { color: var(--color-primary); text-decoration: underline; }
.cookie-consent__actions { display: flex; gap: 8px; }
.btn-cookie {
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    transition: all var(--transition);
}
.btn-cookie--accept { background: var(--color-primary); color: #fff; }
.btn-cookie--accept:hover { background: var(--color-primary-hover); }
.btn-cookie--reject {
    background: var(--color-bg-muted);
    color: var(--color-text-soft);
}
.btn-cookie--reject:hover { background: var(--color-border); }

@media (max-width: 640px) {
    .cookie-consent__content { flex-direction: column; align-items: stretch; }
    .cookie-consent__actions { flex-direction: column-reverse; }
}

/* ==============================================
   29. ANIMATIONS & UTILITIES
   ============================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.5s ease both; }

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg-soft); }
::-webkit-scrollbar-thumb {
    background: var(--color-border-strong);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

::selection { background: var(--color-primary); color: #fff; }

.loading-text {
    display: inline-block;
    position: relative;
}
.loading-text::after {
    content: '...';
    animation: dots 1.4s steps(4, end) infinite;
    display: inline-block;
    width: 16px;
    text-align: left;
}
@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* ==============================================
   30. RESPONSIVE
   ============================================== */
@media (max-width: 1024px) {
    .sidebar { position: static; }
    .widget--sticky { position: static; }
}

@media (max-width: 768px) {
    .layout { padding: 18px 0; }
    .section { margin-bottom: 30px; }
    .section__title { font-size: 19px; }
    .post-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .hero-slider { margin-bottom: 24px; }
}

@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .post-grid { grid-template-columns: 1fr; }
    .article__content { font-size: 16px; }
    .article__title { font-size: 26px; }
    .article__meta { flex-direction: column; align-items: flex-start; }
    .page-header { padding: 22px; gap: 16px; }
    .page-header__icon span { width: 56px; height: 56px; font-size: 24px; }
    .page-header__title { font-size: 24px; }
}
