.legal-hero {
    position: relative;
    display: grid;
    min-height: clamp(260px, 20vw, 380px);
    overflow: hidden;
    place-items: center;
    color: #fff;
    background:
        radial-gradient(circle at 82% 22%, rgb(255 148 31 / 24%) 0 7%, transparent 7.2%),
        radial-gradient(circle at 13% 110%, rgb(255 255 255 / 8%) 0 24%, transparent 24.2%),
        linear-gradient(125deg, var(--blue-dark), var(--blue));
}

.legal-hero::after {
    position: absolute;
    right: -70px;
    bottom: -130px;
    width: 340px;
    height: 340px;
    content: "";
    border: 1px solid rgb(255 255 255 / 14%);
    border-radius: 50%;
    box-shadow: 0 0 0 42px rgb(255 255 255 / 4%), 0 0 0 84px rgb(255 255 255 / 3%);
}

.legal-hero-copy {
    position: relative;
    z-index: 1;
    text-align: center;
}

.legal-hero-copy > span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--orange);
    font-size: var(--type-note);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.legal-hero-copy > span::before,
.legal-hero-copy > span::after {
    width: 24px;
    height: 1px;
    content: "";
    background: currentColor;
}

.legal-hero h1 {
    margin: 12px 0 10px;
    color: var(--orange);
    font-size: var(--type-page-title);
    line-height: 1.1;
}

.legal-hero p {
    max-width: 700px;
    margin: 0 auto;
    font-size: var(--type-body);
    line-height: 1.6;
}

.legal-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 780px);
    justify-content: center;
    gap: clamp(54px, 6vw, 100px);
    padding-block: clamp(64px, 6vw, 108px);
}

/* Terminos y condiciones: contenido de la BD (Summernote), sin el indice
   lateral de anclas que usa privacy_policy.html -- un solo bloque a ancho
   completo en su lugar. */
.legal-layout-full {
    grid-template-columns: minmax(0, 860px);
}

.legal-index {
    align-self: start;
    position: sticky;
    top: 132px;
    padding: 24px;
    background: #f5f7fa;
    border-top: 3px solid var(--orange);
    border-radius: 0 0 10px 10px;
}

.legal-index > p {
    margin: 0 0 15px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
}

.legal-index nav {
    display: grid;
    gap: 2px;
}

.legal-index a {
    display: grid;
    grid-template-columns: 26px 1fr;
    align-items: center;
    min-height: 38px;
    color: #666;
    font-size: 11px;
    transition: color 180ms ease, transform 180ms ease;
}

.legal-index a:hover {
    color: var(--orange-dark);
    transform: translateX(3px);
}

.legal-index a span {
    color: var(--orange);
    font-size: 9px;
    font-weight: 700;
}

.legal-document {
    min-width: 0;
}

.legal-review-notice {
    margin: 0 0 32px;
    padding: 16px 22px;
    color: var(--blue);
    font-size: var(--type-note);
    background: #fff8ef;
    border-left: 4px solid var(--orange);
    border-radius: 0 10px 10px 0;
}

/* Contenido de Terms venido de Summernote (HTML plano: p/h2/h3/ul/ol/li/a/img/
   table), sin las <section> con ancla numerada que estiliza el resto de este
   archivo -- mismos colores y tamanos que .legal-document section/h2 arriba. */
.legal-richtext > p,
.legal-richtext li {
    margin: 0;
    color: #5c5c5c;
    font-size: var(--type-body);
    line-height: 1.85;
}

.legal-richtext > p + p,
.legal-richtext > p + ul,
.legal-richtext > p + ol,
.legal-richtext > ul + p,
.legal-richtext > ol + p {
    margin-top: 14px;
}

.legal-richtext > h2,
.legal-richtext > h3 {
    margin: 42px 0 14px;
    color: var(--blue);
    line-height: 1.25;
}

.legal-richtext > h2:first-child,
.legal-richtext > h3:first-child {
    margin-top: 0;
}

.legal-richtext > h2 {
    font-size: clamp(20px, 1.5vw, 27px);
}

.legal-richtext > h3 {
    font-size: clamp(17px, 1.2vw, 21px);
}

.legal-richtext > ul,
.legal-richtext > ol {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
    padding-left: 20px;
    color: #5c5c5c;
    font-size: var(--type-body);
}

.legal-richtext li::marker {
    color: var(--orange);
}

.legal-richtext a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgb(255 148 31 / 55%);
    text-underline-offset: 3px;
}

.legal-richtext img {
    max-width: 100%;
    height: auto;
    margin: 14px 0;
    border-radius: 8px;
}

.legal-richtext table {
    width: 100%;
    margin: 14px 0;
    color: #5c5c5c;
    font-size: var(--type-body);
    border-collapse: collapse;
}

.legal-richtext th,
.legal-richtext td {
    padding: 8px 12px;
    text-align: left;
    border: 1px solid #ececec;
}

.legal-intro {
    margin-bottom: 54px;
    padding: 26px 30px;
    background: #fff8ef;
    border-left: 4px solid var(--orange);
    border-radius: 0 10px 10px 0;
}

.legal-intro strong {
    display: block;
    margin-bottom: 5px;
    color: var(--blue);
    font-size: var(--type-subtitle);
}

.legal-intro p,
.legal-document section p {
    margin: 0;
    color: #5c5c5c;
    font-size: var(--type-body);
    line-height: 1.85;
}

.legal-document section {
    position: relative;
    padding: 0 0 42px 54px;
    scroll-margin-top: 130px;
}

.legal-document section + section {
    padding-top: 8px;
    border-top: 1px solid #ececec;
}

.legal-document section p + p,
.legal-document section p + ul,
.legal-document section ul + p {
    margin-top: 14px;
}

.legal-section-number {
    position: absolute;
    top: 8px;
    left: 0;
    color: var(--orange);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.legal-document h2 {
    margin: 0 0 14px;
    color: var(--blue);
    font-size: clamp(20px, 1.5vw, 27px);
    line-height: 1.25;
}

.legal-document ul {
    display: grid;
    gap: 8px;
    margin-bottom: 0;
    padding-left: 20px;
    color: #5c5c5c;
    font-size: var(--type-body);
}

.legal-document li::marker {
    color: var(--orange);
}

.legal-document a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgb(255 148 31 / 55%);
    text-underline-offset: 3px;
}

.legal-contact {
    padding: 30px 34px 32px 88px !important;
    color: #fff;
    background: var(--blue);
    border: 0 !important;
    border-radius: 12px;
}

.legal-contact .legal-section-number {
    top: 39px;
    left: 34px;
}

.legal-document section.legal-contact h2,
.legal-document section.legal-contact p,
.legal-document section.legal-contact a {
    color: #fff;
}

.legal-document section.legal-contact a {
    text-decoration-color: var(--orange);
}

.legal-contact ::selection {
    color: #fff;
    background: #0061d5;
}

.legal-contact address {
    display: grid;
    gap: 2px;
    margin-top: 16px;
    font-size: var(--type-body);
    font-style: normal;
}

.legal-contact address strong {
    color: var(--orange);
}

@media (max-width: 900px) {
    .legal-hero {
        min-height: 260px;
    }

    .legal-hero-copy {
        width: calc(100% - 40px);
    }

    .legal-layout {
        display: block;
        padding-block: 48px 72px;
    }

    .legal-index {
        position: static;
        margin-bottom: 48px;
        padding: 18px 20px;
    }

    .legal-index nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px 16px;
    }

    .legal-document {
        max-width: 760px;
        margin-inline: auto;
    }
}

@media (max-width: 600px) {
    .legal-hero {
        min-height: 235px;
    }

    .legal-hero-copy > span::before,
    .legal-hero-copy > span::after {
        width: 16px;
    }

    .legal-index nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .legal-intro {
        margin-bottom: 42px;
        padding: 22px;
    }

    .legal-document section {
        padding: 0 0 36px 38px;
    }

    .legal-contact {
        padding: 26px 24px 28px 62px !important;
    }

    .legal-contact .legal-section-number {
        top: 34px;
        left: 24px;
    }
}
