/*
Theme Name: NewMindPress V2 - Ultimate
Theme URI: https://newmindpress.com
Author: NewMindPress Team
Author URI: https://newmindpress.com
Description: A premium WordPress theme with modern card-based design, smooth animations, user bookmarks, quote saving, reading lists, and author profiles. Designed for maximum user engagement.
Version: 2.0.0
License: GPL v2 or later
Text Domain: newmindpress-v2
Tags: rtl-language-support, custom-colors, custom-logo, featured-images, threaded-comments
*/

/* ========================================
   NEWMINDPRESS V2 - ULTIMATE THEME
   Premium Design System
   ======================================== */

/* ========================================
   CSS VARIABLES - Design Tokens
   ======================================== */
:root {
    /* Primary Palette */
    --primary: #e63946;
    --primary-dark: #c62828;
    --primary-light: #ff6b6b;
    --primary-rgb: 230, 57, 70;
    --secondary: #1d3557;
    --secondary-rgb: 29, 53, 87;
    --accent: #457b9d;
    --accent-light: #a8dadc;

    /* Text Colors */
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8a8a9a;
    --text-inverse: #ffffff;

    /* Background Colors */
    --bg-white: #ffffff;
    --bg-cream: #faf9f7;
    --bg-light: #f5f3f0;
    --bg-dark: #1a1a2e;

    /* Border */
    --border: #e8e5e1;
    --border-light: #f0eeeb;

    /* Shadows */
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --shadow-glow: 0 0 30px rgba(230, 57, 70, 0.15);

    /* Radius */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Typography */
    --font-main: 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Noto Sans Arabic', Georgia, serif;

    /* Spacing */
    --section-gap: 80px;
    --container-padding: 24px;

    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-overlay: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-toast: 700;
    --z-preloader: 9999;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
    background-color: var(--bg-cream);
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.625rem); }
h4 { font-size: clamp(1.125rem, 2vw, 1.375rem); }

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

a:hover {
    color: var(--primary-dark);
}

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

::selection {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary-dark);
}

/* ========================================
   CONTAINER
   ======================================== */
.container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

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

/* ========================================
   PRELOADER
   ======================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-white);
    z-index: var(--z-preloader);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

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

.preloader-bar {
    width: 200px;
    height: 3px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.preloader-bar::after {
    content: '';
    display: block;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-full);
    animation: preloaderSlide 1.2s ease-in-out infinite;
}

@keyframes preloaderSlide {
    0% { transform: translateX(250%); }
    100% { transform: translateX(-100%); }
}

/* ========================================
   READING PROGRESS
   ======================================== */
.reading-progress-container {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: transparent;
    z-index: calc(var(--z-sticky) + 10);
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--accent));
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 0 0 0 2px;
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.4);
}

/* ========================================
   HEADER - Glass Morphism
   ======================================== */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    border-bottom: 1px solid rgba(var(--secondary-rgb), 0.06);
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.95);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 24px;
}

/* Logo */
.site-branding {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.site-logo {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.site-logo:hover {
    opacity: 0.85;
}

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

/* Navigation */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 4px;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 10px 18px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 18px;
    left: 18px;
    height: 2px;
    background: var(--primary);
    border-radius: var(--radius-full);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: right;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a,
.main-navigation .current_page_item a {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.06);
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item a::after,
.main-navigation .current_page_item a::after {
    transform: scaleX(1);
}

/* Sub-menus */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    flex-direction: column;
    z-index: var(--z-dropdown);
    border: 1px solid var(--border-light);
}

.main-navigation li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation ul ul a {
    padding: 10px 16px;
    font-size: 0.875rem;
}

.main-navigation ul ul a::after {
    display: none;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.header-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
    transform: translateY(-1px);
}

.header-btn .badge {
    position: absolute;
    top: 2px;
    left: 2px;
    background: var(--primary);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    animation: badgePop 0.3s ease;
}

@keyframes badgePop {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* User Avatar */
.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.user-avatar:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none !important;
}

/* ========================================
   MOBILE NAVIGATION - Slide-in
   ======================================== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-overlay);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    background: var(--bg-white);
    z-index: var(--z-modal);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.mobile-menu-close:hover {
    background: var(--primary);
    color: white;
}

.mobile-menu-nav {
    padding: 16px;
}

.mobile-menu-nav ul {
    list-style: none;
}

.mobile-menu-nav li {
    border-bottom: 1px solid var(--border-light);
}

.mobile-menu-nav a {
    display: block;
    padding: 14px 16px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mobile-menu-nav a:hover,
.mobile-menu-nav .current-menu-item a {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.06);
    padding-right: 24px;
}

.mobile-menu-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.mobile-menu-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ========================================
   SEARCH OVERLAY
   ======================================== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    z-index: var(--z-modal);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 15vh 20px 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-slow);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-inner {
    width: 100%;
    max-width: 700px;
    transform: translateY(30px);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-overlay.active .search-overlay-inner {
    transform: translateY(0);
}

.search-close {
    position: absolute;
    top: 30px;
    left: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-close:hover {
    background: var(--primary);
    transform: rotate(90deg);
}

.search-form-large {
    position: relative;
}

.search-form-large input {
    width: 100%;
    padding: 22px 30px;
    font-size: 1.375rem;
    border: none;
    border-radius: var(--radius-lg);
    background: #fff;
    font-family: inherit;
    color: var(--text-primary);
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
}

.search-form-large input:focus {
    outline: none;
    box-shadow: var(--shadow-xl), 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

.search-form-large input::placeholder {
    color: var(--text-muted);
}

.search-hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    margin-top: 16px;
}

.search-hint kbd {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.75rem;
}

/* ========================================
   BOOKMARKS DRAWER
   ======================================== */
.bookmarks-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 420px;
    max-width: 90vw;
    background: var(--bg-white);
    z-index: var(--z-modal);
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bookmarks-drawer.active {
    transform: translateX(0);
}

.bookmarks-drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg-white);
    z-index: 1;
}

.bookmarks-drawer-header h3 {
    margin: 0;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bookmarks-drawer-close {
    width: 36px;
    height: 36px;
    background: var(--bg-light);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.bookmarks-drawer-close:hover {
    background: var(--primary);
    color: white;
}

.bookmarks-list {
    padding: 16px 24px;
}

.bookmark-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.bookmark-item:last-child {
    border-bottom: none;
}

.bookmark-item:hover {
    padding-right: 8px;
}

.bookmark-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.bookmark-item-content h4 {
    font-size: 0.9375rem;
    margin-bottom: 8px;
    line-height: 1.5;
}

.bookmark-item-content h4 a {
    color: var(--text-primary);
}

.bookmark-item-content h4 a:hover {
    color: var(--primary);
}

.remove-bookmark {
    font-size: 0.75rem;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 0;
    transition: var(--transition);
}

.remove-bookmark:hover {
    text-decoration: underline;
}

.bookmarks-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 20px;
}

.bookmarks-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.bookmarks-login-btn {
    display: block;
    text-align: center;
    padding: 14px 24px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-top: 16px;
    transition: var(--transition);
}

.bookmarks-login-btn:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
}

/* Drawer Backdrop */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-overlay);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.drawer-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   TRENDING TICKER
   ======================================== */
.trending-ticker {
    background: var(--secondary);
    color: white;
    overflow: hidden;
    position: relative;
}

.trending-ticker-inner {
    display: flex;
    align-items: center;
    padding: 10px 0;
    gap: 16px;
}

.trending-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.trending-label .pulse-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.trending-scroll {
    overflow: hidden;
    flex: 1;
    mask-image: linear-gradient(to left, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to left, transparent, black 5%, black 95%, transparent);
}

.trending-track {
    display: flex;
    gap: 40px;
    animation: tickerScroll 30s linear infinite;
    width: max-content;
}

.trending-track:hover {
    animation-play-state: paused;
}

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

.trending-item {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    font-size: 0.875rem;
}

.trending-item a {
    color: rgba(255, 255, 255, 0.9);
    transition: var(--transition);
}

.trending-item a:hover {
    color: var(--primary-light);
}

.trending-separator {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.5rem;
}

/* ========================================
   HERO SECTION - Featured Articles
   ======================================== */
.hero-section {
    padding: 40px 0 20px;
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-cream) 100%);
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.hero-main {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    min-height: 420px;
}

.hero-main a {
    display: block;
    height: 100%;
}

.hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-main:hover img {
    transform: scale(1.04);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 36px 36px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.9));
    color: white;
}

.hero-category {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: clamp(1.5rem, 3vw, 2.125rem);
    color: white;
    margin-bottom: 14px;
    line-height: 1.35;
    font-weight: 700;
}

.hero-meta {
    display: flex;
    gap: 20px;
    font-size: 0.8125rem;
    opacity: 0.75;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Hero Side Articles */
.hero-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-side-item {
    display: flex;
    gap: 16px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    flex: 1;
    border: 1px solid var(--border-light);
}

.hero-side-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(-4px);
    border-color: rgba(var(--primary-rgb), 0.15);
}

.hero-side-image {
    width: 140px;
    min-width: 140px;
    height: 100%;
}

.hero-side-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-side-item:hover .hero-side-image img {
    transform: scale(1.05);
}

.hero-side-content {
    padding: 16px 16px 16px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-side-category {
    font-size: 0.6875rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.hero-side-title {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.hero-side-title a {
    color: inherit;
    transition: var(--transition);
}

.hero-side-title a:hover {
    color: var(--primary);
}

.hero-side-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    display: flex;
    gap: 12px;
}

/* ========================================
   SECTION HEADERS
   ======================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -18px;
    right: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-full);
}

.section-title .section-icon {
    font-size: 1.25rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-top: 8px;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.view-all:hover {
    background: rgba(var(--primary-rgb), 0.06);
    gap: 12px;
}

/* ========================================
   ARTICLE CARDS - Premium Design
   ======================================== */
.articles-section {
    padding: 60px 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.article-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border-light);
    position: relative;
}

.article-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
    border-color: rgba(var(--primary-rgb), 0.1);
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.article-card:hover::before {
    opacity: 1;
}

.article-image-wrapper {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.article-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover .article-image-wrapper img {
    transform: scale(1.06);
}

/* Card Actions Overlay */
.card-actions {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 2;
}

.article-card:hover .card-actions {
    opacity: 1;
    transform: translateY(0);
}

.card-action-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.card-action-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.15);
}

.card-action-btn.active {
    background: var(--primary);
    color: white;
}

/* Category Badge */
.article-category {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: white;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

/* Article Content */
.article-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-title {
    font-size: 1.0625rem;
    line-height: 1.55;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
}

.article-title a {
    color: inherit;
    transition: var(--transition);
}

.article-title a:hover {
    color: var(--primary);
}

.article-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Author Info */
.article-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.author-avatar-small {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
}

.author-info {
    flex: 1;
    min-width: 0;
}

.author-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.article-meta {
    font-size: 0.725rem;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
    margin-top: 2px;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* ========================================
   POPULAR ARTICLES - Numbered
   ======================================== */
.popular-section {
    background: var(--bg-white);
    padding: 60px 0;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    counter-reset: popular-counter;
}

.popular-card {
    counter-increment: popular-counter;
    position: relative;
}

.popular-card .article-image-wrapper::before {
    content: counter(popular-counter, arabic-indic);
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 800;
    z-index: 2;
    box-shadow: var(--shadow-md);
}

/* ========================================
   CATEGORIES SECTION
   ======================================== */
.categories-browse {
    padding: 60px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 3/2;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.category-card:hover img {
    transform: scale(1.08);
}

.category-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 30%, rgba(0, 0, 0, 0.8));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: white;
    transition: var(--transition);
}

.category-card:hover .category-card-overlay {
    background: linear-gradient(transparent 20%, rgba(var(--primary-rgb), 0.85));
}

.category-card-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.category-card-count {
    font-size: 0.8125rem;
    opacity: 0.8;
}

/* ========================================
   NEWSLETTER CTA - Full Width
   ======================================== */
.newsletter-cta {
    background: linear-gradient(135deg, var(--secondary) 0%, #0d1b2a 50%, var(--accent) 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.newsletter-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.1);
    animation: floatBubble 8s ease-in-out infinite;
}

.newsletter-cta::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    animation: floatBubble 10s ease-in-out infinite reverse;
}

@keyframes floatBubble {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

.newsletter-cta-inner {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.newsletter-cta-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: bounce 3s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.newsletter-cta h2 {
    color: white;
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 12px;
}

.newsletter-cta p {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 32px;
    font-size: 1.0625rem;
    line-height: 1.7;
}

.newsletter-cta-form {
    display: flex;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
}

.newsletter-cta-form input[type="email"] {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.newsletter-cta-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.newsletter-cta-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.12);
}

.newsletter-cta-form button {
    padding: 16px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.newsletter-cta-form button:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
}

.newsletter-privacy {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8125rem;
    margin-top: 16px;
}

/* ========================================
   STATS COUNTER
   ======================================== */
.stats-section {
    padding: 50px 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9375rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ========================================
   SINGLE ARTICLE PAGE
   ======================================== */
.single-article {
    padding: 40px 0;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
}

/* Article Header */
.article-header {
    margin-bottom: 32px;
}

.article-header .article-category {
    position: static;
    display: inline-block;
    margin-bottom: 20px;
}

.article-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.3;
    margin-bottom: 24px;
}

.article-header-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.article-author-large {
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-avatar-large {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
}

.author-info-large .author-name {
    font-size: 0.9375rem;
    font-weight: 600;
}

.author-info-large .author-bio-short {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.article-stats {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.article-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Featured Image */
.article-featured-image {
    width: 100%;
    border-radius: var(--radius-xl);
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 24px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-muted);
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .separator {
    opacity: 0.4;
    font-size: 0.75rem;
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Article Actions Bar */
.article-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 72px;
    z-index: var(--z-dropdown);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    gap: 12px;
}

.action-group {
    display: flex;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-secondary);
    transition: var(--transition);
    white-space: nowrap;
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.04);
}

.action-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Article Body */
.article-body {
    font-size: 1.125rem;
    line-height: 2;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: 24px;
}

.article-body h2 {
    font-size: 1.625rem;
    margin: 48px 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    scroll-margin-top: 100px;
}

.article-body h3 {
    font-size: 1.375rem;
    margin: 36px 0 18px;
    scroll-margin-top: 100px;
}

.article-body h4 {
    font-size: 1.125rem;
    margin: 28px 0 14px;
}

.article-body blockquote {
    background: linear-gradient(135deg, var(--bg-cream), var(--bg-light));
    border-right: 4px solid var(--primary);
    padding: 28px 32px;
    margin: 36px 0;
    font-style: italic;
    font-size: 1.1875rem;
    border-radius: var(--radius-md);
    position: relative;
    line-height: 1.8;
}

.article-body blockquote::before {
    content: '\201C';
    font-size: 5rem;
    color: var(--primary);
    opacity: 0.15;
    position: absolute;
    top: -10px;
    right: 20px;
    font-family: Georgia, serif;
    line-height: 1;
}

.article-body img {
    border-radius: var(--radius-md);
    margin: 24px 0;
    box-shadow: var(--shadow-sm);
}

.article-body ul, .article-body ol {
    margin-bottom: 24px;
    padding-right: 28px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(var(--primary-rgb), 0.3);
    transition: var(--transition);
}

.article-body a:hover {
    text-decoration-color: var(--primary);
}

.article-body pre {
    background: var(--bg-dark);
    color: #e0e0e0;
    padding: 24px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 24px 0;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.article-body code {
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    font-size: 0.9em;
}

.article-body pre code {
    background: none;
    padding: 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.article-body th,
.article-body td {
    padding: 12px 16px;
    border: 1px solid var(--border);
    text-align: right;
}

.article-body th {
    background: var(--bg-light);
    font-weight: 600;
}

/* Table of Contents */
.toc-widget {
    background: var(--bg-cream);
    border: 1px solid var(--border-light);
}

.toc-widget .widget-title {
    border-bottom-color: var(--accent);
}

.toc-list {
    list-style: none;
    padding: 0;
}

.toc-list li {
    margin-bottom: 4px;
}

.toc-list a {
    display: block;
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border-right: 2px solid transparent;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.06);
    border-right-color: var(--primary);
}

.toc-list .toc-h3 {
    padding-right: 24px;
    font-size: 0.8125rem;
}

/* Tags */
.article-tags {
    margin: 40px 0;
    padding: 24px 0;
    border-top: 1px solid var(--border);
}

.article-tags-label {
    display: block;
    margin-bottom: 14px;
    font-weight: 600;
    font-size: 0.9375rem;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-cream);
    padding: 7px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.tag-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* Author Box */
.author-box {
    background: var(--bg-cream);
    padding: 32px;
    border-radius: var(--radius-lg);
    margin: 40px 0;
    border: 1px solid var(--border-light);
}

.author-box-inner {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.author-box .author-avatar-large {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.author-box-content {
    flex: 1;
}

.author-box-content h4 {
    margin-bottom: 8px;
    font-size: 1.125rem;
}

.author-box-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
    font-size: 0.9375rem;
}

.author-box-link {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9375rem;
}

.author-box-link:hover {
    gap: 10px;
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 48px 0;
    padding: 32px 0;
    border-top: 2px solid var(--border);
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: var(--bg-cream);
    border-radius: var(--radius-md);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.post-nav-link:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.post-nav-link:last-child {
    text-align: left;
}

.post-nav-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.post-nav-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
}

.post-nav-link:hover .post-nav-title {
    color: var(--primary);
}

/* Related Articles */
.related-articles {
    margin-top: 60px;
}

.related-articles h3 {
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.widget:hover {
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: white;
    border: none;
}

.newsletter-widget .widget-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.newsletter-widget p {
    opacity: 0.85;
    margin-bottom: 20px;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.newsletter-form input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-family: inherit;
    font-size: 0.9375rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: var(--transition);
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.newsletter-form button {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-family: inherit;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

/* Popular Posts */
.popular-post {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.popular-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-post:hover {
    padding-right: 4px;
}

.popular-post img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.popular-post-content {
    flex: 1;
    min-width: 0;
}

.popular-post-content h5 {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 6px;
}

.popular-post-content h5 a {
    color: var(--text-primary);
}

.popular-post-content h5 a:hover {
    color: var(--primary);
}

.popular-post-content span {
    font-size: 0.725rem;
    color: var(--text-muted);
}

/* Categories Widget */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 6px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-cream);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.category-list a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateX(-4px);
}

.category-list .count {
    background: var(--bg-white);
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

.category-list a:hover .count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ========================================
   TEXT SELECTION POPUP
   ======================================== */
.text-selection-popup {
    position: absolute;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    display: none;
    z-index: var(--z-popover);
    gap: 4px;
    border: 1px solid var(--border-light);
}

.text-selection-popup.show {
    display: flex;
    animation: popupFade 0.2s ease;
}

@keyframes popupFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.popup-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.popup-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
    transform: scale(1.1);
}

/* ========================================
   FONT SIZE CONTROLS
   ======================================== */
.font-size-panel {
    position: fixed;
    left: 24px;
    bottom: 170px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    z-index: var(--z-fixed);
    display: none;
    flex-direction: column;
    gap: 8px;
    border: 1px solid var(--border-light);
}

.font-size-panel.show {
    display: flex;
    animation: popupFade 0.2s ease;
}

.font-size-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.font-size-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.font-size-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ========================================
   FLOATING ACTIONS
   ======================================== */
.floating-actions {
    position: fixed;
    left: 24px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: var(--z-fixed);
}

.floating-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.floating-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

/* Scroll to Top */
.scroll-top {
    position: fixed;
    left: 24px;
    bottom: 40px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: var(--z-fixed);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

/* ========================================
   LOAD MORE
   ======================================== */
.load-more-wrapper {
    text-align: center;
    margin-top: 48px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 40px;
    background: var(--bg-white);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.load-more-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.load-more-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.load-more-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: none;
}

.load-more-btn.loading .load-more-spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   FOOTER - Premium Design
   ======================================== */
.site-footer {
    background: var(--secondary);
    color: white;
    padding: 70px 0 30px;
    margin-top: var(--section-gap);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-light));
}

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

.footer-brand .site-logo {
    color: white;
    margin-bottom: 16px;
    display: inline-block;
    font-size: 1.5rem;
}

.footer-brand p {
    opacity: 0.7;
    font-size: 0.9375rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.0625rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-social a:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.footer-widget h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.footer-widget h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
    border-radius: var(--radius-full);
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9375rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-links a::before {
    content: '\2190';
    opacity: 0;
    transform: translateX(8px);
    transition: var(--transition);
    font-size: 0.75rem;
}

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

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    opacity: 0.6;
}

.footer-bottom a {
    color: inherit;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--primary-light);
    opacity: 1;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination-wrapper {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.pagination-wrapper .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    background: var(--bg-white);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
    border: 1px solid var(--border);
    text-decoration: none;
}

.pagination-wrapper .page-numbers:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-wrapper .page-numbers.current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-wrapper .page-numbers.prev,
.pagination-wrapper .page-numbers.next {
    padding: 0 16px;
}

.pagination-wrapper .page-numbers.dots {
    border: none;
    background: none;
    min-width: 30px;
}

/* ========================================
   ARCHIVE HEADER
   ======================================== */
.archive-header {
    padding: 48px 0 32px;
    background: linear-gradient(180deg, var(--bg-white), var(--bg-cream));
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 40px;
}

.archive-header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.archive-icon {
    width: 64px;
    height: 64px;
    background: rgba(var(--primary-rgb), 0.08);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.archive-info h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 4px;
}

.archive-description {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* ========================================
   AUTHOR PAGE
   ======================================== */
.author-header {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    padding: 60px 0;
    color: white;
    margin-bottom: 40px;
}

.author-profile {
    display: flex;
    align-items: center;
    gap: 32px;
}

.author-profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

.author-profile-info h1 {
    color: white;
    margin-bottom: 8px;
}

.author-profile-bio {
    opacity: 0.8;
    line-height: 1.8;
    max-width: 600px;
    margin-bottom: 16px;
}

.author-profile-stats {
    display: flex;
    gap: 24px;
}

.author-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    opacity: 0.8;
}

.author-stat strong {
    font-size: 1.125rem;
    opacity: 1;
}

/* ========================================
   404 PAGE
   ======================================== */
.error-404-section {
    padding: 80px 20px;
    text-align: center;
}

.error-404-number {
    font-size: clamp(6rem, 15vw, 10rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 20px;
}

.error-404-title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: 16px;
}

.error-404-text {
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.error-404-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 40px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.error-404-btn:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.error-404-search {
    max-width: 500px;
    margin: 40px auto;
    display: flex;
    gap: 12px;
}

.error-404-search input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-white);
}

.error-404-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.error-404-search button {
    padding: 16px 28px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition);
}

.error-404-search button:hover {
    background: var(--accent);
}

/* ========================================
   COMMENTS
   ======================================== */
.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--border);
}

.comments-title {
    font-size: 1.375rem;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment-item {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-light);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-body {
    display: flex;
    gap: 16px;
}

.comment-avatar img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.comment-content {
    flex: 1;
}

.comment-meta {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.comment-author-name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.comment-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.comment-text {
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    font-size: 0.8125rem;
    color: var(--primary);
    font-weight: 500;
    transition: var(--transition);
}

.comment-reply-link:hover {
    color: var(--primary-dark);
}

/* Comment Form */
.comment-form-wrapper {
    margin-top: 40px;
}

.comment-form-title {
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.comment-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-white);
    color: var(--text-primary);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.comment-form textarea {
    min-height: 140px;
    resize: vertical;
}

.comment-form p {
    margin-bottom: 18px;
}

.comment-form .required {
    color: var(--primary);
}

.comment-submit-btn {
    padding: 14px 36px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.comment-submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 14px 28px;
    border-radius: var(--radius-md);
    z-index: var(--z-toast);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success { background: #059669; }
.toast.error { background: #dc2626; }
.toast.warning { background: #d97706; }
.toast.info { background: var(--accent); }

.toast.hiding {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* ========================================
   SKELETON LOADING
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-light) 25%, var(--bg-cream) 37%, var(--bg-light) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.skeleton-card {
    height: 380px;
    border-radius: var(--radius-lg);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 10px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ========================================
   DARK MODE - Complete Theme
   ======================================== */
body.dark-mode {
    --bg-white: #1a1a2e;
    --bg-cream: #141428;
    --bg-light: #1e1e38;
    --bg-dark: #0d0d1a;
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a82;
    --border: #2a2a44;
    --border-light: #222240;
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.35);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.4);
}

body.dark-mode .site-header {
    background: rgba(26, 26, 46, 0.85);
    border-bottom-color: rgba(255, 255, 255, 0.04);
}

body.dark-mode .site-header.scrolled {
    background: rgba(26, 26, 46, 0.95);
}

body.dark-mode .hero-side-item {
    background: var(--bg-white);
}

body.dark-mode .article-card {
    background: var(--bg-white);
}

body.dark-mode .search-form-large input {
    background: var(--bg-light);
    color: var(--text-primary);
}

body.dark-mode .bookmarks-drawer {
    background: var(--bg-white);
}

body.dark-mode .bookmarks-drawer-header {
    background: var(--bg-white);
}

body.dark-mode .mobile-menu {
    background: var(--bg-white);
}

body.dark-mode .trending-ticker {
    background: #0d0d1a;
}

body.dark-mode .popular-section {
    background: var(--bg-white);
}

body.dark-mode .stats-section {
    background: var(--bg-white);
}

body.dark-mode .site-footer {
    background: #0d0d1a;
}

body.dark-mode .article-body pre {
    background: #0d0d1a;
    border: 1px solid var(--border);
}

body.dark-mode .article-body code {
    background: var(--bg-light);
}

body.dark-mode .widget {
    background: var(--bg-white);
}

body.dark-mode .card-action-btn {
    background: rgba(26, 26, 46, 0.9);
    color: var(--text-primary);
}

body.dark-mode .floating-btn {
    background: var(--bg-white);
    border-color: var(--border);
}

body.dark-mode .article-actions-bar {
    background: rgba(26, 26, 46, 0.9);
}

body.dark-mode .action-btn {
    background: var(--bg-white);
    border-color: var(--border);
    color: var(--text-secondary);
}

body.dark-mode .font-size-panel {
    background: var(--bg-white);
    border-color: var(--border);
}

body.dark-mode .font-size-btn {
    background: var(--bg-white);
    border-color: var(--border);
    color: var(--text-secondary);
}

body.dark-mode .error-404-search input {
    background: var(--bg-white);
    border-color: var(--border);
    color: var(--text-primary);
}

body.dark-mode .comment-form input,
body.dark-mode .comment-form textarea {
    background: var(--bg-light);
    border-color: var(--border);
    color: var(--text-primary);
}

body.dark-mode .preloader {
    background: var(--bg-cream);
}

body.dark-mode .text-selection-popup {
    background: var(--bg-white);
    border-color: var(--border);
}

body.dark-mode img {
    opacity: 0.92;
}

/* ========================================
   RESPONSIVE - Tablet (1024px)
   ======================================== */
@media (max-width: 1024px) {
    :root {
        --section-gap: 60px;
    }

    .article-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-grid {
        grid-template-columns: 1.2fr 1fr;
    }

    .hero-main {
        min-height: 350px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   RESPONSIVE - Mobile (768px)
   ======================================== */
@media (max-width: 768px) {
    :root {
        --container-padding: 16px;
        --section-gap: 48px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-main {
        min-height: 280px;
    }

    .hero-content {
        padding: 30px 20px 24px;
    }

    .hero-side {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hero-side-image {
        width: 110px;
        min-width: 110px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .popular-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }

    .main-navigation {
        display: none;
    }

    .menu-toggle {
        display: flex !important;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .article-actions-bar {
        flex-wrap: wrap;
        gap: 10px;
        position: static;
    }

    .action-btn span:last-child {
        display: none;
    }

    .action-btn {
        padding: 8px 12px;
    }

    .newsletter-cta-form {
        flex-direction: column;
    }

    .newsletter-cta-form button {
        width: 100%;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .author-profile {
        flex-direction: column;
        text-align: center;
    }

    .author-profile-stats {
        justify-content: center;
    }

    .author-box-inner {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .floating-actions {
        left: 16px;
        bottom: 80px;
    }

    .scroll-top {
        left: 16px;
        bottom: 24px;
        width: 42px;
        height: 42px;
    }

    .floating-btn {
        width: 42px;
        height: 42px;
    }

    .error-404-search {
        flex-direction: column;
    }

    .search-close {
        top: 20px;
        left: 20px;
    }

    .trending-label {
        font-size: 0.6875rem;
        padding: 5px 12px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .section-title::after {
        bottom: -18px;
    }

    .archive-header-inner {
        flex-direction: column;
        text-align: center;
    }

    .pagination-wrapper .page-numbers {
        min-width: 36px;
        height: 36px;
        font-size: 0.8125rem;
    }
}

/* ========================================
   RESPONSIVE - Small (480px)
   ======================================== */
@media (max-width: 480px) {
    .header-inner {
        padding: 12px 0;
    }

    .site-logo {
        font-size: 1.375rem;
    }

    .header-btn {
        width: 38px;
        height: 38px;
    }

    .hero-main {
        min-height: 240px;
        border-radius: var(--radius-md);
    }

    .hero-title {
        font-size: 1.25rem;
    }

    .article-content {
        padding: 18px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .trending-ticker-inner {
        padding: 8px 0;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .site-header,
    .reading-progress-container,
    .trending-ticker,
    .floating-actions,
    .scroll-top,
    .article-actions-bar,
    .sidebar,
    .site-footer,
    .related-articles,
    .post-navigation,
    .comments-area,
    .newsletter-cta,
    .text-selection-popup,
    .font-size-panel,
    .bookmarks-drawer,
    .search-overlay,
    .mobile-menu,
    .mobile-menu-overlay,
    .drawer-backdrop {
        display: none !important;
    }

    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-body {
        font-size: 12pt;
        line-height: 1.6;
    }

    .article-body a {
        text-decoration: underline;
        color: black;
    }

    .article-body a::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }

    .article-featured-image {
        max-height: 300px;
        object-fit: cover;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    z-index: 10000;
    font-weight: 600;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    color: white;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: 2rem; }
.hidden { display: none; }

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

    .trending-track {
        animation: none;
    }
}
