html {
    scroll-behavior: smooth;
}

body.legal-page {
    background: #0f2c38;
    color: #ffffff;
}

/* ================= HERO (Matches Contact Layout) ================= */

.legal-hero {
    height: 45vh;
    background: linear-gradient(rgba(19,47,61,0.75), rgba(19,47,61,0.75)),
    url('https://images.unsplash.com/photo-1589820296156-2454bb8a6ad1') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay h1 {
    font-size: 48px;
    color: var(--gold);
    letter-spacing: 1px;
}

.hero-overlay p {
    margin-top: 15px;
    opacity: 0.9;
}


/* ================= BREADCRUMB ================= */

.breadcrumb a {
    color: var(--gold);
    text-decoration: none;
    transition: 0.3s ease;
}

.breadcrumb a:hover {
    color: #e1c885;
}

.breadcrumb {
    font-size: 14px;
    margin-bottom: 15px;
}

.breadcrumb span {
    color: rgba(255,255,255,0.75);
}

/* ================= CONTENT ================= */

.legal-container {
    max-width: 1000px;
    margin: 80px auto;
    padding: 0 8%;
    line-height: 1.9;
    color: var(--white);
}

.legal-header h2 {
    color: var(--gold);
    margin-bottom: 8px;
}

.effective-date {
    color: var(--gold);
    opacity: 0.8;
}

.legal-block {
    margin-top: 50px;
}

.legal-block h3 {
    color: var(--gold);
    margin-bottom: 15px;
}

.legal-block ul {
    margin: 15px 0 20px 20px;
}

.legal-block li {
    margin-bottom: 8px;
}

.contact-section {
    padding-top: 30px;
}

/* ================= FADE ================= */

.fade-section {
    opacity: 0;
    transform: translateY(40px);
    transition: 0.8s ease;
}

.fade-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================= RESPONSIVE ================= */

@media(max-width:768px){
    .hero-overlay h1{
        font-size: 32px;
    }

    .legal-container{
        padding: 0 6%;
    }
}

/* ================= LAYOUT ================= */

.legal-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 80px;
}

/* Sidebar */
.legal-sidebar {
    position: sticky;
    top: 140px;
    height: fit-content;
}

.toc {
    position: sticky;
    top: 140px;
    padding: 30px 25px;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(225,200,133,0.15);
    border-radius: 12px;
}

.toc h4 {
    color: var(--gold);
    margin-bottom: 20px;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.toc ul {
    list-style: none;
    padding: 0;
}

.toc li {
    margin-bottom: 14px;
}

.toc a {
    text-decoration: none;
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    transition: 0.3s ease;
}

.toc a:hover {
    color: var(--gold);
}

/* Main content */
.legal-content {
    max-width: 800px;
}

/* Hide sidebar on mobile */
@media (max-width: 992px) {
    .legal-layout {
        grid-template-columns: 1fr;
    }

    .legal-sidebar {
        display: none;
    }
}

/* ================= TABLE OF CONTENTS ================= */

.toc {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(225,200,133,0.15);
    border-radius: 12px;
    padding: 25px;
}

.toc h4 {
    color: #e1c885;
    margin-bottom: 18px;
    font-size: 14px;
    letter-spacing: 1px;
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    margin-bottom: 12px;
}

/* Links */

.toc a {
    display: block;
    padding: 6px 10px;
    text-decoration: none;
    color: #9ca9b3;
    font-size: 14px;
    border-left: 2px solid transparent;
    transition: all 0.25s ease;
}

.toc a:hover {
    color: #e1c885;
    padding-left: 14px;
}

/* ACTIVE SECTION */

.toc a.active {
    color: #e1c885;
    border-left: 3px solid #e1c885;
    background: rgba(225,200,133,0.08);
    font-weight: 500;
}

.legal-block {
    scroll-margin-top: 140px;
}

/* ================= LEGAL CONTENT ================= */

.legal-content {
    max-width: 780px;
}

.legal-header {
    margin-bottom: 50px;
}

.legal-header h2 {
    color: #e1c885;
    font-size: 28px;
}

.effective-date {
    opacity: 0.7;
    font-size: 14px;
}

.legal-block {
    margin-bottom: 50px;
    line-height: 1.8;
}

.legal-block h3 {
    color: #e1c885;
    font-size: 20px;
    margin-bottom: 12px;
}

.legal-block p {
    margin-bottom: 10px;
    color: #cfd6db;
}

.legal-block ul {
    padding-left: 20px;
    margin-top: 10px;
}

.legal-block li {
    margin-bottom: 8px;
}

/* Elegant divider */

.legal-block:not(:last-child):not(.contact-section)::after {
    content: "";
    display: block;
    height: 1px;
    width: 100%;
    margin-top: 35px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(225,200,133,0.35),
        transparent
    );
}

@media (max-width: 900px) {

    .legal-layout {
        grid-template-columns: 1fr;
    }

    .legal-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 40px;
    }

}