/* ===== Legal Pages Styles ===== */

/* Active nav link */
.nav-active {
    color: var(--brand) !important;
}

/* Hero */
.legal-hero {
    padding: 140px 0 60px;
    text-align: center;
    position: relative;
    background: linear-gradient(180deg, var(--bg), var(--surface));
}

.legal-title {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Layout */
.legal-content {
    padding: 60px 0 120px;
}

.legal-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 60px;
    align-items: start;
}

/* Sidebar */
.legal-sidebar {
    position: sticky;
    top: 90px;
}

.legal-sidebar h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.legal-toc {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-left: 2px solid var(--divider);
    padding-left: 16px;
}

.legal-toc a {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 4px 0;
    transition: all 0.3s;
    line-height: 1.4;
}

.legal-toc a:hover,
.legal-toc a.active {
    color: var(--brand);
}

.legal-toc a.active {
    border-left: 2px solid var(--brand);
    margin-left: -18px;
    padding-left: 16px;
}

/* Main content */
.legal-main {
    max-width: 800px;
}

.legal-intro {
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    margin-bottom: 48px;
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    border-left: 4px solid var(--brand);
}

.legal-section {
    margin-bottom: 48px;
    scroll-margin-top: 100px;
}

.legal-section h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--divider);
}

.legal-section h3 {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-primary);
}

.legal-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 14px;
}

.legal-section ul {
    margin-bottom: 16px;
    padding-left: 0;
}

.legal-section ul li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    padding: 6px 0 6px 24px;
    position: relative;
}

.legal-section ul li::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
}

.legal-section ul li strong {
    color: var(--text-primary);
}

/* Callout */
.legal-callout {
    background: var(--brand-faint);
    border: 1px solid rgba(232, 52, 90, 0.25);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin: 20px 0;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.legal-callout strong {
    color: var(--brand);
}

/* Tables */
.legal-table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--divider);
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.legal-table thead {
    background: var(--surface-elevated);
}

.legal-table th {
    text-align: left;
    padding: 14px 18px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--divider);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legal-table td {
    padding: 14px 18px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--divider);
    line-height: 1.5;
}

.legal-table tbody tr:last-child td {
    border-bottom: none;
}

.legal-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Contact grid */
.legal-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.legal-contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    transition: border-color 0.3s;
}

.legal-contact-item:hover {
    border-color: var(--brand);
}

.legal-contact-item svg {
    color: var(--brand);
    flex-shrink: 0;
}

.legal-contact-item strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.legal-contact-item span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.legal-authority {
    margin-top: 24px;
    font-style: italic;
}

/* Rights grid (privacy page) */
.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.right-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: var(--radius-sm);
    padding: 20px;
    transition: border-color 0.3s;
}

.right-item:hover {
    border-color: var(--brand);
}

.right-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: var(--brand-faint);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
}

.right-item strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.right-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.5;
}

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

    .legal-sidebar {
        position: relative;
        top: 0;
        background: var(--surface);
        border: 1px solid var(--divider);
        border-radius: var(--radius-md);
        padding: 24px;
        margin-bottom: 40px;
    }

    .legal-toc {
        flex-direction: row;
        flex-wrap: wrap;
        border-left: none;
        padding-left: 0;
        gap: 4px;
    }

    .legal-toc a {
        background: var(--surface-elevated);
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .legal-toc a.active {
        border-left: none;
        margin-left: 0;
        padding-left: 12px;
        background: var(--brand-faint);
        color: var(--brand);
    }
}

@media (max-width: 768px) {
    .legal-title {
        font-size: 2rem;
    }

    .legal-section h2 {
        font-size: 1.3rem;
    }

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

@media (max-width: 480px) {
    .legal-title {
        font-size: 1.7rem;
    }

    .legal-intro {
        padding: 20px 24px;
    }

    .legal-contact-grid {
        grid-template-columns: 1fr;
    }
}
