/* ==========================================================================
   Республика Келарион - Modern Stylesheet
   Preserved Color Palette:
   --kelarion-primary: #1a365d
   --kelarion-secondary: #2d3748
   --kelarion-accent: #3182ce
   --kelarion-light: #f7fafc
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties & Theme System
   -------------------------------------------------------------------------- */
:root {
    /* Core Kelarion Colors - PRESERVED */
    --kelarion-primary: #1a365d;
    --kelarion-secondary: #2d3748;
    --kelarion-accent: #3182ce;
    --kelarion-light: #f7fafc;
    
    /* Derived Colors for Glass-morphism */
    --kelarion-primary-rgb: 26, 54, 93;
    --kelarion-accent-rgb: 49, 130, 206;
    --kelarion-light-rgb: 247, 250, 252;
    
    /* Light Theme Variables */
    --bg-primary: var(--kelarion-light);
    --bg-secondary: #ffffff;
    --bg-tertiary: #edf2f7;
    --text-primary: #1f2937;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: rgba(49, 130, 206, 0.18);
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-bg-solid: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(49, 130, 206, 0.18);
    --glass-shadow: 0 10px 32px -10px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
    
    /* Typography with fallbacks for offline use */
    --font-heading: 'Unbounded', 'Playfair Display', 'Georgia', 'Times New Roman', serif;
    --font-body: 'Inter', 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    /* Spacing & Layout */
    --section-padding: clamp(3rem, 6vw, 5rem);
    --container-max: 1200px;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index Scale */
    --z-back-to-top: 1000;
    --z-navbar: 999;
    --z-scroll-progress: 998;
    --z-sidebar: 100;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --kelarion-light: #0f172a;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(49, 130, 206, 0.25);
    --card-bg: rgba(15, 23, 42, 0.7);
    --card-bg-solid: #1e293b;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(49, 130, 206, 0.25);
    --glass-shadow: 0 10px 32px -10px rgba(0, 0, 0, 0.3);
    --hover-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.4);
}

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

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.75;
    letter-spacing: 0.01em;
    transition: background-color var(--transition-slow), color var(--transition-slow);
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(var(--kelarion-accent-rgb), 0.3);
    color: var(--text-primary);
}

/* Focus Visible for Accessibility */
:focus-visible {
    outline: 3px solid var(--kelarion-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --------------------------------------------------------------------------
   3. Scroll Progress Bar
   -------------------------------------------------------------------------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--kelarion-accent), #63b3ed);
    z-index: var(--z-scroll-progress);
    transition: width 0.1s linear;
}

/* --------------------------------------------------------------------------
   4. Typography System with clamp()
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.6rem);
}

h4 {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
}

h5 {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
}

h6 {
    font-size: clamp(0.9rem, 1.2vw, 1rem);
}

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 300;
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   5. Glass-morphism Navigation
   -------------------------------------------------------------------------- */
.navbar {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(var(--kelarion-primary-rgb), 0.85) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0;
    transition: all var(--transition-base);
    z-index: var(--z-navbar);
}

.navbar.scrolled {
    background: rgba(var(--kelarion-primary-rgb), 0.95) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.4rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: white !important;
    text-decoration: none;
}

.nav-logo {
    width: 28px;
    height: 28px;
    color: white;
    flex-shrink: 0;
}

.brand-text {
    display: none;
}

@media (min-width: 576px) {
    .brand-text {
        display: inline;
        font-size: 1.1rem;
        font-weight: 600;
        letter-spacing: 0.05em;
    }
}

.navbar-nav {
    gap: 0.25rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.4rem 0.8rem !important;
    border-radius: 8px;
    transition: all var(--transition-base);
    position: relative;
    font-size: 0.9rem;
}

.nav-link:hover,
.nav-link.active {
    color: white !important;
    background: rgba(255, 255, 255, 0.15);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--kelarion-accent);
    transition: width var(--transition-base);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

/* Gold accent nav link for Login */
.nav-link-gold {
    color: var(--kelarion-gold) !important;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    margin-left: 0.5rem;
}

.nav-link-gold:hover {
    background: rgba(255, 215, 0, 0.2) !important;
    border-color: rgba(255, 215, 0, 0.5);
    color: #ffed4e !important;
}

.nav-link-gold::after {
    display: none;
}

/* Theme Toggle Button */
.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    color: white;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.navbar-brand:hover .nav-logo {
    transform: rotate(360deg) scale(1.1);
}

.theme-toggle i {
    position: absolute;
    transition: all var(--transition-base);
}

.theme-toggle .fa-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-toggle .fa-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

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

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

/* Mobile Navigation */
.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.4rem 0.6rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(var(--kelarion-primary-rgb), 0.98);
        border-radius: 12px;
        margin-top: 0.75rem;
        padding: 1rem;
        backdrop-filter: blur(20px);
    }

    .nav-item {
        width: 100%;
    }

    .nav-link-gold {
        margin-left: 0;
        margin-top: 0.5rem;
        text-align: center;
        justify-content: center;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
    }
}

/* --------------------------------------------------------------------------
   6. Hero Section with Animated Background
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        rgba(var(--kelarion-primary-rgb), 0.95) 0%, 
        rgba(45, 55, 72, 0.98) 50%,
        rgba(var(--kelarion-primary-rgb), 0.95) 100%);
    color: white;
    text-align: center;
    overflow: hidden;
    padding: 6rem 1rem;
}

/* Try to load external background image, fallback to gradient if unavailable */
@media (min-width: 1px) {
    .hero {
        background: linear-gradient(135deg, 
            rgba(var(--kelarion-primary-rgb), 0.9) 0%, 
            rgba(45, 55, 72, 0.95) 100%),
            url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&w=1920&q=80') center/cover;
    }
}

/* Geometric Hex Grid Overlay */
.hero-geometric-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    animation: slowRotate 60s linear infinite;
    pointer-events: none;
}

@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hex-grid {
    width: 100%;
    height: 100%;
}

/* Particle Canvas */
.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: min(800px, 90vw);
    width: 100%;
    padding: 0 1rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.8s ease-out;
}

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

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.15;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.typewriter-text {
    display: inline;
    border-right: 3px solid var(--kelarion-accent);
    animation: blink 1s step-end infinite, fadeIn 2s ease-out forwards;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

@keyframes typewriter {
    to { max-width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* Disable typewriter for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .typewriter-text {
        border-right: none;
        animation: none;
    }
    
    .hero-geometric-overlay {
        animation: none;
    }
}

/* Fade in animation for typewriter replacement */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

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

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.hero-cta .btn {
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all var(--transition-base);
}

.hero-cta .btn-primary {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    border: none;
    color: #1a202c;
}

.hero-cta .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(237, 137, 54, 0.4);
}

.hero-cta .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.hero-cta .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    transform: translateY(-3px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: fadeIn 1s ease-out 1.2s both;
}

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

.scroll-chevron {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* --------------------------------------------------------------------------
   7. Section Styles
   -------------------------------------------------------------------------- */
.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--kelarion-accent), #63b3ed);
    color: white;
    border-radius: 16px;
    font-size: 1.75rem;
    box-shadow: 0 8px 20px rgba(var(--kelarion-accent-rgb), 0.3);
}

.section-icon.constitution-icon {
    background: linear-gradient(135deg, #3182ce, #63b3ed);
}

.section-icon.criminal-icon {
    background: linear-gradient(135deg, #e53e3e, #fc8181);
}

.section-icon.decree-icon {
    background: linear-gradient(135deg, #805ad5, #b794f4);
}

.section-icon.history-icon {
    background: linear-gradient(135deg, #d69e2e, #f6ad55);
}

.section-icon.citizenship-icon {
    background: linear-gradient(135deg, #38a169, #68d391);
}

.section-title {
    color: var(--kelarion-primary);
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .section-title {
    color: var(--text-primary);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* --------------------------------------------------------------------------
   8. Glass-morphism Cards
   -------------------------------------------------------------------------- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    transition: all var(--transition-base);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow);
    border-color: rgba(var(--kelarion-accent-rgb), 0.4);
}

.card-header-glass {
    background: rgba(var(--kelarion-primary-rgb), 0.1);
    color: var(--kelarion-primary);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-family: var(--font-heading);
    border-bottom: 1px solid var(--glass-border);
}

[data-theme="dark"] .card-header-glass {
    background: rgba(var(--kelarion-accent-rgb), 0.15);
    color: var(--text-primary);
}

/* Preamble Card */
.preamble-card {
    border-left: 4px solid var(--kelarion-accent);
}

.preamble-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: rgba(var(--kelarion-accent-rgb), 0.1);
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--kelarion-accent);
}

[data-theme="dark"] .preamble-header {
    color: #63b3ed;
    background: rgba(var(--kelarion-accent-rgb), 0.2);
}

.preamble-header i {
    font-size: 1.25rem;
}

.preamble-body {
    padding: 1.5rem;
}

.preamble-body p {
    margin-bottom: 0;
    font-style: italic;
    line-height: 1.8;
}

/* --------------------------------------------------------------------------
   9. Article Cards (Constitution & Criminal Code)
   -------------------------------------------------------------------------- */
.law-category {
    margin-bottom: 2rem;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    background: linear-gradient(135deg, var(--kelarion-secondary), var(--kelarion-primary));
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.category-title:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.category-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.accordion-icon {
    margin-left: auto;
    transition: transform var(--transition-base);
}

.category-title[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}

.chapter {
    margin-bottom: 2rem;
    padding-left: 1rem;
}

.chapter-title {
    color: var(--kelarion-primary);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--kelarion-accent);
    display: inline-block;
}

[data-theme="dark"] .chapter-title {
    color: var(--text-primary);
}

.article-card {
    background: var(--card-bg-solid);
    border-radius: 14px;
    border-left: 4px solid var(--kelarion-accent);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    transition: all var(--transition-base);
}

[data-theme="dark"] .article-card {
    background: var(--card-bg-solid);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-left-color: #63b3ed;
}

.article-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.article-number {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--kelarion-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-header h5 {
    color: var(--kelarion-secondary);
    font-weight: 600;
    margin: 0;
}

[data-theme="dark"] .article-header h5 {
    color: var(--text-primary);
}

.article-body {
    color: var(--text-secondary);
}

[data-theme="dark"] .article-body {
    color: var(--text-secondary);
}

.article-body p {
    margin-bottom: 0.5rem;
}

.article-body p:last-child {
    margin-bottom: 0;
}

/* Decree Article Styling */
.decree-article {
    border-left-color: #805ad5;
}

.decree-article:hover {
    border-left-color: #b794f4;
}

.article-badge {
    display: inline-block;
    background: rgba(var(--kelarion-accent-rgb), 0.1);
    color: var(--kelarion-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.decree-list {
    list-style: none;
    padding-left: 0;
    margin: 0.75rem 0;
}

.decree-list li {
    padding: 0.35rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.decree-list li::before {
    content: '•';
    color: var(--kelarion-accent);
    position: absolute;
    left: 0.5rem;
    font-weight: bold;
}

/* --------------------------------------------------------------------------
   10. Sticky Table of Contents (Sidebar)
   -------------------------------------------------------------------------- */
.toc-sidebar {
    position: sticky;
    top: 100px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.toc-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--kelarion-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--kelarion-accent);
}

[data-theme="dark"] .toc-title {
    color: var(--text-primary);
}

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

.toc-list ul {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.25rem;
}

.toc-link {
    display: block;
    padding: 0.4rem 0.6rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.toc-link:hover {
    color: var(--kelarion-accent);
    background: rgba(var(--kelarion-accent-rgb), 0.08);
}

.toc-link.active {
    color: white;
    background: var(--kelarion-accent);
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(var(--kelarion-accent-rgb), 0.4);
}

/* Highlight parent sections when child is active */
.toc-list li:has(.toc-link.active) > .toc-link:not(.active) {
    color: var(--kelarion-accent);
    font-weight: 500;
}

/* Nested active items */
.toc-list ul .toc-link.active {
    background: rgba(var(--kelarion-accent-rgb), 0.9);
}

/* --------------------------------------------------------------------------
   11. News Section & Skeleton Loader
   -------------------------------------------------------------------------- */
.news-skeleton {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skeleton-item {
    background: var(--card-bg-solid);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.skeleton-date {
    width: 100px;
    height: 16px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    animation: shimmer 1.5s infinite;
}

.skeleton-title {
    width: 80%;
    height: 24px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    animation: shimmer 1.5s infinite;
}

.skeleton-text {
    width: 100%;
    height: 16px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    animation: shimmer 1.5s infinite;
}

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

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

/* News Items */
.news-container {
    animation: fadeIn 0.5s ease-out;
}

.news-item {
    background: var(--card-bg-solid);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--kelarion-accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-base);
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.news-date {
    color: var(--kelarion-accent);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.news-item h4 {
    color: var(--kelarion-primary);
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .news-item h4 {
    color: var(--text-primary);
}

.news-item p {
    color: var(--text-secondary);
}

[data-theme="dark"] .news-item p {
    color: var(--text-secondary);
}

.news-item p:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   12. Quick Links Card
   -------------------------------------------------------------------------- */
.quick-links-card {
    position: sticky;
    top: 100px;
}

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

.quick-links-list li {
    border-bottom: 1px solid var(--glass-border);
}

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

.quick-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 0;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.quick-link:hover {
    color: var(--kelarion-accent);
    padding-left: 0.5rem;
}

[data-theme="dark"] .quick-link:hover {
    color: var(--kelarion-accent);
}

.quick-link i:first-child {
    color: var(--kelarion-accent);
}

[data-theme="dark"] .quick-link i:first-child {
    color: var(--kelarion-accent);
}

.quick-link i:first-child {
    width: 20px;
}

.quick-link span {
    flex: 1;
}

.quick-link i:last-child {
    color: var(--text-muted);
    font-size: 0.75rem;
    opacity: 0;
    transition: all var(--transition-fast);
}

.quick-link:hover i:last-child {
    opacity: 1;
    transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   13. Decree Section Styling
   -------------------------------------------------------------------------- */
.section-decree {
    background: var(--bg-tertiary);
}

.decree-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.decree-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.decree-header-official {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--kelarion-primary), var(--kelarion-secondary));
    border-radius: 16px;
    color: white;
    flex-wrap: wrap;
}

.decree-seal {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 1.5rem;
}

.decree-title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 200px;
}

.decree-label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
}

.decree-number {
    font-size: 0.9rem;
    opacity: 0.9;
}

.decree-subject {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.decree-su.brand-text {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.decree-appendix {
    background: linear-gradient(135deg, rgba(var(--kelarion-accent-rgb), 0.1), rgba(var(--kelarion-primary-rgb), 0.05));
    border-left-color: #805ad5;
}

/* --------------------------------------------------------------------------
   14. Timeline Component
   -------------------------------------------------------------------------- */
.section-history {
    background: var(--bg-tertiary);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--kelarion-accent), #63b3ed);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 100%;
}

.timeline-item.left .timeline-content {
    margin-right: 50%;
    padding-right: 2rem;
    text-align: right;
}

.timeline-item.right .timeline-content {
    margin-left: 50%;
    padding-left: 2rem;
    text-align: left;
}

.timeline-date {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: var(--kelarion-accent);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(var(--kelarion-accent-rgb), 0.4);
}

.date-day {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.date-month {
    font-size: 0.875rem;
    text-transform: lowercase;
}

.date-year {
    font-size: 0.75rem;
    opacity: 0.9;
}

.timeline-card {
    background: var(--card-bg-solid);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
}

.timeline-card::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--kelarion-accent);
    border-radius: 50%;
    top: 2rem;
    box-shadow: 0 0 0 4px var(--bg-tertiary);
}

.timeline-item.left .timeline-content {
    margin-right: calc(50% + 2rem);
    padding-right: 1rem;
    text-align: right;
}

.timeline-item.right .timeline-content {
    margin-left: calc(50% + 2rem);
    padding-left: 1rem;
    text-align: left;
}

.timeline-item.left .timeline-card::before {
    right: calc(-2rem - 8px);
}

.timeline-item.right .timeline-card::before {
    left: calc(-2rem - 8px);
}

.timeline-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--kelarion-accent-rgb), 0.1);
    color: var(--kelarion-accent);
    border-radius: 12px;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.timeline-card h4 {
    color: var(--kelarion-primary);
    margin-bottom: 0.75rem;
}

[data-theme="dark"] .timeline-card h4 {
    color: var(--text-primary);
}

.timeline-list {
    list-style: none;
    padding-left: 0;
    margin: 0.75rem 0;
}

.timeline-list li {
    padding: 0.35rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.timeline-list li::before {
    content: '✓';
    color: var(--kelarion-accent);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.timeline-note {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Timeline Status Badges */
.timeline-status {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 1rem;
    transition: all var(--transition-base);
}

.timeline-status.completed {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.timeline-status.current {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    color: white;
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
    animation: pulse 2s infinite;
}

.timeline-status.future {
    background: linear-gradient(135deg, #718096, #4a5568);
    color: white;
    box-shadow: 0 4px 12px rgba(113, 128, 150, 0.3);
}

/* Timeline Card Variants */
.timeline-card.completed {
    border-left: 4px solid #48bb78;
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.05), var(--card-bg-solid));
}

.timeline-card.current {
    border-left: 4px solid #3182ce;
    background: linear-gradient(135deg, rgba(49, 130, 206, 0.05), var(--card-bg-solid));
    box-shadow: 0 8px 25px rgba(49, 130, 206, 0.15);
}

.timeline-card.future {
    border-left: 4px solid #718096;
    background: linear-gradient(135deg, rgba(113, 128, 150, 0.05), var(--card-bg-solid));
    opacity: 0.9;
}

/* Roadmap Summary */
.roadmap-summary {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.summary-card {
    background: var(--card-bg-solid);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-base);
    border: 1px solid var(--glass-border);
    height: 100%;
}

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

.summary-card.completed {
    border-top: 4px solid #48bb78;
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.05), var(--card-bg-solid));
}

.summary-card.current {
    border-top: 4px solid #3182ce;
    background: linear-gradient(135deg, rgba(49, 130, 206, 0.05), var(--card-bg-solid));
}

.summary-card.future {
    border-top: 4px solid #718096;
    background: linear-gradient(135deg, rgba(113, 128, 150, 0.05), var(--card-bg-solid));
}

.summary-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.summary-card.completed .summary-icon {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.summary-card.current .summary-icon {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    animation: pulse 2s infinite;
}

.summary-card.future .summary-icon {
    background: linear-gradient(135deg, #718096, #4a5568);
}

.summary-card h5 {
    color: var(--kelarion-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.summary-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.summary-card small {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Mobile Timeline */
@media (max-width: 767px) {
    .timeline-line {
        left: 20px;
    }
    
    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        margin-left: 50px;
        margin-right: 0;
        padding-left: 1rem;
        padding-right: 0;
        text-align: left;
    }
    
    .timeline-card::before {
        left: -2.25rem !important;
        right: auto !important;
    }
}

/* --------------------------------------------------------------------------
   15. Citizenship Multi-Step Form
   -------------------------------------------------------------------------- */
.citizenship-steps {
    margin-bottom: 2rem;
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border-radius: 50%;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all var(--transition-base);
}

.step.active .step-number,
.step.completed .step-number {
    background: var(--kelarion-accent);
    color: white;
}

.step.completed .step-number::after {
    content: '✓';
    font-size: 1rem;
}

.step.completed .step-number {
    font-size: 0;
}

.step-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--kelarion-accent);
}

.step-connector {
    flex: 1;
    height: 2px;
    background: var(--bg-tertiary);
    max-width: 40px;
    min-width: 20px;
}

.step.completed + .step-connector {
    background: var(--kelarion-accent);
}

/* Citizenship Cards */
.citizenship-card {
    display: none;
    animation: slideIn 0.4s ease-out;
}

.citizenship-card.active {
    display: block;
}

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

.citizenship-header {
    text-align: center;
    padding: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.citizenship-icon-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--kelarion-accent), #63b3ed);
    color: white;
    border-radius: 20px;
    font-size: 2rem;
}

.citizenship-icon-large.success-icon {
    background: linear-gradient(135deg, #38a169, #68d391);
}

.citizenship-header h3 {
    color: var(--kelarion-primary);
    margin: 0;
}

[data-theme="dark"] .citizenship-header h3 {
    color: var(--text-primary);
}

.citizenship-body {
    padding: 2rem;
}

.citizenship-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Discord CTA */
.discord-cta {
    text-align: center;
    margin-top: 1.5rem;
}

.btn-discord {
    background: linear-gradient(135deg, #5865F2, #7289DA);
    border: none;
    color: white;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 12px;
    transition: all var(--transition-base);
}

.btn-discord:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(88, 101, 242, 0.4);
    color: white;
}

.discord-link {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Form Preview */
.form-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-preview-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    color: var(--text-secondary);
}

.form-preview-item i {
    color: var(--kelarion-accent);
}

/* Verification Info */
.verification-info {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.info-item i {
    color: var(--kelarion-accent);
    width: 24px;
    text-align: center;
}

/* Citizen Benefits */
.citizen-benefits {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(var(--kelarion-accent-rgb), 0.1);
    border-radius: 12px;
}

.citizen-benefits h5 {
    margin-bottom: 1rem;
    color: var(--kelarion-primary);
}

[data-theme="dark"] .citizen-benefits h5 {
    color: var(--text-primary);
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.benefits-list i {
    color: #38a169;
    width: 20px;
}

/* Form Embed */
.form-embed-card {
    overflow: hidden;
}

.form-embed-wrapper {
    position: relative;
}

.form-embed-wrapper iframe {
    display: block;
    width: 100%;
    border: none;
    transition: opacity 0.6s ease-in;
}

.form-footer-official {
    background: linear-gradient(135deg, var(--kelarion-primary) 0%, var(--kelarion-secondary) 100%);
    color: white;
    padding: 1.5rem 2rem;
    margin-top: -4px;
}

.form-footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-footer-content i {
    font-size: 1.5rem;
    color: #68d391;
}

.form-footer-content i:last-child {
    font-size: 1.75rem;
}

.form-footer-text h6 {
    color: white;
    margin: 0;
    font-size: 1rem;
}

[data-theme="dark"] .form-footer-text h6 {
    color: white;
}

.form-footer-text p {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .form-footer-text p {
    color: rgba(255, 255, 255, 0.9);
}

/* --------------------------------------------------------------------------
   16. Modern Footer
   -------------------------------------------------------------------------- */
.footer-modern {
    position: relative;
    background: linear-gradient(135deg, var(--kelarion-primary) 0%, var(--kelarion-secondary) 100%);
    color: white;
    padding: 4rem 0 2rem;
    overflow: hidden;
}

.footer-grid-bg {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-seal {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    color: white;
}

.footer-brand-text h4 {
    color: white;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin: 0;
}

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

.footer-motto {
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    font-size: 0.9rem;
    margin: 0;
}

.footer-title {
    color: white;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: white;
    padding-left: 0.5rem;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
}

/* Discord Widget */
.discord-widget {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-base);
}

.discord-widget:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.discord-widget-link {
    display: block;
    color: white;
    text-decoration: none;
    padding: 1rem;
}

.discord-widget-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.discord-widget-header i {
    font-size: 1.5rem;
    color: #7289DA;
}

.discord-widget-header span {
    font-weight: 600;
}

.discord-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online {
    background: #68d391;
    box-shadow: 0 0 8px #68d391;
}

/* Footer Bottom */
.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.9rem;
}

.footer-legal {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   17. Back to Top Button
   -------------------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--kelarion-accent), #63b3ed);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(var(--kelarion-accent-rgb), 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: var(--z-back-to-top);
}

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

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(var(--kelarion-accent-rgb), 0.5);
}

.back-to-top:active {
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   18. Scroll Reveal Animations (Intersection Observer)
   -------------------------------------------------------------------------- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   19. Button Styles & Micro-interactions
   -------------------------------------------------------------------------- */
.btn {
    transition: all var(--transition-base);
    font-weight: 500;
    border-radius: 10px;
    padding: 0.625rem 1.25rem;
}

.btn:hover {
    transform: scale(1.04);
}

.btn-primary {
    background: var(--kelarion-accent);
    border-color: var(--kelarion-accent);
}

.btn-primary:hover {
    background: #2b6cb0;
    border-color: #2b6cb0;
}

.btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--glass-border);
}

.btn-outline-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   20. Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
    .toc-sidebar {
        display: none;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    .step-label {
        display: none;
    }
    
    .step-indicator {
        gap: 0.25rem;
    }
    
    .citizenship-footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .citizenship-footer .btn {
        width: 100%;
    }
    
    .footer-brand {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom .row {
        text-align: center;
    }
    
    .footer-bottom .text-md-end {
        text-align: center !important;
        margin-top: 0.5rem;
    }
}

@media (max-width: 575px) {
    .article-card {
        padding: 1.25rem;
    }
    
    .preamble-body,
    .citizenship-body,
    .citizenship-header,
    .citizenship-footer {
        padding: 1.25rem;
    }
    
    .back-to-top {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
    }
}

/* --------------------------------------------------------------------------
   21. Print Styles
   -------------------------------------------------------------------------- */
@media print {
    .navbar,
    .scroll-progress,
    .back-to-top,
    .theme-toggle,
    .toc-sidebar,
    .scroll-indicator,
    .hero-particles,
    .hero-geometric-overlay {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
        background: var(--kelarion-primary) !important;
    }
    
    .article-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* --------------------------------------------------------------------------
   22. Reduced Motion Preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}
