/* ===================================
   Graphin8 - Legal Pages Theme
   =================================== */

:root {
    --g8-navy: #060a20;
    --g8-navy-light: #0f1738;
    --g8-blue: #1F3C88;
    --g8-cyan: #5893D4;
    --g8-orange: #F7B633;
    --g8-orange-hover: #e69a2b;
    --g8-text-main: #e6eefb;
    --g8-text-muted: #94a3b8;
    --g8-border: rgba(255, 255, 255, 0.08);
    --g8-glass: rgba(15, 23, 56, 0.6);
    --g8-radius: 20px;
}

/* --- Layout --- */
.legal-page-wrapper {
    background-color: var(--g8-navy);
    color: var(--g8-text-main);
    min-height: 100vh;
    padding: 120px 20px 60px; /* Top padding accounts for fixed navbar */
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

.legal-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    position: relative;
}

/* --- Header Section --- */
.legal-header {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--g8-border);
}

.legal-header h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, #fff 0%, var(--g8-text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.last-updated {
    color: var(--g8-cyan);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Sidebar Navigation (Table of Contents) --- */
.legal-sidebar {
    position: relative;
}

.legal-toc {
    position: sticky;
    top: 100px;
    background: var(--g8-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: var(--g8-radius);
    border: 1px solid var(--g8-border);
}

.legal-toc h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--g8-text-main);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--g8-border);
}

.legal-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legal-toc li {
    margin-bottom: 10px;
}

.legal-toc a {
    color: var(--g8-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: block;
    padding: 5px 10px;
    border-radius: 8px;
}

.legal-toc a:hover,
.legal-toc a.active {
    color: var(--g8-navy);
    background: var(--g8-cyan);
    padding-left: 15px;
}

/* --- Main Content --- */
.legal-content {
    background: var(--g8-navy-light);
    border: 1px solid var(--g8-border);
    border-radius: var(--g8-radius);
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.legal-section {
    margin-bottom: 40px;
    scroll-margin-top: 100px; /* Offset for sticky header */
}

.legal-section h2 {
    color: var(--g8-text-main);
    font-size: 1.8rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legal-section h2::before {
    content: '';
    display: block;
    width: 6px;
    height: 24px;
    background: var(--g8-orange);
    border-radius: 3px;
}

.legal-section p, .legal-section li {
    color: var(--g8-text-muted);
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.legal-section ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.legal-section li {
    margin-bottom: 8px;
}

.legal-section strong {
    color: var(--g8-text-main);
}

.legal-section a {
    color: var(--g8-cyan);
    text-decoration: none;
    border-bottom: 1px dashed var(--g8-cyan);
    transition: all 0.2s ease;
}

.legal-section a:hover {
    color: var(--g8-orange);
    border-bottom-color: var(--g8-orange);
}

/* --- Mobile Responsive --- */
@media (max-width: 992px) {
    .legal-container {
        grid-template-columns: 1fr;
    }

    .legal-sidebar {
        display: none; /* Hide TOC on mobile or move to top */
    }

    .legal-content {
        padding: 25px;
    }

    .legal-header h1 {
        font-size: 2.2rem;
    }
}