/**
 * WPDM Glamour Theme - Main Stylesheet
 *
 * Color Mode System:
 * - Light Mode: .wpdm-glamour-theme.light-mode
 * - Dark Mode: .wpdm-glamour-theme.dark-mode
 * - System: .wpdm-glamour-theme (follows prefers-color-scheme)
 */

/* ========================================
   CSS Custom Properties (Light Mode Default)
======================================== */
:root {
    /* Primary Colors */
    --fs-primary: #6366f1;
    --fs-primary-hover: #4f46e5;
    --fs-primary-light: #eef2ff;
    --fs-primary-dark: #3730a3;

    /* Secondary Colors */
    --fs-secondary: #64748b;
    --fs-secondary-hover: #475569;

    /* Status Colors */
    --fs-success: #10b981;
    --fs-success-light: #d1fae5;
    --fs-warning: #f59e0b;
    --fs-warning-light: #fef3c7;
    --fs-danger: #ef4444;
    --fs-danger-light: #fee2e2;
    --fs-info: #06b6d4;
    --fs-info-light: #cffafe;

    /* Light Mode Colors */
    --fs-bg: #f8fafc;
    --fs-bg-alt: #f1f5f9;
    --fs-bg-card: #ffffff;
    --fs-text: #1e293b;
    --fs-text-secondary: #64748b;
    --fs-text-muted: #94a3b8;
    --fs-border: #e2e8f0;
    --fs-border-light: #f1f5f9;

    /* Typography */
    --fs-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --fs-font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;

    /* Sizing */
    --fs-radius: 8px;
    --fs-radius-lg: 12px;
    --fs-radius-xl: 16px;
    --fs-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --fs-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --fs-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Transitions */
    --fs-transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --fs-transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --fs-container: 1200px;
    --fs-header-height: 72px;
}

/* ========================================
   Dark Mode Variables
======================================== */
.wpdm-glamour-theme.dark-mode {
    --fs-bg: #0f172a;
    --fs-bg-alt: #1e293b;
    --fs-bg-card: #1e293b;
    --fs-text: #f1f5f9;
    --fs-text-secondary: #cbd5e1;
    --fs-text-muted: #94a3b8;
    --fs-border: #334155;
    --fs-border-light: #1e293b;
    --fs-primary-light: #312e81;
    --fs-success-light: #064e3b;
    --fs-warning-light: #78350f;
    --fs-danger-light: #7f1d1d;
    --fs-info-light: #164e63;
    --fs-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
    --fs-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --fs-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

/* System Preference Dark Mode */
@media (prefers-color-scheme: dark) {
    .wpdm-glamour-theme:not(.light-mode) {
        --fs-bg: #0f172a;
        --fs-bg-alt: #1e293b;
        --fs-bg-card: #1e293b;
        --fs-text: #f1f5f9;
        --fs-text-secondary: #cbd5e1;
        --fs-text-muted: #94a3b8;
        --fs-border: #334155;
        --fs-border-light: #1e293b;
        --fs-primary-light: #312e81;
        --fs-success-light: #064e3b;
        --fs-warning-light: #78350f;
        --fs-danger-light: #7f1d1d;
        --fs-info-light: #164e63;
        --fs-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
        --fs-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
        --fs-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    }
}

/* ========================================
   Base Styles
======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: var(--fs-font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--fs-text);
    background-color: var(--fs-bg);
    transition: background-color var(--fs-transition-slow), color var(--fs-transition-slow);
}

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

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

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

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

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

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

/* ========================================
   Layout
======================================== */
.container {
    max-width: var(--fs-container);
    margin: 0 auto;
    padding: 0 24px;
}

.site-content {
    min-height: calc(100vh - var(--fs-header-height) - 200px);
}

/* ========================================
   Header
======================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100000;
    background: var(--fs-bg-card);
    border-bottom: 1px solid var(--fs-border);
    transition: background-color var(--fs-transition-slow), border-color var(--fs-transition-slow);
}

.header-inner {
    max-width: var(--fs-container);
    margin: 0 auto;
    padding: 0 24px;
    height: var(--fs-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.site-branding a {
    display: flex;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fs-text);
    letter-spacing: -0.025em;
}

.site-title:hover {
    color: var(--fs-primary);
}

.custom-logo {
    max-height: 32px;
    width: auto;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
}

.nav-menu > li {
    position: relative;
}

/* Main nav links */
.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--fs-text);
    border-radius: var(--fs-radius);
    position: relative;
    transition: all 0.2s ease;
}

.nav-menu > li > a:hover {
    color: var(--fs-primary);
    background: var(--fs-primary-light);
}

/* Active/Current state */
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-parent > a,
.nav-menu > li.current-menu-ancestor > a {
    color: var(--fs-primary);
    background: var(--fs-primary-light);
}

/* Dropdown arrow for parent items */
.nav-menu > li.menu-item-has-children > a {
    padding-right: 34px;
}

.nav-menu > li.menu-item-has-children > a::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-60%) rotate(45deg);
    transition: transform 0.25s ease;
}

.nav-menu > li.menu-item-has-children:hover > a::after {
    transform: translateY(-40%) rotate(-135deg);
}

/* ========================================
   Dropdown Submenus - Desktop
======================================== */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
    box-shadow:
        0 10px 40px -10px rgba(0, 0, 0, 0.15),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

/* Dropdown top accent line */
.nav-menu .sub-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: linear-gradient(90deg, var(--fs-primary), var(--fs-primary-hover));
    border-radius: 0 0 3px 3px;
}

/* Show dropdown on hover */
.nav-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

/* Dropdown items */
.nav-menu .sub-menu li {
    position: relative;
}

.nav-menu .sub-menu a {
    display: block;
    padding: 11px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--fs-text-secondary);
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.nav-menu .sub-menu a:hover {
    color: var(--fs-primary);
    background: var(--fs-primary-light);
    border-left-color: var(--fs-primary);
}

.nav-menu .sub-menu .current-menu-item > a {
    color: var(--fs-primary);
    background: var(--fs-primary-light);
    border-left-color: var(--fs-primary);
}

/* Dropdown item icons (if added) */
.nav-menu .sub-menu a svg,
.nav-menu .sub-menu a .menu-icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    opacity: 0.7;
}

/* Nested submenus (3rd level) */
.nav-menu .sub-menu .sub-menu {
    top: -8px;
    left: 100%;
    margin-left: 4px;
}

.nav-menu .sub-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Arrow indicator for nested dropdowns */
.nav-menu .sub-menu .menu-item-has-children > a {
    padding-right: 32px;
    position: relative;
}

.nav-menu .sub-menu .menu-item-has-children > a::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 5px;
    height: 5px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-50%) rotate(-45deg);
    transition: transform 0.15s ease;
}

.nav-menu .sub-menu .menu-item-has-children:hover > a::after {
    transform: translateY(-50%) rotate(-45deg) translateX(3px);
}

/* Dropdown Header/Title (add class="menu-header" to li) */
.nav-menu .sub-menu li.menu-header {
    padding: 8px 20px 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fs-text-muted);
}

.nav-menu .sub-menu li.menu-header:not(:first-child) {
    margin-top: 8px;
    border-top: 1px solid var(--fs-border);
    padding-top: 14px;
}

/* Dropdown Divider (add class="menu-divider" to li) */
.nav-menu .sub-menu li.menu-divider {
    height: 1px;
    margin: 8px 16px;
    background: var(--fs-border);
}

/* Highlight/CTA menu item */
.nav-menu > li.menu-highlight > a {
    background: var(--fs-primary);
    color: #fff;
}

.nav-menu > li.menu-highlight > a:hover {
    background: var(--fs-primary-hover);
    color: #fff;
}

.nav-menu > li.menu-highlight > a::after {
    border-color: #fff;
}

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

.header-actions .menu-toggle {
    display: none;
}

/* ========================================
   Color Scheme Toggle
======================================== */
.color-scheme-toggle {
    display: flex;
    background: var(--fs-bg-alt);
    border-radius: var(--fs-radius);
    padding: 4px;
    gap: 2px;
}

.color-scheme-toggle .toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--fs-text-muted);
    cursor: pointer;
    transition: all var(--fs-transition);
}

.color-scheme-toggle .toggle-btn:hover {
    color: var(--fs-text);
    background: var(--fs-bg-card);
}

.color-scheme-toggle .toggle-btn.active {
    color: var(--fs-primary);
    background: var(--fs-bg-card);
    box-shadow: var(--fs-shadow);
}

.color-scheme-toggle .toggle-btn svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   Header Style 2 - Two Row Layout
======================================== */
.header-style-2 .site-header {
    border-bottom: none;
}

.header-style-2 .header-top-bar {
    background: var(--fs-bg-card);
    border-bottom: 1px solid var(--fs-border);
}

.header-style-2 .header-top-bar .header-inner {
    height: 60px;
    gap: 24px;
}

.header-style-2 .site-branding {
    flex-shrink: 0;
}

.header-style-2 .custom-logo {
    max-height: 40px;
}

/* Header Search */
.header-style-2 .header-search {
    flex: 1;
    max-width: 600px;
}

.header-style-2 .header-search .search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.header-style-2 .header-search .search-icon {
    position: absolute;
    left: 16px;
    color: var(--fs-text-muted);
    pointer-events: none;
}

.header-style-2 .header-search .search-field {
    width: 100%;
    padding: 12px 16px 12px 48px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--fs-bg-alt);
    border: 1px solid var(--fs-border);
    border-radius: 50px;
    color: var(--fs-text);
    transition: all var(--fs-transition);
}

.header-style-2 .header-search .search-field:focus {
    outline: none;
    border-color: var(--fs-primary);
    background: var(--fs-bg-card);
    box-shadow: 0 0 0 3px var(--fs-primary-light);
}

.header-style-2 .header-search .search-field::placeholder {
    color: var(--fs-text-muted);
}

/* Header Icons */
.header-style-2 .header-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.header-style-2 .header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--fs-bg-alt);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius);
    color: var(--fs-text-secondary);
    transition: all var(--fs-transition);
}

.header-style-2 .header-icon-btn:hover {
    background: var(--fs-bg-card);
    border-color: var(--fs-primary);
    color: var(--fs-primary);
}

.header-style-2 .header-icon-btn svg {
    width: 18px;
    height: 18px;
}

/* Color scheme toggle sizing for Style 2 */
.header-style-2 .color-scheme-toggle {
    padding: 3px;
}

.header-style-2 .color-scheme-toggle .toggle-btn {
    width: 30px;
    height: 30px;
}

.header-style-2 .color-scheme-toggle .toggle-btn svg {
    width: 16px;
    height: 16px;
}

/* Navigation Bar */
.header-style-2 .header-nav-bar {
    background: var(--fs-primary);
}

.header-style-2 .header-nav-bar .header-inner {
    height: 48px;
    padding: 0 24px;
}

.header-style-2 .header-nav-bar .main-navigation {
    flex: 1;
    justify-content: flex-start;
}

.header-style-2 .header-nav-bar .nav-menu {
    gap: 0;
}

.header-style-2 .header-nav-bar .nav-menu > li > a {
    padding: 12px 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #fff;
    border-radius: 0;
    background: transparent;
    transition: background-color 0.15s ease;
}

.header-style-2 .header-nav-bar .nav-menu > li > a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.header-style-2 .header-nav-bar .nav-menu > li.current-menu-item > a,
.header-style-2 .header-nav-bar .nav-menu > li.current-menu-parent > a,
.header-style-2 .header-nav-bar .nav-menu > li.current-menu-ancestor > a {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Dropdown arrow for Style 2 - with proper spacing */
.header-style-2 .header-nav-bar .nav-menu > li.menu-item-has-children > a {
    padding-right: 28px;
}

.header-style-2 .header-nav-bar .nav-menu > li.menu-item-has-children > a::after {
    right: 10px;
    width: 5px;
    height: 5px;
    border-color: rgba(255, 255, 255, 0.8);
}

.header-style-2 .header-nav-bar .nav-menu > li.menu-item-has-children:hover > a::after {
    border-color: #fff;
}

/* Dropdown menu positioning for Style 2 */
.header-style-2 .header-nav-bar .nav-menu .sub-menu {
    top: 100%;
    left: 0;
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
}

.header-style-2 .header-nav-bar .nav-menu .sub-menu a {
    color: var(--fs-text-secondary);
}

.header-style-2 .header-nav-bar .nav-menu .sub-menu a:hover {
    color: var(--fs-primary);
    background: var(--fs-primary-light);
}

/* Hide menu toggle on desktop for Style 2 */
.header-style-2 .menu-toggle {
    display: none;
}

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

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--fs-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--fs-primary-hover);
    color: #fff;
}

.btn-secondary {
    background: var(--fs-bg-alt);
    color: var(--fs-text);
    border: 1px solid var(--fs-border);
}

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

.btn-success {
    background: var(--fs-success);
    color: #fff;
}

.btn-success:hover {
    background: #059669;
    color: #fff;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

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

/* ========================================
   Cards
======================================== */
.card {
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
    overflow: hidden;
    transition: all var(--fs-transition);
}

.card:hover {
    box-shadow: var(--fs-shadow-md);
    border-color: var(--fs-primary);
}

.card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--fs-bg-alt);
    overflow: hidden;
}

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

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

.card-body {
    padding: 20px;
}

.card-title {
    margin: 0 0 8px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--fs-text);
}

.card-title a {
    color: inherit;
}

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

.card-excerpt {
    margin: 0 0 16px;
    font-size: 0.9375rem;
    color: var(--fs-text-secondary);
    line-height: 1.5;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.8125rem;
    color: var(--fs-text-muted);
}

.card-meta svg {
    width: 14px;
    height: 14px;
    margin-right: 4px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--fs-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ========================================
   Hero Section
======================================== */
.hero {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--fs-primary-light) 0%, var(--fs-bg) 100%);
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    margin: 0 0 16px;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--fs-text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero-subtitle {
    margin: 0 0 32px;
    font-size: 1.25rem;
    color: var(--fs-text-secondary);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

/* ========================================
   Section
======================================== */
.section {
    padding: 64px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
}

.section-title {
    margin: 0 0 12px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--fs-text);
}

.section-subtitle {
    margin: 0;
    font-size: 1.125rem;
    color: var(--fs-text-secondary);
}

.section--alt {
    background: var(--fs-bg-alt);
}

/* ========================================
   Grid
======================================== */
.grid {
    display: grid;
    gap: 24px;
}

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

@media (max-width: 992px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 { grid-template-columns: 1fr; }
}

/* ========================================
   Blog Post Styles
======================================== */
.post-list {
    display: grid;
    gap: 32px;
}

.post-item {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    padding: 24px;
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
    transition: all var(--fs-transition);
}

.post-item:hover {
    box-shadow: var(--fs-shadow-md);
    border-color: var(--fs-primary);
}

.post-thumbnail {
    aspect-ratio: 4 / 3;
    border-radius: var(--fs-radius);
    overflow: hidden;
    background: var(--fs-bg-alt);
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    display: flex;
    flex-direction: column;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.875rem;
    color: var(--fs-text-muted);
}

.post-title {
    margin: 0 0 12px;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

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

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

.post-excerpt {
    margin: 0 0 16px;
    color: var(--fs-text-secondary);
    flex: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--fs-primary);
}

.read-more svg {
    width: 16px;
    height: 16px;
    transition: transform var(--fs-transition);
}

.read-more:hover svg {
    transform: translateX(4px);
}

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

/* ========================================
   Single Post
======================================== */
.single-post-header {
    padding: 48px 0;
    text-align: center;
    background: var(--fs-bg-alt);
}

.single-post-title {
    margin: 0 0 16px;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
}

.single-post-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    color: var(--fs-text-muted);
}

.single-post-meta .author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.single-post-meta .author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.single-post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px;
}

.entry-content {
    font-size: 1.0625rem;
    line-height: 1.8;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin: 2em 0 0.75em;
    font-weight: 700;
    line-height: 1.3;
}

.entry-content h2 { font-size: 1.75rem; }
.entry-content h3 { font-size: 1.375rem; }
.entry-content h4 { font-size: 1.125rem; }

.entry-content p {
    margin: 0 0 1.5em;
}

.entry-content ul,
.entry-content ol {
    margin: 0 0 1.5em;
    padding-left: 1.5em;
}

.entry-content li {
    margin-bottom: 0.5em;
}

.entry-content blockquote {
    margin: 2em 0;
    padding: 24px 32px;
    background: var(--fs-bg-alt);
    border-left: 4px solid var(--fs-primary);
    border-radius: 0 var(--fs-radius) var(--fs-radius) 0;
    font-style: italic;
}

.entry-content pre {
    margin: 2em 0;
    padding: 24px;
    background: var(--fs-bg-alt);
    border-radius: var(--fs-radius);
    overflow-x: auto;
    font-family: var(--fs-font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
}

.entry-content code {
    padding: 2px 6px;
    background: var(--fs-bg-alt);
    border-radius: 4px;
    font-family: var(--fs-font-mono);
    font-size: 0.875em;
}

.entry-content pre code {
    padding: 0;
    background: none;
}

.entry-content img {
    border-radius: var(--fs-radius);
}

/* ========================================
   Page Template (Standard)
======================================== */
.page-header--standard {
    padding: 48px 0;
    background: var(--fs-bg-alt);
}

.page-header--standard .page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 24px;
}

.page-content .comments-section {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--fs-border);
}

/* ========================================
   Content Width Page Template
======================================== */
.page-header--content-width {
    padding: 48px 0;
    background: var(--fs-bg-alt);
}

.page-header--content-width .page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.content-width-page {
    width: 100%;
}

.content-width-content {
    max-width: var(--fs-container);
    margin: 0 auto;
    padding: 48px 24px;
}

.content-width-content .comments-section {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--fs-border);
}

/* ========================================
   Full Width Page Template
======================================== */
.site-main--full-width {
    width: 100%;
}

.page-header--full-width {
    padding: 64px 0;
    background: var(--fs-bg-alt);
    text-align: center;
}

.page-header--full-width .page-title {
    font-size: 2.75rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.full-width-page {
    width: 100%;
}

.full-width-content {
    width: 100%;
}

.full-width-content > .entry-content {
    padding: 48px 24px;
}

/* Allow full-width blocks in Gutenberg */
.full-width-content .entry-content .alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
}

.full-width-content .entry-content .alignwide {
    margin-left: calc(-25vw + 50%);
    margin-right: calc(-25vw + 50%);
    max-width: 100vw;
    width: calc(100% + 50vw - 100%);
    max-width: calc(100% + 400px);
}

/* Constrain text content for readability */
.full-width-content .entry-content > p,
.full-width-content .entry-content > h1,
.full-width-content .entry-content > h2,
.full-width-content .entry-content > h3,
.full-width-content .entry-content > h4,
.full-width-content .entry-content > h5,
.full-width-content .entry-content > h6,
.full-width-content .entry-content > ul,
.full-width-content .entry-content > ol,
.full-width-content .entry-content > blockquote {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Full width comments section */
.full-width-content .comments-section {
    margin-top: 48px;
    padding: 48px 0;
    background: var(--fs-bg-alt);
    border-top: 1px solid var(--fs-border);
}

.full-width-content .comments-section .container {
    max-width: 900px;
}

/* ========================================
   Download/Package Cards (WPDM)
======================================== */
.wpdm-download-button-full .wpdm-download-link {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    height: 48px;
    text-transform: uppercase;
    font-weight: 700;
}
.download-card {
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
    overflow: hidden;
    transition: all var(--fs-transition);
}

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

.download-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    background: linear-gradient(135deg, var(--fs-primary) 0%, var(--fs-primary-dark) 100%);
}

.download-card-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.download-card-icon svg {
    width: 64px;
    height: 64px;
    color: rgba(255, 255, 255, 0.9);
}

.download-card-body {
    padding: 20px;
}

.download-card-title {
    margin: 0 0 8px;
    font-size: 1.125rem;
    font-weight: 600;
}

.download-card-title a {
    color: var(--fs-text);
}

.download-card-title a:hover {
    color: var(--fs-primary);
}

.download-card-excerpt {
    margin: 0 0 16px;
    font-size: 0.9375rem;
    color: var(--fs-text-secondary);
    line-height: 1.5;
}

.download-card-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.download-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--fs-text-muted);
}

.download-stat svg {
    width: 14px;
    height: 14px;
}

.download-card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--fs-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-version {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--fs-bg-alt);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fs-text-secondary);
}

/* ========================================
   Single Package Page
======================================== */
.single-package-page {
    background: var(--fs-bg);
}

/* Package Hero */
.package-hero {
    position: relative;
    padding: 48px 0;
    background: linear-gradient(135deg, var(--fs-primary) 0%, var(--fs-primary-hover) 100%);
    color: #fff;
    overflow: hidden;
}

.package-hero__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--fs-primary) 0%, var(--fs-primary-hover) 100%);
    opacity: 0.95;
    z-index: 0;
}

.package-hero .container {
    position: relative;
    z-index: 2;
}

/* Breadcrumb */
.package-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.875rem;
}

.package-breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.15s ease;
}

.package-breadcrumb a:hover {
    color: #fff;
}

.package-breadcrumb .separator {
    color: rgba(255, 255, 255, 0.5);
}

.package-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.2;
}

.package-excerpt {
    font-size: 1.125rem;
    margin: 0 0 24px;
    opacity: 0.9;
    line-height: 1.6;
}

/* Quick Stats */
.package-quick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.package-quick-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    opacity: 0.9;
}

.package-quick-stats .stat-item svg {
    opacity: 0.8;
}

/* Package Content Area */
.package-content-area {
    padding: 48px 0;
}

.package-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 48px;
    align-items: start;
}

/* Package Main Content */
.package-main {
    min-width: 0;
}

/* Package Featured Image */
.package-featured-image {
    margin-bottom: 32px;
    border-radius: var(--fs-radius-lg);
    overflow: hidden;
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
}

.package-featured-image img {
    display: block;
    width: 100%;
    height: auto;
}

/* Mobile Download Card */
.package-download-card.mobile-only {
    display: none;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
}

/* Package Section */
.package-section {
    margin-bottom: 32px;
    padding: 28px;
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
}

.package-section .section-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--fs-border);
}

.package-section .section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--fs-text);
}

.package-section .section-title svg {
    color: var(--fs-primary);
    flex-shrink: 0;
}

.package-section .section-content {
    color: var(--fs-text-secondary);
    line-height: 1.7;
}

.package-section .section-content p:last-child {
    margin-bottom: 0;
}

/* Screenshots */
.package-screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.screenshot-item {
    display: block;
    border-radius: var(--fs-radius);
    overflow: hidden;
    border: 1px solid var(--fs-border);
    transition: all 0.2s ease;
}

.screenshot-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--fs-shadow-lg);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Tags */
.package-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px;
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
}

.package-tags .tags-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--fs-text-secondary);
}

.package-tags .tag-item {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--fs-text-secondary);
    background: var(--fs-bg-alt);
    border-radius: 20px;
    transition: all 0.15s ease;
}

.package-tags .tag-item:hover {
    color: var(--fs-primary);
    background: var(--fs-primary-light);
}

/* Package Sidebar */
.package-sidebar {
    min-width: 0;
}

.sidebar-sticky {
    position: sticky;
    top: calc(var(--fs-header-height) + 24px);
}

/* Download Card (Sidebar) */
.package-sidebar .download-card {
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
    overflow: hidden;
}

.package-sidebar .download-card:hover {
    transform: none;
    box-shadow: none;
}

.download-card__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: var(--fs-bg-alt);
    border-bottom: 1px solid var(--fs-border);
}

.download-card__icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
}

.download-card__icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--fs-primary) 0%, var(--fs-primary-hover) 100%);
    border-radius: var(--fs-radius);
    color: #fff;
    flex-shrink: 0;
}

.download-card__title-wrap {
    flex: 1;
    min-width: 0;
}

.download-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--fs-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-card__version {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fs-primary);
    background: var(--fs-primary-light);
    border-radius: 4px;
}

.download-card__body {
    padding: 20px;
}

.download-card__body .wpdm-download-button-full {
    margin-bottom: 20px;
}

.download-card__body .wpdm-download-button-full .wpdm-download-link {
    width: 100%;
    justify-content: center;
}

.download-card__details {
    list-style: none;
    margin: 0;
    padding: 0;
}

.download-card__details li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--fs-border-light);
}

.download-card__details li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.download-card__details .detail-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--fs-text-secondary);
}

.download-card__details .detail-label svg {
    color: var(--fs-text-muted);
    flex-shrink: 0;
}

.download-card__details .detail-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--fs-text);
}

.download-card__footer {
    padding: 16px 20px;
    background: var(--fs-bg-alt);
    border-top: 1px solid var(--fs-border);
}

.download-card__footer .category-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.download-card__footer .category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.download-card__footer .category-link {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--fs-primary);
    background: var(--fs-primary-light);
    border-radius: 4px;
    transition: all 0.15s ease;
}

/* Dark mode: ensure category links are visible */
.dark-mode .download-card__footer .category-link,
.wpdm-glamour-theme.dark-mode .download-card__footer .category-link {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.2);
}

@media (prefers-color-scheme: dark) {
    .wpdm-glamour-theme:not(.light-mode) .download-card__footer .category-link {
        color: #a5b4fc;
        background: rgba(99, 102, 241, 0.2);
    }
}

.download-card__footer .category-link:hover {
    background: var(--fs-primary);
    color: #fff;
}

/* Related Downloads */
.related-downloads {
    margin-top: 24px;
    padding: 20px;
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
}

.related-title {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--fs-text);
}

.related-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.related-item {
    border-bottom: 1px solid var(--fs-border-light);
}

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

.related-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    color: var(--fs-text-secondary);
    transition: color 0.15s ease;
}

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

.related-item__title {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
}

.related-item svg {
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.related-item a:hover svg {
    opacity: 1;
    transform: translateX(3px);
}

/* Button Block */
.btn-block {
    display: flex;
    width: 100%;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

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

@media (max-width: 768px) {
    .package-hero {
        padding: 32px 0;
    }

    .package-title {
        font-size: 1.75rem;
    }

    .package-excerpt {
        font-size: 1rem;
    }

    .package-quick-stats {
        gap: 12px 16px;
    }

    .package-quick-stats .stat-item {
        font-size: 0.875rem;
    }

    .package-content-area {
        padding: 24px 0;
    }

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

    .package-download-card.mobile-only {
        display: block;
    }

    .package-sidebar {
        order: -1;
    }

    .sidebar-sticky {
        position: static;
    }

    .package-sidebar .download-card__header,
    .package-sidebar .download-card__body .wpdm-download-button-full + * {
        display: none;
    }

    .package-sidebar .download-card__body {
        padding: 0;
    }

    .package-sidebar .download-card {
        display: none;
    }

    .package-section {
        padding: 20px;
    }

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

/* ========================================
   Sidebar
======================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.widget {
    padding: 24px;
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
}

.widget-title {
    margin: 0 0 16px;
    padding-bottom: 12px;
    font-size: 1rem;
    font-weight: 700;
    border-bottom: 2px solid var(--fs-primary);
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--fs-border-light);
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--fs-text-secondary);
}

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

/* ========================================
   Single Package - Classic Template
======================================== */
.single-package-classic {
    background: var(--fs-bg);
}

/* Classic Breadcrumb */
.classic-breadcrumb-wrap {
    padding: 16px 0;
    background: var(--fs-bg-alt);
    border-bottom: 1px solid var(--fs-border);
}

.classic-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--fs-text-muted);
}

.classic-breadcrumb a {
    color: var(--fs-text-secondary);
    transition: color 0.15s ease;
}

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

.classic-breadcrumb .separator {
    color: var(--fs-text-muted);
    opacity: 0.5;
}

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

/* Classic Content Area */
.classic-content-area {
    padding: 48px 0;
}

.classic-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}

/* Classic Main Content */
.classic-main {
    min-width: 0;
}


.classic-content.entry-content {
    font-size: 1rem;
    line-height: 1.7;
}

.classic-comments {
    margin-top: 48px;
}

/* Classic Sidebar */
.classic-sidebar {
    min-width: 0;
}

.classic-sidebar .widget {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
}

.classic-sidebar .widget:last-child {
    margin-bottom: 0;
}

.classic-sidebar .widget-title {
    margin: 0 0 16px;
    padding-bottom: 12px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--fs-text);
    border-bottom: 2px solid var(--fs-primary);
}

/* Classic Template Responsive */
@media (max-width: 992px) {
    .classic-layout {
        grid-template-columns: 1fr 240px;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .classic-content-area {
        padding: 24px 0;
    }

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

    .classic-content {
        padding: 20px;
    }

    .classic-sidebar {
        order: -1;
    }
}

/* ========================================
   Pagination
======================================== */
.pagination {
    margin-top: 48px;
}

.pagination-list {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-list a,
.pagination-list span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--fs-text);
    transition: all var(--fs-transition);
}

.pagination-list a:hover {
    border-color: var(--fs-primary);
    color: var(--fs-primary);
}

.pagination-list .current {
    background: var(--fs-primary);
    border-color: var(--fs-primary);
    color: #fff;
}

/* ========================================
   Footer
======================================== */
.site-footer {
    background: var(--fs-bg-card);
    border-top: 1px solid var(--fs-border);
    margin-top: auto;
}

.footer-widgets {
    padding: 48px 0;
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.footer-widget-area .widget {
    padding: 0;
    background: none;
    border: none;
}

.footer-widget-area .widget-title {
    color: var(--fs-text);
    border-bottom-color: var(--fs-border);
}

.footer-bottom {
    padding: 24px 0;
    border-top: 1px solid var(--fs-border);
}

.footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.copyright {
    color: var(--fs-text-muted);
    font-size: 0.875rem;
}

.footer-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 24px;
}

.footer-menu a {
    font-size: 0.875rem;
    color: var(--fs-text-secondary);
}

.footer-menu a:hover {
    color: var(--fs-primary);
}

.footer-powered {
    font-size: 0.875rem;
    color: var(--fs-text-muted);
}

.footer-powered a {
    color: var(--fs-text-secondary);
}

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

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   Forms
======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--fs-text);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--fs-text);
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius);
    transition: all var(--fs-transition);
}

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

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

/* ========================================
   Badges
======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
}

.badge-primary {
    background: var(--fs-primary-light);
    color: var(--fs-primary);
}

.badge-success {
    background: var(--fs-success-light);
    color: var(--fs-success);
}

.badge-warning {
    background: var(--fs-warning-light);
    color: var(--fs-warning);
}

.badge-danger {
    background: var(--fs-danger-light);
    color: var(--fs-danger);
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 992px) {
    .header-inner {
        gap: 16px;
    }
}

@media (max-width: 768px) {
    :root {
        --fs-header-height: 64px;
    }

    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 998;
    }

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

    /* Mobile Navigation Panel */
    .main-navigation {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        background: var(--fs-bg-card);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .main-navigation.is-open {
        transform: translateX(0);
    }

    /* Mobile Menu Header */
    .mobile-menu-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid var(--fs-border);
        background: var(--fs-bg-alt);
    }

    .mobile-menu-title {
        font-size: 1rem;
        font-weight: 600;
        color: var(--fs-text);
    }

    .mobile-menu-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: var(--fs-bg-card);
        border: 1px solid var(--fs-border);
        border-radius: var(--fs-radius);
        color: var(--fs-text-muted);
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mobile-menu-close:hover {
        background: var(--fs-danger-light);
        border-color: var(--fs-danger);
        color: var(--fs-danger);
    }

    .mobile-menu-close svg {
        width: 20px;
        height: 20px;
    }

    /* Mobile Nav Menu Container */
    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 12px 0;
        flex: 1;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    /* Mobile Nav Items */
    .nav-menu > li {
        border-bottom: 1px solid var(--fs-border);
    }

    .nav-menu > li:last-child {
        border-bottom: none;
    }

    .nav-menu > li > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        font-size: 1rem;
        font-weight: 500;
        color: var(--fs-text);
        border-radius: 0;
        transition: all 0.2s ease;
    }

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

    .nav-menu > li.current-menu-item > a,
    .nav-menu > li.current-menu-parent > a {
        color: var(--fs-primary);
        background: var(--fs-primary-light);
    }

    /* Mobile Dropdown Parent Arrow */
    .nav-menu > li.menu-item-has-children > a {
        padding-right: 48px;
    }

    .nav-menu > li.menu-item-has-children > a::after {
        content: '';
        position: absolute;
        right: 20px;
        top: 50%;
        width: 8px;
        height: 8px;
        border-right: 2px solid var(--fs-text-muted);
        border-bottom: 2px solid var(--fs-text-muted);
        transform: translateY(-50%) rotate(45deg);
        transition: transform 0.3s ease;
    }

    .nav-menu > li.menu-item-has-children.is-expanded > a::after {
        transform: translateY(-50%) rotate(-135deg);
    }

    /* Mobile Dropdown Toggle Button */
    .mobile-dropdown-toggle {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1;
    }

    /* Mobile Submenus (Accordion) */
    .nav-menu .sub-menu {
        position: static;
        display: none;
        min-width: auto;
        padding: 0;
        margin: 0;
        background: var(--fs-bg-alt);
        border: none;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }

    .nav-menu .sub-menu::before {
        display: none;
    }

    .nav-menu > li.is-expanded > .sub-menu,
    .nav-menu .sub-menu li.is-expanded > .sub-menu {
        display: block;
        animation: slideDown 0.3s ease;
    }

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

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

    .nav-menu .sub-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu .sub-menu a {
        padding: 14px 20px 14px 36px;
        font-size: 0.9375rem;
        color: var(--fs-text-secondary);
        border-left: 3px solid transparent;
        background: transparent;
    }

    .nav-menu .sub-menu a:hover,
    .nav-menu .sub-menu a:active {
        color: var(--fs-primary);
        background: var(--fs-primary-light);
        border-left-color: var(--fs-primary);
    }

    .nav-menu .sub-menu .current-menu-item > a {
        color: var(--fs-primary);
        background: var(--fs-primary-light);
        border-left-color: var(--fs-primary);
    }

    /* Nested submenus (3rd level) */
    .nav-menu .sub-menu .sub-menu {
        background: rgba(0, 0, 0, 0.02);
    }

    .nav-menu .sub-menu .sub-menu a {
        padding-left: 52px;
    }

    /* Header Actions Mobile */
    .header-actions {
        gap: 8px;
    }

    /* Mobile Menu Toggle Button (Hamburger) */
    .header-actions .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 10;
        width: 44px;
        height: 44px;
        background: var(--fs-bg-alt);
        border: 1px solid var(--fs-border);
        border-radius: var(--fs-radius);
        padding: 0;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .header-actions .menu-toggle:hover {
        background: var(--fs-bg-card);
        border-color: var(--fs-primary);
    }

    .header-actions .menu-toggle-icon {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        width: 22px;
        height: 22px;
        position: relative;
    }

    .header-actions .menu-toggle-icon span {
        display: block;
        position: absolute;
        width: 20px;
        height: 2px;
        background: var(--fs-text);
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .header-actions .menu-toggle-icon span:nth-child(1) {
        transform: translateY(-6px);
    }

    .header-actions .menu-toggle-icon span:nth-child(2) {
        transform: translateY(0);
    }

    .header-actions .menu-toggle-icon span:nth-child(3) {
        transform: translateY(6px);
    }

    /* Hamburger to X animation */
    .header-actions .menu-toggle.is-active .menu-toggle-icon span:nth-child(1) {
        transform: translateY(0) rotate(45deg);
    }

    .header-actions .menu-toggle.is-active .menu-toggle-icon span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .header-actions .menu-toggle.is-active .menu-toggle-icon span:nth-child(3) {
        transform: translateY(0) rotate(-45deg);
    }

    .header-actions .btn {
        display: none;
    }

    .header-actions .color-scheme-toggle {
        order: 1;
    }

    /* Mobile Menu Footer (optional) */
    .mobile-menu-footer {
        padding: 16px 20px;
        border-top: 1px solid var(--fs-border);
        background: var(--fs-bg-alt);
    }

    .mobile-menu-footer .btn {
        display: flex;
        width: 100%;
    }

    /* ========================================
       Header Style 2 - Mobile
    ======================================== */
    .header-style-2 .header-top-bar .header-inner {
        height: 64px;
        gap: 12px;
    }

    .header-style-2 .header-search {
        display: none;
    }

    .header-style-2 .header-icons {
        gap: 4px;
    }

    .header-style-2 .header-icon-btn {
        width: 40px;
        height: 40px;
    }

    .header-style-2 .header-icon-btn svg {
        width: 18px;
        height: 18px;
    }

    .header-style-2 .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--fs-bg-alt);
        border: 1px solid var(--fs-border);
        border-radius: var(--fs-radius);
        padding: 0;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .header-style-2 .menu-toggle:hover {
        background: var(--fs-bg-card);
        border-color: var(--fs-primary);
    }

    .header-style-2 .menu-toggle-icon {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        width: 22px;
        height: 22px;
        position: relative;
    }

    .header-style-2 .menu-toggle-icon span {
        display: block;
        position: absolute;
        width: 18px;
        height: 2px;
        background: var(--fs-text);
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .header-style-2 .menu-toggle-icon span:nth-child(1) {
        transform: translateY(-5px);
    }

    .header-style-2 .menu-toggle-icon span:nth-child(2) {
        transform: translateY(0);
    }

    .header-style-2 .menu-toggle-icon span:nth-child(3) {
        transform: translateY(5px);
    }

    .header-style-2 .menu-toggle.is-active .menu-toggle-icon span:nth-child(1) {
        transform: translateY(0) rotate(45deg);
    }

    .header-style-2 .menu-toggle.is-active .menu-toggle-icon span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .header-style-2 .menu-toggle.is-active .menu-toggle-icon span:nth-child(3) {
        transform: translateY(0) rotate(-45deg);
    }

    /* Hide nav bar on mobile - menu slides in from side */
    .header-style-2 .header-nav-bar {
        display: none;
    }

    /* Mobile menu panel for Style 2 */
    .header-style-2 .main-navigation {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        background: var(--fs-bg-card);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .header-style-2 .main-navigation.is-open {
        transform: translateX(0);
    }

    .header-style-2 .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 12px 0;
        flex: 1;
        overflow-y: auto;
    }

    .header-style-2 .nav-menu > li {
        border-bottom: 1px solid var(--fs-border);
    }

    .header-style-2 .nav-menu > li:last-child {
        border-bottom: none;
    }

    .header-style-2 .nav-menu > li > a {
        padding: 16px 20px;
        font-size: 1rem;
        color: var(--fs-text);
        background: transparent;
    }

    .header-style-2 .nav-menu > li > a:hover {
        color: var(--fs-primary);
        background: var(--fs-primary-light);
    }

    .header-style-2 .nav-menu > li.menu-item-has-children > a::after {
        border-color: var(--fs-text-muted);
    }

    .header-style-2 .nav-menu .sub-menu {
        position: static;
        display: none;
        background: var(--fs-bg-alt);
        border: none;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 0;
        margin: 0;
    }

    .header-style-2 .nav-menu .sub-menu::before {
        display: none;
    }

    .header-style-2 .nav-menu > li.is-expanded > .sub-menu {
        display: block;
        animation: slideDown 0.3s ease;
    }

    .header-style-2 .nav-menu .sub-menu a {
        padding: 14px 20px 14px 36px;
        border-left: 3px solid transparent;
    }

    .hero {
        padding: 48px 0;
    }

    .section {
        padding: 48px 0;
    }
}

/* Smaller mobile devices */
@media (max-width: 480px) {
    .main-navigation {
        width: 100%;
        max-width: 100%;
    }

    .header-style-2 .main-navigation {
        width: 100%;
        max-width: 100%;
    }
}

/* ========================================
   Comments
======================================== */
.comments-area {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--fs-border);
}

.comments-header {
    margin-bottom: 32px;
}

.comments-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--fs-text);
    margin: 0;
}

.comments-title svg {
    color: var(--fs-primary);
    flex-shrink: 0;
}

/* Comment List */
.comment-list {
    list-style: none;
    margin: 0 0 48px 0;
    padding: 0;
}

.comment-item {
    margin-bottom: 24px;
}

.comment-item .children {
    list-style: none;
    margin: 24px 0 0 0;
    padding-left: 24px;
    border-left: 2px solid var(--fs-border);
}

@media (min-width: 768px) {
    .comment-item .children {
        padding-left: 48px;
    }
}

/* Comment Body */
.comment-body {
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
    padding: 24px;
    box-shadow: var(--fs-shadow);
}

.comment-meta {
    margin-bottom: 16px;
}

.comment-author.vcard {
    display: flex;
    align-items: center;
    gap: 16px;
}

.comment-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid var(--fs-border);
}

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

.comment-author-info .fn {
    font-weight: 600;
    color: var(--fs-text);
    font-size: 1rem;
}

.comment-author-info .fn a {
    color: var(--fs-text);
    text-decoration: none;
}

.comment-author-info .fn a:hover {
    color: var(--fs-primary);
}

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

.comment-date a {
    color: inherit;
    text-decoration: none;
}

.comment-date a:hover {
    color: var(--fs-primary);
}

.comment-awaiting-moderation {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--fs-warning-light);
    color: var(--fs-warning);
    border-radius: var(--fs-radius);
    font-size: 0.875rem;
    font-weight: 500;
}

.comment-content {
    color: var(--fs-text-secondary);
    line-height: 1.7;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.comment-actions {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--fs-border-light);
}

.comment-actions .reply-link a,
.comment-actions .edit-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--fs-primary);
    text-decoration: none;
    transition: color var(--fs-transition);
}

.comment-actions .reply-link a:hover,
.comment-actions .edit-link a:hover {
    color: var(--fs-primary-hover);
}

/* Comment Pagination */
.comment-navigation {
    margin: 32px 0;
    padding: 16px 0;
    border-top: 1px solid var(--fs-border);
    border-bottom: 1px solid var(--fs-border);
}

.comment-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.comment-navigation .nav-previous a,
.comment-navigation .nav-next a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--fs-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--fs-transition);
}

.comment-navigation .nav-previous a:hover,
.comment-navigation .nav-next a:hover {
    color: var(--fs-primary-hover);
}

/* No Comments Message */
.no-comments {
    padding: 24px;
    background: var(--fs-bg-alt);
    border-radius: var(--fs-radius);
    color: var(--fs-text-secondary);
    text-align: center;
    font-style: italic;
}

/* Comment Form */
.comment-respond {
    margin-top: 48px;
    padding-top: 32px;
}

.comment-reply-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--fs-text);
    margin: 0 0 24px 0;
}

.comment-reply-title svg {
    color: var(--fs-primary);
    flex-shrink: 0;
}

.comment-reply-title small {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--fs-text-muted);
    margin-left: auto;
}

.comment-reply-title small a {
    color: var(--fs-danger);
    text-decoration: none;
}

.comment-reply-title small a:hover {
    text-decoration: underline;
}

.comment-form {
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
    padding: 32px;
    box-shadow: var(--fs-shadow);
}

.comment-form-field {
    margin-bottom: 20px;
}

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

.comment-form-field .required {
    color: var(--fs-danger);
}

.comment-form-field input[type="text"],
.comment-form-field input[type="email"],
.comment-form-field input[type="url"],
.comment-form-field textarea {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--fs-text);
    background: var(--fs-bg);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius);
    transition: border-color var(--fs-transition), box-shadow var(--fs-transition);
}

.comment-form-field input[type="text"]:focus,
.comment-form-field input[type="email"]:focus,
.comment-form-field input[type="url"]:focus,
.comment-form-field textarea:focus {
    outline: none;
    border-color: var(--fs-primary);
    box-shadow: 0 0 0 3px var(--fs-primary-light);
}

.comment-form-field input::placeholder,
.comment-form-field textarea::placeholder {
    color: var(--fs-text-muted);
}

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

/* Form Field Grid for logged-out users */
@media (min-width: 768px) {
    .comment-form .comment-form-author,
    .comment-form .comment-form-email,
    .comment-form .comment-form-url {
        display: inline-block;
        width: calc(33.333% - 14px);
        margin-right: 20px;
        vertical-align: top;
    }

    .comment-form .comment-form-url {
        margin-right: 0;
    }
}

/* Logged in message */
.logged-in-as {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--fs-primary-light);
    border-radius: var(--fs-radius);
    color: var(--fs-text-secondary);
    font-size: 0.875rem;
}

.logged-in-as a {
    color: var(--fs-primary);
    font-weight: 500;
    text-decoration: none;
}

.logged-in-as a:hover {
    text-decoration: underline;
}

/* Submit Button */
.form-submit {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.form-submit button[type="submit"] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--fs-primary);
    border: none;
    border-radius: var(--fs-radius);
    cursor: pointer;
    transition: background var(--fs-transition), transform var(--fs-transition);
}

.form-submit button[type="submit"]:hover {
    background: var(--fs-primary-hover);
}

.form-submit button[type="submit"]:active {
    transform: scale(0.98);
}

.form-submit button[type="submit"] svg {
    flex-shrink: 0;
}

/* Reply form inside comments */
.comment-item .comment-respond {
    margin-top: 24px;
    margin-left: 72px;
    padding-top: 0;
}

@media (max-width: 767px) {
    .comment-item .comment-respond {
        margin-left: 0;
    }

    .comment-form {
        padding: 20px;
    }
}

/* ========================================
   Category Archive (Taxonomy Template)
======================================== */
.category-archive {
    min-height: calc(100vh - 200px);
}

/* Category Header */
.category-header {
    padding: 48px 0;
    background: var(--fs-bg-alt);
    border-bottom: 1px solid var(--fs-border);
}

.category-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.875rem;
}

.category-breadcrumb a {
    color: var(--fs-text-secondary);
    transition: color var(--fs-transition);
}

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

.category-breadcrumb .separator {
    color: var(--fs-text-muted);
}

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

.category-header-content {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.category-info {
    flex: 1;
}

.category-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--fs-text);
}

.category-description {
    color: var(--fs-text-secondary);
    margin: 0 0 16px;
    max-width: 600px;
    line-height: 1.6;
}

.category-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.875rem;
    color: var(--fs-text-secondary);
}

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

.category-meta svg {
    opacity: 0.7;
}

/* Subcategories Section */
.subcategories-section {
    margin-bottom: 48px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--fs-text);
}

.section-title svg {
    color: var(--fs-primary);
}

.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.subcategory-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--fs-bg-card);
    border: 1px solid var(--fs-border);
    border-radius: var(--fs-radius-lg);
    transition: all var(--fs-transition);
}

.subcategory-card:hover {
    border-color: var(--fs-primary);
    box-shadow: var(--fs-shadow-md);
    transform: translateY(-2px);
}

.subcategory-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--fs-primary-light);
    border-radius: var(--fs-radius);
    color: var(--fs-primary);
    flex-shrink: 0;
}

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

.subcategory-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--fs-text);
}

.subcategory-card .subcategory-count {
    font-size: 0.8125rem;
    color: var(--fs-text-muted);
}

.subcategory-arrow {
    color: var(--fs-text-muted);
    transition: transform var(--fs-transition);
    flex-shrink: 0;
}

.subcategory-card:hover .subcategory-arrow {
    transform: translateX(4px);
    color: var(--fs-primary);
}

/* Category Content Area */
.category-content-area {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 48px;
    align-items: start;
}

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

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--fs-text-secondary);
}

.no-results svg {
    color: var(--fs-text-muted);
    margin-bottom: 16px;
}

.no-results h2 {
    font-size: 1.5rem;
    margin: 0 0 8px;
    color: var(--fs-text);
}

.no-results p {
    margin: 0;
}

/* Sidebar Category List */
.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-list li {
    border-bottom: 1px solid var(--fs-border);
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: var(--fs-text-secondary);
    transition: color var(--fs-transition);
}

.category-list li a:hover {
    color: var(--fs-primary);
}

.category-list li.current a {
    color: var(--fs-primary);
    font-weight: 600;
}

.category-list .count {
    color: var(--fs-text-muted);
    font-size: 0.8125rem;
}

/* Popular List */
.popular-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.popular-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--fs-border);
}

.popular-list li:last-child {
    border-bottom: none;
}

.popular-list li a {
    flex: 1;
    color: var(--fs-text-secondary);
    transition: color var(--fs-transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
}

.popular-list li a:hover {
    color: var(--fs-primary);
}

.popular-list .no-items {
    color: var(--fs-text-muted);
    font-style: italic;
}

/* Parent Category Link */
.parent-category-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--fs-bg-alt);
    border-radius: var(--fs-radius);
    color: var(--fs-text-secondary);
    font-weight: 500;
    transition: all var(--fs-transition);
}

.parent-category-link:hover {
    background: var(--fs-primary-light);
    color: var(--fs-primary);
}

/* Category Responsive */
@media (max-width: 991px) {
    .category-content-area {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 767px) {
    .category-header {
        padding: 32px 0;
    }

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

    .category-meta {
        flex-wrap: wrap;
        gap: 12px;
    }

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

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

/* Dark Mode - Category Archive */
.dark-mode .category-header {
    background: var(--fs-bg-alt);
    border-bottom-color: var(--fs-border);
}

.dark-mode .subcategory-card {
    background: var(--fs-bg-card);
    border-color: var(--fs-border);
}

.dark-mode .subcategory-icon {
    background: rgba(99, 102, 241, 0.15);
}

.dark-mode .parent-category-link {
    background: var(--fs-bg-alt);
}

.dark-mode .parent-category-link:hover {
    background: rgba(99, 102, 241, 0.15);
}

/* ========================================
   Print Styles
======================================== */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .color-scheme-toggle,
    .pagination {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
