/* ── Legal Sidebar Layout — Screen Studio style ── */
/* Shared by ALL legal pages: index.html + each document page */

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2332;
    --accent: #e8943a;
    --accent-glow: rgba(232, 148, 58, 0.3);
    --accent-light: #f0a84c;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #1e293b;
    --sidebar-width: 280px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}

/* ── Two-column layout ── */
.legal-layout {
    display: flex;
}

/* ── Sidebar ── */
.legal-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 2rem 0;
    position: sticky;
    top: 58px;
    max-height: calc(100vh - 58px);
    overflow-y: auto;
    flex-shrink: 0;
    align-self: flex-start;
}

.sidebar-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 0 1.25rem;
    margin-bottom: 0.6rem;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section-header {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0 1.25rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.sidebar-section-header .icon {
    font-size: 0.85rem;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li a {
    display: block;
    padding: 0.45rem 1.25rem 0.45rem 1.6rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
    line-height: 1.35;
}

.sidebar-nav li a:hover {
    color: var(--text-primary);
    background: rgba(232, 148, 58, 0.05);
    border-left-color: rgba(232, 148, 58, 0.3);
}

.sidebar-nav li a.active {
    color: var(--accent);
    background: rgba(232, 148, 58, 0.08);
    border-left-color: var(--accent);
    font-weight: 600;
}

.sidebar-nav li a .sub {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.1rem;
}

.sidebar-lang {
    padding: 0 1.25rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.sidebar-lang-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.lang-switch {
    display: flex;
    gap: 0.3rem;
}

.lang-btn {
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.lang-btn.active {
    background: var(--accent);
    color: #0a0e17;
    border-color: var(--accent);
}

.lang-btn:hover:not(.active) {
    border-color: var(--accent);
    color: var(--text-primary);
}

/* ── Main content wrapper — fills remaining space, centers child ── */
.legal-content-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
}

/* ── Main content area — centered within wrapper ── */
.legal-content {
    width: 100%;
    max-width: 820px;
    padding: 2.5rem 3rem 4rem;
}

/* ── Document page content styles ── */
.legal-content h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    line-height: 1.2;
}

.legal-content h1 .gradient {
    background: linear-gradient(135deg, #e8943a, #f0c040, #ff6b2b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-content .subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* ── PDF downloads (index page) ── */
.downloads-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-top: 2rem;
}

.downloads-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pdf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.pdf-download {
    text-align: center;
    margin: 0.5rem 0 1.5rem;
}

.pdf-download .pdf-link {
    display: inline-flex;
    font-size: 0.9rem;
    padding: 0.45rem 1rem;
    border: 1px solid var(--accent);
    border-radius: 8px;
}

.pdf-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.pdf-link:hover {
    background: rgba(232, 148, 58, 0.08);
    text-decoration: underline;
}

/* ── Contact box ── */
.contact-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 2rem;
}

.contact-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.contact-box a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.contact-box a:hover { text-decoration: underline; }

/* ── Doc cards (index page) ── */
.doc-cards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.doc-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.9rem 1.2rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.doc-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(232, 148, 58, 0.06);
    transform: translateX(3px);
}

.doc-card .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.doc-card .card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.doc-card .arrow {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 1rem;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-light);
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.section-label:first-child {
    margin-top: 0;
}

/* ── Footer (identical to main site) ── */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    color: var(--text-muted);
}

footer a { color: var(--accent); text-decoration: none; }

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-logo {
    width: 320px;
    height: auto;
    border-radius: 0;
    filter: drop-shadow(0 0 10px rgba(232, 148, 58, 0.3));
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-light);
}

.footer-download {
    color: var(--accent-light) !important;
    font-weight: 600 !important;
}

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

/* ── Mobile sidebar toggle ── */
.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 200;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #0a0e17;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.sidebar-toggle:hover { transform: scale(1.05); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .legal-sidebar {
        position: fixed;
        left: -300px;
        top: 58px;
        z-index: 150;
        transition: left 0.3s ease;
        box-shadow: none;
    }

    .legal-sidebar.open {
        left: 0;
        box-shadow: 4px 0 24px rgba(0,0,0,0.5);
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .legal-content {
        padding: 2rem 1.2rem 3rem;
    }

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

@media (max-width: 640px) {
    .legal-content h1 { font-size: 1.5rem; }
    nav { display: none; }
}

/* ── Sidebar backdrop on mobile ── */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    top: 58px;
    background: rgba(0,0,0,0.5);
    z-index: 140;
}

.sidebar-backdrop.visible {
    display: block;
}
