/* legale.css - Stili specifici per la pagina legale (Tema Dark + Serif) */

@import url('https://fonts.googleapis.com/css2?family=Georgia:ital,wght@0,400;0,700;1,400&family=Inter:wght@400;600;700&display=swap');

/* Smooth scroll per l'ancora del footer */
html {
    scroll-behavior: smooth;
}

/* Impostazione Tema Base (Rosso) per la pagina esterna */
body {
    --theme-color: #ff1a1a;
    --theme-dark: #8a0303;
    --theme-glow: rgba(255, 26, 26, 0.6);
    --theme-glow-light: rgba(138, 3, 3, 0.2);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

*, *:before, *:after {
    box-sizing: inherit;
}

/* Previene che il nome del sito vada a capo su mobile */
.logo {
    white-space: nowrap;
}

.legal-main-container {
    display: flex;
    justify-content: center;
    padding: 50px 20px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.legal-content-box {
    background-color: #0a0a0a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 50px 40px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), 0 0 15px var(--theme-glow-light);
    color: #ccc;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.98rem;
    line-height: 1.8;
    text-align: left;
    width: 100%;
}

/* TITOLO PRINCIPALE (H1) */
.legal-content-box h1 {
    color: var(--theme-color);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.85em;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    text-shadow: 0 0 10px var(--theme-glow-light);
    text-transform: uppercase;
    text-align: center;
    line-height: 1.3;
}

/* DATA DI AGGIORNAMENTO */
.legal-update-date {
    text-align: center;
    color: #777;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 35px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid #222;
    padding-bottom: 20px;
}

/* TITOLI DELLE SEZIONI (H2) */
.legal-content-box h2 {
    color: #fff;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.3em;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 18px;
    letter-spacing: 1px;
    border-left: 3px solid var(--theme-color);
    padding-left: 12px;
    text-transform: uppercase;
}

/* PARAGRAFI DI TESTO ORDINARIO */
.legal-content-box p {
    margin-bottom: 16px;
    color: #aaa;
}

/* STRUTTURA GENERALE DEGLI ELENCHI PUNTATI E NUMERATI */
.legal-content-box ul, 
.legal-content-box ol {
    margin-bottom: 22px;
    padding-left: 25px;
    color: #aaa;
}

.legal-content-box li {
    margin-bottom: 12px;
    line-height: 1.6;
}

/* ----------------------------------------------------
   GERARCHIA DELLE ETICHETTE (STRONG) NEGLI ELENCHI
   ---------------------------------------------------- */

/* Primo Livello (Punto Pieno): Etichette grandi e in primo piano */
.legal-content-box > ul > li > strong,
.legal-content-box > ol > li > strong {
    color: #ffffff;
    font-size: 1.05em;
    font-weight: 700;
    display: inline-block;
    margin-right: 4px;
}

/* Secondo Livello (Punto Vuoto / Sotto-elenco): Etichette medie e discrete */
.legal-content-box ul ul > li > strong,
.legal-content-box ol ul > li > strong {
    color: #dddddd;
    font-size: 0.95em;
    font-weight: 600;
    display: inline;
}

/* Margini interni per sotto-elenchi */
.legal-content-box ul ul, 
.legal-content-box ol ul {
    margin-top: 10px;
    margin-bottom: 10px;
    padding-left: 20px;
}

/* Stile per i marcatori generici strong fuori dagli elenchi */
.legal-content-box strong {
    color: #ddd;
}

/* ================================================
   PULSANTE "TORNA SU" (FISSO IN BASSO A SINISTRA)
   ================================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 45px;
    height: 45px;
    background-color: #0a0a0a;
    color: var(--theme-color);
    border: 1px solid var(--theme-color);
    border-radius: 50%;
    font-size: 1.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8), 0 0 10px var(--theme-glow-light);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.2s ease, background-color 0.2s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Forza il flash istantaneo (colore del tema) quando cliccato/toccato da touch */
.back-to-top:active,
.back-to-top:focus {
    background-color: var(--theme-color) !important;
    color: #000 !important;
    box-shadow: 0 0 20px var(--theme-glow) !important;
    transform: translateY(0) !important;
    transition: none !important;
}

/* Hover classico solo per dispositivi con cursore (Desktop) */
@media (hover: hover) {
    .back-to-top:hover {
        background-color: var(--theme-color);
        color: #000;
        box-shadow: 0 0 20px var(--theme-glow);
        transform: translateY(-3px);
    }

    .back-to-top:active {
        transform: translateY(0);
    }
}

/* ===========
   USER BADGE
   =========== */
.user-badge {
    visibility: hidden;
    pointer-events: none;
}

/* ===================
   RESPONSIVE DESIGN
   =================== */
@media screen and (max-width: 768px) {
    .legal-content-box {
        padding: 30px 20px;
    }
    
    .legal-content-box h1 {
        font-size: 1.4em;
    }

    .legal-content-box h2 {
        font-size: 1.15em;
    }

    .legal-content-box > ul > li > strong,
    .legal-content-box > ol > li > strong {
        font-size: 1em;
    }

    /* Adattamento del pulsante "Torna su" per schrami piccoli */
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 38px;
        height: 38px;
        font-size: 0.9em;
    }
}