/* --- Estilos para páginas legales (aviso legal y privacidad) --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --marca: #2b0b2e;
    --texto: #222;
    --suave: #595959;
    --borde: #e6e0e7;
}

body {
    font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    background-color: #f4f4f4;
    color: var(--texto);
    line-height: 1.7;
    font-size: 16px;
    padding: 20px;
}

a {
    color: var(--marca);
    text-decoration: underline;
    text-underline-offset: 2px;
}

a:focus-visible {
    outline: 2px solid var(--marca);
    outline-offset: 3px;
}

.legal {
    background-color: #fff;
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 50px 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.legal-header {
    border-bottom: 3px solid var(--marca);
    padding-bottom: 16px;
    margin-bottom: 28px;
}

.legal-header .marca {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 1.4rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #000;
    display: block;
}

.legal-header .marca a {
    color: inherit;
    text-decoration: none;
}

.legal-header .marca a:hover {
    color: var(--marca);
}

.volver {
    display: inline-block;
    margin-bottom: 24px;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--suave);
}

.volver:hover {
    color: var(--marca);
    text-decoration: underline;
}

h1 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 2rem;
    color: #000;
    line-height: 1.2;
    margin-bottom: 6px;
}

.actualizado {
    font-size: 0.8rem;
    color: var(--suave);
    margin-bottom: 28px;
}

h2 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 1.2rem;
    color: var(--marca);
    margin: 34px 0 10px;
}

h3 {
    font-size: 1rem;
    margin: 20px 0 6px;
    color: #000;
}

p {
    margin-bottom: 12px;
}

ul, ol {
    margin: 0 0 14px 22px;
}

li {
    margin-bottom: 6px;
}

strong {
    font-weight: 700;
}

/* Tabla de finalidades */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 20px;
    font-size: 0.9rem;
}

th, td {
    border: 1px solid var(--borde);
    padding: 9px 11px;
    text-align: left;
    vertical-align: top;
}

th {
    background-color: #f6f2f7;
    color: var(--marca);
    font-weight: 700;
}

/* Datos pendientes de completar: deben desaparecer antes de publicar */
.pendiente {
    background-color: #fff3a3;
    border-radius: 2px;
    padding: 0 4px;
    font-weight: 700;
    white-space: nowrap;
}

.legal-footer {
    margin-top: 36px;
    padding-top: 14px;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
    color: var(--suave);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    justify-content: space-between;
}

.legal-footer a {
    color: var(--marca);
}

@media (max-width: 600px) {
    body {
        padding: 12px;
    }

    .legal {
        padding: 26px 22px 20px;
    }

    h1 {
        font-size: 1.6rem;
    }

    table, th, td {
        font-size: 0.85rem;
    }

    /* La tabla se convierte en bloques para no romper en móvil */
    table, thead, tbody, tr, th, td {
        display: block;
        width: 100%;
    }

    thead {
        display: none;
    }

    tr {
        border: 1px solid var(--borde);
        margin-bottom: 12px;
        padding: 4px 0;
    }

    td {
        border: 0;
        border-bottom: 1px dashed var(--borde);
    }

    td:last-child {
        border-bottom: 0;
    }

    td::before {
        content: attr(data-label);
        display: block;
        font-weight: 700;
        color: var(--marca);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}

@media print {
    body {
        background: #fff;
        padding: 0;
        font-size: 11pt;
    }

    .legal {
        box-shadow: none;
        max-width: none;
        padding: 0;
    }

    .volver {
        display: none;
    }

    .pendiente {
        background: none;
        outline: 1px solid #000;
    }

    h2 {
        page-break-after: avoid;
    }

    table, tr {
        page-break-inside: avoid;
    }
}
