/**
 * @file legal.css
 * @brief Estilos de las páginas legales públicas de EquIAtext.
 * @ingroup estilos
 */

.pagina-legal {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(159, 102, 203, 0.09), transparent 34rem),
        #f5f5f7;
}

.contenedor-legal {
    width: min(100% - 32px, 980px);
    margin: 0 auto;
    padding: 28px 0 48px;
}

.cabecera-legal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 20px;
    padding: 18px 22px;
    border: 1px solid #ded7e9;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 32px rgba(74, 54, 120, 0.08);
}

.logo-legal {
    display: block;
    width: min(300px, 52vw);
    height: auto;
}

.volver-aplicacion {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid #d8c9ea;
    border-radius: 9px;
    background: #faf7ff;
    color: #4a3678;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.volver-aplicacion:hover,
.volver-aplicacion:focus-visible {
    background: #eeeaf5;
    color: #2f2a5a;
}

.volver-aplicacion svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.articulo-legal {
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid #ded7e9;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(47, 42, 90, 0.07);
}

.articulo-legal h1 {
    margin: 0 0 6px;
    color: #4a3678;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.15;
}

.fecha-legal {
    margin: 0 0 26px;
    color: #6f6878;
    font-size: 14px;
}

.introduccion-legal {
    margin: 0 0 28px;
    padding: 16px 18px;
    border-left: 5px solid #9f66cb;
    border-radius: 8px;
    background: #faf7ff;
    color: #3f3749;
    line-height: 1.65;
}

.seccion-legal {
    margin-top: 30px;
}

.seccion-legal h2 {
    margin: 0 0 12px;
    color: #4a3678;
    font-size: 21px;
    line-height: 1.3;
}

.seccion-legal h3 {
    margin: 20px 0 8px;
    color: #564376;
    font-size: 17px;
}

.seccion-legal p,
.seccion-legal li,
.tabla-legal td,
.tabla-legal th,
.lista-datos-legales dd,
.lista-datos-legales dt {
    font-size: 15px;
    line-height: 1.68;
}

.seccion-legal p {
    margin: 9px 0;
}

.seccion-legal ul,
.seccion-legal ol {
    margin: 10px 0;
    padding-left: 24px;
}

.seccion-legal li + li {
    margin-top: 7px;
}

.articulo-legal a {
    color: #4a3678;
    font-weight: 650;
    text-underline-offset: 3px;
}

.articulo-legal a:hover,
.articulo-legal a:focus-visible {
    color: #2f2a5a;
}

.lista-datos-legales {
    display: grid;
    grid-template-columns: minmax(150px, 220px) 1fr;
    gap: 0;
    margin: 16px 0 0;
    border: 1px solid #e2dbea;
    border-radius: 10px;
    overflow: hidden;
}

.lista-datos-legales dt,
.lista-datos-legales dd {
    margin: 0;
    padding: 11px 14px;
    border-bottom: 1px solid #e8e2ee;
}

.lista-datos-legales dt {
    background: #faf7ff;
    color: #4a3678;
    font-weight: 700;
}

.lista-datos-legales dd {
    background: #fff;
    color: #28242d;
}

.lista-datos-legales dt:last-of-type,
.lista-datos-legales dd:last-of-type {
    border-bottom: 0;
}

.dato-pendiente {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid #e9c4cc;
    border-radius: 6px;
    background: #fff4f6;
    color: #8d2b43;
    font-size: 13px;
    font-weight: 700;
}

.aviso-legal-destacado {
    margin: 18px 0;
    padding: 14px 16px;
    border: 1px solid #dfcde9;
    border-radius: 9px;
    background: #faf7ff;
    color: #42364d;
}

.tabla-legal-contenedor {
    margin: 16px 0;
    overflow-x: auto;
    border: 1px solid #ded7e9;
    border-radius: 10px;
}

.tabla-legal {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.tabla-legal th,
.tabla-legal td {
    padding: 12px 13px;
    border-bottom: 1px solid #e8e2ee;
    text-align: left;
    vertical-align: top;
}

.tabla-legal th {
    background: #f3edf8;
    color: #4a3678;
    font-weight: 750;
}

.tabla-legal tr:last-child td {
    border-bottom: 0;
}

.navegacion-legal-interna {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 0 20px;
}

.navegacion-legal-interna a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #d8c9ea;
    border-radius: 999px;
    background: #fff;
    color: #564376;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.navegacion-legal-interna a[aria-current="page"] {
    border-color: #564376;
    background: #564376;
    color: #fff;
}

.pie-legal-documento {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid #ded7e9;
    color: #6f6878;
    font-size: 13px;
    line-height: 1.55;
}

@media (max-width: 700px) {
    .contenedor-legal {
        width: min(100% - 20px, 980px);
        padding-top: 10px;
    }

    .cabecera-legal {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .logo-legal {
        width: min(320px, 100%);
    }

    .articulo-legal {
        padding: 22px 17px;
    }

    .lista-datos-legales {
        grid-template-columns: 1fr;
    }

    .lista-datos-legales dt,
    .lista-datos-legales dd {
        border-bottom: 1px solid #e8e2ee;
    }

    .lista-datos-legales dd:last-of-type {
        border-bottom: 0;
    }
}
