/* Páginas legales */

.haaly-legal {
    --hl-verde: #028c42;
    --hl-verde-oscuro: #026b33;
    --hl-azul: #1b2a4a;
    --hl-fondo: #f7faf8;
    --hl-borde: #d9e7df;
    --hl-texto: #25352c;
    --hl-oro: #e9c46a;
    --hl-ancho: 1160px;
    display: block;
    width: 100%;
    min-width: 0;
    background: #fff;
    color: var(--hl-texto);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.7;
}

.haaly-legal,
.haaly-legal *,
.haaly-legal *::before,
.haaly-legal *::after {
    box-sizing: border-box;
}

.haaly-legal a {
    color: #06662f;
    text-underline-offset: .2em;
}

.haaly-legal a:hover {
    text-decoration-thickness: 2px;
}

.haaly-legal :is(a, button, summary):focus-visible {
    outline: 3px solid #c27a00;
    outline-offset: 3px;
    border-radius: 3px;
}

.haaly-legal :is(section[id], div[id]) {
    scroll-margin-top: calc(var(--alto-header, 100px) + 24px);
}

/* Encabezado de contenido, no cabecera de la web */
.haaly-legal .legal-hero {
    background: var(--hl-fondo);
    border-bottom: 1px solid var(--hl-borde);
    padding: clamp(2rem, 5vw, 4.3rem) 1rem;
}

.haaly-legal .legal-hero>div {
    max-width: var(--hl-ancho);
    margin-inline: auto;
}

.haaly-legal .legal-hero h1 {
    font-size: clamp(2rem, 5vw, 3.35rem);
    font-weight: 800;
    line-height: 1.18;
    margin: .55rem 0 .85rem;
    color: var(--hl-azul);
}

.haaly-legal .legal-hero p {
    max-width: 75ch;
    margin: .4rem 0;
}

.haaly-legal .legal-hero .version {
    font-size: .86rem;
    color: #40594b;
    font-weight: 700;
}

/* Indice lateral y contenido */
.haaly-legal .legal-grid {
    width: min(100%, var(--hl-ancho));
    padding: 3rem 1.1rem 4.5rem;
    margin-inline: auto;
    display: grid;
    grid-template-columns: 255px minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 4.1rem);
    align-items: start;
}

.haaly-legal .indice {
    position: sticky;
    top: calc(var(--alto-header, 100px) + 20px);
    border: 1px solid var(--hl-borde);
    border-radius: 14px;
    padding: 1.25rem;
    background: var(--hl-fondo);
}

.haaly-legal .indice h2 {
    font-size: 1.1rem;
    margin: 0 0 .75rem;
    line-height: 1.35;
    color: var(--hl-azul);
}

.haaly-legal .indice ul {
    margin: 0;
    padding-left: 1.15rem;
}

.haaly-legal .indice li {
    margin: .42rem 0;
    font-size: .93rem;
}

.haaly-legal .indice a {
    text-decoration: none;
}

.haaly-legal .indice a:hover {
    text-decoration: underline;
}

.haaly-legal .legal-cuerpo {
    min-width: 0;
}

.haaly-legal .legal-cuerpo>section {
    padding: 0;
    margin: 0 0 2.6rem;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    min-width: 0;
}

.haaly-legal .legal-cuerpo h2 {
    color: var(--hl-azul);
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    line-height: 1.3;
    margin: 0 0 .9rem;
}

.haaly-legal .legal-cuerpo h3 {
    color: var(--hl-azul);
    font-size: 1.13rem;
    line-height: 1.4;
    margin: 1.3rem 0 .6rem;
}

.haaly-legal .legal-cuerpo p,
.haaly-legal .legal-cuerpo li {
    max-width: 80ch;
}

.haaly-legal .legal-cuerpo p {
    margin: 0 0 1rem;
}

.haaly-legal .legal-cuerpo ul {
    padding-left: 1.35rem;
}

.haaly-legal .legal-cuerpo li {
    margin: .45rem 0;
}

/* Cajas informativas y datos de la asociacion */
.haaly-legal .legal-cuerpo>section.resumen {
    border: 1px solid #b8d7c5;
    border-top: 4px solid var(--hl-verde);
    border-radius: 12px;
    padding: 1.35rem;
    background: var(--hl-fondo);
}

.haaly-legal .resumen ul {
    margin-bottom: .1rem;
}

.haaly-legal .caja-aviso {
    padding: 1rem 1.15rem;
    border-left: 4px solid var(--hl-oro);
    background: #fffbf0;
    border-radius: 0 10px 10px 0;
    margin: 1.15rem 0;
}

.haaly-legal .datos {
    display: grid;
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
    gap: 0 1rem;
    margin: 0;
    border-top: 1px solid var(--hl-borde);
}

.haaly-legal .datos dt,
.haaly-legal .datos dd {
    padding: .68rem .3rem;
    border-bottom: 1px solid var(--hl-borde);
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.haaly-legal .datos dt {
    font-weight: 750;
    color: var(--hl-azul);
}

/* Apartados desplegables nativos y accesibles */
.haaly-legal details.acordeon {
    border: 1px solid var(--hl-borde);
    border-radius: 10px;
    margin: 0 0 .85rem;
    background: #fff;
    overflow: clip;
}

.haaly-legal .acordeon>summary {
    cursor: pointer;
    padding: 1rem 1.2rem;
    font-weight: 750;
    color: var(--hl-azul);
    background: var(--hl-fondo);
    line-height: 1.4;
}

.haaly-legal .acordeon[open]>summary {
    border-bottom: 1px solid var(--hl-borde);
}

.haaly-legal .acordeon .dentro {
    padding: 1rem 1.2rem;
}

.haaly-legal .acordeon p {
    margin: .3rem 0 1rem;
}

/* Tablas que se pueden desplazar horizontalmente en movil */
.haaly-legal .tabla-scroll {
    overflow-x: auto;
    max-width: 100%;
    border: 1px solid var(--hl-borde);
    border-radius: 10px;
    -webkit-overflow-scrolling: touch;
}

.haaly-legal .tabla-scroll table {
    border-collapse: collapse;
    width: 100%;
    min-width: 720px;
    font-size: .92rem;
}

.haaly-legal .tabla-scroll :is(th, td) {
    border-bottom: 1px solid var(--hl-borde);
    padding: .8rem;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.haaly-legal .tabla-scroll th {
    color: var(--hl-azul);
    background: var(--hl-fondo);
}

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

/* Enlaces entre documentos legales */
.haaly-legal .relacionados {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}

.haaly-legal .relacionados a {
    border: 1px solid var(--hl-borde);
    background: var(--hl-fondo);
    border-radius: 10px;
    padding: .7rem 1rem;
    font-weight: 700;
    text-decoration: none;
}

.haaly-legal .relacionados a:hover {
    text-decoration: underline;
}

/* Boton de volver al inicio del contenido legal, dentro del main */
.haaly-legal .legal-volver {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 70;
    width: 47px;
    height: 47px;
    border-radius: 50%;
    background: var(--hl-verde-oscuro);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 5px 15px #0002;
}

.haaly-legal .legal-volver:hover {
    background: var(--hl-verde);
}
