/* ============================================================
   1860 TRAVELS — LEGAL PAGES (Privacy, Terms, Cookies)
   Premium Skyscanner-style layout
   ============================================================ */

/* ── HERO ── */
.legal-hero {
    background: url('/images/legalnew.jpg') center center / cover no-repeat;
    padding: 80px 0 64px;
    position: relative;
    overflow: hidden;
}
.legal-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.52) 0%,
        rgba(0, 0, 0, 0.38) 100%
    );
}
.legal-hero::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 56px;
    background: var(--bg);
    clip-path: ellipse(60% 100% at 50% 100%);
}
.legal-hero-inner {
    position: relative; z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    padding: 0 24px;
}
.legal-hero-badge {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.85);
    font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    padding: 5px 14px; border-radius: 20px;
    margin-bottom: 24px;
}
.legal-hero-badge i { color: var(--amber); font-size: 12px; }
.legal-hero h1 {
    font-size: clamp(30px, 5vw, 52px);
    font-weight: 800; color: #fff;
    margin: 0 0 18px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.legal-hero p {
    font-size: 16px; color: rgba(255,255,255,0.8);
    line-height: 1.7; margin: 0 0 28px;
}
.legal-hero-meta {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 16px; border-radius: 20px;
    font-size: 12px; color: rgba(255,255,255,0.75); font-weight: 500;
}
.legal-hero-meta i { color: var(--amber); }

/* ── BODY LAYOUT ── */
.legal-body {
    padding: 60px 0 80px;
    background: var(--bg);
}
.legal-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    align-items: start;
}

/* ── SIDEBAR TOC ── */
.legal-toc {
    position: sticky;
    top: 90px;
}
.legal-toc-card {
    background: #fff;
    border: 1px solid var(--border-lt);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.legal-toc-title {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--text-dk2);
    margin: 0 0 16px;
    display: flex; align-items: center; gap: 8px;
}
.legal-toc-title i { color: var(--blue); font-size: 12px; }
.legal-toc-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 2px;
}
.legal-toc-list a {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 8px 10px; border-radius: var(--r-sm);
    font-size: 12.5px; font-weight: 600; color: var(--text-dk2);
    text-decoration: none; transition: all 0.2s;
    line-height: 1.4;
}
.legal-toc-list a:hover,
.legal-toc-list a.active {
    background: rgba(4,142,211,0.08);
    color: var(--blue);
}
.legal-toc-list a .toc-num {
    flex-shrink: 0;
    width: 20px; height: 20px;
    background: var(--bg-2);
    border-radius: 5px;
    font-size: 10px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-dk2);
    margin-top: 1px;
    transition: all 0.2s;
}
.legal-toc-list a:hover .toc-num,
.legal-toc-list a.active .toc-num {
    background: var(--blue);
    color: #fff;
}

/* ── MAIN CONTENT ── */
.legal-content {}
.legal-section {
    background: #fff;
    border: 1px solid var(--border-lt);
    border-radius: var(--r-lg);
    padding: 36px 40px;
    margin-bottom: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.05);
    scroll-margin-top: 100px;
}
.legal-section:last-child { margin-bottom: 0; }

.legal-section-header {
    display: flex; align-items: flex-start; gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-lt);
}
.legal-section-icon {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, rgba(4,142,211,0.12), rgba(4,142,211,0.06));
    border: 1px solid rgba(4,142,211,0.15);
    display: flex; align-items: center; justify-content: center;
    color: var(--blue); font-size: 18px;
}
.legal-section-header-text {}
.legal-section-num {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--blue);
    margin-bottom: 4px;
}
.legal-section h2 {
    font-size: 18px; font-weight: 800; color: var(--text-dk);
    margin: 0; line-height: 1.3;
}

.legal-section p {
    font-size: 14.5px; line-height: 1.85;
    color: #454540; margin: 0 0 14px;
}
.legal-section p:last-child { margin-bottom: 0; }

.legal-list {
    list-style: none; margin: 0 0 14px; padding: 0;
    display: flex; flex-direction: column; gap: 10px;
}
.legal-list li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 14.5px; line-height: 1.7; color: #454540;
}
.legal-list li::before {
    content: '';
    flex-shrink: 0;
    width: 6px; height: 6px;
    background: var(--blue);
    border-radius: 50%;
    margin-top: 9px;
}
.legal-list li:last-child { margin-bottom: 0; }

.legal-alpha-list {
    list-style: none; margin: 12px 0 14px; padding: 0;
    display: flex; flex-direction: column; gap: 8px;
}
.legal-alpha-list li {
    display: flex; align-items: flex-start; gap: 12px;
    font-size: 14px; line-height: 1.7; color: #454540;
    background: var(--bg);
    border-left: 3px solid var(--blue);
    padding: 10px 14px;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.legal-alpha-list .alpha-label {
    flex-shrink: 0;
    font-weight: 700; color: var(--blue); font-size: 12px;
    min-width: 18px;
}

.legal-clause-list {
    list-style: none; margin: 0 0 14px; padding: 0;
    display: flex; flex-direction: column; gap: 12px;
}
.legal-clause-list li {
    display: flex; align-items: flex-start; gap: 12px;
    font-size: 14.5px; line-height: 1.7; color: #454540;
}
.legal-clause-list .clause-num {
    flex-shrink: 0;
    font-weight: 700; color: var(--blue);
    font-size: 12px; font-variant-numeric: tabular-nums;
    min-width: 32px; padding-top: 2px;
}

.legal-highlight {
    background: linear-gradient(135deg, rgba(4,142,211,0.07), rgba(4,142,211,0.03));
    border: 1px solid rgba(4,142,211,0.15);
    border-left: 4px solid var(--blue);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    padding: 16px 20px;
    margin: 16px 0;
    font-size: 14.5px; line-height: 1.75; color: #3a3a35;
}
.legal-highlight strong { color: var(--blue); }

.legal-amber-box {
    background: linear-gradient(135deg, rgba(243,163,22,0.1), rgba(243,163,22,0.05));
    border: 1px solid rgba(243,163,22,0.25);
    border-left: 4px solid var(--amber);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    padding: 16px 20px; margin: 16px 0;
    font-size: 14.5px; line-height: 1.75; color: #3a3a35;
}
.legal-amber-box i { color: var(--amber); margin-right: 6px; }

/* Cookie name/description table */
.legal-cookie-table {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 0;
    margin: 16px 0 0;
    border: 1px solid var(--border-lt);
    border-radius: var(--r-md);
    overflow: hidden;
}
.legal-cookie-table-row {
    display: contents;
}
.legal-cookie-table-row:not(:last-child) .legal-cookie-cell {
    border-bottom: 1px solid var(--border-lt);
}
.legal-cookie-cell {
    padding: 12px 16px;
    font-size: 13.5px;
    line-height: 1.65;
    color: #454540;
}
.legal-cookie-cell:first-child {
    background: var(--bg);
    font-weight: 700;
    color: var(--blue);
    font-family: monospace;
    font-size: 12.5px;
    border-right: 1px solid var(--border-lt);
    word-break: break-all;
}

/* Third-party provider list */
.legal-provider-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 8px 0 16px;
}
.legal-provider-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--bg);
    border: 1px solid var(--border-lt);
    border-radius: var(--r-md);
    padding: 14px 16px;
}
.legal-provider-icon {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--border-lt);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: var(--blue);
}
.legal-provider-body { flex: 1; min-width: 0; }
.legal-provider-name {
    font-size: 13.5px; font-weight: 700; color: var(--text-dk);
    display: block; margin-bottom: 3px;
}
.legal-provider-desc {
    font-size: 13px; color: var(--text-dk2); line-height: 1.6;
}
.legal-provider-link {
    display: inline-block;
    margin-top: 5px;
    font-size: 12px; font-weight: 600; color: var(--blue);
    text-decoration: none;
}
.legal-provider-link:hover { text-decoration: underline; }

/* Cookie type cards */
.cookie-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px; margin-top: 20px;
}
.cookie-card {
    background: var(--bg);
    border: 1px solid var(--border-lt);
    border-radius: var(--r-md);
    padding: 20px;
}
.cookie-card-icon {
    width: 38px; height: 38px;
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; margin-bottom: 12px;
}
.cookie-card-icon.essential  { background: rgba(4,142,211,0.1); color: var(--blue); }
.cookie-card-icon.analytics  { background: rgba(243,163,22,0.1); color: var(--amber-d); }
.cookie-card-icon.functional { background: rgba(0,48,135,0.1); color: var(--navy); }
.cookie-card-icon.marketing  { background: rgba(76,175,80,0.1); color: #388e3c; }
.cookie-card h4 {
    font-size: 13.5px; font-weight: 700; color: var(--text-dk);
    margin: 0 0 8px;
}
.cookie-card p {
    font-size: 13px; color: var(--text-dk2);
    line-height: 1.6; margin: 0;
}
.cookie-badge {
    display: inline-block;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 2px 8px;
    border-radius: 10px; margin-top: 10px;
}
.cookie-badge.required { background: rgba(4,142,211,0.12); color: var(--blue); }
.cookie-badge.optional { background: rgba(243,163,22,0.12); color: var(--amber-d); }

/* CTA Section */
.legal-cta {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
    border-radius: var(--r-xl);
    padding: 40px 48px;
    text-align: center;
    margin-top: 32px;
}
.legal-cta h3 { font-size: 22px; font-weight: 800; color: #fff; margin: 0 0 10px; }
.legal-cta p { font-size: 14.5px; color: rgba(255,255,255,0.8); margin: 0 0 24px; }
.legal-cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.legal-cta .btn-primary-brand {
    background: var(--amber); color: var(--navy);
    padding: 12px 28px; border-radius: var(--r-md);
    font-weight: 700; font-size: 14px;
    border: none; text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px;
    transition: all 0.2s;
}
.legal-cta .btn-primary-brand:hover { background: var(--amber-d); transform: translateY(-1px); }
.legal-cta .btn-outline-brand {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff; padding: 12px 28px; border-radius: var(--r-md);
    font-weight: 600; font-size: 14px;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px;
    transition: all 0.2s;
}
.legal-cta .btn-outline-brand:hover { background: rgba(255,255,255,0.18); }

/* ── RESPONSIVE — tablet ── */
@media (max-width: 900px) {
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0 16px;
    }
    /* hide entire sidebar — replaced by horizontal tab strip */
    .legal-toc { display: none; }

    .legal-toc-mobile { display: none !important; }

    .legal-body { padding: 32px 0 60px; }
    .legal-hero { padding: 52px 0 72px; }
    .legal-hero p { font-size: 15px; }

    .legal-section { padding: 22px 18px; margin-bottom: 14px; }
    .legal-section h2 { font-size: 16px; }
    .legal-section-icon { width: 38px; height: 38px; font-size: 15px; }

    .legal-section p,
    .legal-list li,
    .legal-clause-list li,
    .legal-alpha-list li { font-size: 14px; }

    .cookie-grid { grid-template-columns: 1fr; gap: 12px; }
    .legal-cta { padding: 26px 20px; border-radius: var(--r-lg); }
    .legal-cta h3 { font-size: 18px; }
    .legal-cta-actions { flex-direction: column; align-items: stretch; }
    .legal-cta .btn-primary-brand,
    .legal-cta .btn-outline-brand { justify-content: center; }
}

/* ── RESPONSIVE — small phones ── */
@media (max-width: 480px) {
    .legal-layout { padding: 0 12px; }
    .legal-hero-inner { padding: 0 16px; }
    .legal-hero { padding: 40px 0 68px; }
    .legal-hero p { font-size: 14px; }

    .legal-section { padding: 18px 14px; border-radius: var(--r-md); }
    .legal-section-header { gap: 12px; margin-bottom: 18px; padding-bottom: 14px; }
    .legal-section h2 { font-size: 15px; }
    .legal-section-num { font-size: 10px; }

    .legal-section p,
    .legal-list li,
    .legal-clause-list li,
    .legal-alpha-list li { font-size: 13.5px; line-height: 1.75; }

    .legal-highlight,
    .legal-amber-box { font-size: 13.5px; padding: 12px 14px; }

    .legal-clause-list .clause-num { min-width: 26px; font-size: 11px; }
    .legal-alpha-list li { padding: 9px 12px; gap: 10px; }

    .cookie-card { padding: 16px; }
    .legal-cta { padding: 22px 16px; }
    .legal-cta h3 { font-size: 17px; }
    .legal-cta p { font-size: 13.5px; }
    .legal-cta .btn-primary-brand,
    .legal-cta .btn-outline-brand { font-size: 13px; padding: 11px 20px; }

    /* prevent any text from overflowing card edges */
    .legal-section, .legal-highlight, .legal-amber-box {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* Mobile TOC — sticky tab bar (Skyscanner/Booking.com style) */
.legal-toc-mobile {
    display: none;
    position: sticky;
    top: 67px; /* sits flush below the sticky navbar */
    z-index: 90;
    background: #fff;
    border-bottom: 1px solid var(--border-lt);
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* no gap/padding — tabs sit edge to edge */
}
.legal-toc-mobile::-webkit-scrollbar { display: none; }
.legal-toc-mobile-inner {
    display: flex;
    min-width: max-content;
    padding: 0 16px;
}
.legal-toc-mobile a {
    flex-shrink: 0;
    padding: 13px 16px;
    font-size: 12.5px; font-weight: 700;
    color: var(--text-dk2);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -1px; /* overlap the container border */
    transition: color 0.2s, border-color 0.2s;
    letter-spacing: 0.01em;
}
.legal-toc-mobile a:hover { color: var(--blue); }
.legal-toc-mobile a.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

/* Animation */
@keyframes legalFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.legal-section { animation: legalFadeUp 0.5s ease both; }
.legal-section:nth-child(1) { animation-delay: 0.05s; }
.legal-section:nth-child(2) { animation-delay: 0.10s; }
.legal-section:nth-child(3) { animation-delay: 0.15s; }
.legal-section:nth-child(4) { animation-delay: 0.20s; }
.legal-section:nth-child(5) { animation-delay: 0.25s; }
.legal-section:nth-child(6) { animation-delay: 0.30s; }
.legal-section:nth-child(7) { animation-delay: 0.35s; }
.legal-section:nth-child(8) { animation-delay: 0.40s; }
