/* ===== LEGAL PAGES (Privacy Policy & Terms of Service) ===== */

/* ---- Page Layout ---- */
.legal-main {
    min-height: 100vh;
    padding-top: 80px; /* navbar height */
}

/* ---- Hero Banner ---- */
.legal-hero {
    position: relative;
    padding: 80px 32px 60px;
    text-align: center;
    background: var(--surface);
    border-bottom: 1px solid var(--glass-border);
    overflow: hidden;
}

.legal-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 50% 120%, rgba(255, 107, 43, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

/* Subtle decorative grid */
.legal-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--glass-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.4;
    pointer-events: none;
}

.legal-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.legal-hero-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--orange-glow);
    border: 2px solid rgba(255, 107, 43, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--orange);
    margin: 0 auto 20px;
    box-shadow: 0 0 32px var(--orange-glow);
    animation: legalIconPulse 3s ease-in-out infinite;
}

@keyframes legalIconPulse {
    0%, 100% { box-shadow: 0 0 20px var(--orange-glow); transform: scale(1); }
    50%       { box-shadow: 0 0 40px rgba(255, 107, 43, 0.35); transform: scale(1.05); }
}

.legal-hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--text);
    margin: 16px 0 12px;
    line-height: 1.15;
}

.legal-hero-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
}

.legal-hero-sub strong {
    color: var(--orange);
}

/* ---- Container: TOC + Content side by side ---- */
.legal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 32px 80px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 48px;
    align-items: start;
}

/* ---- Table of Contents ---- */
.legal-toc {
    position: sticky;
    top: 100px;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 24px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--orange) transparent;
}

.legal-toc::-webkit-scrollbar { width: 4px; }
.legal-toc::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 4px; }

.legal-toc h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.legal-toc ul li {
    border-left: 2px solid var(--border);
    margin-bottom: 2px;
    transition: border-color 0.2s;
}

.legal-toc ul li:has(a.active) {
    border-left-color: var(--orange);
}

.legal-toc a {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-muted);
    transition: var(--transition);
    border-radius: 0 6px 6px 0;
    line-height: 1.4;
}

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

/* ---- Main Content Article ---- */
.legal-content {
    min-width: 0;
}

/* ---- Individual Section ---- */
.legal-section {
    padding: 40px;
    background: var(--card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.legal-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.legal-section:hover {
    border-color: rgba(255, 107, 43, 0.25);
}

.legal-section:hover::before {
    opacity: 1;
}

/* Section Icon Badge */
.legal-section-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--orange-glow);
    border: 1px solid rgba(255, 107, 43, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--orange);
    margin-bottom: 16px;
    transition: var(--transition);
}

.legal-section:hover .legal-section-icon {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange);
    transform: rotate(-5deg) scale(1.05);
}

/* Headings */
.legal-section h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.legal-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 20px 0 10px;
}

/* Paragraphs */
.legal-section p {
    font-size: 14.5px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 14px;
}

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

.legal-section a {
    color: var(--orange);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s;
}

.legal-section a:hover {
    text-decoration-color: var(--orange);
}

/* ---- Lists ---- */
.legal-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 16px;
}

.legal-list li {
    position: relative;
    padding: 8px 0 8px 24px;
    font-size: 14.5px;
    color: var(--text-muted);
    line-height: 1.7;
    border-bottom: 1px solid var(--glass-border);
}

.legal-list li:last-child {
    border-bottom: none;
}

.legal-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--orange);
    flex-shrink: 0;
}

/* ---- Callout Boxes ---- */
.legal-callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.6;
    margin: 16px 0;
    border: 1px solid;
}

.legal-callout i {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.legal-callout.info {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.legal-callout.success {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.legal-callout.warning {
    background: rgba(255, 107, 43, 0.08);
    border-color: rgba(255, 107, 43, 0.3);
    color: var(--orange);
}

/* ---- Table ---- */
.legal-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    margin: 16px 0;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

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

.legal-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
}

.legal-table td {
    padding: 12px 16px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
    vertical-align: top;
    line-height: 1.5;
}

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

.legal-table tr:hover td {
    background: var(--surface);
}

/* ---- Contact Card ---- */
.legal-contact-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.legal-contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: var(--text-muted);
}

.legal-contact-item i {
    width: 36px;
    height: 36px;
    background: var(--orange-glow);
    border: 1px solid rgba(255, 107, 43, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange);
    font-size: 14px;
    flex-shrink: 0;
}

.legal-contact-item a {
    color: var(--orange);
}

/* ---- Bottom Navigation ---- */
.legal-bottom-nav {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.legal-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    transition: var(--transition);
}

.legal-nav-btn:hover {
    border-color: var(--orange);
    color: var(--orange);
    transform: translateY(-2px);
}

.legal-nav-btn.primary {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px var(--orange-glow);
}

.legal-nav-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--orange-glow);
    color: #fff;
}

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

    .legal-toc {
        position: relative;
        top: 0;
        max-height: none;
    }
}

@media (max-width: 640px) {
    .legal-hero {
        padding: 60px 20px 40px;
    }

    .legal-container {
        padding: 40px 20px 60px;
    }

    .legal-section {
        padding: 28px 24px;
    }

    .legal-bottom-nav {
        flex-direction: column;
    }

    .legal-nav-btn {
        justify-content: center;
    }
}
