/* =========================================================
   CONDICIONES GENERALES IAact
   ========================================================= */

:root {
    --legal-bg: #080b14;
    --legal-surface: #0f1421;
    --legal-surface-soft: #131a2a;
    --legal-border: rgba(255, 255, 255, 0.09);
    --legal-border-strong: rgba(255, 255, 255, 0.15);

    --legal-text: #f5f7fb;
    --legal-text-soft: #c3cad8;
    --legal-text-muted: #8f98aa;

    --legal-blue: #4779ce;
    --legal-blue-soft: rgba(71, 121, 206, 0.12);
    --legal-yellow: #f5a623;
    --legal-yellow-soft: rgba(245, 166, 35, 0.12);

    --legal-radius: 18px;
}


/* Página general
   ========================================================= */

.legal-page {
    min-height: 100vh;
    padding: 150px 0 100px;
    background:
        radial-gradient(
            circle at 15% 0%,
            rgba(71, 121, 206, 0.11),
            transparent 32%
        ),
        #080b14;
}

.legal-page__container {
    max-width: 1280px;
}


/* Cabecera
   ========================================================= */

.legal-header {
    max-width: 900px;
    margin: 0 auto 56px;
    text-align: center;
}

.legal-header__eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 13px;
    margin-bottom: 22px;

    border: 1px solid rgba(71, 121, 206, 0.35);
    border-radius: 999px;

    background: rgba(71, 121, 206, 0.12);
    color: #89adf0;

    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.legal-header h1 {
    max-width: 840px;
    margin: 0 auto 20px;

    color: var(--legal-text);

    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.legal-header__lead {
    max-width: 740px;
    margin: 0 auto;

    color: var(--legal-text-soft);

    font-size: 18px;
    line-height: 1.75;
}

.legal-header__meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 28px;

    margin-top: 28px;

    color: var(--legal-text-muted);

    font-size: 13px;
}

.legal-header__meta strong {
    color: var(--legal-text-soft);
}


/* Distribución: índice + contenido
   ========================================================= */

.legal-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 820px);
    justify-content: center;
    align-items: start;
    gap: 42px;
}


/* Índice lateral
   ========================================================= */

.legal-sidebar {
    position: relative;
}

.legal-sidebar__inner {
    position: sticky;
    top: 110px;

    max-height: calc(100vh - 140px);
    padding: 20px 18px;

    overflow-y: auto;
    scrollbar-width: thin;

    border: 1px solid var(--legal-border);
    border-radius: 16px;

    background: rgba(15, 20, 33, 0.72);
    backdrop-filter: blur(14px);
}

.legal-sidebar__title {
    margin: 0 0 14px;
    padding: 0 8px 13px;

    border-bottom: 1px solid var(--legal-border);

    color: var(--legal-text);

    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.legal-index {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.legal-index a {
    display: block;
    padding: 7px 8px;

    border-radius: 8px;

    color: var(--legal-text-muted);

    font-size: 12px;
    line-height: 1.35;
    text-decoration: none;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.legal-index a:hover {
    color: #fff;
    background: var(--legal-blue-soft);
    transform: translateX(3px);
}


/* Contenido legal
   ========================================================= */

.condiciones-contratacion {
    min-width: 0;
}

.condiciones-contratacion > section {
    position: relative;

    margin-bottom: 22px;
    padding: 34px 38px;

    scroll-margin-top: 115px;

    border: 1px solid var(--legal-border);
    border-radius: var(--legal-radius);

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.025),
            rgba(255, 255, 255, 0)
        ),
        var(--legal-surface);

    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.16);

    transition:
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.condiciones-contratacion > section:hover {
    border-color: rgba(71, 121, 206, 0.22);

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.22);
}


/* Títulos
   ========================================================= */

.condiciones-contratacion h2 {
    position: relative;

    margin: 0 0 22px;
    padding-left: 19px;

    color: var(--legal-text);

    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 22px;
    font-weight: 750;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.condiciones-contratacion h2::before {
    content: "";

    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 0;

    width: 4px;

    border-radius: 999px;

    background: linear-gradient(
        180deg,
        var(--legal-blue),
        #6d95df
    );
}


/* Párrafos y enlaces
   ========================================================= */

.condiciones-contratacion p {
    margin: 0 0 16px;

    color: var(--legal-text-soft);

    font-family: "Inter", sans-serif;
    font-size: 15px;
    line-height: 1.8;
}

.condiciones-contratacion p:last-child {
    margin-bottom: 0;
}

.condiciones-contratacion strong {
    color: var(--legal-text);
    font-weight: 650;
}

.condiciones-contratacion a {
    color: #84aaf0;
    text-decoration: underline;
    text-decoration-color: rgba(132, 170, 240, 0.35);
    text-underline-offset: 3px;
}

.condiciones-contratacion a:hover {
    color: #aec8f7;
    text-decoration-color: currentColor;
}


/* Listas
   ========================================================= */

.condiciones-contratacion ul,
.condiciones-contratacion ol {
    display: grid;
    gap: 10px;

    margin: 18px 0 22px;
    padding-left: 0;

    list-style: none;
}

.condiciones-contratacion li {
    position: relative;

    padding-left: 27px;

    color: var(--legal-text-soft);

    font-family: "Inter", sans-serif;
    font-size: 14.5px;
    line-height: 1.7;
}

.condiciones-contratacion ul > li::before {
    content: "";

    position: absolute;
    top: 9px;
    left: 4px;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--legal-blue);

    box-shadow:
        0 0 0 4px rgba(71, 121, 206, 0.12);
}

.condiciones-contratacion ol {
    counter-reset: legal-counter;
}

.condiciones-contratacion ol > li {
    counter-increment: legal-counter;
}

.condiciones-contratacion ol > li::before {
    content: counter(legal-counter);

    position: absolute;
    top: 1px;
    left: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 19px;
    height: 19px;

    border-radius: 6px;

    background: var(--legal-blue-soft);
    color: #8fb2f2;

    font-size: 11px;
    font-weight: 700;
}


/* Tabla de precios
   ========================================================= */

.condiciones-contratacion .table-responsive {
    margin: 24px 0;
    overflow-x: auto;

    border: 1px solid var(--legal-border);
    border-radius: 14px;
}

.condiciones-contratacion .table {
    width: 100%;
    margin: 0;

    border-collapse: collapse;

    color: var(--legal-text-soft);
}

.condiciones-contratacion .table thead th {
    padding: 15px 18px;

    border: 0;
    border-bottom: 1px solid var(--legal-border-strong);

    background: #171f31;
    color: var(--legal-text-muted);

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-align: left;
    text-transform: uppercase;
}

.condiciones-contratacion .table tbody td {
    padding: 16px 18px;

    border: 0;
    border-bottom: 1px solid var(--legal-border);

    color: var(--legal-text-soft);

    font-size: 14px;
    vertical-align: middle;
}

.condiciones-contratacion .table tbody tr:last-child td {
    border-bottom: 0;
}

.condiciones-contratacion .table tbody tr:hover td {
    background: rgba(71, 121, 206, 0.05);
}

.condiciones-contratacion .table tbody td:last-child {
    color: var(--legal-text);
    font-weight: 700;
}


/* Apartados especialmente importantes
   ========================================================= */

#revision-humana,
#plazo-revision,
#uso-inteligencia-artificial {
    border-color: rgba(71, 121, 206, 0.22);

    background:
        linear-gradient(
            145deg,
            rgba(71, 121, 206, 0.09),
            rgba(71, 121, 206, 0.015)
        ),
        var(--legal-surface);
}

#desistimiento {
    border-color: rgba(245, 166, 35, 0.22);

    background:
        linear-gradient(
            145deg,
            rgba(245, 166, 35, 0.075),
            rgba(245, 166, 35, 0.01)
        ),
        var(--legal-surface);
}

#desistimiento h2::before {
    background: var(--legal-yellow);
}


/* Anexo
   ========================================================= */

#formulario-desistimiento {
    border-style: dashed;
    border-color: var(--legal-border-strong);
    background: rgba(255, 255, 255, 0.018);
}

#formulario-desistimiento li {
    padding: 12px 15px;

    border: 1px solid var(--legal-border);
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.02);
}

#formulario-desistimiento li::before {
    display: none;
}


/* Responsive
   ========================================================= */

@media (max-width: 1050px) {

    .legal-layout {
        grid-template-columns: 1fr;
    }

    .legal-sidebar {
        display: none;
    }

    .condiciones-contratacion {
        max-width: 820px;
        margin: 0 auto;
    }
}


@media (max-width: 768px) {

    .legal-page {
        padding: 115px 0 70px;
    }

    .legal-header {
        margin-bottom: 35px;
        text-align: left;
    }

    .legal-header h1 {
        font-size: 35px;
    }

    .legal-header__lead {
        font-size: 16px;
        line-height: 1.65;
    }

    .legal-header__meta {
        justify-content: flex-start;
        gap: 8px 20px;
    }

    .condiciones-contratacion > section {
        margin-bottom: 14px;
        padding: 25px 21px;

        border-radius: 14px;
    }

    .condiciones-contratacion h2 {
        margin-bottom: 18px;

        font-size: 19px;
    }

    .condiciones-contratacion p {
        font-size: 14.5px;
        line-height: 1.75;
    }

    .condiciones-contratacion li {
        font-size: 14px;
    }
}


@media (max-width: 480px) {

    .legal-header h1 {
        font-size: 31px;
    }

    .legal-page .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .condiciones-contratacion > section {
        padding: 23px 18px;
    }

    .condiciones-contratacion .table thead th,
    .condiciones-contratacion .table tbody td {
        padding: 13px 14px;
        white-space: nowrap;
    }
}