/* ============================================================
   Legal Pages Stylesheet - BrainBit-SOMS
   Matches homepage brand: Blue #2563EB, Teal #06B6D4, Dark #0B1D35
   ============================================================ */

/* Base */
body {
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    color: #334155;
    line-height: 1.8;
}

/* Legal Navbar */
.legal-nav {
    background: rgba(11, 29, 53, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Hero Banner */
.legal-hero {
    background: linear-gradient(135deg, #0B1D35 0%, #1a2744 50%, #0f2847 100%);
    position: relative;
    overflow: hidden;
}
.legal-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(6,182,212,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.legal-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* Content Card */
.legal-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}

/* Table of Contents */
.toc {
    background: #f1f5f9;
    border-radius: 12px;
    border-left: 4px solid #2563EB;
}
.toc a {
    color: #475569;
    text-decoration: none;
    transition: color 0.2s;
}
.toc a:hover {
    color: #2563EB;
}

/* Section Headers */
.legal-card h2 {
    color: #0B1D35;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.35rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    scroll-margin-top: 100px;
}
.legal-card h2 .section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2563EB, #06B6D4);
    color: #fff;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-right: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.legal-card h3 {
    color: #1e293b;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Lists */
.legal-card ul, .legal-card ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}
.legal-card li {
    margin-bottom: 0.4rem;
    padding-left: 0.25rem;
}
.legal-card ul li::marker {
    color: #2563EB;
}
.legal-card ol li::marker {
    color: #2563EB;
    font-weight: 600;
}

/* Key Highlight Boxes */
.legal-highlight {
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border-left: 4px solid #2563EB;
    border-radius: 0 12px 12px 0;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}
.legal-warning {
    background: linear-gradient(135deg, #fefce8, #fffbeb);
    border-left: 4px solid #F59E0B;
    border-radius: 0 12px 12px 0;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}
.legal-important {
    background: linear-gradient(135deg, #fef2f2, #fff1f2);
    border-left: 4px solid #ef4444;
    border-radius: 0 12px 12px 0;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

/* Tables */
.legal-card table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}
.legal-card table th {
    background: #f1f5f9;
    color: #0B1D35;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}
.legal-card table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}
.legal-card table tr:hover td {
    background: #f8fafc;
}

/* Links */
.legal-card a {
    color: #2563EB;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.legal-card a:hover {
    color: #1d4ed8;
}

/* Effective Date Badge */
.effective-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(37,99,235,0.1);
    color: #2563EB;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Quick Nav (Legal Page Links) */
.legal-quick-nav {
    background: linear-gradient(135deg, #0B1D35, #1a2744);
    border-radius: 12px;
}
.legal-quick-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    text-decoration: none;
    padding: 6px 0;
    font-size: 0.875rem;
    transition: color 0.2s;
}
.legal-quick-nav a:hover {
    color: #06B6D4;
}
.legal-quick-nav a.active {
    color: #ffffff;
    font-weight: 500;
}

/* Footer */
.legal-footer {
    background: #070f1d;
}

/* Print Styles */
@media print {
    .legal-nav, .legal-footer, .legal-quick-nav, .toc {
        display: none !important;
    }
    .legal-hero {
        background: #fff !important;
        color: #000 !important;
        padding: 1rem 0 !important;
    }
    .legal-hero * {
        color: #000 !important;
    }
    .legal-card {
        box-shadow: none !important;
        border: none !important;
    }
    body {
        background: #fff !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .legal-card h2 {
        font-size: 1.15rem;
    }
    .legal-card {
        border-radius: 12px;
    }
}
