/* ==========================================================================
   Legal pages (Privacy Policy, Terms of Service)
   Depends on the design tokens declared in style.css :root
   ========================================================================== */

.legal-hero {
    background: linear-gradient(135deg, var(--warm-white) 0%, var(--cream) 50%, var(--blush-pink) 100%);
    padding: 160px 0 80px;
    text-align: center;
}

.legal-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    border-radius: 50px;
    background: rgba(92, 107, 65, 0.1);
    color: var(--sage-green);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.legal-hero__title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--charcoal);
    margin-bottom: 20px;
}

.legal-hero__intro {
    max-width: 680px;
    margin: 0 auto 28px;
    color: var(--soft-gray);
    font-size: 1.075rem;
    line-height: 1.75;
}

.legal-hero__meta {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 28px;
    font-size: 0.9rem;
    color: var(--soft-gray);
}

.legal-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legal-hero__meta i {
    color: var(--sage-green);
}

/* Layout ----------------------------------------------------------------- */

.legal-body {
    padding: 72px 0 96px;
    background: var(--warm-white);
}

.legal-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
}

/* Grid items default to min-width:auto, which lets wide children (the data
   tables) push the whole page wider than the viewport. */
.legal-layout > * {
    min-width: 0;
}

@media (max-width: 1024px) {
    .legal-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }
}

/* Table of contents ------------------------------------------------------ */

.legal-toc {
    position: sticky;
    top: 110px;
}

@media (max-width: 1024px) {
    .legal-toc {
        position: static;
        background: var(--cream);
        border-radius: 20px;
        padding: 24px 28px;
    }
}

.legal-toc__heading {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--soft-gray);
    margin-bottom: 18px;
}

.legal-toc__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    counter-reset: toc;
}

.legal-toc__list a {
    display: flex;
    gap: 10px;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--soft-gray);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.25s ease;
}

.legal-toc__list a::before {
    counter-increment: toc;
    content: counter(toc);
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    font-size: 0.75rem;
    padding-top: 2px;
    opacity: 0.55;
}

.legal-toc__list a:hover {
    color: var(--sage-green);
    background: rgba(92, 107, 65, 0.07);
}

.legal-toc__list a.active {
    color: var(--sage-green);
    font-weight: 600;
    background: rgba(92, 107, 65, 0.09);
    border-left-color: var(--sage-green);
}

.legal-toc__list a.active::before {
    opacity: 1;
}

/* Content ---------------------------------------------------------------- */

.legal-content {
    max-width: 780px;
    min-width: 0;
}

.legal-section {
    scroll-margin-top: 110px;
    padding-bottom: 44px;
    margin-bottom: 44px;
    border-bottom: 1px solid rgba(114, 110, 106, 0.15);
}

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

.legal-section__number {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sage-green);
    margin-bottom: 10px;
}

.legal-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 2.6vw, 1.9rem);
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1.3;
    margin-bottom: 18px;
}

.legal-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--charcoal);
    margin: 28px 0 12px;
}

.legal-section p {
    color: var(--soft-gray);
    line-height: 1.8;
    margin-bottom: 16px;
}

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

.legal-section a:not(.btn-primary):not(.btn-secondary) {
    color: var(--sage-green);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: opacity 0.25s ease;
}

.legal-section a:not(.btn-primary):not(.btn-secondary):hover {
    opacity: 0.7;
}

.legal-section strong {
    color: var(--charcoal);
    font-weight: 600;
}

.legal-section ul,
.legal-section ol {
    margin: 0 0 16px;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legal-section ul li {
    position: relative;
    padding-left: 28px;
    color: var(--soft-gray);
    line-height: 1.75;
}

.legal-section ul li::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sage-green);
}

.legal-section ol {
    counter-reset: legal-ol;
}

.legal-section ol li {
    position: relative;
    padding-left: 34px;
    color: var(--soft-gray);
    line-height: 1.75;
}

.legal-section ol li::before {
    counter-increment: legal-ol;
    content: counter(legal-ol) '.';
    position: absolute;
    left: 8px;
    top: 0;
    font-weight: 600;
    color: var(--sage-green);
    font-variant-numeric: tabular-nums;
}

/* Data table ------------------------------------------------------------- */

.legal-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(114, 110, 106, 0.18);
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.925rem;
    min-width: 520px;
}

.legal-table th,
.legal-table td {
    text-align: left;
    padding: 14px 18px;
    vertical-align: top;
    line-height: 1.65;
}

.legal-table thead th {
    background: var(--cream);
    color: var(--charcoal);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.legal-table tbody tr + tr {
    border-top: 1px solid rgba(114, 110, 106, 0.15);
}

.legal-table tbody td {
    color: var(--soft-gray);
}

.legal-table tbody td:first-child {
    color: var(--charcoal);
    font-weight: 500;
}

/* Callout ---------------------------------------------------------------- */

.legal-callout {
    display: flex;
    gap: 16px;
    background: var(--cream);
    border-left: 3px solid var(--sage-green);
    border-radius: 0 16px 16px 0;
    padding: 22px 26px;
    margin: 0 0 16px;
}

.legal-callout i {
    color: var(--sage-green);
    font-size: 1.05rem;
    margin-top: 4px;
    flex: 0 0 auto;
}

.legal-callout p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Contact card ----------------------------------------------------------- */

.legal-contact-card {
    background: var(--cream);
    border-radius: 24px;
    padding: 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px 28px;
    margin-bottom: 16px;
}

.legal-contact-card__item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.legal-contact-card__icon {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: rgba(92, 107, 65, 0.12);
    color: var(--sage-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.legal-contact-card__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--soft-gray);
    margin-bottom: 4px;
}

.legal-contact-card__value {
    color: var(--charcoal);
    font-weight: 500;
    line-height: 1.5;
    font-size: 0.95rem;
    /* Break long addresses only as a last resort, never mid-word by default. */
    overflow-wrap: anywhere;
    word-break: normal;
}

.legal-contact-card__value a {
    color: var(--charcoal) !important;
    text-decoration: none !important;
}

.legal-contact-card__value a:hover {
    color: var(--sage-green) !important;
}

/* Cross-link footer ------------------------------------------------------ */

.legal-crosslink {
    margin-top: 64px;
    padding: 36px;
    border-radius: 24px;
    background: var(--cream);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.legal-crosslink h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 6px;
}

.legal-crosslink p {
    color: var(--soft-gray);
    font-size: 0.95rem;
    margin: 0;
}

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

    .legal-body {
        padding: 52px 0 72px;
    }

    .legal-contact-card,
    .legal-crosslink {
        padding: 24px;
    }

    .legal-crosslink {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media print {
    .floating-navbar,
    .legal-toc,
    .whatsapp-float,
    .legal-crosslink,
    footer {
        display: none !important;
    }

    .legal-hero {
        padding: 0 0 24px;
        text-align: left;
        background: none;
    }

    .legal-body {
        padding: 0;
    }

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