/*
 * landing.css — Stili della landing page di vendita (index.html).
 *
 * Si aggiunge a style.css e Bootstrap 4 senza sostituirli.
 * Sezioni: variabili, hero, offerta del giorno, estrazioni (stile estrazioni.it),
 * scelta del gioco, autore, catalogo, avviso, banner cookie.
 * Mobile-first: le regole base valgono per lo smartphone, le media query
 * allargano il layout sugli schermi più grandi.
 */

/* --- 1. Variabili -------------------------------------------------------- */
:root {
    --blu: #1a237e;
    --blu-medio: #283593;
    --oro: #ffc107;
    --rosso: #c8102e;
    --rosso-scuro: #9c0c24;
    --verde: #0f7b57;
    --testo: #1c2024;
    --testo-tenue: #5b6570;
    --sfondo-chiaro: #f4f6f9;
    --bordo: #dde3ea;
    --bordo-forte: #c3ccd7;
    --raggio: 12px;
    --ombra: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .08);
}

/* Solo sopra e sotto: con "padding: 2.5rem 0" un <main class="container sezione">
   perdeva il margine laterale e il testo toccava il bordo dello smartphone */
.sezione { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.sezione-chiara { background: #fff; }
.sezione h2 { text-align: center; }
.sezione .sottotitolo {
    text-align: center; color: var(--testo-tenue);
    max-width: 680px; margin: -.5rem auto 1.75rem;
}

/* Il footer usa la classe .header: qui non deve restare attaccato in alto */
footer.header { position: static; }

/* --- 2. Hero ------------------------------------------------------------- */
.hero {
    background: linear-gradient(135deg, var(--blu) 0%, #0d47a1 100%);
    color: #fff;
    padding: 2.5rem 0 2rem;
    text-align: center;
}
.hero h1 { color: #fff; font-size: 1.6rem; line-height: 1.25; }

/* Logo testuale (prima era un H1: ora l'unico H1 è il titolo della hero) */
.logo .marchio {
    font-family: 'Montserrat', sans-serif; font-weight: 600;
    font-size: 1.6rem; color: #fff; text-decoration: none;
}
.logo .marchio:hover { color: var(--oro); }
.hero p.lead { color: rgba(255, 255, 255, .9); font-size: 1.05rem; max-width: 720px; margin: 0 auto 1.25rem; }
.hero .bottoni-hero .btn { margin: .25rem; }
.fiducia {
    list-style: none; padding: 0; margin: 1.5rem auto 0;
    display: grid; gap: .5rem; max-width: 900px;
    grid-template-columns: 1fr;
}
.fiducia li {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 8px; padding: .5rem .75rem; font-size: .92rem;
}
.fiducia i { color: var(--oro); margin-right: .35rem; }
@media (min-width: 640px) {
    .hero h1 { font-size: 2.1rem; }
    .fiducia { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) { .fiducia { grid-template-columns: repeat(4, 1fr); } }

/* --- 3. Offerta del giorno ----------------------------------------------- */
.offerta {
    background: #fff;
    border: 2px solid var(--oro);
    border-radius: var(--raggio);
    box-shadow: var(--ombra);
    overflow: hidden;
    max-width: 960px; margin: 0 auto;
}
.offerta-testata {
    background: var(--oro); color: #1c2024;
    padding: .6rem 1rem; font-weight: 700; text-align: center;
}
.offerta-corpo { display: grid; gap: 1.25rem; padding: 1.25rem; align-items: center; }
.offerta-corpo img { max-width: 100%; max-height: 300px; display: block; margin: 0 auto; border-radius: 8px; }
.offerta-corpo h3 { color: var(--blu); margin-bottom: .5rem; }
.offerta-corpo .descr { color: var(--testo-tenue); font-size: .95rem; }
.prezzi { margin: .75rem 0; }
.prezzo-vecchio { text-decoration: line-through; color: var(--testo-tenue); font-size: 1.1rem; margin-right: .5rem; }
.prezzo-nuovo { color: var(--rosso); font-size: 2rem; font-weight: 700; }
.risparmio {
    display: inline-block; background: var(--rosso); color: #fff;
    border-radius: 999px; padding: .1rem .6rem; font-size: .85rem; font-weight: 600; margin-left: .35rem;
    vertical-align: middle;
}
.conto-rovescia { font-size: .95rem; margin: .5rem 0 1rem; }
.conto-rovescia strong { font-family: 'Roboto Mono', monospace; color: var(--rosso); }
.regalo { background: #fff6e6; border-radius: 8px; padding: .6rem .8rem; font-size: .92rem; margin-bottom: 1rem; }
.btn-acquista { font-size: 1.1rem; font-weight: 700; padding: .65rem 1.4rem; }
@media (min-width: 768px) { .offerta-corpo { grid-template-columns: 2fr 3fr; } }

/* --- 4. Estrazioni (stesso stile di estrazioni.it) ----------------------- */
.griglia-estrazioni { display: grid; gap: 1rem; }
@media (min-width: 640px) { .griglia-estrazioni { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .griglia-estrazioni { grid-template-columns: repeat(3, 1fr); } }

.estrazione {
    background: #fff; border: 1px solid var(--bordo);
    border-radius: var(--raggio); box-shadow: var(--ombra); overflow: hidden;
}
.estrazione-testata { background: linear-gradient(135deg, #14416b, #0d2f4d); color: #fff; padding: .6rem .85rem; }
.estrazione-testata strong { display: block; font-size: .98rem; }
.estrazione-testata span { font-size: .8rem; opacity: .85; }
.estrazione-corpo { padding: .5rem .85rem .85rem; }
.estrazione-riga {
    display: flex; align-items: center; gap: .5rem;
    padding: .35rem 0; border-bottom: 1px dashed var(--bordo);
}
.estrazione-riga:last-child { border-bottom: 0; }
.estrazione-ruota { flex: none; width: 82px; font-size: .82rem; font-weight: 600; color: var(--testo-tenue); }
@media (max-width: 360px) {
    .estrazione-ruota { width: 68px; font-size: .75rem; }
    .pallina { width: 27px; height: 27px; font-size: .76rem; }
}
.estrazione-nota { font-size: .8rem; color: var(--testo-tenue); margin: .4rem 0 0; }

.palline { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.pallina {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(160deg, #fff, #e6ebf2);
    border: 1px solid var(--bordo-forte); color: #1c2024;
    font-weight: 700; font-size: .82rem; font-variant-numeric: tabular-nums;
}
.stato-estrazioni { text-align: center; color: var(--testo-tenue); padding: 1rem; }
.fonte-estrazioni { text-align: center; font-size: .9rem; margin-top: 1.25rem; color: var(--testo-tenue); }
.fonte-estrazioni a { font-weight: 600; }

/* --- 5. Scelta del gioco ------------------------------------------------- */
.scelta-gioco { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.scelta-gioco .btn { min-width: 150px; }
.esito-scelta { text-align: center; margin-top: 1rem; font-weight: 600; color: var(--blu); min-height: 1.5em; }
.card.consigliato { border: 2px solid var(--oro); box-shadow: 0 0 0 4px rgba(255, 193, 7, .25); }
.card .etichetta-consigliato { display: none; }
.card.consigliato .etichetta-consigliato {
    display: inline-block; background: var(--oro); color: #1c2024;
    border-radius: 999px; padding: .1rem .6rem; font-size: .8rem; font-weight: 700; margin-left: .5rem;
}

/* --- 6. Autore e video --------------------------------------------------- */
.autore { display: grid; gap: 1.5rem; align-items: center; }
.autore blockquote {
    border-left: 4px solid var(--oro); padding: .5rem 1rem; margin: 1rem 0;
    font-style: italic; color: var(--testo);
}
.video-responsive { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--raggio); box-shadow: var(--ombra); }
.video-responsive iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
@media (min-width: 992px) { .autore { grid-template-columns: 1fr 1fr; } }

/* --- 7. Catalogo --------------------------------------------------------- */
/* I titoli h3 ereditano il blu da style.css: sul fondo scuro erano illeggibili */
.card-header h3 { color: #fff; margin-bottom: 0; font-size: 1.3rem; }
/* Lo stile inline max-width:350px faceva uscire le immagini dallo schermo su smartphone */
.card-body img.img-fluid { max-width: min(350px, 100%) !important; }
.prezzo-catalogo { font-size: 1.25rem; font-weight: 700; color: var(--blu); margin-bottom: .75rem; }
.card-body .btn { margin: .25rem; }

/* --- 7b. Domande frequenti ----------------------------------------------- */
.faq { max-width: 860px; }
.faq details {
    background: #fff; border: 1px solid var(--bordo); border-radius: 8px;
    padding: .75rem 1rem; margin-bottom: .6rem;
}
.faq summary { cursor: pointer; font-weight: 600; color: var(--blu); }
.faq details p { margin: .6rem 0 0; }

/* --- 8. Avviso di prudenza ----------------------------------------------- */
.avviso-prudenza {
    background: #fff6e6; border: 1px solid #f0d9a8; border-radius: var(--raggio);
    padding: 1rem; font-size: .9rem; color: var(--testo); max-width: 960px; margin: 0 auto;
}

/* --- 8b. Footer comune ---------------------------------------------------- */
.piede { background: var(--blu); color: rgba(255, 255, 255, .85); padding: 2rem 0 1.5rem; font-size: .9rem; text-align: center; }
.piede a { color: #fff; }
.piede a:hover { color: var(--oro); }
.piede-link { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.2rem; margin-bottom: 1rem; font-weight: 600; }
.piede p { margin-bottom: .4rem; }
.piede-avviso { font-size: .8rem; opacity: .8; }
.nota-fattura { font-size: .8rem; color: var(--testo-tenue); margin: .6rem 0 0; }

/* --- 8c. Archivio anno per anno ------------------------------------------- */
.briciole { font-size: .85rem; color: var(--testo-tenue); margin-bottom: 1rem; }
.archivio-impaginato { display: grid; gap: 1.5rem; }
.archivio-principale { min-width: 0; }   /* evita che la griglia allarghi la pagina */
.archivio-principale h1 { font-size: 1.7rem; }
.intro-archivio { color: var(--testo); }
.avviso-ruote { background: #e8f0fe; border-radius: 8px; padding: .6rem .8rem; font-size: .92rem; }
.nav-anni { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1rem 0 .5rem; }
.nav-anni select { width: auto; min-width: 110px; }
.nav-anni-fondo { justify-content: space-between; margin-top: 2rem; }
.tutti-anni { margin-bottom: 1rem; }
.tutti-anni summary { cursor: pointer; color: var(--blu); font-weight: 600; font-size: .92rem; }
.griglia-anni { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: .3rem; margin-top: .6rem; }
.griglia-anni a {
    text-align: center; padding: .25rem 0; font-size: .85rem; border-radius: 6px;
    border: 1px solid var(--bordo); background: #fff;
}
.griglia-anni a.attivo { background: var(--blu); color: #fff; border-color: var(--blu); }
.nav-mesi {
    display: flex; gap: .35rem; overflow-x: auto; padding: .4rem 0; margin-bottom: 1rem;
    position: sticky; top: 64px; z-index: 5; background: var(--sfondo-chiaro, #f5f5f5);
}
.nav-mesi a {
    flex: none; padding: .25rem .65rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
    background: #fff; border: 1px solid var(--bordo);
}
.mese-archivio { margin-bottom: 1.75rem; scroll-margin-top: 120px; }
.mese-archivio h2 { font-size: 1.25rem; text-align: left; border-bottom: 2px solid var(--oro); padding-bottom: .3rem; }
.mese-archivio h2 small { font-size: .8rem; color: var(--testo-tenue); font-weight: 400; }

/* Scheda promozionale tra i mesi */
.promo-archivio {
    display: grid; gap: 1rem; align-items: center;
    background: #fff; border: 2px dashed var(--oro); border-radius: var(--raggio);
    padding: 1rem; margin: 0 0 1.75rem;
}
.promo-archivio img { max-width: 160px; height: auto; border-radius: 6px; margin: 0 auto; }
.promo-archivio h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.promo-archivio p { margin-bottom: .6rem; font-size: .92rem; }
.promo-occhiello { color: var(--rosso); font-weight: 700; text-transform: uppercase; font-size: .75rem !important; letter-spacing: .03em; }
@media (min-width: 576px) { .promo-archivio { grid-template-columns: 160px 1fr; } }

/* Colonna laterale di acquisto */
.archivio-lato { display: grid; gap: 1rem; align-content: start; }
.offerta-compatta .offerta-corpo { grid-template-columns: 1fr !important; padding: 1rem; gap: .75rem; }
.offerta-compatta .offerta-corpo img { max-height: 160px; }
.offerta-compatta .prezzo-nuovo { font-size: 1.6rem; }
.offerta-compatta .descr { display: none; }
.lato-programmi { background: #fff; border: 1px solid var(--bordo); border-radius: var(--raggio); padding: 1rem; }
.lato-prodotto { padding: .7rem 0; border: 0; border-bottom: 1px solid var(--bordo); border-radius: 0; }
.lato-prodotto:last-of-type { border-bottom: 0; }
.lato-prodotto .descr-prodotto { font-size: .8rem; color: var(--testo-tenue); margin: .2rem 0 .4rem; }
@media (min-width: 992px) {
    .archivio-impaginato { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
    .archivio-lato { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow-y: auto; }
    .archivio-principale .griglia-estrazioni { grid-template-columns: repeat(2, 1fr); }
}
/* Con la colonna di acquisto accanto, 2 schede per riga: con 3 i numeri andavano a capo */
.offerta-compatta .offerta-corpo h3 { font-size: 1.2rem; }

/* --- 8c-bis. Ritardi e frequenze ----------------------------------------- */
.scelta-ruote { display: flex; flex-wrap: wrap; gap: .35rem; margin: 1rem 0; }
.scelta-ruote a {
    padding: .25rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
    background: #fff; border: 1px solid var(--bordo);
}
.scelta-ruote a.attivo { background: var(--blu); color: #fff; border-color: var(--blu); }
.selezione-libera { background: #fff; border: 1px solid var(--bordo); border-radius: 8px; padding: .6rem .9rem; margin-bottom: 1.25rem; }
.selezione-libera summary { cursor: pointer; font-weight: 600; color: var(--blu); }
.selezione-libera fieldset { margin-top: .75rem; }
.caselle-ruote { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .2rem .75rem; }
.caselle-ruote label { margin: 0; font-size: .92rem; }
.riepilogo-stat { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 1rem; }
.riepilogo-stat div { background: #fff; border: 1px solid var(--bordo); border-radius: 8px; padding: .5rem .75rem; }
.riepilogo-stat span { display: block; font-size: .75rem; text-transform: uppercase; color: var(--testo-tenue); letter-spacing: .03em; }
.riepilogo-stat strong { font-size: .95rem; }
.blocco-stat { margin-bottom: 1.75rem; }
.blocco-stat h2 { font-size: 1.25rem; text-align: left; border-bottom: 2px solid var(--oro); padding-bottom: .3rem; }
.nota-stat { font-size: .88rem; color: var(--testo-tenue); }
.classifica { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.classifica li { background: #fff; border: 1px solid var(--bordo); border-radius: 8px; text-align: center; padding: .5rem .25rem; }
.classifica .pallina { width: 38px; height: 38px; font-size: 1rem; }
.classifica .valore { display: block; font-weight: 700; color: var(--rosso); margin-top: .25rem; font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .classifica { grid-template-columns: repeat(10, 1fr); } }
.tabella-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabella-stat { width: 100%; border-collapse: collapse; background: #fff; font-size: .92rem; }
.tabella-stat th {
    background: var(--blu); color: #fff; padding: .5rem; text-align: center; cursor: pointer;
    white-space: nowrap; user-select: none;
}
.tabella-stat th[aria-sort="descending"]::after { content: ' ▼'; font-size: .7em; }
.tabella-stat th[aria-sort="ascending"]::after { content: ' ▲'; font-size: .7em; }
.tabella-stat td { padding: .3rem .5rem; text-align: center; border-bottom: 1px solid var(--bordo); font-variant-numeric: tabular-nums; }
.tabella-stat tbody tr:hover { background: #fff6e6; }
.spiegazione-stat li { margin-bottom: .4rem; }

/* --- 8d. Pagine di testo (azienda, privacy, cookie, termini, libro) ------- */
.pagina-testa { background: linear-gradient(135deg, var(--blu) 0%, #0d47a1 100%); color: #fff; padding: 2rem 0; text-align: center; }
.pagina-testa h1 { color: #fff; font-size: 1.8rem; margin-bottom: .4rem; }
.pagina-testa p { color: rgba(255, 255, 255, .9); margin: 0; }
.pagina-testo { max-width: 860px; margin: 0 auto; padding: 2rem 15px; }
.pagina-testo h2 { font-size: 1.3rem; text-align: left; margin-top: 1.75rem; }
.pagina-testo .scheda-info { background: #fff; border: 1px solid var(--bordo); border-radius: var(--raggio); padding: 1.25rem; box-shadow: var(--ombra); }
.griglia-contatti { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.griglia-contatti div { background: var(--sfondo-chiaro); border-radius: 8px; padding: .8rem 1rem; }
.griglia-contatti dt { font-size: .8rem; text-transform: uppercase; color: var(--testo-tenue); letter-spacing: .03em; }
.griglia-contatti dd { margin: .2rem 0 0; font-weight: 600; }
.libro { display: grid; gap: 1.5rem; align-items: start; }
.libro img { max-width: 320px; width: 100%; height: auto; margin: 0 auto; display: block; border-radius: 8px; box-shadow: var(--ombra); }
@media (min-width: 768px) { .libro { grid-template-columns: 320px 1fr; } }
.elenco-spunte { list-style: none; padding: 0; }
.elenco-spunte li { padding-left: 1.6rem; position: relative; margin-bottom: .4rem; }
.elenco-spunte li::before { content: '\2713'; position: absolute; left: 0; color: var(--verde); font-weight: 700; }
.citazione { border-left: 4px solid var(--oro); padding: .5rem 1rem; margin: 1.5rem 0; }
.citazione footer { font-weight: 600; color: var(--blu); }
.griglia-tre { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 1.5rem 0; }

/* --- 9. Banner cookie (prima era senza stile) ---------------------------- */
.cookie-banner {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000;
    background: #1c2024; color: #fff; padding: 1rem; font-size: .85rem;
    text-align: center; box-shadow: 0 -4px 14px rgba(0, 0, 0, .2);
}
.cookie-banner p { margin-bottom: .6rem; }
.cookie-banner button {
    background: var(--oro); color: #1c2024; border: 0; border-radius: 6px;
    padding: .4rem 1rem; margin: .2rem; font-weight: 600; cursor: pointer;
}
.cookie-banner button.reject { background: #fff; }

/* --- 10. Barra fissa su smartphone --------------------------------------- */
.barra-mobile {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500;
    display: flex; gap: .5rem; padding: .5rem; background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .15);
}
.barra-mobile .btn { flex: 1; font-weight: 600; }
body { padding-bottom: 64px; }
@media (min-width: 768px) {
    .barra-mobile { display: none; }
    body { padding-bottom: 0; }
}
