/* Sito pubblico. Colori e font arrivano dall'admin come variabili (--colore, --accento, --font-*) */
:root {
  --colore: #1E3A8A; --su-colore: #fff;
  --accento: #F4B731; --su-accento: #14161B;
  --font-titoli: system-ui, sans-serif;
  --font-testo: system-ui, sans-serif;
  --inchiostro: #12151B;
  --grigio: #5A6170;
  --linea: #E3E6EB;
  --chiaro: #F6F7F9;
  --tinta: color-mix(in srgb, var(--colore) 5%, #fff);
  --larghezza: 1200px;
  --margine: clamp(1.25rem, 4vw, 2.5rem);
  --raggio: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: #fff; color: var(--inchiostro); font-family: var(--font-testo); font-size: 1.0625rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--colore); text-underline-offset: .2em; }
h1, h2, h3 { font-family: var(--font-titoli); }
a:focus-visible, summary:focus-visible, .pulsante:focus-visible { outline: 3px solid var(--accento); outline-offset: 3px; border-radius: 6px; }
.contenitore { width: 100%; max-width: var(--larghezza); margin: 0 auto; padding: 0 var(--margine); }

.anteprima { padding: .65rem var(--margine); background: var(--inchiostro); color: #fff; font-size: .9rem; }
.anteprima a { color: var(--accento); }

/* ---------- pulsanti ---------- */
.pulsante { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .7rem 1.4rem; border-radius: 999px;
            font-weight: 600; font-size: 1rem; text-decoration: none; border: 1.5px solid transparent; transition: background-color .15s, border-color .15s, color .15s; }
.pulsante.pieno { background: var(--colore); color: var(--su-colore); }
.pulsante.pieno:hover { background: color-mix(in srgb, var(--colore) 85%, #000); }
.pulsante.vuoto { border-color: currentColor; color: inherit; }
.pulsante.piccolo { min-height: 40px; padding: .45rem 1.1rem; font-size: .95rem; }
.testata .pulsante.pieno { background: var(--accento); color: var(--su-accento); }
.testata .pulsante.pieno:hover { background: color-mix(in srgb, var(--accento) 88%, #fff); }
.testata .pulsante.vuoto:hover { background: rgba(255, 255, 255, .12); }

/* ---------- barra ---------- */
.barra { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--linea); }
.barra-dentro { display: flex; align-items: center; gap: 2rem; min-height: 4.5rem; }
.marchio, .piede-marchio { display: flex; align-items: center; gap: .7rem; flex: none; text-decoration: none; color: var(--inchiostro); }
.marchio img { height: 2.75rem; width: auto; max-width: 11rem; object-fit: contain; border-radius: 10px; }
.marchio span, .piede-marchio span, .chiuso-marchio span { font-family: var(--font-titoli); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; color: var(--colore); }
.menu { display: flex; gap: .25rem; margin-left: auto; }
.menu a { padding: .5rem .8rem; border-radius: 8px; color: var(--grigio); font-weight: 500; font-size: .97rem; text-decoration: none; }
.menu a:hover { color: var(--inchiostro); background: var(--chiaro); }
.barra-destra { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.menu + .barra-destra { margin-left: 0; }
.menu-telefono { display: none; position: relative; }
.menu-telefono summary { list-style: none; display: grid; gap: 4px; place-content: center; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; }
.menu-telefono summary::-webkit-details-marker { display: none; }
.menu-telefono summary span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--inchiostro); }
.menu-telefono nav { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 13rem; display: grid; padding: .5rem; background: #fff; border: 1px solid var(--linea); border-radius: var(--raggio); box-shadow: 0 12px 32px rgba(18, 21, 27, .12); }
.menu-telefono nav a { padding: .7rem .8rem; border-radius: 8px; color: var(--inchiostro); text-decoration: none; font-weight: 500; }
.menu-telefono nav a:hover { background: var(--chiaro); }
@media (max-width: 900px) {
  .menu { display: none; }
  .menu-telefono { display: block; }
  .menu + .barra-destra { margin-left: auto; }
}
@media (max-width: 420px) { .barra-destra .pulsante { display: none; } }

/* ---------- testata ---------- */
.testata { position: relative; display: flex; align-items: flex-end; background: var(--colore); color: var(--su-colore); padding: clamp(4rem, 12vw, 8rem) 0 clamp(3rem, 7vw, 5rem); overflow: hidden; }
.testata.con-foto { min-height: min(82vh, 760px); color: #fff; background: #0E1117; }
.testata-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.testata.con-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(9, 11, 16, .82) 0%, rgba(9, 11, 16, .45) 45%, rgba(9, 11, 16, .1) 100%); }
.testata-testo { position: relative; z-index: 1; }
.testata-quando { margin: 0 0 1rem; font-weight: 600; font-size: 1.05rem; opacity: .9; }
.testata h1 { margin: 0; max-width: 16ch; font-weight: 800; font-size: clamp(2.75rem, 7.5vw, 5.5rem); line-height: 1.02; letter-spacing: -.03em; }
.testata-frase { margin: 1.25rem 0 0; max-width: 40ch; font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.5; opacity: .92; }
.azioni { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }

/* ---------- fascia informazioni ---------- */
.info { border-bottom: 1px solid var(--linea); }
.info-griglia { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1.25rem 2rem; margin: 0 auto; padding-top: 1.75rem; padding-bottom: 1.75rem; }
.info dt { font-size: .85rem; color: var(--grigio); }
.info dd { margin: .2rem 0 0; font-weight: 600; font-size: 1.05rem; }
.info dd::first-letter { text-transform: uppercase; }
.info .mancano dd { color: var(--colore); }
@media (max-width: 640px) { .info-griglia { grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; padding-top: 1.4rem; padding-bottom: 1.4rem; } }

/* ---------- sezioni ---------- */
.sezione { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.sezione.tinta { background: var(--tinta); }
.sezione h2 { margin: 0; font-weight: 750; font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.12; letter-spacing: -.025em; }
.intestazione { max-width: 46rem; margin-bottom: 2.5rem; }
.intestazione p, .intro { margin: .75rem 0 0; color: var(--grigio); font-size: 1.12rem; }
.nota { margin: -.25rem 0 1rem; color: var(--grigio); }
.sezione h3 { margin: 0 0 .9rem; font-weight: 700; font-size: 1.15rem; color: var(--colore); }

/* testo e foto */
.libera { display: grid; gap: 2.5rem; align-items: center; }
.libera-testo { max-width: 40rem; }
.testo { margin-top: 1.25rem; font-size: 1.1rem; color: #2A2F3A; }
.testo p { margin: 0 0 1em; }
.libera .pulsante { margin-top: .75rem; }
.libera-foto { margin: 0; }
.libera-foto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--raggio); }
@media (min-width: 900px) {
  .libera.con-foto.foto-destra, .libera.con-foto.foto-sinistra { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; }
  .libera.foto-sinistra .libera-foto { order: -1; }
}
.libera.foto-sopra .libera-foto { order: -1; }
.libera.foto-sopra .libera-foto img { aspect-ratio: 21 / 9; }

/* programma */
.fasce { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 900px) { .fasce { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.fascia { background: #fff; border: 1px solid var(--linea); border-radius: var(--raggio); padding: 1.5rem 1.5rem .75rem; }
.fascia ol { list-style: none; margin: 0; padding: 0; }
.fascia li { display: grid; grid-template-columns: 6.75rem minmax(0, 1fr); gap: .75rem; padding: .75rem 0; border-top: 1px solid var(--linea); align-items: baseline; }
.fascia li:first-child { border-top: 0; }
.fascia .ora { font-weight: 700; font-size: .95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fascia .cosa { overflow-wrap: break-word; }
.fascia small { display: block; color: var(--grigio); font-size: .92rem; }

/* sponsor per tipologia */
.gruppo-sponsor + .gruppo-sponsor { margin-top: 2.75rem; }
.loghi { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.loghi li { display: flex; align-items: center; justify-content: center; text-align: center; background: #fff; border: 1px solid var(--linea); border-radius: var(--raggio); overflow-wrap: anywhere; }
.loghi-grande { grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.loghi-grande li { min-height: 9.5rem; padding: 1.75rem; }
.loghi-grande span { font-family: var(--font-titoli); font-weight: 800; font-size: 1.35rem; line-height: 1.2; }
.loghi-grande img { height: 5rem; width: auto; max-width: 100%; object-fit: contain; }
.loghi-medio { grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); }
.loghi-medio li { min-height: 6.5rem; padding: 1.1rem; }
.loghi-medio span { font-family: var(--font-titoli); font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.loghi-medio img { height: 3.5rem; width: auto; max-width: 100%; object-fit: contain; }
.loghi-piccolo { grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: .6rem; }
.loghi-piccolo li { min-height: 4.5rem; padding: .8rem; }
.loghi-piccolo span { font-weight: 600; font-size: .88rem; line-height: 1.3; }
.loghi-piccolo img { height: 2.5rem; width: auto; max-width: 100%; object-fit: contain; }

/* galleria */
.galleria { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.galleria figure { margin: 0; }
.galleria img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--raggio); transition: opacity .15s; }
.galleria a:hover img { opacity: .9; }
.galleria figcaption { margin-top: .5rem; font-size: .92rem; color: var(--grigio); }

/* lotteria, stand, contatti */
.premi { list-style: none; margin: 0; padding: 0; columns: 3 14rem; column-gap: 2.5rem; max-width: 60rem; }
.premi li { break-inside: avoid; padding: .7rem 0; border-bottom: 1px solid var(--linea); font-weight: 600; }
.premi small { display: block; color: var(--grigio); font-weight: 400; font-size: .92rem; }
.stand { display: grid; gap: 2rem; }
@media (min-width: 900px) { .stand { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.etichette { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.etichette li { padding: .45rem .9rem; border-radius: 999px; background: #fff; border: 1px solid var(--linea); font-weight: 500; font-size: .95rem; }
.contatti { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem; max-width: 60rem; }
.contatti li { display: grid; gap: .15rem; }
.contatti span { font-size: .9rem; color: var(--grigio); }
.contatti a { font-family: var(--font-titoli); font-weight: 700; font-size: 1.3rem; text-decoration: none; overflow-wrap: anywhere; }
.contatti a:hover { text-decoration: underline; }

/* ---------- piè di pagina ---------- */
.piede { border-top: 1px solid var(--linea); padding: 3rem 0 2.5rem; color: var(--grigio); font-size: .95rem; }
.piede-griglia { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 760px) { .piede-griglia { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.piede p { margin: .3rem 0 0; }
.piede-marchio img { height: 3rem; width: auto; max-width: 11rem; object-fit: contain; border-radius: 10px; }
.piede-info p:first-child { color: var(--inchiostro); font-weight: 600; margin-top: 0; }
.piede-info p:first-child + p::first-letter { text-transform: uppercase; }
.piede-area { grid-column: 1 / -1; margin-top: 1rem !important; padding-top: 1.25rem; border-top: 1px solid var(--linea); font-size: .88rem; }
.piede-area a { color: var(--grigio); }

/* ---------- coming soon ---------- */
.presto { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 3rem var(--margine);
          background: var(--colore); color: var(--su-colore); text-align: center; overflow: hidden; }
.presto.con-foto { color: #fff; background: #0E1117; }
.presto-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.presto.con-foto::after { content: ""; position: absolute; inset: 0; background: rgba(9, 11, 16, .62); }
.presto-dentro { position: relative; z-index: 1; display: grid; justify-items: center; max-width: 40rem; }
.presto-marchio { display: flex; align-items: center; justify-content: center; margin-bottom: 2.25rem; }
.presto-marchio img { height: 5.5rem; width: auto; max-width: 14rem; border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.presto-marchio span { font-family: var(--font-titoli); font-weight: 800; font-size: 1.5rem; color: inherit; }
.presto-etichetta { margin: 0 0 .75rem; padding: .35rem .9rem; border-radius: 999px; background: rgba(255, 255, 255, .14); font-weight: 600; font-size: .95rem; letter-spacing: .02em; }
.presto h1 { margin: 0; font-weight: 800; font-size: clamp(2.6rem, 8vw, 4.75rem); line-height: 1.02; letter-spacing: -.03em; }
.presto-quando { margin: 1rem 0 0; font-weight: 600; font-size: 1.1rem; opacity: .9; }
.presto-quando::first-letter { text-transform: uppercase; }
.presto-conto { margin: 1.75rem 0 0; display: flex; align-items: baseline; gap: .5rem; }
.presto-conto strong { font-family: var(--font-titoli); font-weight: 800; font-size: clamp(3rem, 10vw, 4.5rem); line-height: 1; color: var(--accento); font-variant-numeric: tabular-nums; }
.presto-conto span { font-size: 1.15rem; opacity: .85; }
.presto-testo { margin: 1.5rem 0 0; font-size: 1.15rem; line-height: 1.55; opacity: .9; max-width: 34ch; }
.presto .pulsante { margin-top: 2rem; }
.presto .pulsante.pieno { background: var(--accento); color: var(--su-accento); }

/* ---------- foto a schermo intero ---------- */
.lightbox:focus { outline: none; }
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; overflow: hidden; }
.lightbox::backdrop { background: rgba(8, 10, 14, .96); }
.lightbox[open] { display: grid; place-items: center; animation: lightbox-entra .18s ease-out; }
@keyframes lightbox-entra { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lightbox[open] { animation: none; } }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: .9rem; width: 100%; height: 100%; padding: 4.5rem 4.5rem 3rem; align-content: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 9rem); max-height: calc(100dvh - 9rem); width: auto; height: auto; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox figcaption { max-width: 60ch; text-align: center; font-size: 1rem; color: rgba(255, 255, 255, .85); }
.lightbox button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
                   background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; transition: background-color .15s; }
.lightbox button:hover { background: rgba(255, 255, 255, .24); }
.lightbox button:focus-visible { outline: 3px solid var(--accento); outline-offset: 2px; }
.lightbox-chiudi { top: 1rem; right: 1rem; font-size: 1.15rem !important; }
.lightbox-prec { left: 1rem; top: 50%; transform: translateY(-50%); font-size: 2rem !important; }
.lightbox-succ { right: 1rem; top: 50%; transform: translateY(-50%); font-size: 2rem !important; }
.lightbox-conta { position: absolute; top: 1.6rem; left: 1.25rem; font-size: .9rem; color: rgba(255, 255, 255, .7); }
@media (max-width: 640px) {
  .lightbox figure { padding: 4rem .75rem 5.5rem; }
  .lightbox-prec, .lightbox-succ { top: auto; bottom: 1.25rem; transform: none; }
  .lightbox-prec { left: calc(50% - 60px); }
  .lightbox-succ { right: calc(50% - 60px); }
}
html.lightbox-aperta { overflow: hidden; }
.galleria a { display: block; cursor: zoom-in; }

/* sponsor con sito: tutto il riquadro è cliccabile */
.loghi li:has(> a) { padding: 0; }
.loghi li > a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: inherit; padding: inherit; color: inherit; text-decoration: none; border-radius: inherit; transition: background-color .15s; }
.loghi-grande li > a { padding: 1.75rem; }
.loghi-medio li > a { padding: 1.1rem; }
.loghi-piccolo li > a { padding: .8rem; }
.loghi li:has(> a) { transition: border-color .15s, box-shadow .15s; }
.loghi li:has(> a):hover { border-color: var(--colore); box-shadow: 0 6px 18px rgba(18, 21, 27, .08); }
