/* ==========================================================================
   Legal pages (Privacy Policy, Cookie Policy, Terms) — readable "document" layout
   Left: sticky table of contents + help box. Right: always-open text.
   ========================================================================== */

/* ---------- Two columns with sticky index (desktop) ---------- */

@media (min-width: 992px) {
    .legal-row {
        display: flex;                  /* columns get the same height, so the index can stay sticky */
        align-items: stretch;
    }
    .legal-row:before,
    .legal-row:after { display: none; } /* Bootstrap 3 clearfix would become flex items */
    .legal-aside-inner {
        position: sticky;
        top: 90px;                      /* below the fixed header */
    }
}

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

.legal-toc {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 18px 20px;
    margin-bottom: 25px;
}
.legal-toc-title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #990000;
}
.legal-toc ol {
    margin: 0;
    padding: 0 0 0 20px;
    font-size: 13px;
    line-height: 1.4;
}
.legal-toc li { margin: 0 0 7px; color: #999; }
.legal-toc li:last-child { margin-bottom: 0; }
.legal-toc li::marker { transition: color 0.2s; }
.legal-toc a {
    color: #555;
    transition: color 0.2s;
}
/* Current section (and hover): number and text turn red */
.legal-toc li.is-active,
.legal-toc li:hover { color: #990000; }
.legal-toc li.is-active::marker { font-weight: 700; }
.legal-toc li.is-active a,
.legal-toc a:hover {
    color: #990000;
    text-decoration: none;
}
.legal-toc li.is-active a { font-weight: 700; }

/* ---------- Document ---------- */

.legal-doc {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 36px 40px 40px;
    font-family: "Lato", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #444;
}
.legal-doc > h2:first-child {
    margin-top: 0;
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: #333;
}
.legal-updated {
    margin: 4px 0 24px;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 12px;
    color: #888;
}

.legal-summary {
    background: #faf7f5;
    border-left: 4px solid #990000;
    padding: 18px 22px;
    margin: 0 0 36px;
}
.legal-summary h3 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #990000;
}
.legal-summary ul { margin: 0; padding-left: 18px; }
.legal-summary li { margin-bottom: 4px; }

.legal-section {
    scroll-margin-top: 90px;            /* anchor links don't end up under the fixed header */
    padding-top: 8px;
    margin-bottom: 30px;
}
.legal-section h3 {
    font-size: 19px;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.legal-section h3 .legal-num { color: #990000; margin-right: 6px; }
.legal-section h4 {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin: 20px 0 6px;
}
.legal-doc p { margin: 0 0 12px; }
.legal-doc ul { padding-left: 20px; margin: 0 0 12px; }
.legal-doc li { margin-bottom: 5px; }
.legal-doc a { color: #990000; text-decoration: underline; }
.legal-doc a:hover { color: #333; }
.legal-doc strong { color: #333; }

/* Data controller card */
.legal-card {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 20px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 3px;
    padding: 16px 20px;
    margin: 0 0 12px;
}
.legal-card dt { font-weight: 700; color: #333; }
.legal-card dd { margin: 0; }

/* Tables */
.legal-table-wrap {
    overflow-x: auto;
    margin: 0 0 14px;
    -webkit-overflow-scrolling: touch;
}
.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.5;
}
.legal-table th,
.legal-table td {
    text-align: left;
    vertical-align: top;
    padding: 10px 12px;
    border: 1px solid #e5e5e5;
}
.legal-table th {
    background: #333;
    color: #fff;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.legal-table tbody tr:nth-child(even) td { background: #fafafa; }

.legal-doc code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    color: #990000;
    background: #f6f1ef;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
}

.legal-note {
    font-size: 13px;
    color: #777;
}

/* ---------- Mobile / tablet ---------- */

@media (max-width: 991px) {
    .legal-help { display: none; }      /* contacts are already in the text (section "Your rights") */
}
@media (max-width: 767px) {
    .legal-doc { padding: 24px 18px 28px; font-size: 15px; }
    .legal-doc > h2:first-child { font-size: 22px; }
    .legal-card { grid-template-columns: 1fr; gap: 0; }
    .legal-card dt { margin-top: 8px; }
    .legal-card dt:first-child { margin-top: 0; }
}

/* ---------- Print: just the document ---------- */

@media print {
    header, footer, #position, .parallax-window, .legal-aside, #toTop, #preloader,
    .cc-banner, .cc-modal { display: none !important; }
    .legal-doc { border: 0; padding: 0; }
    .legal-row > div { width: 100% !important; }
}
