@import url('/vendor/fonts/fonts.css');

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--theme-bg, #262626);
    color: #444444;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.container {
    max-width: 800px;
    /* In un flex column i margini auto fanno restringere il box al contenuto: la larghezza
       esplicita lo tiene a tutta pagina (meno il margine laterale) anche con testi brevi. */
    width: calc(100% - 32px);
    box-sizing: border-box;
    margin: 40px auto auto auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
h1 {
    color: var(--theme-bg, #333);
    margin-top: 0;
}
p {
    margin-bottom: 1em;
}

/* --- Documenti legali: informativa privacy, termini d'uso, cookie policy ---- */
.documento-legale {
    margin-bottom: 32px;
}
.documento-legale h1 {
    font-size: 1.7rem;
    line-height: 1.25;
}
.documento-legale h2 {
    color: var(--theme-bg, #333);
    font-size: 1.35rem;
    margin: 1.8em 0 0.5em;
}
.documento-legale h3 {
    color: #333333;
    font-size: 1.1rem;
    margin: 1.5em 0 0.4em;
}
.documento-legale a {
    color: var(--theme-bg, #1a4f8b);
    text-decoration: underline;
}
.documento-legale ul {
    margin: 0 0 1em;
    padding-left: 1.3em;
}
.documento-legale li {
    margin-bottom: 0.3em;
}
.documento-legale .aggiornamento {
    color: #777777;
    font-size: 0.9rem;
    margin-top: -0.4em;
}
.documento-legale .riepilogo {
    background: #f5f6f8;
    border-left: 4px solid var(--theme-bg, #262626);
    border-radius: 4px;
    padding: 14px 16px;
    margin: 1.2em 0;
}
.documento-legale .riepilogo ul {
    margin: 0.5em 0 0;
}
.documento-legale .riepilogo li:last-child {
    margin-bottom: 0;
}
.documento-legale ol {
    margin: 0 0 1em;
    padding-left: 1.5em;
}

/* Indice delle sezioni: i documenti sono lunghi e si leggono anche a salti. */
.documento-legale .indice {
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 1.2em 0 1.5em;
    font-size: 0.95rem;
}
.documento-legale .indice ol {
    margin: 0.4em 0 0;
}
.documento-legale .indice li {
    margin-bottom: 0.15em;
}
/* Le ancore non devono finire sotto il bordo superiore della finestra. */
.documento-legale [id] {
    scroll-margin-top: 16px;
}

/* Riquadri di evidenza (cosa non facciamo, avvisi sull'ente) */
.documento-legale .nota {
    background: #fff8e6;
    border-left: 4px solid var(--theme-accent, #f16c01);
    border-radius: 4px;
    padding: 12px 16px;
    margin: 1em 0 1.2em;
}
.documento-legale .nota p:last-child,
.documento-legale .nota ul:last-child {
    margin-bottom: 0;
}

/* Schede «voce: descrizione» dell'informativa: la prima colonna fa da etichetta. */
.tabella-legale.scheda tbody th {
    width: 26%;
    white-space: normal;
}

.documento-legale address {
    font-style: normal;
    background: #f5f6f8;
    border-radius: 4px;
    padding: 14px 16px;
    overflow-wrap: anywhere;
}
.documento-legale code {
    background: #eef0f3;
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 0.9em;
    overflow-wrap: anywhere;
}

.tabella-legale {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0 1.5em;
    font-size: 0.92rem;
}
.tabella-legale caption {
    caption-side: top;
    text-align: left;
    font-weight: 600;
    color: #333333;
    padding-bottom: 8px;
}
.tabella-legale th,
.tabella-legale td {
    text-align: left;
    vertical-align: top;
    padding: 10px 12px;
    border: 1px solid #e1e4e8;
}
.tabella-legale thead th {
    background: #f1f2f4;
    color: #333333;
}
/* Le intestazioni di riga vanno a capo: in informativa e termini sono frasi intere (per esempio
   le categorie di dati della tabella sulla conservazione). Restano su una riga solo i nomi dei
   cookie, che spezzati non si riconoscerebbero più. */
.tabella-legale tbody th {
    font-weight: 600;
}
.tabella-legale tbody th code {
    white-space: nowrap;
}
.tabella-legale tbody th a {
    font-weight: 400;
    font-size: 0.9em;
}

/* Su schermi stretti ogni riga diventa un blocco con le etichette davanti ai valori:
   una tabella a 4 colonne non si legge e farebbe scorrere la pagina in orizzontale. */
@media (max-width: 700px) {
    .container {
        width: calc(100% - 24px);
        margin-top: 16px;
        padding: 20px 16px;
    }
    .documento-legale h1 {
        font-size: 1.4rem;
    }
    .tabella-legale,
    .tabella-legale caption,
    .tabella-legale tbody,
    .tabella-legale tr,
    .tabella-legale th,
    .tabella-legale td {
        display: block;
        width: auto;
    }
    .tabella-legale thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }
    .tabella-legale tr {
        border: 1px solid #e1e4e8;
        border-radius: 6px;
        margin-bottom: 12px;
        overflow: hidden;
    }
    .tabella-legale th,
    .tabella-legale td {
        border: none;
        border-bottom: 1px solid #eceef1;
    }
    .tabella-legale tr > :last-child {
        border-bottom: none;
    }
    .tabella-legale tbody th {
        background: #f1f2f4;
    }
    /* Le schede hanno già l'etichetta nella prima cella: niente intestazione ripetuta. */
    .tabella-legale.scheda tbody th {
        width: auto;
    }
    .tabella-legale.scheda td::before {
        display: none;
    }
    .tabella-legale td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.78rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: #777777;
        margin-bottom: 2px;
    }
}
