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

/* Las páginas legales conservan el mismo fondo, anchura y cabecera del index. */
.pagina-legal {
    min-height: 100vh;
    background: #f5f5f7;
}

.pagina-legal-principal {
    padding-top: 30px;
    padding-bottom: 10px;
}

.cabecera-legal-fija {
    position: sticky;
    top: 0;
    z-index: 1100;
    padding: 0 0 10px;
    background: #f5f5f7;
}

.cabecera-legal-fija::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background: #f5f5f7;
}

.cabecera-aplicacion-legal {
    margin-bottom: 0;
}

.enlace-logo-legal {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    text-decoration: none;
}

.enlace-logo-legal:focus-visible {
    border-radius: 8px;
    outline: 3px solid #d8c9ea;
    outline-offset: 3px;
}

.boton-guia-legal {
    text-decoration: none;
}

/* Barra de navegación: botón de regreso y menú legal, sin aspecto de pestañas. */
.navegacion-legal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
    padding: 12px;
    border: 1px solid #ded7e9;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(47, 42, 90, 0.06);
}

.boton-volver-herramienta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid #d8c9ea;
    border-radius: 9px;
    background: #faf7ff;
    color: #4a3678;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.boton-volver-herramienta:hover {
    background: #eeeaf5;
    border-color: #9f88c2;
    color: #2f2a5a;
    box-shadow: 0 5px 14px rgba(86, 67, 118, 0.12);
    transform: translateY(-1px);
}

.boton-volver-herramienta:focus-visible,
.enlace-menu-legal:focus-visible {
    outline: 3px solid #d8c9ea;
    outline-offset: 2px;
}

.boton-volver-herramienta svg,
.enlace-menu-legal svg {
    flex: 0 0 auto;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-legal {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.titulo-menu-legal {
    flex: 0 0 auto;
    color: #756a80;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.lista-menu-legal {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.enlace-menu-legal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #625a6b;
    font-family: 'Poppins', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.enlace-menu-legal:hover {
    background: #faf7ff;
    border-color: #ded3eb;
    color: #4a3678;
}

.enlace-menu-legal.activo {
    border-color: #cfc0e6;
    background: #eeeaf5;
    color: #4a3678;
    box-shadow: inset 3px 0 0 #c94f7c;
    font-weight: 700;
}

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

.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: 400;
    text-underline-offset: 3px;
}

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

.dato-marca-legal {
    text-align: center !important;
}

.marca-legal-bloque {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
    text-align: center;
}

.marca-legal-nombre {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.15;
}

.marca-legal-equ,
.marca-legal-text {
    color: #564376;
}

.marca-legal-ia {
    color: #C94F7C;
}

.marca-legal-subtitulo {
    color: #28242d;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
}

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

.lista-datos-legales dt,
.lista-datos-legales dd {
    min-height: 47px;
    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;
}

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

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

.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;
}

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

.pie-pagina-legal {
    margin-top: 30px;
}

/* v15 · Navegación legal adaptable antes de que los enlaces se solapen. */
@media (max-width: 1120px) {
    .navegacion-legal {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .boton-volver-herramienta {
        align-self: flex-start;
    }

    .menu-legal {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        width: 100%;
        gap: 10px;
    }

    .lista-menu-legal {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: 100%;
        gap: 7px;
    }

    .enlace-menu-legal {
        width: 100%;
        min-width: 0;
        padding-inline: 8px;
        text-align: center;
    }
}

@media (max-width: 760px) {
    .pagina-legal-principal {
        padding-top: 20px;
    }

    .cabecera-legal-fija {
        padding-bottom: 8px;
    }

    .navegacion-legal {
        margin-top: 4px;
        padding: 9px;
        gap: 8px;
    }

    .boton-volver-herramienta {
        width: 100%;
        white-space: nowrap;
    }

    .menu-legal {
        display: block;
    }

    .titulo-menu-legal {
        display: none;
    }

    .lista-menu-legal {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .enlace-menu-legal {
        min-height: 42px;
        white-space: normal;
    }

    .contenedor-legal {
        margin-top: 16px;
    }

    .articulo-legal {
        padding: 22px 18px;
        border-radius: 13px;
    }

    .lista-datos-legales {
        display: block;
    }

    .lista-datos-legales dt,
    .lista-datos-legales dd {
        min-height: auto;
    }

    .lista-datos-legales dt {
        padding-bottom: 5px;
        border-bottom: 0;
    }

    .lista-datos-legales dd {
        padding-top: 5px;
    }

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

@media (max-width: 430px) {
    .enlace-menu-legal {
        gap: 5px;
        padding: 7px 5px;
        font-size: 11.5px;
        line-height: 1.25;
    }

    .enlace-menu-legal svg {
        width: 15px;
        height: 15px;
    }
}

@media (max-width: 470px) {
    .boton-guia-legal span {
        display: none;
    }

    .boton-guia-legal {
        width: 36px;
        min-width: 36px;
        height: 36px;
        padding: 0;
    }
}
.saltar-contenido{position:fixed;left:1rem;top:-5rem;z-index:100000;background:#fff;color:#111;padding:.75rem 1rem;border:2px solid currentColor}.saltar-contenido:focus{top:1rem}

/* v6 · Lectura homogénea y justificada de los textos legales. */
.articulo-legal p,
.articulo-legal li,
.articulo-legal dd,
.tabla-legal td {
    text-align: justify;
    text-justify: inter-word;
    hyphens: none;
    -webkit-hyphens: none;
    overflow-wrap: break-word;
}

/* Los enlaces y datos breves conservan una lectura natural. */
.articulo-legal a,
.lista-datos-legales dt,
.tabla-legal th {
    text-align: left;
}

/* v7 · El estado de conformidad usa la misma lectura que los párrafos normales. */
.seccion-legal .aviso-legal-destacado {
    margin: 9px 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 15px;
    line-height: 1.68;
    text-align: justify;
    text-justify: inter-word;
    hyphens: none;
    -webkit-hyphens: none;
    overflow-wrap: break-word;
}
