/* ================================================================
   LEGAL PAGES (Privacy, Terms, Cookies)
   Two-column layout: sticky TOC + article
   ================================================================ */

.legal-content {
    padding: 3rem 0 4rem;
    background: #ffffff;
}

.legal-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

/* Sticky TOC */
.legal-toc {
    position: sticky;
    top: 100px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.legal-toc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--main-dark-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legal-toc-header i {
    color: var(--main-green);
    font-size: 1rem;
}

.legal-toc-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.legal-toc-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #64748b;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.legal-toc-link:hover {
    color: var(--main-green);
    background: rgba(0, 201, 80, 0.05);
}

.legal-toc-link.active {
    color: var(--main-green);
    background: rgba(0, 201, 80, 0.08);
    border-left-color: var(--main-green);
    font-weight: 600;
}

/* Article */
.legal-article {
    min-width: 0;
}

.legal-updated {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(2, 6, 24, 0.05);
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--main-grey);
    margin-bottom: 2rem;
}

.legal-updated i {
    color: var(--main-green);
}

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

.legal-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--main-dark-blue);
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f5f9;
    letter-spacing: -0.01em;
}

.legal-section-content {
    color: var(--main-grey);
    font-size: 0.95rem;
    line-height: 1.75;
    margin: 0 0 1rem 0;
}

.legal-section-content a {
    color: var(--main-green);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 201, 80, 0.3);
    transition: all 0.2s ease;
}

.legal-section-content a:hover {
    border-bottom-color: var(--main-green);
}

.legal-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.legal-list li {
    position: relative;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 3px solid var(--main-green);
    font-size: 0.92rem;
    color: var(--main-grey);
    line-height: 1.6;
}

.legal-list li::before {
    content: '•';
    position: absolute;
    left: 1rem;
    top: 0.75rem;
    color: var(--main-green);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.legal-list li strong {
    color: var(--main-dark-blue);
    font-weight: 700;
}

/* Back to top */
.legal-back-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f1f5f9;
    color: var(--main-dark-blue);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.legal-back-top:hover {
    background: var(--main-green);
    color: #ffffff;
}

/* Responsive */
@media (max-width: 991.98px) {
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .legal-toc {
        position: static;
        max-height: none;
    }
    
    .legal-toc-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.25rem 1rem;
    }
}

@media (max-width: 575.98px) {
    .legal-toc-list {
        grid-template-columns: 1fr;
    }
    
    .legal-section-title {
        font-size: 1.15rem;
    }
    
    .legal-section-content {
        font-size: 0.9rem;
    }
    
    .legal-list li {
        font-size: 0.85rem;
        padding-left: 2.25rem;
    }
}

/* Print styles */
@media print {
    .legal-toc {
        display: none;
    }
    
    .legal-layout {
        grid-template-columns: 1fr;
    }
    
    .legal-section {
        page-break-inside: avoid;
    }
}