/**
 * IBlog 24 - Modern Redesign
 * Fresh, Clean, Professional Layout
 */

/* ==================== CSS Variables ==================== */
:root {
    /* Colors - Modern Amber Theme */
    --primary: #f59e0b;
    --primary-hover: #d97706;
    --primary-light: #fef3c7;
    --primary-dark: #b45309;
    --secondary: #fbbf24;
    --accent: #f59e0b;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Text Colors */
    --text-dark: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Legacy Text Variable Aliases */
    --text-primary: #0f172a;
    --text-secondary: #475569;

    /* Backgrounds */
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray: #f1f5f9;
    --bg-dark: #0f172a;

    /* Legacy Background Variable Aliases */
    --bg-primary: #ffffff;
    --bg-secondary: #f1f5f9;

    /* Borders & Shadows */
    --border: #e2e8f0;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ==================== Dark Mode ==================== */
[data-theme="dark"] {
    /* Colors - Pure Dark Theme (no blue tints) */
    --primary: #ffffff;
    --primary-hover: #e5e5e5;
    --primary-light: #333333;
    --primary-dark: #ffffff;
    --secondary: #a3a3a3;
    --accent: #d4d4d4;

    /* Text Colors - Pure white/gray */
    --text-dark: #ffffff;
    --text-body: #e5e5e5;
    --text-muted: #a3a3a3;
    --text-light: #737373;

    /* Legacy Text Variable Aliases */
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;

    /* Backgrounds - Pure blacks/grays */
    --bg-white: #171717;
    --bg-light: #0a0a0a;
    --bg-gray: #1f1f1f;
    --bg-dark: #000000;

    /* Legacy Background Variable Aliases */
    --bg-primary: #171717;
    --bg-secondary: #262626;

    /* Borders & Shadows */
    --border: #2e2e2e;
    --border-color: #2e2e2e;
    --border-light: #2e2e2e;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.6), 0 1px 2px -1px rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.6), 0 2px 4px -2px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.6), 0 4px 6px -4px rgb(0 0 0 / 0.5);
}

[data-theme="dark"] body {
    background: var(--bg-light);
    color: var(--text-body);
}

[data-theme="dark"] .page-loader {
    background: #0f172a;
}

[data-theme="dark"] .header {
    background: var(--bg-white);
    border-bottom-color: var(--border);
}

[data-theme="dark"] .card,
[data-theme="dark"] .article,
[data-theme="dark"] .sidebar-widget {
    background: var(--bg-white);
    border-color: var(--border);
}

[data-theme="dark"] .footer {
    background: var(--bg-dark);
}

[data-theme="dark"] .dropdown-menu {
    background: var(--bg-white);
    border-color: var(--border);
}

[data-theme="dark"] .btn-icon {
    color: var(--text-muted);
}

[data-theme="dark"] .btn-icon:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: var(--bg-gray);
    border-color: var(--border);
    color: var(--text-body);
}

[data-theme="dark"] .cookie-consent,
[data-theme="dark"] .cookie-modal-content {
    background: var(--bg-white);
}

[data-theme="dark"] .tts-player {
    background: var(--bg-gray);
    border-color: var(--border);
}

[data-theme="dark"] .article-author {
    background: linear-gradient(135deg, var(--bg-gray) 0%, var(--bg-white) 100%);
    border-color: var(--border);
}

[data-theme="dark"] .author-stats {
    color: #94a3b8;
}

[data-theme="dark"] .author-stats strong {
    color: #e2e8f0;
}

[data-theme="dark"] .author-divider {
    background: var(--border);
}

[data-theme="dark"] .author-avatar {
    border-color: #0ea5e9;
}

/* Dark mode buttons - all types */
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-search,
[data-theme="dark"] button[type="submit"],
[data-theme="dark"] input[type="submit"] {
    color: #000000;
    border-color: #ffffff;
}

[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-search:hover,
[data-theme="dark"] button[type="submit"]:hover,
[data-theme="dark"] input[type="submit"]:hover {
    background: #e5e5e5;
    color: #000000;
}

[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn-outline {
    background: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn-outline:hover {
    background: #ffffff;
    color: #000000;
}

[data-theme="dark"] .btn,
[data-theme="dark"] button {
    color: var(--text-body);
}

[data-theme="dark"] .btn-primary,
[data-theme="dark"] a.btn-primary,
[data-theme="dark"] button.btn-primary,
[data-theme="dark"] input[type="submit"].btn-primary {
    background: #f59e0b !important;
    color: #1a1a1a !important;
}

[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] a.btn-primary:hover,
[data-theme="dark"] button.btn-primary:hover {
    background: #d97706 !important;
    color: #1a1a1a !important;
}

[data-theme="dark"] .btn-outline {
    border-color: #e5e5e5;
    color: #e5e5e5;
}

[data-theme="dark"] .btn-outline:hover {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #1a1a1a;
}

/* Dark mode: Fix all elements using --primary background (which is white in dark mode) */
[data-theme="dark"] .hero-search-box button,
[data-theme="dark"] .featured-badge,
[data-theme="dark"] .page-link.active,
[data-theme="dark"] .pagination a.active,
[data-theme="dark"] .pagination a:hover,
[data-theme="dark"] .subscribe-btn,
[data-theme="dark"] .read-more-btn,
[data-theme="dark"] .load-more-btn,
[data-theme="dark"] .newsletter-btn,
[data-theme="dark"] .tag:hover,
[data-theme="dark"] .share-btn,
[data-theme="dark"] .scroll-to-top,
[data-theme="dark"] .copy-code-btn:hover,
[data-theme="dark"] .language-selector .dropdown-menu a.active,
[data-theme="dark"] .language-switcher .lang-btn.active,
[data-theme="dark"] .language-switcher .lang-btn:hover,
[data-theme="dark"] .mag-search-form button,
[data-theme="dark"] .compact-date,
[data-theme="dark"] .compact-icon {
    background: #f59e0b;
    color: #1a1a1a;
}

/* Dark mode search */
[data-theme="dark"] .search-form .btn-search {
    background: #ffffff;
    color: #000000;
}

[data-theme="dark"] .search-input {
    background: #1f1f1f;
    border-color: #2e2e2e;
    color: #ffffff;
}

[data-theme="dark"] .search-input::placeholder {
    color: #737373;
}

/* Dark mode hero section */
[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #0a0a0a 0%, #171717 100%);
}

[data-theme="dark"] .hero-search input {
    background: #1f1f1f;
    border-color: #2e2e2e;
    color: #ffffff;
}

[data-theme="dark"] .hero-search button {
    background: #ffffff;
    color: #000000;
}

/* Dark mode tags and badges */
[data-theme="dark"] .tag,
[data-theme="dark"] .badge {
    background: #262626;
    color: #ffffff;
}

/* Dark mode form elements */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-input {
    background: #1f1f1f;
    border-color: #2e2e2e;
    color: #ffffff;
}

/* Dark mode cards hover */
[data-theme="dark"] .card:hover,
[data-theme="dark"] .post-card:hover,
[data-theme="dark"] .post-card-modern:hover {
    border-color: #404040;
}

/* Clickable card styles */
.post-card-modern {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.post-card-modern:active {
    transform: translateY(-2px);
}

/* Dark mode newsletter/subscribe */
[data-theme="dark"] .newsletter-form input,
[data-theme="dark"] .subscribe-form input {
    background: #1f1f1f;
    border-color: #2e2e2e;
    color: #ffffff;
}

[data-theme="dark"] .newsletter-form button,
[data-theme="dark"] .subscribe-form button {
    background: #ffffff;
    color: #000000;
}

/* Dark mode alerts */
[data-theme="dark"] .alert {
    border-color: #2e2e2e;
}

/* Dark mode close buttons */
[data-theme="dark"] .btn-close-search,
[data-theme="dark"] .close-modal,
[data-theme="dark"] .alert-close {
    color: #a3a3a3;
}

[data-theme="dark"] .btn-close-search:hover,
[data-theme="dark"] .close-modal:hover,
[data-theme="dark"] .alert-close:hover {
    color: #ffffff;
}

/* Dark mode TTS player */
[data-theme="dark"] .tts-btn {
    background: #262626;
    color: #ffffff;
    border-color: #2e2e2e;
}

[data-theme="dark"] .tts-btn:hover {
    background: #333333;
}

/* Dark mode sidebar */
[data-theme="dark"] .sidebar-widget {
    background: #171717;
    border-color: #2e2e2e;
}

/* Hide empty ad widgets */
.sidebar-ad:empty,
.sidebar-widget.sidebar-ad:empty,
.ad-wrapper:empty,
.ad-section:empty {
    display: none;
}

/* Hide ad widgets with no content (only whitespace) */
.sidebar-ad:not(:has(*)),
.ad-wrapper:not(:has(*)),
.ad-section:not(:has(*)) {
    display: none;
}

/* Dark mode footer */
[data-theme="dark"] .footer {
    background: #000000;
    border-top-color: #2e2e2e;
}

[data-theme="dark"] .footer a {
    color: #a3a3a3;
}

[data-theme="dark"] .footer a:hover {
    color: #ffffff;
}

[data-theme="dark"] .article-category {
    background: #262626;
    color: #ffffff;
}

[data-theme="dark"] .card-category {
    background: #262626;
    color: #ffffff;
}

[data-theme="dark"] a {
    color: #ffffff;
}

[data-theme="dark"] a:hover {
    color: #a3a3a3;
}

[data-theme="dark"] .nav-list a.active,
[data-theme="dark"] .nav-list a:hover {
    color: #ffffff;
}

[data-theme="dark"] .nav-list > li.dropdown.active > .dropdown-toggle {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

[data-theme="dark"] .nav-list > li.dropdown.active > .dropdown-toggle::after {
    background: var(--primary);
}

[data-theme="dark"] .logo img {
    filter: brightness(0) invert(1);
}

/* Logo - no focus outline */
[data-theme="dark"] .logo:focus,
[data-theme="dark"] .logo:focus-visible,
[data-theme="dark"] .logo:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

[data-theme="dark"] .logo:focus img,
[data-theme="dark"] .logo:focus-visible img {
    filter: brightness(0) invert(1);
}

[data-theme="dark"] .hero-abstract svg * {
    stroke: #ffffff !important;
}

[data-theme="dark"] .trending-card,
[data-theme="dark"] .category-card {
    background: var(--bg-white);
    border-color: var(--border);
}

[data-theme="dark"] .pagination .page-link {
    background: var(--bg-white);
    border-color: var(--border);
    color: #ffffff;
}

[data-theme="dark"] .pagination .page-link.active {
    background: #ffffff;
    color: #000000;
}

[data-theme="dark"] .breadcrumb a {
    color: #a3a3a3;
}

[data-theme="dark"] .breadcrumb a:hover {
    color: #ffffff;
}

/* Dark mode - ALL remaining elements */

/* Post cards */
[data-theme="dark"] .post-card,
[data-theme="dark"] .card {
    background: #171717;
    border-color: #2e2e2e;
}

[data-theme="dark"] .card-title,
[data-theme="dark"] .post-title {
    color: #ffffff;
}

[data-theme="dark"] .card-excerpt,
[data-theme="dark"] .post-excerpt {
    color: #a3a3a3;
}

[data-theme="dark"] .card-meta,
[data-theme="dark"] .post-meta {
    color: #737373;
}

/* Article page */
[data-theme="dark"] .article {
    background: #171717;
}

[data-theme="dark"] .article-title {
    color: #ffffff;
}

[data-theme="dark"] .article-content {
    color: #e5e5e5;
}

[data-theme="dark"] .article-content h2,
[data-theme="dark"] .article-content h3,
[data-theme="dark"] .article-content h4 {
    color: #ffffff;
}

[data-theme="dark"] .article-content blockquote {
    background: #1f1f1f;
    border-left-color: #ffffff;
    color: #a3a3a3;
}

[data-theme="dark"] .article-content code {
    background: #262626;
    color: #e5e5e5;
}

[data-theme="dark"] .article-content pre {
    background: #0a0a0a;
    border-color: #2e2e2e;
}

/* Related posts */
[data-theme="dark"] .related-posts {
    background: #171717;
    border-color: #2e2e2e;
}

[data-theme="dark"] .related-post-card {
    background: #1f1f1f;
    border-color: #2e2e2e;
}

/* Comments section */
[data-theme="dark"] .comments-section {
    background: #171717;
}

[data-theme="dark"] .comment {
    background: #1f1f1f;
    border-color: #2e2e2e;
}

[data-theme="dark"] .comment-author {
    color: #ffffff;
}

[data-theme="dark"] .comment-content {
    color: #e5e5e5;
}

/* Social share buttons */
[data-theme="dark"] .share-btn {
    background: #262626;
    color: #ffffff;
    border-color: #2e2e2e;
}

[data-theme="dark"] .share-btn:hover {
    background: #333333;
}

/* Tables */
[data-theme="dark"] table {
    border-color: #2e2e2e;
}

[data-theme="dark"] th {
    background: #1f1f1f;
    color: #ffffff;
    border-color: #2e2e2e;
}

[data-theme="dark"] td {
    border-color: #2e2e2e;
    color: #e5e5e5;
}

[data-theme="dark"] tr:nth-child(even) {
    background: #1a1a1a;
}

/* Modals */
[data-theme="dark"] .modal,
[data-theme="dark"] .modal-content {
    background: #171717;
    border-color: #2e2e2e;
}

[data-theme="dark"] .modal-header {
    border-bottom-color: #2e2e2e;
    color: #ffffff;
}

[data-theme="dark"] .modal-footer {
    border-top-color: #2e2e2e;
}

/* Dropdowns - ALL elements */
[data-theme="dark"] .dropdown-menu {
    background: #171717;
    border-color: #2e2e2e;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .dropdown-menu a,
[data-theme="dark"] .dropdown-menu li a,
[data-theme="dark"] .dropdown-menu .dropdown-item {
    color: #e5e5e5;
    background: transparent;
}

[data-theme="dark"] .dropdown-menu a:hover,
[data-theme="dark"] .dropdown-menu li a:hover,
[data-theme="dark"] .dropdown-menu .dropdown-item:hover {
    background: #262626;
    color: #ffffff;
}

[data-theme="dark"] .dropdown-menu a.active,
[data-theme="dark"] .dropdown-menu li a.active,
[data-theme="dark"] .dropdown-menu .dropdown-item.active {
    background: #262626;
    color: #ffffff;
}

[data-theme="dark"] .dropdown-menu li {
    color: #e5e5e5;
}

[data-theme="dark"] .dropdown-menu label,
[data-theme="dark"] .dropdown-menu span,
[data-theme="dark"] .dropdown-menu p,
[data-theme="dark"] .dropdown-menu .view-all {
    color: #e5e5e5;
}

[data-theme="dark"] .dropdown-menu .view-all:hover {
    color: #ffffff;
    background: #262626;
}

[data-theme="dark"] .dropdown-menu i {
    color: #a3a3a3;
}

[data-theme="dark"] .dropdown-divider {
    border-color: #2e2e2e;
    background: #2e2e2e;
}

[data-theme="dark"] .dropdown-toggle {
    color: #e5e5e5;
}

[data-theme="dark"] .dropdown-toggle:hover {
    color: #ffffff;
}

/* Language selector dropdown */
[data-theme="dark"] .language-selector .dropdown-menu {
    background: #171717;
}

[data-theme="dark"] .language-selector .dropdown-menu a {
    color: #e5e5e5;
}

[data-theme="dark"] .language-selector .dropdown-menu a:hover,
[data-theme="dark"] .language-selector .dropdown-menu a.active {
    background: #262626;
    color: #ffffff;
}

[data-theme="dark"] .lang-code {
    color: #a3a3a3;
}

/* Header actions */
[data-theme="dark"] .header-actions .btn-icon {
    color: #a3a3a3;
}

[data-theme="dark"] .header-actions .btn-icon:hover {
    color: #ffffff;
    background: #262626;
}

/* Navigation dropdown */
[data-theme="dark"] .main-nav .dropdown-menu {
    background: #171717;
    border-color: #2e2e2e;
}

[data-theme="dark"] .main-nav .dropdown-menu li a {
    color: #e5e5e5;
}

[data-theme="dark"] .main-nav .dropdown-menu li a:hover {
    background: #262626;
    color: #ffffff;
}

[data-theme="dark"] .main-nav .dropdown-menu li a i {
    color: #737373;
}

/* Featured badge / Latest label */
[data-theme="dark"] .featured-badge {
    background: #ffffff;
    color: #000000;
}

[data-theme="dark"] .featured-content {
    color: #ffffff;
}

[data-theme="dark"] .featured-title {
    color: #ffffff;
}

[data-theme="dark"] .featured-category {
    color: #a3a3a3;
    background: #262626;
}

[data-theme="dark"] .featured-category:hover {
    color: #ffffff;
}

[data-theme="dark"] .featured-excerpt {
    color: #a3a3a3;
}

[data-theme="dark"] .featured-meta {
    color: #737373;
}

/* Section headers */
[data-theme="dark"] .section-header h2 {
    color: #ffffff;
}

[data-theme="dark"] .section-header p {
    color: #a3a3a3;
}

/* All badges and labels */
[data-theme="dark"] .badge,
[data-theme="dark"] .label,
[data-theme="dark"] .chip {
    background: #262626;
    color: #ffffff;
}

[data-theme="dark"] .badge-primary,
[data-theme="dark"] .label-primary {
    background: #ffffff;
    color: #000000;
}

/* Tooltips */
[data-theme="dark"] .tooltip {
    background: #262626;
    color: #ffffff;
}

/* Progress bars */
[data-theme="dark"] .progress {
    background: #262626;
}

[data-theme="dark"] .progress-bar {
    background: #ffffff;
}

/* Tabs */
[data-theme="dark"] .tabs {
    border-color: #2e2e2e;
}

[data-theme="dark"] .tab {
    color: #a3a3a3;
}

[data-theme="dark"] .tab.active {
    color: #ffffff;
    border-color: #ffffff;
}

[data-theme="dark"] .tab:hover {
    color: #ffffff;
}

/* Accordion */
[data-theme="dark"] .accordion-item {
    background: #171717;
    border-color: #2e2e2e;
}

[data-theme="dark"] .accordion-header {
    color: #ffffff;
}

[data-theme="dark"] .accordion-body {
    color: #e5e5e5;
}

/* Lists */
[data-theme="dark"] .list-group-item {
    background: #171717;
    border-color: #2e2e2e;
    color: #e5e5e5;
}

/* Icons in dark mode */
[data-theme="dark"] .fa,
[data-theme="dark"] .fas,
[data-theme="dark"] .far,
[data-theme="dark"] .fab {
    color: inherit;
}

/* Scroll to top button */
[data-theme="dark"] .scroll-top {
    background: #ffffff;
    color: #000000;
}

[data-theme="dark"] .scroll-top:hover {
    background: #e5e5e5;
}

/* Loading spinners */
[data-theme="dark"] .spinner,
[data-theme="dark"] .loader {
    border-color: #2e2e2e;
    border-top-color: #ffffff;
}

/* Affiliate disclosure */
[data-theme="dark"] .affiliate-disclosure {
    background: #1f1f1f;
    border-color: #2e2e2e;
    color: #a3a3a3;
}

/* Language switcher */
[data-theme="dark"] .language-switcher .lang-btn {
    background: #262626;
    color: #a3a3a3;
    border-color: #2e2e2e;
}

[data-theme="dark"] .language-switcher .lang-btn.active,
[data-theme="dark"] .language-switcher .lang-btn:hover {
    background: #ffffff;
    color: #000000;
}

/* Cookie consent */
[data-theme="dark"] .cookie-consent {
    background: #171717;
    border-top-color: #2e2e2e;
}

[data-theme="dark"] .cookie-consent-text h3 {
    color: #ffffff;
}

[data-theme="dark"] .cookie-consent-text p {
    color: #a3a3a3;
}

[data-theme="dark"] .btn-accept-all {
    background: #ffffff;
    color: #000000;
}

[data-theme="dark"] .btn-preferences {
    background: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

[data-theme="dark"] .btn-preferences:hover {
    background: #ffffff;
    color: #000000;
}

/* Cookie modal */
[data-theme="dark"] .cookie-modal-content {
    background: #171717;
}

[data-theme="dark"] .cookie-modal-header {
    border-bottom-color: #2e2e2e;
}

[data-theme="dark"] .cookie-modal-header h2 {
    color: #ffffff;
}

[data-theme="dark"] .cookie-category {
    background: #1f1f1f;
    border-color: #2e2e2e;
}

[data-theme="dark"] .cookie-category-info h3 {
    color: #ffffff;
}

[data-theme="dark"] .cookie-category-info p {
    color: #a3a3a3;
}

[data-theme="dark"] .cookie-modal-footer {
    border-top-color: #2e2e2e;
}

[data-theme="dark"] .toggle-slider {
    background: #404040;
}

[data-theme="dark"] .cookie-toggle input:checked + .toggle-slider {
    background: #ffffff;
}

/* Popular/Trending sections */
[data-theme="dark"] .section-title {
    color: #ffffff;
}

[data-theme="dark"] .trending-section,
[data-theme="dark"] .popular-section {
    background: #0a0a0a;
}

[data-theme="dark"] .trending-number {
    color: #404040;
}

/* Category cards */
[data-theme="dark"] .category-card {
    background: #171717;
    border-color: #2e2e2e;
}

[data-theme="dark"] .category-card:hover {
    border-color: #404040;
}

[data-theme="dark"] .category-name {
    color: #ffffff;
}

[data-theme="dark"] .category-count {
    color: #737373;
}

/* Error pages */
[data-theme="dark"] .error-page {
    color: #ffffff;
}

[data-theme="dark"] .error-page h1 {
    color: #ffffff;
}

[data-theme="dark"] .error-page p {
    color: #a3a3a3;
}

/* Contact form */
[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea,
[data-theme="dark"] .contact-form select {
    background: #1f1f1f;
    border-color: #2e2e2e;
    color: #ffffff;
}

[data-theme="dark"] .contact-form label {
    color: #e5e5e5;
}

/* Reading progress bar */
[data-theme="dark"] .reading-progress {
    background: #2e2e2e;
}

[data-theme="dark"] .reading-progress-bar {
    background: #ffffff;
}

/* Skeleton loaders */
[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #1f1f1f 25%, #2e2e2e 50%, #1f1f1f 75%);
}

/* Image placeholders */
[data-theme="dark"] .img-placeholder {
    background: #1f1f1f;
}

/* Horizontal rule */
[data-theme="dark"] hr {
    border-color: #2e2e2e;
}

/* Selection highlight */
[data-theme="dark"] ::selection {
    background: #ffffff;
    color: #000000;
}

/* Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar {
    background: #0a0a0a;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #404040;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #525252;
}

/* Dark mode toggle button */
.dark-mode-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.dark-mode-toggle .icon-sun,
.dark-mode-toggle .icon-moon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dark-mode-toggle .icon-sun {
    opacity: 1;
    transform: rotate(0deg);
}

.dark-mode-toggle .icon-moon {
    opacity: 0;
    transform: rotate(-90deg);
}

[data-theme="dark"] .dark-mode-toggle .icon-sun {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="dark"] .dark-mode-toggle .icon-moon {
    opacity: 1;
    transform: rotate(0deg);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-body);
    background: var(--bg-light);
    min-height: 100vh;
}


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

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

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

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ==================== Layout ==================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.main-content {
    min-height: calc(100vh - 160px);
}

/* ==================== Header ==================== */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.logo:focus,
.logo:focus-visible,
.logo:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.logo img {
    height: 42px;
    width: auto;
    max-width: 200px;
    outline: none !important;
    border: none !important;
    object-fit: contain;
}

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

.nav-list {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-list > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    color: var(--text-body);
    font-weight: 500;
    font-size: 0.8125rem;
    border-radius: var(--radius);
    position: relative;
    transition: all var(--transition-fast);
}

.nav-list > li > a svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-list > li > a:hover svg,
.nav-list > li > a.active svg {
    opacity: 1;
}

/* Nav links with icon and text */
.nav-list > li > a.nav-icon-link {
    padding: 8px;
}

.nav-list > li > a.nav-icon-link .nav-icon {
    opacity: 0.8;
}

.nav-list > li > a.nav-icon-link:hover .nav-icon,
.nav-list > li > a.nav-icon-link.active .nav-icon {
    opacity: 1;
}

/* Desktop: show icon only, hide text */
.nav-list > li > a.nav-icon-link .nav-text {
    display: none;
}

.nav-list > li > a.nav-icon-link .nav-icon {
    display: block;
}

.nav-list > li > a:hover,
.nav-list > li > a.active {
    background: var(--bg-gray);
    color: var(--primary);
}

/* Dropdown parent active state */
.nav-list > li.dropdown.active > .dropdown-toggle,
.nav-list > li.dropdown.active > a.dropdown-toggle,
.nav-list > li > a.dropdown-toggle.active {
    background: var(--bg-gray) !important;
    color: var(--primary) !important;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 220px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--text-body);
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.dropdown-menu a:hover {
    background: var(--bg-gray);
    color: var(--primary);
}

.dropdown-menu a.active {
    background: var(--primary-light);
    color: var(--primary);
}

.dropdown-menu a.active i {
    color: var(--primary);
}

.dropdown-menu a i {
    width: 20px;
    color: var(--text-muted);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

.dropdown-menu a.view-all {
    color: var(--primary);
    font-weight: 600;
}

.dropdown-menu a.view-all i {
    color: var(--primary);
}

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

.btn-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-body);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--bg-gray);
    border-color: var(--text-light);
}

/* Language Selector Button */
.language-selector .btn-icon {
    width: auto;
    padding: 0 12px;
    gap: 6px;
}

.language-selector .btn-icon i {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.language-selector .lang-code {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.language-selector:hover .btn-icon {
    background: var(--bg-gray);
}

.mobile-nav-toggle {
    display: none;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 120px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.search-form {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 650px;
    padding: 0 20px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

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

.search-input {
    flex: 1;
    padding: 18px 28px;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 1.125rem;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-xl), 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-input::placeholder {
    color: var(--text-light);
}

.btn-search {
    padding: 18px 28px;
    background: var(--primary);
    color: #1a1a1a;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.btn-search:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.btn-close-search {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-gray);
    border: 1px solid var(--border);
    color: var(--text-body);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-close-search:hover {
    background: var(--primary);
    color: #1a1a1a;
    border-color: var(--primary);
}

/* Dark Mode Search Overlay */
[data-theme="dark"] .search-overlay {
    background: rgba(10, 10, 10, 0.98);
}

[data-theme="dark"] .search-input {
    background: #171717;
    border-color: #2e2e2e;
    color: #ffffff;
}

[data-theme="dark"] .search-input:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-xl), 0 0 0 4px rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .search-input::placeholder {
    color: #737373;
}

[data-theme="dark"] .btn-close-search {
    background: #1f1f1f;
    border-color: #2e2e2e;
    color: #e5e5e5;
}

[data-theme="dark"] .btn-close-search:hover {
    background: var(--primary);
    color: #1a1a1a;
    border-color: var(--primary);
}

/* ==================== Hero Section - Clean & Modern ==================== */
.hero-modern {
    background: var(--bg-white);
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.hero-text p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Abstract Visual Animation - Squared Grid */
.hero-abstract {
    width: 80px;
    height: 80px;
    margin: 20px 0;
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 6px;
}

.hero-abstract .grid-cell {
    background: var(--primary);
    border-radius: 4px;
    animation: gridPulse 2s ease-in-out infinite;
}

.hero-abstract .grid-cell:nth-child(1) { animation-delay: 0s; }
.hero-abstract .grid-cell:nth-child(2) { animation-delay: 0.1s; background: var(--secondary); }
.hero-abstract .grid-cell:nth-child(3) { animation-delay: 0.2s; }
.hero-abstract .grid-cell:nth-child(4) { animation-delay: 0.3s; background: var(--accent); }
.hero-abstract .grid-cell:nth-child(5) { animation-delay: 0.4s; background: var(--secondary); }
.hero-abstract .grid-cell:nth-child(6) { animation-delay: 0.5s; background: var(--accent); }
.hero-abstract .grid-cell:nth-child(7) { animation-delay: 0.6s; }
.hero-abstract .grid-cell:nth-child(8) { animation-delay: 0.7s; background: var(--secondary); }
.hero-abstract .grid-cell:nth-child(9) { animation-delay: 0.8s; }

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

.hero-search-box {
    display: flex;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px;
}

.hero-search-box i {
    color: var(--text-muted);
    padding: 12px 14px;
    font-size: 1rem;
}

.hero-search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9375rem;
    padding: 12px 0;
    background: transparent;
}

.hero-search-box button {
    background: var(--primary);
    color: #1a1a1a;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.hero-search-box button:hover {
    background: var(--primary-hover);
}

/* Featured Card */
.featured-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.featured-card:hover {
    box-shadow: var(--shadow-lg);
}

.featured-image {
    height: 200px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.featured-card:hover .featured-image img {
    transform: scale(1.03);
}

.featured-placeholder {
    background: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-placeholder i {
    font-size: 3rem;
    color: var(--text-light);
}

.featured-content {
    padding: 20px;
}

.featured-badge {
    display: inline-block;
    background: var(--primary);
    color: #1a1a1a;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.featured-category {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-left: 10px;
}

.featured-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 12px 0 8px;
    line-height: 1.35;
}

.featured-content h2 a {
    color: var(--text-dark);
}

.featured-content h2 a:hover {
    color: var(--primary);
}

.featured-content > p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 12px;
    line-height: 1.5;
}

.featured-meta {
    display: flex;
    gap: 14px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.featured-meta i {
    margin-right: 5px;
}

/* ==================== Categories Bar ==================== */
.trending-section {
    background: var(--bg-light);
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    overflow: visible;
}

.trending-section .container {
    overflow: visible;
    display: flex;
    justify-content: center;
}

.trending-categories {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 12px;
    overflow: visible;
    padding: 4px 0;
    margin: 0;
    width: 100%;
    max-width: 1100px;
}

.trending-categories::-webkit-scrollbar {
    display: none;
}

.trending-cat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: normal;
    justify-content: flex-start;
}

.trending-cat:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.trending-cat i {
    font-size: 1rem;
    color: var(--primary);
}

.trending-cat span {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.trending-cat:hover span {
    color: var(--primary);
}

.trending-cat small {
    display: none;
}

/* ==================== Section Headers ==================== */
.section-header {
    text-align: center;
    margin-bottom: 24px;
    padding-top: 32px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==================== Editor's Picks Section ==================== */
.editor-picks-section {
    margin-bottom: 20px;
}

.editor-picks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.editor-pick-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
}

.editor-pick-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.pick-image {
    position: relative;
    height: 90px;
    overflow: hidden;
}

.pick-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.editor-pick-card:hover .pick-image img {
    transform: scale(1.03);
}

.pick-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--bg-gray);
}

.pick-placeholder i {
    font-size: 1.5rem;
    color: var(--text-light);
}

.pick-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #1a1a1a;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
}

.pick-content {
    padding: 10px;
}

.pick-category {
    display: inline-block;
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.pick-content h3 {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.pick-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pick-meta {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    color: var(--text-light);
}

/* ==================== Today's Best Section ==================== */
.today-best-section {
    margin-bottom: 20px;
}

.today-best-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.today-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    position: relative;
    transition: all var(--transition);
}

.today-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.today-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    background: var(--bg-dark);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    z-index: 2;
}

.today-image {
    height: 75px;
    overflow: hidden;
}

.today-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.today-card:hover .today-image img {
    transform: scale(1.03);
}

.today-content {
    padding: 8px;
}

.today-category {
    display: inline-block;
    color: var(--primary);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.today-content h3 {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.today-meta {
    display: flex;
    gap: 8px;
    font-size: 0.65rem;
    color: var(--text-light);
}

/* ==================== Quick Reads Section ==================== */
.quick-reads-section {
    margin-bottom: 24px;
    background: var(--bg-gray);
    padding: 20px 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
}

.quick-reads-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
}

.quick-reads-scroll::-webkit-scrollbar {
    height: 6px;
}

.quick-reads-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.quick-card {
    flex: 0 0 200px;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid var(--border);
}

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

.quick-image {
    height: 90px;
    overflow: hidden;
}

.quick-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-content {
    padding: 10px;
}

.quick-category {
    display: inline-block;
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.quick-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.quick-time {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ==================== Most Popular Section ==================== */
.most-popular-section {
    margin-bottom: 24px;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.popular-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid var(--border);
}

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

.popular-image {
    position: relative;
    height: 100px;
    overflow: hidden;
}

.popular-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-views {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}

.popular-content {
    padding: 10px;
}

.popular-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.popular-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ==================== Dark Mode - New Sections ==================== */
[data-theme="dark"] .editor-pick-card,
[data-theme="dark"] .today-card,
[data-theme="dark"] .quick-card,
[data-theme="dark"] .popular-card {
    background: #171717;
    border-color: #2e2e2e;
}

[data-theme="dark"] .pick-content h3,
[data-theme="dark"] .today-content h3,
[data-theme="dark"] .quick-content h4,
[data-theme="dark"] .popular-content h4 {
    color: #ffffff;
}

[data-theme="dark"] .pick-content p,
[data-theme="dark"] .pick-meta,
[data-theme="dark"] .today-meta,
[data-theme="dark"] .quick-time,
[data-theme="dark"] .popular-date {
    color: #a3a3a3;
}

[data-theme="dark"] .pick-category,
[data-theme="dark"] .today-category,
[data-theme="dark"] .quick-category {
    color: #ffffff;
}

[data-theme="dark"] .today-rank {
    background: #ffffff;
    color: #000000;
}

[data-theme="dark"] .quick-reads-section {
    background: #0a0a0a;
}

[data-theme="dark"] .pick-placeholder {
    background: #1f1f1f;
}

/* ==================== Responsive - New Sections ==================== */
@media (max-width: 1024px) {
    .editor-picks-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

@media (max-width: 640px) {
    .editor-picks-grid {
        grid-template-columns: 1fr;
    }

    .today-best-grid {
        grid-template-columns: 1fr;
    }

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

    .quick-card {
        flex: 0 0 200px;
    }
}

/* ==================== Posts Grid - Cards ==================== */
.posts-grid-full {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.post-card-modern {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.post-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.post-card-image {
    position: relative;
    height: 140px;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.post-card-modern:hover .post-card-image img {
    transform: scale(1.08);
}

.post-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-gray), var(--border));
}

.post-placeholder i {
    font-size: 3rem;
    color: var(--text-light);
}

.post-card-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: #1a1a1a;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.post-card-content {
    padding: 14px;
}

.post-card-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.post-card-content h3 a {
    color: inherit;
}

.post-card-content h3 a:hover {
    color: var(--primary);
}

.post-card-content > p {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.7rem;
    color: var(--text-light);
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.post-card-footer span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==================== Category Cards ==================== */
.browse-categories {
    padding: 48px 0 64px;
}

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

.category-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    transition: all var(--transition);
    text-decoration: none;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.category-card .category-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    transition: transform var(--transition);
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(3deg);
}

.category-card .category-icon i {
    font-size: 1.5rem;
    color: #1a1a1a;
}

.category-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.category-card span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ==================== Blog Layout with Sidebar ==================== */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

.blog-main {
    min-width: 0;
}

.blog-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
    align-self: flex-start;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.post-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

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

.post-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-body {
    padding: 20px;
}

.post-category {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 10px;
}

.post-title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.post-title a {
    color: var(--text-dark);
}

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

.post-excerpt {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.8125rem;
    color: var(--text-light);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ==================== Sidebar Widgets ==================== */
.widget {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--bg-gray);
}

.category-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: var(--text-body);
    border-radius: var(--radius);
    transition: all var(--transition-fast);
    margin-bottom: 4px;
}

.category-list li a:hover,
.category-list li.active a {
    background: var(--bg-gray);
    color: var(--primary);
}

.category-list .count {
    margin-left: auto;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--bg-gray);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    color: var(--text-muted);
}

.popular-posts li {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

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

.popular-posts a {
    display: block;
    color: var(--text-body);
}

.popular-posts .title {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
    line-height: 1.4;
}

.popular-posts .views {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Explore Widget */
.explore-widget .widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.explore-widget .widget-title i {
    color: var(--primary);
}

.explore-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.explore-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.explore-link.memorial {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}
.explore-link.memorial:hover {
    background: rgba(239, 68, 68, 0.2);
}

.explore-link.event {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}
.explore-link.event:hover {
    background: rgba(245, 158, 11, 0.2);
}

.explore-link.countdown {
    background: rgba(168, 85, 247, 0.1);
    color: #9333ea;
}
.explore-link.countdown:hover {
    background: rgba(168, 85, 247, 0.2);
}

.explore-link.quiz {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}
.explore-link.quiz:hover {
    background: rgba(245, 158, 11, 0.2);
}

.explore-link.poll {
    background: rgba(249, 115, 22, 0.1);
    color: #ea580c;
}
.explore-link.poll:hover {
    background: rgba(249, 115, 22, 0.2);
}

.explore-link.calculator {
    background: rgba(20, 184, 166, 0.1);
    color: #0d9488;
}
.explore-link.calculator:hover {
    background: rgba(20, 184, 166, 0.2);
}

/* Dark mode explore links */
[data-theme="dark"] .explore-link.memorial {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}
[data-theme="dark"] .explore-link.event {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}
[data-theme="dark"] .explore-link.countdown {
    background: rgba(168, 85, 247, 0.15);
    color: #a78bfa;
}
[data-theme="dark"] .explore-link.quiz {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}
[data-theme="dark"] .explore-link.poll {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
}
[data-theme="dark"] .explore-link.calculator {
    background: rgba(20, 184, 166, 0.15);
    color: #2dd4bf;
}

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

.page-numbers {
    display: flex;
    gap: 4px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-body);
    font-weight: 600;
    transition: all var(--transition-fast);
}

.page-link:hover,
.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #1a1a1a;
}

.page-link.prev,
.page-link.next {
    gap: 8px;
    padding: 0 18px;
}

/* ==================== Category Header ==================== */
.category-header {
    text-align: center;
    padding: 64px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #1a1a1a;
    border-radius: var(--radius-xl);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.category-header > * {
    position: relative;
    z-index: 1;
}

.category-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.category-desc {
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto 12px;
    font-size: 1.125rem;
}

.category-stats {
    font-size: 0.9375rem;
    opacity: 0.8;
}

/* ==================== Article Page ==================== */
.article {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
}

.article-header {
    padding: 28px 32px 20px;
    text-align: center;
}

.article-category {
    display: inline-block;
    padding: 5px 14px;
    background: var(--primary);
    color: #1a1a1a;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
}

.article-title {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Article Meta Row - TTS left, Author right */
.article-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    margin-top: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.article-meta-row .tts-player {
    margin: 0;
    flex: 0 1 auto;
    min-width: 280px;
    width: 100%;
    max-width: 520px;
}

.tts-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.tts-button-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tts-track {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    width: 100%;
}

.tts-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--bg-light) 0%, #fff 100%);
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    flex: 0 0 auto;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

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

.author-divider {
    width: 1px;
    height: 32px;
    background: var(--border-light);
    margin-left: auto;
}

.author-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-left: 4px;
}

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

.author-stats strong {
    color: var(--text-dark);
    font-weight: 600;
}

.author-stats i {
    font-size: 0.6875rem;
    width: 14px;
    text-align: center;
    color: var(--primary);
}

/* Mid screen - wrap nicely */
@media (max-width: 900px) {
    .article-header {
        padding: 20px 20px 16px;
    }

    .article-title {
        font-size: 1.4rem;
    }

    .article-meta-row {
        flex-direction: column;
        padding: 16px 20px;
        gap: 14px;
        align-items: stretch;
    }

    .article-meta-row .tts-player {
        width: 100%;
        min-width: auto;
        margin: 0;
    }

    .article-author {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .tts-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .tts-button-group {
        justify-content: flex-start;
    }

    .tts-track {
        width: 100%;
        min-width: 0;
    }
}

.article-image {
    margin: 0;
    overflow: hidden;
    width: 100%;
}

.article-image img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}

.article-content {
    padding: 48px;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-body);
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 40px 0 20px;
}

.article-content h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 32px 0 16px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
    margin: 20px 0;
    padding-left: 28px;
}

.article-content li {
    margin-bottom: 10px;
    list-style: disc;
}

.article-content ol li {
    list-style: decimal;
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 24px 32px;
    margin: 32px 0;
    background: var(--bg-light);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-style: italic;
    color: var(--text-body);
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: #1a1a1a;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text-body);
}

.btn-secondary:hover {
    background: var(--border);
}

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

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

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8125rem;
}

/* ==================== Footer ==================== */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.8);
    padding: 72px 0 32px;
    
}

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

.footer-section {}

.footer-logo {
    margin-bottom: 24px;
}

.footer-logo img {
    height: 64px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.footer-logo a:hover img {
    opacity: 0.85;
}

.footer-title {
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-title i {
    color: var(--primary);
}

.footer-desc {
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 24px;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

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

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: white;
    padding-left: 4px;
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.875rem;
}

.footer-legal {
    margin-top: 16px;
    font-size: 0.8125rem;
}

.footer-legal a {
    color: rgba(255,255,255,0.6);
}

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

/* Footer Newsletter */
.footer-newsletter {
    margin-top: 40px;
    padding: 32px 40px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-newsletter-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-newsletter-text {
    flex: 1;
    min-width: 280px;
}

.footer-newsletter-text h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-newsletter-text h3 i {
    color: #60a5fa;
}

.footer-newsletter-text p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 0.9375rem;
}

.footer-newsletter-form {
    display: flex;
    gap: 12px;
    flex: 1;
    max-width: 480px;
    min-width: 300px;
}

.footer-newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.footer-newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.footer-newsletter-form input:focus {
    outline: none;
    border-color: #60a5fa;
    background: rgba(255, 255, 255, 0.15);
}

.footer-newsletter-form button {
    padding: 14px 28px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #1a1a1a;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.footer-newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

@media (max-width: 768px) {
    .footer-newsletter {
        padding: 24px 20px;
    }

    .footer-newsletter-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-newsletter-text {
        min-width: 100%;
    }

    .footer-newsletter-form {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        flex-direction: column;
    }

    .footer-newsletter-form button {
        justify-content: center;
    }
}

.powered-by {
    opacity: 0.4;
    margin-top: 12px;
    font-size: 0.8125rem;
}

/* ==================== Popular Categories Section ==================== */
.popular-categories-section {
    background: var(--bg-light);
    padding: 32px 0;
    margin-top: 32px;
}

.popular-categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.popular-categories-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.btn-view-all:hover {
    gap: 10px;
}

.popular-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
    overflow: visible;
    padding: 4px 0 0;
    margin: 0;
}

.popular-categories-list::-webkit-scrollbar {
    display: none;
}

.pop-cat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    flex: 1 1 220px;
    min-width: 200px;
    white-space: normal;
    transition: all var(--transition-fast);
}

.pop-cat-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.pop-cat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.pop-cat-icon i {
    font-size: 1rem;
    color: var(--primary);
}

.pop-cat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pop-cat-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.pop-cat-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==================== Categories Page ==================== */
.categories-page {
    padding: 0 0 60px;
}

.page-header-simple {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 40px;
}

.page-header-simple h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.page-header-simple p {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 8px 0;
}

.category-box {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    background: var(--bg-white, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius-lg, 12px);
    transition: all var(--transition, 0.2s ease);
    text-decoration: none;
    color: inherit;
}

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

.category-box-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light, #eff6ff);
    border-radius: var(--radius-lg, 12px);
    flex-shrink: 0;
}

.category-box-icon i {
    font-size: 1.5rem;
    color: var(--primary, #2563eb);
}

.category-box:hover .category-box-icon {
    background: var(--primary);
}

.category-box:hover .category-box-icon i {
    color: white;
}

.category-box-content {
    flex: 1;
    min-width: 0;
}

.category-box-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark, #1e293b);
    margin: 0 0 6px 0;
}

.category-box-content p {
    font-size: 0.875rem;
    color: var(--text-muted, #64748b);
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.category-box-count {
    font-size: 0.8125rem;
    color: var(--text-light, #94a3b8);
    font-weight: 500;
    display: inline-block;
}

.category-box-arrow {
    color: var(--text-light, #94a3b8);
    font-size: 1rem;
    transition: all var(--transition-fast, 0.15s ease);
    flex-shrink: 0;
}

.category-box:hover .category-box-arrow {
    color: var(--primary);
    transform: translateX(4px);
}

/* Category box focus styles */
.category-box:focus,
.category-box:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-color: var(--primary);
}

/* Dark mode category boxes */
[data-theme="dark"] .category-box {
    background: #171717;
    border-color: #2e2e2e;
}

[data-theme="dark"] .category-box:hover,
[data-theme="dark"] .category-box:focus,
[data-theme="dark"] .category-box:focus-visible {
    border-color: #ffffff;
    outline-color: #ffffff;
}

[data-theme="dark"] .category-box-icon {
    background: #262626;
}

[data-theme="dark"] .category-box-icon i {
    color: #ffffff;
}

[data-theme="dark"] .category-box:hover .category-box-icon,
[data-theme="dark"] .category-box:focus .category-box-icon {
    background: #ffffff;
}

[data-theme="dark"] .category-box:hover .category-box-icon i,
[data-theme="dark"] .category-box:focus .category-box-icon i {
    color: #000000;
}

[data-theme="dark"] .category-box-content h3 {
    color: #ffffff;
}

[data-theme="dark"] .category-box-content p {
    color: #a3a3a3;
}

[data-theme="dark"] .category-box-count {
    color: #737373;
}

[data-theme="dark"] .category-box-arrow {
    color: #737373;
}

[data-theme="dark"] .category-box:hover .category-box-arrow {
    color: #ffffff;
}

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

    .category-box {
        padding: 20px 22px;
        gap: 16px;
    }

    .category-box-icon {
        width: 54px;
        height: 54px;
    }

    .page-header-simple h1 {
        font-size: 1.75rem;
    }

    .popular-categories .section-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* ==================== Languages Page ==================== */
.languages-page {
    padding: 0 0 60px;
}

.languages-stats {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin-top: 8px;
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.language-group {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.language-group-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-gray);
    border-bottom: 1px solid var(--border);
}

.language-group-title .lang-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.language-group-title .lang-count {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-white);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.locale-list {
    padding: 8px;
}

.locale-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.locale-item:hover {
    background: var(--bg-gray);
}

.locale-item.active {
    background: var(--primary-light);
}

.locale-flag {
    font-size: 1.5rem;
    line-height: 1;
}

.locale-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.locale-native {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.locale-code {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: monospace;
}

.locale-current {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #1a1a1a;
    border-radius: 50%;
    font-size: 0.85rem;
}

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

    .locale-item {
        padding: 10px;
    }

    .locale-flag {
        font-size: 1.25rem;
    }
}

/* ==================== Page Top Spacing ==================== */
.main-content > .container:first-child {
    padding-top: 32px;
}

/* ==================== Breadcrumb ==================== */
/* Page Breadcrumb (category pages) */
.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    margin: 0;
    padding: 0px 0 12px 0;
    color: var(--text-muted);
}

.page-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.page-breadcrumb i {
    font-size: 0.625rem;
    color: var(--text-light);
}

.page-breadcrumb span {
    color: var(--text-dark);
    font-weight: 500;
}

[data-theme="dark"] .page-breadcrumb span {
    color: var(--text-body);
}

/* Reduce mag-layout padding when breadcrumb is present */
.page-breadcrumb + .mag-layout {
    padding-top: 16px;
}

.breadcrumb {
    margin-bottom: 24px;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.875rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: var(--text-light);
}

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

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

.breadcrumb-item.active {
    color: var(--text-body);
    font-weight: 500;
}

/* ==================== Alerts ==================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9375rem;
}

.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger, .alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ==================== Empty State ==================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 24px;
}

.empty-state h2 {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 1.0625rem;
}

/* ==================== Search Header ==================== */
.search-header {
    padding: 32px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.search-header h1 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.search-header p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-featured {
        max-width: 450px;
        margin: 0 auto;
    }

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

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

    .blog-sidebar {
        position: static;
    }

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

@media (max-width: 768px) {
    /* Container - reduced padding on mobile */
    .container {
        padding: 0 16px;
    }

    /* Header */
    .header-inner {
        height: 56px;
        gap: 12px;
    }

    .logo img {
        height: 32px;
        max-width: 140px;
    }

    /* Mobile nav - hidden off screen by default, shown via .active class */
    .mobile-nav-toggle {
        display: flex !important;
    }

    .header-actions {
        gap: 6px;
    }

    .btn-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .language-selector .btn-icon {
        padding: 0 10px;
        gap: 4px;
    }

    .language-selector .lang-code {
        font-size: 0.85rem;
    }

    /* Search Overlay Mobile */
    .search-overlay {
        padding: 20px;
        padding-top: 80px;
        align-items: flex-start;
    }

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

    .search-form {
        flex-direction: row;
        padding: 0;
        max-width: 100%;
        gap: 8px;
    }

    .search-input {
        flex: 1;
        min-width: 0;
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .btn-search {
        padding: 14px 18px;
        border-radius: 10px;
        flex-shrink: 0;
    }

    .btn-close-search {
        position: fixed;
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }

    /* Hero Section */
    .hero-modern {
        padding: 20px 0;
    }

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

    .hero-text h1 {
        font-size: 1.5rem;
    }

    /* Abstract animation mobile */
    .hero-abstract {
        width: 60px;
        height: 60px;
        margin: 16px 0;
        gap: 4px;
    }

    .hero-abstract .grid-cell {
        border-radius: 3px;
    }

    .hero-text p {
        font-size: 0.9375rem;
        margin-bottom: 16px;
    }

    .hero-search-box {
        flex-direction: column;
        border-radius: var(--radius);
        padding: 6px;
    }

    .hero-search-box i {
        display: none;
    }

    .hero-search-box input {
        padding: 12px;
        text-align: center;
        font-size: 0.875rem;
    }

    .hero-search-box button {
        width: 100%;
        padding: 12px;
        border-radius: var(--radius-sm);
        font-size: 0.8125rem;
    }

    .featured-card {
        display: none;
    }

    /* Trending/Categories Bar */
    .trending-section {
        padding: 10px 0;
        overflow: visible;
    }

    .trending-section .container {
        padding: 0;
        overflow: visible;
    }

    .trending-categories {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        overflow: visible;
        padding: 0 16px;
        margin: 0;
        scrollbar-width: none;
    }

    .trending-categories::-webkit-scrollbar {
        display: none;
    }

    .trending-cat {
        flex: 1 1 160px;
        max-width: calc(50% - 8px);
        min-width: 150px;
        padding: 8px 12px;
        white-space: normal;
    }

    .trending-cat:first-child {
        margin-left: 0;
    }

    .trending-cat:last-child {
        margin-right: 0;
    }

    .trending-cat i {
        font-size: 0.875rem;
    }

    .trending-cat span {
        font-size: 0.8125rem;
    }

    .trending-cat small {
        display: none;
    }

    /* Popular Categories */
    .popular-categories-section {
        padding: 20px 0;
        margin-top: 20px;
    }

    .popular-categories-section > .container {
        padding: 0 16px;
    }

    .popular-categories-header {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 16px;
    }

    .popular-categories-header h2 {
        font-size: 1rem;
        flex: 1;
    }

    .btn-view-all {
        font-size: 0.85rem;
        padding: 6px 10px;
        background: var(--bg-gray);
        border-radius: var(--radius-sm);
    }

    .popular-categories-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        overflow: visible;
        padding: 0;
        margin: 0;
    }

    .pop-cat-item {
        flex: 1 1 calc(50% - 5px);
        min-width: calc(50% - 5px);
        max-width: calc(50% - 5px);
        padding: 12px;
    }

    .pop-cat-icon {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }

    .pop-cat-info {
        gap: 2px;
        flex: 1;
        min-width: 0;
    }

    .pop-cat-name {
        font-size: 0.8125rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pop-cat-count {
        font-size: 0.6875rem;
    }

    /* Section Headers */
    .section-header {
        margin-bottom: 20px;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }

    /* Posts Grid */
    .posts-grid-full {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .post-card-modern {
        flex-direction: column;
    }

    .post-card-image {
        height: 120px;
    }

    .post-card-content {
        padding: 10px;
    }

    .post-card-content h3 {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .post-card-content > p {
        display: none;
    }

    .post-card-footer {
        padding-top: 8px;
        gap: 8px;
        font-size: 0.65rem;
    }

    /* Category Grid */
    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .category-card {
        padding: 16px 12px;
    }

    .category-card .category-icon {
        width: 48px;
        height: 48px;
    }

    /* Article Page */
    .article {
        border-radius: 0;
        margin: 0 -16px;
    }

    .article-header {
        padding: 16px 14px 12px;
    }

    .article-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .article-category {
        margin-bottom: 10px;
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .article-meta {
        gap: 12px;
        font-size: 0.8rem;
    }

    .article-meta-row {
        padding: 14px;
        gap: 12px;
    }

    .article-content {
        padding: 16px;
    }

    .article-image {
        margin: 0;
        border-radius: 0;
    }

    /* Categories Page */
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .category-box {
        padding: 18px 20px;
        gap: 16px;
    }

    .category-box-icon {
        width: 52px;
        height: 52px;
    }

    .category-box-icon i {
        font-size: 1.25rem;
    }

    .category-box-content h3 {
        font-size: 1rem;
    }

    .page-header-simple {
        padding: 24px 16px;
        margin-bottom: 24px;
    }

    .page-header-simple h1 {
        font-size: 1.5rem;
    }

    /* Sidebar */
    .blog-sidebar {
        margin-top: 32px;
    }

    .widget {
        padding: 16px;
    }

    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }

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

    .footer-logo img {
        height: 48px;
        max-width: 180px;
    }

    /* Category Header */
    .category-header {
        padding: 32px 16px;
    }

    .category-title {
        font-size: 1.5rem;
    }

    /* Breadcrumb */
    .breadcrumb {
        margin-bottom: 16px;
    }

    .breadcrumb ol {
        font-size: 0.8125rem;
    }

    /* Page Top Spacing */
    .main-content > .container:first-child {
        padding-top: 20px;
    }

    /* Pagination */
    .pagination {
        gap: 8px;
        flex-wrap: wrap;
    }

    .page-link {
        padding: 8px 12px;
        font-size: 0.8125rem;
    }

    .page-numbers {
        gap: 4px;
    }

    /* Dropdown menus */
    .dropdown-menu {
        min-width: 180px;
        padding: 6px;
    }

    .dropdown-menu a {
        padding: 10px 12px;
        font-size: 0.875rem;
    }

    .language-selector .dropdown-menu {
        min-width: 140px;
    }
}

/* ==================== Utility Classes ==================== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: 1.5rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

/* ==================== Language Switcher ==================== */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.language-switcher .lang-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.language-switcher .lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    background: var(--bg-gray);
    color: var(--text-body);
    border: 2px solid transparent;
    transition: all var(--transition-fast);
}

.language-switcher .lang-btn:hover {
    background: var(--primary);
    color: #1a1a1a;
}

.language-switcher .lang-btn.active {
    background: var(--primary);
    color: #1a1a1a;
}

/* ==================== Legal Pages ==================== */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px;
}

.legal-page h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.legal-page .last-updated {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-style: italic;
}

.legal-content section {
    margin-bottom: 32px;
}

.legal-content h2 {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 32px 0 16px;
    color: var(--text-dark);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.legal-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-body);
}

.legal-content p {
    margin-bottom: 16px;
    line-height: 1.75;
    color: var(--text-body);
}

.legal-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.legal-content li {
    margin-bottom: 10px;
    line-height: 1.65;
    color: var(--text-body);
    list-style: disc;
}

.legal-content a {
    color: var(--primary);
    text-decoration: underline;
}

/* ==================== Home Posts Section ==================== */
.home-posts {
    padding-bottom: 24px;
}

/* ==================== Primary Light Background ==================== */
.primary-light {
    background: var(--primary-light);
}

/* ==================== Mobile Navigation ==================== */
@media (max-width: 768px) {
    /* Mobile Menu Panel */
    .main-nav {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-white);
        padding: 16px;
        transform: translateX(-100%);
        transition: transform var(--transition);
        z-index: 999;
        overflow-y: auto;
        display: block !important;
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }

    .nav-list > li {
        width: 100%;
    }

    .nav-list > li > a {
        display: block;
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: var(--radius);
        background: var(--bg-light);
        margin-bottom: 4px;
    }

    .nav-list > li > a:hover,
    .nav-list > li > a.active {
        background: var(--primary-light);
        color: var(--primary);
    }

    /* Mobile: show text, hide icons */
    .nav-list > li > a.nav-icon-link {
        padding: 14px 16px;
    }

    .nav-list > li > a.nav-icon-link .nav-text {
        display: inline;
    }

    .nav-list > li > a.nav-icon-link .nav-icon {
        display: none;
    }

    /* Mobile Dropdown */
    .dropdown .dropdown-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .dropdown .dropdown-toggle i {
        transition: transform var(--transition);
    }

    .dropdown.open .dropdown-toggle i {
        transform: rotate(180deg);
    }

    .dropdown-menu {
        position: static !important;
        transform: none !important;
        left: 0 !important;
        opacity: 1;
        visibility: visible;
        max-height: 0;
        overflow: hidden;
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 0;
        margin-top: 4px;
        background: var(--bg-gray);
        border-radius: var(--radius);
        transition: max-height var(--transition), padding var(--transition);
    }

    .dropdown-menu.show {
        max-height: 600px;
        padding: 8px;
    }

    .dropdown-menu li {
        margin: 0;
    }

    .dropdown-menu a {
        padding: 12px 14px;
        font-size: 0.9375rem;
        border-radius: var(--radius-sm);
    }

    .dropdown-menu a:hover {
        background: var(--bg-white);
    }

    .dropdown-divider {
        margin: 8px 0;
    }

    /* Mobile Language Selector */
    .language-selector {
        position: relative;
    }

    .language-selector .dropdown-menu {
        position: absolute !important;
        top: calc(100% + 8px) !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        min-width: 160px;
        background: var(--bg-white);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow-lg);
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        padding: 0;
        z-index: 1001;
        transition: all var(--transition);
    }

    .language-selector .dropdown-menu.show {
        max-height: 300px;
        opacity: 1;
        visibility: visible;
        padding: 8px;
    }

    .language-selector .dropdown-menu a {
        display: block;
        padding: 10px 14px;
        color: var(--text-body);
        font-size: 0.875rem;
        border-radius: var(--radius-sm);
    }

    .language-selector .dropdown-menu a:hover {
        background: var(--bg-gray);
    }

    .language-selector .dropdown-menu a.active {
        background: var(--primary-light);
        color: var(--primary);
        font-weight: 600;
    }
}

/* ==================== Search Form Buttons ==================== */
.btn-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #1a1a1a;
    border: none;
    border-radius: var(--radius);
    font-size: 1.125rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-search:hover {
    background: var(--primary-hover);
}

.btn-close-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--bg-gray);
    color: var(--text-body);
    border: none;
    border-radius: var(--radius);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-close-search:hover {
    background: var(--danger);
    color: white;
}

/* ==================== Reading Progress Bar ==================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gray);
    z-index: 1001;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0;
    transition: width 100ms ease-out;
}

/* ==================== Copy Code Button ==================== */
.copy-code-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-fast);
}

pre:hover .copy-code-btn {
    opacity: 1;
}

.copy-code-btn:hover {
    background: var(--primary);
    color: #1a1a1a;
    border-color: var(--primary);
}

/* ==================== Toast Notifications ==================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: var(--radius);
    background: var(--bg-dark);
    color: white;
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: var(--shadow-xl);
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition);
    z-index: 2000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--danger);
}

.toast-warning {
    background: var(--warning);
    color: var(--text-dark);
}

.toast-info {
    background: var(--primary);
}

/* ==================== Language Selector Dropdown ==================== */
.language-selector {
    position: relative;
}

.language-selector .dropdown-menu {
    left: 50% !important;
    right: auto;
    transform: translateX(-50%) translateY(10px) !important;
    min-width: 160px;
    padding: 8px;
}

.language-selector:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) !important;
}

.language-selector .dropdown-menu li {
    margin: 0;
}

.language-selector .dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-body);
    transition: all var(--transition-fast);
}

.language-selector .dropdown-menu a:hover {
    background: var(--bg-gray);
}

.language-selector .dropdown-menu a.active {
    background: var(--primary);
    color: #1a1a1a;
    font-weight: 500;
}

.dropdown-menu-right {
    right: 0;
    left: auto;
    transform: translateY(10px);
}

.dropdown:hover .dropdown-menu-right {
    transform: translateY(0);
}

/* ==================== Code Blocks ==================== */
pre {
    background: var(--bg-dark);
    border-radius: var(--radius);
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
    position: relative;
}

pre code {
    color: #e2e8f0;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

code {
    background: var(--bg-gray);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875em;
    color: var(--danger);
}

pre code {
    background: none;
    padding: 0;
    color: #e2e8f0;
}

/* ==================== About & Contact Pages ==================== */
.page-header {
    text-align: center;
    padding: 64px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: var(--radius-xl);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-header > * {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.page-header p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.page-content {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 48px;
    border: 1px solid var(--border);
}

.page-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 32px 0 16px;
}

.page-content h2:first-child {
    margin-top: 0;
}

.page-content p {
    margin-bottom: 16px;
    line-height: 1.75;
    color: var(--text-body);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-fast);
    background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group .error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 6px;
}

/* ==================== 404 Error Page ==================== */
.error-page {
    text-align: center;
    padding: 80px 24px;
    max-width: 600px;
    margin: 0 auto;
}

.error-page h1 {
    font-size: 6rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 16px;
    line-height: 1;
}

.error-page h2 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.error-page p {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 32px;
}

/* ==================== Article Footer & Share ==================== */
.article-footer {
    padding: 32px 48px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tags-label,
.share-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9375rem;
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-gray);
    color: var(--text-body);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.tag:hover {
    background: var(--primary);
    color: #1a1a1a;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: white;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.share-btn.twitter { background: #1da1f2; }
.share-btn.facebook { background: #4267b2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.email { background: var(--text-muted); }

.share-btn:hover { color: white; }

/* Affiliate Disclosure */
.affiliate-disclosure {
    margin: 24px 48px;
    padding: 16px 20px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid var(--warning);
    border-radius: var(--radius);
    color: #92400e;
    font-size: 0.9375rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.affiliate-disclosure i {
    color: var(--warning);
    font-size: 1.1rem;
    margin-top: 2px;
}

/* Related Posts */
.related-posts {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 2px solid var(--border);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 24px;
}

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

@media (max-width: 768px) {
    .article-footer {
        padding: 24px;
        flex-direction: column;
    }

    .affiliate-disclosure {
        margin: 16px 24px;
    }

    .posts-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ==================== Animations ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ==================== Print Styles ==================== */
@media print {
    .header,
    .footer,
    .blog-sidebar,
    .reading-progress,
    .tts-player,
    .copy-code-btn,
    .pagination {
        display: none !important;
    }

    .article {
        border: none;
        box-shadow: none;
    }

    .article-content {
        padding: 0;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}

/* ==================== Magazine Layout Styles ==================== */

/* Hero Section */
.mag-hero {
    padding: 20px 0;
    background: var(--bg-gray);
}

.mag-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    align-items: start;
}

.mag-featured {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 320px;
}

.mag-featured-link {
    display: block;
    height: 100%;
}

.mag-featured-image {
    position: relative;
    height: 100%;
}

.mag-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mag-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

.mag-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 260px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.mag-placeholder i {
    font-size: 4rem;
    color: rgba(255,255,255,0.3);
}

.mag-featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    color: white;
}

.mag-tag {
    display: inline-block;
    background: var(--primary);
    color: #1a1a1a;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.mag-featured-content h1 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
}

.mag-featured-content p {
    font-size: 0.8rem;
    opacity: 0.9;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mag-meta {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    opacity: 0.8;
}

.mag-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Hero Sidebar */
.mag-hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow: hidden;
}

.mag-sidebar-widget {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    border: 1px solid var(--border);
}

.mag-sidebar-widget:first-child {
    flex: 1;
    overflow: hidden;
}

.mag-sidebar-widget.mag-quick-links {
    flex-shrink: 0;
}

.mag-sidebar-widget h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mag-sidebar-widget h3 i {
    color: var(--primary);
}

.mag-trending-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.mag-trending-list li {
    background: var(--bg-gray);
    border-radius: var(--radius);
    padding: 10px;
}

.mag-trending-list a {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--text-body);
    transition: color var(--transition-fast);
}

.mag-trending-list a:hover {
    color: var(--primary);
}

.mag-trend-num {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.5;
    line-height: 1;
}

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

.mag-trend-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mag-trend-views {
    font-size: 0.65rem;
    color: var(--text-light);
}

.mag-trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mag-trend-badge.post {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.mag-trend-badge.memorial {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.mag-trend-badge.quiz {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.mag-trend-badge.poll {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.mag-trend-badge.event {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.mag-trend-badge.countdown {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.mag-trend-badge.calculator {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.mag-trend-badge i {
    font-size: 0.6rem;
}

.mag-cat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mag-cat-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: var(--bg-gray);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-body);
    transition: all var(--transition-fast);
}

.mag-cat-tag:hover {
    background: var(--primary);
    color: #1a1a1a;
}

.mag-cat-tag i {
    font-size: 0.65rem;
}

/* Content-type specific quick link colors */
.mag-cat-tag.memorial { background: rgba(14, 165, 233, 0.1); color: #0ea5e9; }
.mag-cat-tag.memorial:hover { background: #0ea5e9; color: white; }
.mag-cat-tag.event { background: rgba(236, 72, 153, 0.1); color: #ec4899; }
.mag-cat-tag.event:hover { background: #ec4899; color: white; }
.mag-cat-tag.countdown { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.mag-cat-tag.countdown:hover { background: #ef4444; color: white; }
.mag-cat-tag.quiz { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.mag-cat-tag.quiz:hover { background: #10b981; color: white; }
.mag-cat-tag.poll { background: rgba(249, 115, 22, 0.1); color: #f97316; }
.mag-cat-tag.poll:hover { background: #f97316; color: white; }
.mag-cat-tag.calculator { background: rgba(14, 165, 233, 0.1); color: #0ea5e9; }
.mag-cat-tag.calculator:hover { background: #0ea5e9; color: white; }

/* Card type specific accent colors */
/* Content type cards - no border */
.post-card { border-left: 3px solid var(--primary); }

/* Secondary Featured Row - Distinct Pattern */
.mag-secondary {
    padding: 20px 0;
    background: var(--bg-white);
    border-top: 2px solid var(--primary);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.mag-secondary-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.mag-secondary-label i {
    font-size: 0.65rem;
}

.mag-secondary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.mag-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-white);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.mag-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.mag-card a {
    display: block;
}

.mag-card-image {
    position: relative;
    height: 120px;
    overflow: hidden;
}

.mag-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.mag-card:hover .mag-card-image img {
    transform: scale(1.05);
}

.mag-placeholder-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--bg-gray);
}

.mag-placeholder-sm i {
    font-size: 1.5rem;
    color: var(--text-light);
}

.mag-card-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--primary);
    color: #1a1a1a;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
}

.mag-card-body {
    padding: 12px;
}

.mag-card-body h3 {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.mag-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    color: var(--text-light);
}

/* Main Magazine Layout */
.mag-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    padding: 32px 0;
}

.mag-main {
    min-width: 0;
}

/* Full Page Layout with Sidebar */
.mag-full-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    padding: 24px 0 32px;
    align-items: start;
}

.mag-full-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mag-full-main .home-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.mag-full-main .mag-secondary {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.mag-full-layout .mag-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

/* Adjust grids inside full layout for narrower main column */
.mag-full-main .content-grid.grid-4 {
    grid-template-columns: repeat(3, 1fr);
}

/* Trending grid responsive for narrower main column */
.mag-full-main .mag-trending-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mag-full-main .mag-trending-list li {
    padding: 8px;
}

.mag-full-main .mag-trend-title {
    font-size: 0.8rem;
    line-height: 1.3;
    -webkit-line-clamp: 2;
}

@media (max-width: 1400px) {
    .mag-full-main .mag-trending-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .mag-full-main .mag-trend-title {
        font-size: 0.85rem;
    }
}

@media (max-width: 1200px) {
    .mag-full-layout {
        grid-template-columns: 1fr 280px;
        gap: 24px;
    }

    .mag-full-main .mag-trending-list {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .mag-full-main .mag-trending-list li {
        padding: 6px;
    }

    .mag-full-main .mag-trend-title {
        font-size: 0.7rem;
    }

    .mag-full-main .mag-trend-num {
        font-size: 0.85rem;
    }
}

.mag-full-main .dual-grid {
    grid-template-columns: 1fr;
    gap: 20px;
}

.mag-full-main .mag-secondary-grid {
    grid-template-columns: repeat(3, 1fr);
}

.mag-section-header {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: linear-gradient(90deg, var(--bg-gray) 0%, transparent 100%);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    position: relative;
}

.mag-section-header::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
}

.mag-section-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.mag-section-header h2 i {
    color: var(--primary);
    font-size: 1rem;
}

[data-theme="dark"] .mag-section-header {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1) 0%, transparent 100%);
}

[data-theme="dark"] .mag-section-header::after {
    background: linear-gradient(90deg, #2e2e2e, transparent);
}

/* Posts List */
.mag-posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mag-post-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
}

.mag-post-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.mag-post-link {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
}

.mag-post-thumb {
    height: 130px;
    overflow: hidden;
}

.mag-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.mag-post-item:hover .mag-post-thumb img {
    transform: scale(1.05);
}

.mag-post-info {
    padding: 14px 14px 14px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mag-post-cat {
    display: inline-block;
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.mag-post-info h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.mag-post-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mag-post-meta {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    color: var(--text-light);
}

.mag-post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Sidebar */
.mag-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.mag-widget {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.mag-widget:last-child {
    margin-bottom: 0;
}

.mag-widget-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mag-widget-title i {
    color: var(--primary);
}

.mag-search-form {
    display: flex;
    gap: 8px;
}

.mag-search-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    background: var(--bg-gray);
}

.mag-search-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
}

.mag-search-form button {
    padding: 10px 14px;
    background: var(--primary);
    color: #1a1a1a;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.mag-search-form button:hover {
    background: var(--primary-dark);
}

.mag-widget-list {
    list-style: none;
}

.mag-widget-list li {
    border-bottom: 1px solid var(--border);
}

.mag-widget-list li:last-child {
    border-bottom: none;
}

.mag-widget-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: var(--text-body);
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.mag-widget-list a:hover,
.mag-widget-list a.active {
    color: var(--primary);
}

.mag-widget-list a i {
    width: 18px;
    text-align: center;
    color: var(--text-light);
}

.mag-widget-list a:hover i,
.mag-widget-list a.active i {
    color: var(--primary);
}

.mag-widget-list span {
    flex: 1;
}

.mag-widget-list .count {
    flex: 0;
    font-size: 0.85rem;
    color: var(--text-light);
    background: var(--bg-gray);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.mag-widget-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary);
}

.mag-widget-more:hover {
    text-decoration: underline;
}

.mag-popular-list {
    list-style: none;
}

.mag-popular-list li {
    border-bottom: 1px solid var(--border);
}

.mag-popular-list li:last-child {
    border-bottom: none;
}

.mag-popular-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: var(--text-body);
    transition: color var(--transition-fast);
}

.mag-popular-list a:hover {
    color: var(--primary);
}

.mag-popular-list img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.mag-pop-placeholder {
    width: 60px;
    height: 45px;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mag-pop-placeholder i {
    font-size: 1rem;
    color: var(--text-light);
}

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

.mag-pop-title {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 4px;
}

.mag-pop-views {
    font-size: 0.7rem;
    color: var(--text-light);
}

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

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

.mag-newsletter .mag-widget-title i {
    color: white;
}

.mag-newsletter p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 14px;
}

.mag-newsletter-form input {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.mag-newsletter-form button {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mag-newsletter-form button:hover {
    background: white;
    color: var(--primary);
}

/* Dark Mode - Magazine */
[data-theme="dark"] .mag-hero {
    background: #0a0a0a;
}

[data-theme="dark"] .mag-sidebar-widget {
    background: #171717;
    border-color: #2e2e2e;
}

[data-theme="dark"] .mag-sidebar-widget h3 {
    color: #ffffff;
}

[data-theme="dark"] .mag-trending-list li {
    background: #1f1f1f;
}

[data-theme="dark"] .mag-trending-list a {
    color: #e5e5e5;
}

[data-theme="dark"] .mag-trend-title {
    color: #ffffff;
}

[data-theme="dark"] .mag-cat-tag {
    background: #262626;
    color: #e5e5e5;
}

[data-theme="dark"] .mag-cat-tag:hover {
    background: var(--primary);
    color: #1a1a1a;
}

/* Dark mode: content-type quick link colors */
[data-theme="dark"] .mag-cat-tag.memorial { background: rgba(139, 92, 246, 0.2); }
[data-theme="dark"] .mag-cat-tag.event { background: rgba(236, 72, 153, 0.2); }
[data-theme="dark"] .mag-cat-tag.countdown { background: rgba(239, 68, 68, 0.2); }
[data-theme="dark"] .mag-cat-tag.quiz { background: rgba(16, 185, 129, 0.2); }
[data-theme="dark"] .mag-cat-tag.poll { background: rgba(249, 115, 22, 0.2); }
[data-theme="dark"] .mag-cat-tag.calculator { background: rgba(14, 165, 233, 0.2); }

/* Dark mode: trend badges */
[data-theme="dark"] .mag-trend-badge.post { background: rgba(37, 99, 235, 0.2); }
[data-theme="dark"] .mag-trend-badge.memorial { background: rgba(139, 92, 246, 0.2); }
[data-theme="dark"] .mag-trend-badge.quiz { background: rgba(16, 185, 129, 0.2); }
[data-theme="dark"] .mag-trend-badge.poll { background: rgba(249, 115, 22, 0.2); }
[data-theme="dark"] .mag-trend-badge.event { background: rgba(236, 72, 153, 0.2); }
[data-theme="dark"] .mag-trend-badge.countdown { background: rgba(239, 68, 68, 0.2); }
[data-theme="dark"] .mag-trend-badge.calculator { background: rgba(14, 165, 233, 0.2); }

[data-theme="dark"] .mag-secondary {
    background: #0f0f0f;
    border-top-color: #f59e0b;
    border-bottom-color: #2e2e2e;
}

[data-theme="dark"] .mag-secondary-label {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #1a1a1a;
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.4);
}

/* Dark mode: Fix tags and badges that use --primary (which is white in dark mode) */
[data-theme="dark"] .mag-tag,
[data-theme="dark"] .mag-card-tag {
    background: #f59e0b;
    color: #1a1a1a;
}

[data-theme="dark"] .card-badge,
[data-theme="dark"] .content-card .card-badge {
    background: #f59e0b;
    color: #1a1a1a;
}

[data-theme="dark"] .featured-badge {
    background: #f59e0b;
    color: #1a1a1a;
}

[data-theme="dark"] .mag-card {
    background: #171717;
    border-color: #2e2e2e;
}

[data-theme="dark"] .mag-card-body h3 {
    color: #ffffff;
}

[data-theme="dark"] .mag-placeholder-sm {
    background: #1f1f1f;
}

[data-theme="dark"] .mag-section-header h2 {
    color: #ffffff;
}

[data-theme="dark"] .mag-post-item {
    background: #171717;
    border-color: #2e2e2e;
}

[data-theme="dark"] .mag-post-item:hover {
    border-color: var(--primary);
}

[data-theme="dark"] .mag-post-info h3 {
    color: #ffffff;
}

[data-theme="dark"] .mag-post-info p {
    color: #a3a3a3;
}

[data-theme="dark"] .mag-widget {
    background: #171717;
    border-color: #2e2e2e;
}

[data-theme="dark"] .mag-full-main .home-section {
    background: #171717;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

[data-theme="dark"] .mag-full-main .mag-secondary {
    background: #171717;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

[data-theme="dark"] .mag-widget-title {
    color: #ffffff;
    border-color: #2e2e2e;
}

[data-theme="dark"] .mag-widget-list li {
    border-color: #2e2e2e;
}

[data-theme="dark"] .mag-widget-list a {
    color: #e5e5e5;
}

[data-theme="dark"] .mag-widget-list .count {
    background: #262626;
    color: #a3a3a3;
}

[data-theme="dark"] .mag-search-form input {
    background: #0f0f0f;
    border-color: #2e2e2e;
    color: #ffffff;
}

[data-theme="dark"] .mag-search-form input:focus {
    background: #171717;
}

[data-theme="dark"] .mag-popular-list li {
    border-color: #2e2e2e;
}

[data-theme="dark"] .mag-popular-list a {
    color: #e5e5e5;
}

[data-theme="dark"] .mag-pop-title {
    color: #ffffff;
}

[data-theme="dark"] .mag-pop-placeholder {
    background: #1f1f1f;
}

/* Category Header Dark Mode */
[data-theme="dark"] .category-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #312e81 100%);
}

/* Medium screens - constrain hero height */
@media (min-width: 769px) and (max-width: 1400px) {
    .mag-featured {
        height: 380px;
    }
    .mag-hero-sidebar {
        max-height: 380px;
    }
    .mag-featured-content h1 {
        font-size: 1.1rem;
    }
    .mag-featured-content p {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
    .mag-sidebar-widget {
        padding: 10px 12px;
    }
    .mag-sidebar-widget h3 {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
    .mag-trending-list {
        gap: 8px;
    }
    .mag-trending-list li {
        padding: 8px;
    }
    .mag-trend-title {
        font-size: 0.7rem;
    }
}

/* Large screens */
@media (min-width: 1401px) {
    .mag-featured {
        height: 340px;
    }
    .mag-hero-sidebar {
        max-height: 340px;
    }
    .mag-featured-content h1 {
        font-size: 1.2rem;
    }
}

/* Extra large screens */
@media (min-width: 1600px) {
    .mag-featured {
        height: 360px;
    }
    .mag-hero-sidebar {
        max-height: 360px;
    }
}

/* Responsive - Magazine */
@media (max-width: 1024px) {
    .mag-hero-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        max-height: none;
    }

    .mag-featured,
    .mag-featured-image {
        min-height: 260px;
        max-height: 300px;
    }

    .mag-placeholder {
        min-height: 260px;
    }

    .mag-hero-sidebar {
        flex-direction: row;
    }

    .mag-sidebar-widget {
        flex: 1;
    }

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

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

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

    .mag-full-layout .mag-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        max-height: none;
        overflow-y: visible;
    }

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

    .mag-widget {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .mag-hero {
        padding: 16px 0;
    }

    .mag-featured-image {
        min-height: 220px;
    }

    .mag-placeholder {
        min-height: 220px;
    }

    .mag-featured-content {
        padding: 16px;
    }

    .mag-featured-content h1 {
        font-size: 1.25rem;
    }

    .mag-featured-content p {
        display: none;
    }

    .mag-hero-sidebar {
        flex-direction: column;
    }

    .mag-secondary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .mag-card-image {
        height: 90px;
    }

    .mag-card-body {
        padding: 10px;
    }

    .mag-card-body h3 {
        font-size: 0.8rem;
    }

    .mag-card-meta {
        display: none;
    }

    .mag-layout {
        padding: 20px 0;
    }

    .mag-post-link {
        grid-template-columns: 120px 1fr;
        gap: 12px;
    }

    .mag-post-thumb {
        height: 100px;
    }

    .mag-post-info {
        padding: 10px 10px 10px 0;
    }

    .mag-post-info h3 {
        font-size: 0.9rem;
    }

    .mag-post-info p {
        display: none;
    }

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

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

    .mag-full-main .home-section {
        padding: 16px;
    }

    .mag-full-main .mag-secondary {
        padding: 16px;
    }

    .mag-full-main .content-grid.grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .mag-full-main .mag-secondary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .mag-full-main .content-grid.grid-4 {
        grid-template-columns: 1fr;
    }

    .mag-full-main .mag-secondary-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== Homepage Content Sections ==================== */
.home-section {
    padding: 3rem 0;
    background: var(--bg-white);
}

.home-section:nth-child(even) {
    background: var(--bg-light);
}

.home-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.home-section .section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home-section .section-header h2 i {
    color: var(--primary);
}

.home-section .view-all-link {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: gap 0.2s;
}

.home-section .view-all-link:hover {
    gap: 0.5rem;
}

/* Content Grid */
.content-grid {
    display: grid;
    gap: 1.5rem;
}

.content-grid.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

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

/* Content Cards */
.content-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.content-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.content-card .card-image {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: var(--bg-gray);
}

.content-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.content-card:hover .card-image img {
    transform: scale(1.05);
}

.content-card .card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 2.5rem;
    opacity: 0.8;
}

/* Team Logos for Sports Events */
.card-match-teams {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 1rem;
}

.card-match-teams .match-team {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-match-teams .team-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.card-match-teams .match-vs {
    font-size: 1rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

/* Latest Updates Team Logos */
.mag-thumb-match {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 8px;
}

.mag-thumb-match .mag-team-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: white;
    border-radius: 6px;
    padding: 3px;
}

.mag-thumb-match .mag-vs {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
}

.content-card .card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--primary);
    color: #1a1a1a;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.content-card .card-body {
    padding: 1rem;
}

.content-card .card-body h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.content-card .card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 0.5rem;
}

.content-card .card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.content-card .card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Event Card Enhancements */
.event-card .card-body {
    display: flex;
    gap: 1rem;
    padding: 1rem;
}

.event-card .event-date-mini {
    flex-shrink: 0;
    text-align: center;
    padding: 0;
    color: var(--primary);
}

.event-card .event-date-mini .event-month {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.event-card .event-date-mini .event-day {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
}

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

.event-card .event-info h3 {
    margin: 0 0 0.5rem;
}

.event-card .card-live-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #dc2626;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.event-placeholder {
    background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
}

.event-badge {
    background: #f59e0b !important;
}

/* Mixed Content List Styles */
.mixed-content-list .mag-post-item {
    border-left: 4px solid transparent;
}

.mixed-content-list .post-item {
    border-left-color: #f59e0b;
}

.mixed-content-list .event-item {
    border-left-color: #f59e0b;
}

.mixed-content-list .memorial-item {
    border-left-color: #0ea5e9;
}

.mixed-content-list .countdown-item {
    border-left-color: #f59e0b;
}

.mag-post-badges {
    margin-bottom: 0.5rem;
}

.mag-post-cat.post-badge {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.mag-post-cat.event-badge {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.mag-post-cat.memorial-badge {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.mag-post-cat.countdown-badge {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.mag-post-cat i {
    margin-right: 0.25rem;
}

.mag-placeholder-sm.event-placeholder {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.mag-placeholder-sm.memorial-placeholder {
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
}

.mag-placeholder-sm.countdown-placeholder {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.thumb-live-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #dc2626;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    animation: livePulse 2s infinite;
}

/* Dark mode for mixed content */
[data-theme="dark"] .mag-post-cat.post-badge {
    background: rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .mag-post-cat.event-badge {
    background: rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .mag-post-cat.memorial-badge {
    background: rgba(139, 92, 246, 0.2);
}

[data-theme="dark"] .mag-post-cat.countdown-badge {
    background: rgba(245, 158, 11, 0.2);
}

/* Dual Section Layout */
.dual-section {
    background: var(--bg-light);
}

.dual-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.dual-column {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.dual-column .section-header {
    margin-bottom: 1rem;
}

.dual-column .section-header h2 {
    font-size: 1.25rem;
}

/* Compact List */
.compact-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.compact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.compact-item:hover {
    background: var(--bg-gray);
}

.compact-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #1a1a1a;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.compact-date .day {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.compact-date .month {
    font-size: 0.7rem;
    text-transform: uppercase;
}

.compact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
    flex-shrink: 0;
}

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

.compact-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-grid.grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .home-section {
        padding: 2rem 0;
    }

    .home-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .content-grid.grid-4,
    .content-grid.grid-3 {
        grid-template-columns: 1fr;
    }

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

/* Dark Mode */
[data-theme="dark"] .home-section {
    background: var(--bg-dark);
}

[data-theme="dark"] .home-section:nth-child(even) {
    background: #1e293b;
}

[data-theme="dark"] .content-card,
[data-theme="dark"] .dual-column {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .compact-item {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .compact-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Dark mode text colors for homepage content cards */
[data-theme="dark"] .content-card .card-body h3 {
    color: #ffffff;
}

[data-theme="dark"] .content-card .card-subtitle {
    color: #a3a3a3;
}

[data-theme="dark"] .content-card .card-meta {
    color: #94a3b8;
}

[data-theme="dark"] .compact-info h4 {
    color: #ffffff;
}

[data-theme="dark"] .compact-meta {
    color: #94a3b8;
}

[data-theme="dark"] .home-section .section-header h2 {
    color: #ffffff;
}

[data-theme="dark"] .home-section .view-all-link {
    color: var(--primary);
}
