/* ============================================================================
   CABSTATES — Legal Pages Stylesheet
   Version: 1.0 | May 2026
   Used by: privacy.php, terms.php
============================================================================ */

/* ============================================================================
   LEGAL PAGE WRAPPER
============================================================================ */
.legal-page {
    padding: var(--space-32) 0 var(--space-24);
    min-height: 100vh;
}

/* ============================================================================
   LEGAL HEADER
============================================================================ */
.legal-header {
    text-align: center;
    margin-bottom: var(--space-16);
    padding-bottom: var(--space-12);
    border-bottom: var(--border-subtle);
}

.legal-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: var(--space-4);
    display: inline-block;
}

.legal-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: var(--leading-tight);
    color: var(--white);
    margin-bottom: var(--space-4);
}

.legal-updated {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--grey-500);
    letter-spacing: var(--tracking-wide);
}

.legal-updated strong {
    color: var(--grey-400);
    font-weight: 700;
}

/* ============================================================================
   LEGAL CONTENT GRID
============================================================================ */
.legal-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-16);
    -webkit-align-items: flex-start;
    align-items: flex-start;
    position: relative;
}

/* ============================================================================
   TABLE OF CONTENTS (LEFT SIDEBAR)
============================================================================ */
.legal-toc {
    position: sticky;
    top: calc(var(--space-20) + 60px); /* Below navbar */
    background: var(--grey-900);
    border: var(--border-subtle);
    padding: var(--space-6);
    border-radius: var(--radius-sm);
}

.legal-toc-title {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--grey-800);
}

.legal-toc-list {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: var(--space-2);
    list-style: none;
}

.legal-toc-list a {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--grey-400);
    text-decoration: none;
    padding: var(--space-2) var(--space-3);
    border-radius: 4px;
    transition: all var(--transition-base);
    display: block;
    line-height: var(--leading-snug);
}

.legal-toc-list a:hover {
    color: var(--yellow);
    background: rgba(255, 215, 0, 0.05);
    -webkit-transform: translateX(4px);
    transform: translateX(4px);
}

.legal-toc-list a.active {
    color: var(--yellow);
    background: rgba(255, 215, 0, 0.08);
    font-weight: 600;
}

/* ============================================================================
   LEGAL CONTENT (RIGHT COLUMN)
============================================================================ */
.legal-content {
    background: var(--grey-900);
    border: var(--border-subtle);
    padding: var(--space-12);
    border-radius: var(--radius-sm);
    max-width: 900px;
}

/* Section Styles */
.legal-section {
    margin-bottom: var(--space-12);
    padding-bottom: var(--space-12);
    border-bottom: var(--border-subtle);
}

.legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--space-6);
    line-height: var(--leading-tight);
    scroll-margin-top: calc(var(--space-20) + 60px);
}

.legal-section h3 {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--white);
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
    line-height: var(--leading-snug);
}

.legal-section p {
    font-size: var(--text-base);
    color: var(--grey-300);
    line-height: var(--leading-loose);
    margin-bottom: var(--space-5);
}

.legal-section p:last-child {
    margin-bottom: 0;
}

/* Lists */
.legal-section ul,
.legal-section ol {
    margin: var(--space-5) 0;
    padding-left: var(--space-8);
    color: var(--grey-300);
}

.legal-section ul {
    list-style: disc;
}

.legal-section ol {
    list-style: decimal;
}

.legal-section li {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-3);
}

.legal-section li::marker {
    color: var(--yellow);
}

/* Strong/Bold Text */
.legal-section strong {
    color: var(--white);
    font-weight: 700;
}

/* Emphasized Text */
.legal-section em {
    color: var(--yellow);
    font-style: normal;
    font-weight: 600;
}

/* Links within legal content */
.legal-section a {
    color: var(--blue-light);
    text-decoration: underline;
    transition: color var(--transition-base);
}

.legal-section a:hover {
    color: var(--yellow);
}

/* ============================================================================
   LEGAL HIGHLIGHT BOX
============================================================================ */
.legal-highlight {
    background: rgba(255, 215, 0, 0.05);
    border-left: 3px solid var(--yellow);
    padding: var(--space-5) var(--space-6);
    margin: var(--space-6) 0;
    border-radius: 4px;
}

.legal-highlight--spaced {
    margin-top: var(--space-8);
}

.legal-highlight p {
    color: var(--grey-200);
    margin-bottom: 0;
}

.legal-highlight strong {
    color: var(--yellow);
}

/* ============================================================================
   CONTACT BOX
============================================================================ */
.legal-contact-box {
    background: var(--grey-950);
    border: var(--border-yellow);
    padding: var(--space-8);
    margin-top: var(--space-12);
    border-radius: var(--radius-sm);
    text-align: center;
}

.legal-contact-box h3 {
    font-family: var(--font-mono);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--yellow);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

.legal-contact-box p {
    font-size: var(--text-base);
    color: var(--grey-300);
    margin-bottom: var(--space-5);
    line-height: var(--leading-relaxed);
}

.legal-contact-box a {
    color: var(--white);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid var(--yellow);
    transition: all var(--transition-base);
}

.legal-contact-box a:hover {
    color: var(--yellow);
}

/* ============================================================================
   EFFECTIVE DATE BADGE
============================================================================ */
.legal-date-badge {
    display: inline-block;
    background: rgba(0, 71, 171, 0.1);
    border: var(--border-blue);
    color: var(--blue-light);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-8);
}

/* ============================================================================
   RESPONSIVE — TABLET
============================================================================ */
@media (max-width: 1024px) {
    .legal-grid {
        grid-template-columns: 240px 1fr;
        gap: var(--space-12);
    }

    .legal-toc {
        padding: var(--space-5);
    }

    .legal-content {
        padding: var(--space-10);
    }
}

/* ============================================================================
   RESPONSIVE — MOBILE
============================================================================ */
@media (max-width: 768px) {
    .legal-page {
        padding: var(--space-20) 0 var(--space-16);
    }

    .legal-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .legal-toc {
        position: static;
        top: auto;
    }

    .legal-content {
        padding: var(--space-8);
    }

    .legal-section h2 {
        font-size: var(--text-xl);
    }

    .legal-section {
        margin-bottom: var(--space-10);
        padding-bottom: var(--space-10);
    }

    .legal-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

/* ============================================================================
   PRINT STYLES
============================================================================ */
@media print {
    .legal-page {
        padding: 0;
    }

    .legal-toc {
        display: none;
    }

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

    .legal-content {
        border: none;
        padding: 0;
        background: white;
        color: black;
    }

    .legal-section h2,
    .legal-section h3,
    .legal-section p,
    .legal-section li {
        color: black;
    }

    .legal-section {
        page-break-inside: avoid;
    }

    .legal-highlight {
        background: #f5f5f5;
        border-left: 3px solid #000;
    }

    /* Hide navigation, footer, etc. */
    .navbar,
    .site-footer,
    .back-to-top,
    .legal-contact-box {
        display: none;
    }
}
