/* Custom Properties & Design Tokens */
:root {
    /* Fonts */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Theme colors (Dark mode default) */
    --bg-primary: #090e06;
    --bg-secondary: #0f170b;
    --surface: #141f0e;
    --surface-hover: #1b2a13;
    --border: rgba(92, 126, 75, 0.2);
    --border-hover: rgba(92, 126, 75, 0.4);
    --text-primary: #f5f8f3;
    --text-secondary: #9cb190;
    --text-muted: #6b7e61;
    --accent: #4caf50;
    --accent-glow: rgba(76, 175, 80, 0.25);
    --card-bg: rgba(20, 31, 14, 0.6);
    --shadow: rgba(0, 0, 0, 0.4);
    
    /* Layout Spacing */
    --header-height: 70px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Light Theme Variables */
body.light-theme {
    --bg-primary: #fafbf9;
    --bg-secondary: #f2f5f0;
    --surface: #ffffff;
    --surface-hover: #f7faf5;
    --border: rgba(37, 88, 31, 0.12);
    --border-hover: rgba(37, 88, 31, 0.28);
    --text-primary: #0a0e08;
    --text-secondary: #515d4d;
    --text-muted: #808c7c;
    --accent: #25581f;
    --accent-glow: rgba(37, 88, 31, 0.12);
    --card-bg: rgba(255, 255, 255, 0.85);
    --shadow: rgba(37, 88, 31, 0.06);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Background Glow Effects (Dark Theme) */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
    transition: var(--transition);
}

body.light-theme .bg-glow {
    background: radial-gradient(circle, rgba(37, 88, 31, 0.03) 0%, rgba(0, 0, 0, 0) 70%);
}

.bg-glow-top {
    top: -200px;
    left: -200px;
}

.bg-glow-bottom {
    bottom: -200px;
    right: -200px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(9, 14, 6, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    transition: var(--transition);
}

body.light-theme .header {
    background-color: rgba(250, 251, 249, 0.85);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon svg {
    display: block;
    transition: var(--transition);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.theme-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--shadow);
    transition: var(--transition);
}

.theme-btn:hover {
    border-color: var(--accent);
    background: var(--surface-hover);
    transform: scale(1.05);
}

/* Manage Icons inside theme toggle */
.sun-icon {
    display: block;
}
.moon-icon {
    display: none;
}

body.light-theme .sun-icon {
    display: none;
}
body.light-theme .moon-icon {
    display: block;
}

/* Hero Section */
.hero {
    margin-top: var(--header-height);
    padding: 80px 0 50px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-glow);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 30px;
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.hero-subtitle code {
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    border: 1px solid var(--border);
    color: var(--accent);
}

.last-updated {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 32px;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
}

#search-input {
    width: 100%;
    padding: 14px 18px 14px 50px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 30px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    box-shadow: 0 8px 32px var(--shadow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    outline: none;
    transition: var(--transition);
}

#search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 8px 32px var(--accent-glow);
}

#search-input:focus + .search-icon {
    color: var(--accent);
}

/* Main Layout Grid */
.main-content {
    padding: 60px 0;
}

.content-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    align-items: start;
}

/* Sidebar Navigation */
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 30px);
}

.sidebar-sticky {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px var(--shadow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--accent);
    background: var(--surface-hover);
    border-left-color: var(--accent-glow);
    padding-left: 16px;
}

.nav-link.active {
    color: var(--text-primary);
    font-weight: 700;
    background: var(--accent-glow);
    border-left-color: var(--accent);
    padding-left: 16px;
}

/* Policy Article and Sections */
.policy-article {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.policy-section {
    scroll-margin-top: calc(var(--header-height) + 40px);
    transition: var(--transition);
}

.policy-section h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
}

.policy-section p {
    margin-bottom: 16px;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.policy-section ul {
    list-style: none;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.policy-section ul li {
    position: relative;
    padding-left: 24px;
    font-size: 14.5px;
    line-height: 1.6;
}

.policy-section ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Cards within Content */
.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px var(--shadow);
    transition: var(--transition);
}

.info-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow);
}

.info-card h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.info-card p {
    font-size: 14px;
    margin-bottom: 12px;
}

.info-card ul {
    margin: 0;
}

/* Grid layout for features page */
.bullet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 24px 0;
}

.grid-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--transition);
}

.grid-item:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px var(--shadow);
}

.grid-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--accent-glow);
    color: var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid-item h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.grid-item p {
    font-size: 13.5px;
    margin: 0;
    line-height: 1.6;
}

/* Alert block */
.alert-block {
    background: rgba(255, 152, 0, 0.08);
    border-left: 4px solid #ff9800;
    color: var(--text-primary);
    padding: 16px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
    font-size: 14.5px;
}

body.light-theme .alert-block {
    background: rgba(255, 152, 0, 0.05);
}

/* Contact Box */
.contact-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 4px 25px var(--shadow);
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.contact-value a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition-fast);
    border-bottom: 1px dashed transparent;
}

.contact-value a:hover {
    border-bottom-color: var(--accent);
    opacity: 0.95;
}

/* Highlight matching search terms */
.highlight {
    background-color: var(--accent-glow);
    color: var(--text-primary);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 600;
}

/* Footer */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    text-align: center;
    transition: var(--transition);
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13.5px;
}

.footer-meta {
    color: var(--text-muted);
}

/* Floating Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 8px 30px var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 99;
}

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

.back-to-top-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.05) translateY(-2px);
}

/* Responsive Styles */
@media (max-width: 900px) {
    .content-container {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .sidebar {
        position: static;
        width: 100%;
    }

    .sidebar-sticky {
        padding: 16px;
    }

    .sidebar-nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .nav-link {
        border-left: none;
        border-bottom: 2px solid transparent;
        padding: 6px 12px;
        border-radius: 15px;
        background: var(--surface);
        border: 1px solid var(--border);
    }

    .nav-link.active {
        border-bottom-color: var(--accent);
        border-left-color: transparent;
        background: var(--accent-glow);
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .policy-section h2 {
        font-size: 20px;
    }

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