:root {
    --legal-primary: #087a5b;
    --legal-primary-dark: #055c45;
    --legal-accent: #f3b61f;
    --legal-ink: #17212b;
    --legal-muted: #64748b;
    --legal-line: #e5eaf0;
    --legal-surface: #f6f8fa;
}

html { scroll-behavior: smooth; }

.legal-page { background: var(--legal-surface); color: var(--legal-ink); }

.legal-hero {
    position: relative;
    overflow: hidden;
    padding: 110px 0 68px; /* Increased top padding to prevent navbar overlap on breadcrumbs */
    background:
        linear-gradient(90deg, rgba(5, 45, 36, .88) 0%, rgba(6, 78, 59, .72) 55%, rgba(8, 122, 91, .38) 100%),
        url('/images/homeHeader.jpg') center 42% / cover no-repeat;
}

.legal-hero::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -145px;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    box-shadow: 0 0 0 42px rgba(255,255,255,.035), 0 0 0 84px rgba(255,255,255,.025);
}

.legal-hero__inner { position: relative; z-index: 1; }

.legal-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 28px;
    color: rgba(255,255,255,.7);
    font-size: 13px;
}

.legal-breadcrumb a { color: #fff; text-decoration: none; }
.legal-breadcrumb a:hover { text-decoration: underline; }

.legal-hero__content { display: flex; align-items: center; gap: 22px; }

.legal-hero__icon {
    display: grid;
    flex: 0 0 68px;
    width: 68px;
    height: 68px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 18px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 30px;
    backdrop-filter: blur(8px);
}

.legal-eyebrow {
    margin: 0 0 5px !important;
    color: #fde68a !important;
    font-size: 12px !important;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.legal-hero h1 { margin: 0 0 8px; color: #fff; font-size: clamp(32px, 4vw, 48px); line-height: 1.08; }
.legal-hero p { max-width: 650px; margin: 0; color: rgba(255,255,255,.82); font-size: 16px; }

.legal-content { padding: 52px 0 76px; }

.legal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 32px;
    align-items: start;
    max-width: 1160px;
    margin: 0 auto;
}

.legal-document {
    overflow: hidden;
    border: 1px solid var(--legal-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(23, 33, 43, .06);
}

.legal-document__intro { padding: 42px 46px 38px; border-bottom: 1px solid var(--legal-line); }
.legal-kicker { display: block; margin-bottom: 10px; color: var(--legal-primary); font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.legal-document__intro h2 { margin: 0 0 18px; color: var(--legal-ink); font-size: 28px; line-height: 1.25; }
.legal-document__intro p { margin: 0 0 10px; color: var(--legal-muted); font-size: 15px; line-height: 1.75; }
.legal-document__intro p:last-child { margin-bottom: 0; }

.legal-sections { padding: 8px 46px 32px; }

.legal-section { padding: 34px 0; border-bottom: 1px solid var(--legal-line); scroll-margin-top: 100px; }
.legal-section:last-child { border-bottom: 0; }

.legal-section__heading { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.legal-section__number { flex: 0 0 36px; padding-top: 3px; color: var(--legal-primary); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.legal-section__heading h3 { margin: 0; color: var(--legal-ink); font-size: 20px; line-height: 1.35; }
.legal-section__heading p { margin: 5px 0 0; }
.legal-section > p, .legal-section__heading p, .legal-section li { color: #536273; font-size: 14px; line-height: 1.75; }
.legal-section > p { margin: 0 0 0 52px; }
.legal-section ul { margin: 0 0 0 52px; padding: 0; list-style: none; }
.legal-section li { position: relative; margin-bottom: 12px; padding-left: 20px; }
.legal-section li:last-child { margin-bottom: 0; }
.legal-section li::before { content: ""; position: absolute; top: .72em; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--legal-accent); box-shadow: 0 0 0 4px #fff8df; }
.legal-section strong { color: #293746; font-weight: 700; }

.legal-sidebar { position: sticky; top: 90px; display: grid; gap: 18px; }
.legal-sidebar__card, .legal-help-card { border: 1px solid var(--legal-line); border-radius: 16px; background: #fff; box-shadow: 0 8px 25px rgba(23,33,43,.045); }
.legal-sidebar__card { padding: 24px; }
.legal-sidebar__title { margin: 0 0 14px; color: var(--legal-ink); font-size: 15px; font-weight: 800; }
.legal-toc { display: grid; }
.legal-toc a { display: flex; gap: 11px; padding: 9px 0; border-bottom: 1px solid #f0f2f5; color: #5d6b7a; font-size: 13px; text-decoration: none; transition: color .2s ease, transform .2s ease; }
.legal-toc a:last-child { border-bottom: 0; }
.legal-toc a:hover { color: var(--legal-primary); transform: translateX(3px); }
.legal-toc span { color: #9aa6b2; font-size: 11px; font-weight: 700; }

.legal-help-card { padding: 24px; background: linear-gradient(145deg, #073e32, #087a5b); color: #fff; }
.legal-help-card__icon { display: grid; width: 42px; height: 42px; margin-bottom: 16px; place-items: center; border-radius: 12px; background: rgba(255,255,255,.13); font-size: 20px; }
.legal-help-card h3 { margin: 0 0 7px; color: #fff; font-size: 18px; }
.legal-help-card p { margin: 0 0 18px; color: rgba(255,255,255,.72); font-size: 13px; line-height: 1.55; }
.legal-help-card a { display: inline-flex; align-items: center; gap: 7px; color: #fde68a; font-size: 13px; font-weight: 700; text-decoration: none; }

@media (max-width: 991.98px) {
    .legal-layout { grid-template-columns: 1fr; }
    .legal-sidebar { position: static; grid-row: 1; }
    .legal-sidebar__card { display: none; }
    .legal-help-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
    .legal-help-card__icon { margin: 0; }
    .legal-help-card h3 { margin: 0; }
    .legal-help-card p { display: none; }
}

@media (max-width: 575.98px) {
    .legal-hero { padding: 42px 0 48px; }
    .legal-breadcrumb { margin-bottom: 22px; }
    .legal-hero__content { align-items: flex-start; gap: 15px; }
    .legal-hero__icon { flex-basis: 50px; width: 50px; height: 50px; border-radius: 14px; font-size: 22px; }
    .legal-hero h1 { font-size: 31px; }
    .legal-hero p { font-size: 14px; line-height: 1.55; }
    .legal-content { padding: 28px 0 48px; }
    .legal-layout { gap: 20px; }
    .legal-document { border-radius: 14px; }
    .legal-document__intro { padding: 28px 22px 26px; }
    .legal-document__intro h2 { font-size: 23px; }
    .legal-sections { padding: 2px 22px 22px; }
    .legal-section { padding: 27px 0; }
    .legal-section__heading { gap: 9px; }
    .legal-section__number { flex-basis: 30px; }
    .legal-section__heading h3 { font-size: 18px; }
    .legal-section > p, .legal-section ul { margin-left: 39px; }
    .legal-help-card { grid-template-columns: auto 1fr; }
    .legal-help-card a { grid-column: 2; }
}
