/* ===== MarketMetrix Legal Pages ===== */
/* Corporate Design: Primary #0f172a, Accent #0ea5e9 → #8b5cf6 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Newsreader:wght@400;500;600&display=swap');

:root {
    --primary-dark: #0f172a;
    --primary-medium: #1e293b;
    --primary-light: #334155;
    --accent-primary: #0ea5e9;
    --accent-secondary: #8b5cf6;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --bg-color: #f8fafc;
}

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

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 {
    font-family: 'Newsreader', Georgia, serif;
}

/* Navigation */
.legal-nav {
    background: var(--primary-dark);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-brand img {
    height: 40px;
    border-radius: 8px;
}

.nav-back {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-back:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Main Container */
.legal-container {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    flex: 1;
}

/* Content Area */
.legal-content {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.legal-content h1 {
    font-size: 2.25rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.legal-content h2 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-primary);
    display: inline-block;
}

.legal-content h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.legal-content ul, 
.legal-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.legal-content a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.legal-content a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.legal-content strong {
    color: var(--text-primary);
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-left: 4px solid var(--accent-primary);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.info-box p {
    margin: 0;
    color: var(--text-primary);
}

/* Contact Box */
.contact-box {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.contact-box h3 {
    margin-top: 0;
    color: var(--primary-dark);
}

.contact-box p {
    margin-bottom: 0.5rem;
}

/* Sidebar */
.legal-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.legal-sidebar h3 {
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.legal-sidebar ul {
    list-style: none;
    padding: 0;
}

.legal-sidebar li {
    margin-bottom: 0.25rem;
}

.legal-sidebar a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.legal-sidebar a:hover {
    background: white;
    color: var(--accent-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.legal-sidebar a i {
    width: 20px;
    text-align: center;
    color: var(--text-muted);
}

.legal-sidebar a:hover i {
    color: var(--accent-primary);
}

/* Footer */
.legal-footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

.legal-footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* FAQ Accordion */
.faq-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
    transition: background 0.2s;
}

.faq-question:hover {
    background: var(--bg-color);
}

.faq-question i {
    color: var(--accent-primary);
    transition: transform 0.3s;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 1.5rem 1.25rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

.faq-item.active .faq-answer {
    display: block;
}

/* Responsive */
@media (max-width: 900px) {
    .legal-container {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
    }
    
    .legal-sidebar {
        position: static;
        order: -1;
    }
    
    .legal-sidebar ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .legal-content {
        padding: 2rem 1.5rem;
    }
    
    .legal-content h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 600px) {
    .legal-nav {
        padding: 1rem;
    }
    
    .nav-brand span {
        display: none;
    }
    
    .legal-sidebar ul {
        grid-template-columns: 1fr;
    }
    
    .legal-content h1 {
        font-size: 1.5rem;
    }
    
    .legal-content h2 {
        font-size: 1.25rem;
    }
}
