:root {
  --oro: #c9a24a; --oro-chiaro: #e3c47a; --fondo: #111214; --fondo2: #1a1b1f; --bordo: #2c2d33;
  --testo: #f2efe8; --tenue: #a9a59c; --errore: #f87171; --ok: #34d399;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--fondo); color: var(--testo); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--oro); }
h1, h2, h3 { line-height: 1.2; }

.testa { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
         padding: 12px 16px; background: rgba(17,18,20,.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--bordo); }
.marchio { display: flex; align-items: center; gap: 10px; color: var(--oro); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: .03em; }
.cappello { width: 44px; height: 33px; flex: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.marchio small { display: block; font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--tenue); font-weight: 500; }
.testa nav { display: flex; gap: 14px; align-items: center; }
.testa nav a { color: var(--testo); text-decoration: none; font-size: 15px; }
.marchio .corto { display: none; }
.lingua { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--bordo); border-radius: 8px; padding: 4px 10px; font-size: 14px; }
.lingua svg { width: 24px; height: 16px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.25); flex: none; }
.lingua:hover { border-color: var(--oro); }

/* Sfondo FISSO a tutta pagina con dissolvenza tra 4 foto: 1a la foto dell'autista col V250 (propria), poi 3 foto Pexels (licenza libera).
   Elemento position:fixed (non background-attachment, che su iPhone non funziona). 4 foto x 8s = ciclo di 32s. */
.sfondi { position: fixed; inset: 0; z-index: -1; background: var(--fondo); }
.sfondi i { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; animation: dissolvenza 32s infinite; }
/* WebP; la 1a foto subito, le altre solo a pagina caricata (classe .tutte aggiunta da sito.js) */
.sfondi i:nth-child(1) { background-image: url("/assets/sfondo-autista.webp"); background-position: center 35%; }
.sfondi i:nth-child(2) { background-position: center 40%; animation-delay: 8s; }
.sfondi i:nth-child(3) { background-position: center 45%; animation-delay: 16s; }
.sfondi i:nth-child(4) { animation-delay: 24s; }
.sfondi.tutte i:nth-child(2) { background-image: url("/assets/sfondo-bologna.webp"); }
.sfondi.tutte i:nth-child(3) { background-image: url("/assets/sfondo-torre.webp"); }
.sfondi.tutte i:nth-child(4) { background-image: url("/assets/sfondo-auto.webp"); }
.sfondi::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,18,20,.35), rgba(17,18,20,.55) 60%, rgba(17,18,20,.7)); }
/* stessi tempi di prima (entra in ~1,4s, resta ~8s, esce in ~1,7s) riportati su 32s */
@keyframes dissolvenza { 0% { opacity: 0; } 4.5% { opacity: 1; } 24.75% { opacity: 1; } 30% { opacity: 0; } 100% { opacity: 0; } }
@media (orientation: portrait) {
  .sfondi i:nth-child(1) { background-image: url("/assets/sfondo-autista-v.webp"); background-position: center 30%; }
  .sfondi.tutte i:nth-child(2) { background-image: url("/assets/sfondo-bologna-v.webp"); }
  .sfondi.tutte i:nth-child(3) { background-image: url("/assets/sfondo-torre-v.webp"); }
  .sfondi.tutte i:nth-child(4) { background-image: url("/assets/sfondo-auto-v.webp"); }
}
@media (prefers-reduced-motion: reduce) { .sfondi i { animation: none; } .sfondi i:nth-child(1) { opacity: 1; } }

.hero { padding: 110px 16px 90px; text-align: center; }
.hero > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.hero h1 { font-size: clamp(30px, 6vw, 52px); margin-top: 0; margin-bottom: 16px; color: var(--oro); text-shadow: 0 2px 18px rgba(0,0,0,.7); }
.hero p { color: #ece6da; font-size: 18px; max-width: 640px; margin-bottom: 28px; text-shadow: 0 1px 10px rgba(0,0,0,.8); }
.hero .btn:not(.oro) { background: rgba(17,18,20,.55); }
.azioni { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 13px 24px; border-radius: 999px; border: 1px solid var(--oro); color: var(--oro);
       background: transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.oro { background: var(--oro); color: #111; }
.btn.oro:hover { background: var(--oro-chiaro); border-color: var(--oro-chiaro); }
.btn.largo { width: 100%; padding: 15px; font-size: 17px; }
.btn:disabled { opacity: .6; cursor: wait; }

.blocco { max-width: 960px; margin: 0 auto; padding: 40px 16px; }
.blocco h2 { text-align: center; font-size: 28px; margin: 0 0 24px; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.griglia { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.carta { background: rgba(26,27,31,.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 20px; }
.carta p { color: #c9c4b9; }
.carta h3 { margin: 6px 0 8px; color: var(--oro); font-size: 18px; }
.griglia.singola { grid-template-columns: minmax(0, 520px); justify-content: center; text-align: center; }
.carta p { margin: 0; color: var(--tenue); }
.ico { color: var(--oro); text-align: center; margin-bottom: 4px; }
.ico svg { width: 30px; height: 30px; }
.tenue { color: var(--tenue); font-size: 14px; }

.modulo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; background: rgba(26,27,31,.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.08);
          border-radius: 16px; padding: 22px; }
.modulo label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--tenue); }
.modulo .intera { grid-column: 1 / -1; }
.modulo input, .modulo select, .modulo textarea { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--bordo);
          background: var(--fondo); color: var(--testo); font: inherit; font-size: 16px; }
.modulo input:focus, .modulo select:focus, .modulo textarea:focus { outline: 2px solid var(--oro); border-color: transparent; }
.modulo .errato { border-color: var(--errore) !important; }
.modulo .spunta { flex-direction: row; align-items: flex-start; gap: 10px; color: var(--testo); }
.modulo .spunta input { width: auto; margin-top: 4px; }
.trappola { position: absolute; left: -9999px; }
.stima { font-size: 18px; color: var(--oro); min-height: 1em; }
.stima small { color: var(--tenue); font-size: 13px; }
.esito { font-size: 15px; }
.esito.err { color: var(--errore); }
.esito.ok { color: var(--ok); }
.conferma { text-align: center; padding: 30px 10px; }
.conferma h3 { color: var(--oro); font-size: 26px; margin: 0 0 10px; }

.contatti { text-align: center; }
.piede { background: rgba(17,18,20,.85); border-top: 1px solid var(--bordo); color: var(--tenue); font-size: 13px; text-align: center; padding: 24px 16px 36px; line-height: 1.7; }

@media (max-width: 620px) {
  .modulo { grid-template-columns: 1fr; padding: 16px; }
  .hero { padding-top: 40px; }
  .testa nav a:not(.lingua) { display: none; }
  .marchio .lungo { display: none; }
  .marchio .corto { display: inline; }
}

/* WhatsApp: sempre con il logo verde */
.btn.wa { display: inline-flex; align-items: center; gap: 9px; background: #25D366; border-color: #25D366; color: #fff; }
.btn.wa:hover { background: #1ebe5b; border-color: #1ebe5b; }
.btn.wa .ico-wa path { fill: #fff; }
.btn.con-ico { display: inline-flex; align-items: center; gap: 9px; }
.ico-btn { width: 20px; height: 20px; flex: none; }
.ico-wa { width: 22px; height: 22px; flex: none; }
.wa-flottante { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 6; width: 58px; height: 58px; border-radius: 50%;
                background: #25D366; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,.45); }
.wa-flottante .ico-wa { width: 34px; height: 34px; }
.wa-flottante .ico-wa path { fill: #fff; }

/* Selettore data/ora (flatpickr, tema scuro) nei colori del sito */
.flatpickr-calendar { font-family: inherit; }
.flatpickr-day.selected, .flatpickr-day.selected:hover, .flatpickr-day.today.selected { background: var(--oro); border-color: var(--oro); color: #111; }
.flatpickr-day.today { border-color: var(--oro); }
.modulo input[readonly] { cursor: pointer; }

/* selettore ora più grande e leggibile */
.flatpickr-calendar { background: #1d1e23; box-shadow: 0 10px 30px rgba(0,0,0,.6); border: 1px solid #34353c; }
.flatpickr-time { height: auto !important; max-height: none !important; line-height: 56px; }
.flatpickr-time input, .flatpickr-time .flatpickr-time-separator { font-size: 26px !important; height: 56px !important; color: #f2efe8 !important; }
.flatpickr-time input:hover, .flatpickr-time input:focus { background: rgba(201,162,74,.18) !important; }
.flatpickr-calendar.hasTime.noCalendar { width: 220px; }

/* Icone nei campi del modulo: a sinistra, dentro il riquadro */
.conico { position: relative; display: block; }
.conico .ico-campo { position: absolute; left: 12px; top: 13px; width: 20px; height: 20px; color: var(--oro); opacity: .85; pointer-events: none; z-index: 1; }
.conico input, .conico select, .conico textarea { padding-left: 42px !important; }
.conico:focus-within .ico-campo { opacity: 1; }

/* titolo di sezione con icona (segnalibro su "Prenota la tua corsa") */
h2.con-ico { display: flex; align-items: center; justify-content: center; gap: 12px; }
h2.con-ico .ico-btn { width: 28px; height: 28px; color: var(--oro); filter: drop-shadow(0 2px 6px rgba(0,0,0,.7)); }

/* riquadri a colonna (servizi, perché Golden Driver, veicoli): testi centrati come le icone */
.griglia .carta { text-align: center; }

/* effetto hover anche sui tasti a contorno (es. Chiama in alto): si riempiono d'oro */
.btn { transition: background-color .18s, color .18s, border-color .18s, transform .18s; }
.btn:not(.oro):not(.wa):hover, .hero .btn:not(.oro):not(.wa):hover { background: var(--oro-chiaro); border-color: var(--oro-chiaro); color: #111; }  /* identico all'hover di Prenota */
.btn:hover { transform: translateY(-1px); }

/* telefono sempre a portata in alto: numero intero sul computer, solo tasto con la cornetta sul telefono */
.testa nav a.tel-testa { display: inline-flex; align-items: center; gap: 7px; color: var(--oro); font-weight: 600; white-space: nowrap;
                         border: 1px solid var(--oro); border-radius: 999px; padding: 5px 14px; transition: background-color .18s, color .18s; }
.testa nav a.tel-testa:hover { background: var(--oro-chiaro); border-color: var(--oro-chiaro); color: #111; }
.tel-testa .ico-btn { width: 17px; height: 17px; }
@media (max-width: 620px) {
  .testa nav a.tel-testa { display: inline-flex; padding: 0; width: 40px; height: 40px; justify-content: center; background: var(--oro); color: #111; }
  .tel-testa span { display: none; }
}

/* Selettore lingua: bandiera della lingua attuale, menu con le altre quattro */
details.lingue { position: relative; }
details.lingue summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
details.lingue summary::-webkit-details-marker { display: none; }
details.lingue summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--tenue); border-bottom: 1.5px solid var(--tenue); transform: rotate(45deg) translate(-2px,-2px); margin-left: 2px; }
details.lingue .cod-l { display: none; }
.menu-lingue { position: absolute; right: 0; top: calc(100% + 8px); background: #1d1e23; border: 1px solid var(--bordo); border-radius: 12px; padding: 6px; min-width: 170px;
               box-shadow: 0 10px 30px rgba(0,0,0,.55); z-index: 20; }
.menu-lingue a { display: flex !important; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--testo) !important; text-decoration: none; }
.menu-lingue a:hover { background: rgba(201,162,74,.15); }
.menu-lingue svg, details.lingue summary svg { width: 24px; height: 16px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.25); flex: none; }
@media (max-width: 620px) { details.lingue .nome-l { display: none; } details.lingue .cod-l { display: inline; } }

/* calendario flatpickr anche sui telefoni: giorni più grandi da toccare */
@media (max-width: 480px) {
  .flatpickr-calendar:not(.noCalendar) { width: calc(100vw - 32px) !important; max-width: 360px; }
  .flatpickr-calendar:not(.noCalendar) .flatpickr-days, .flatpickr-calendar:not(.noCalendar) .dayContainer { width: 100% !important; min-width: 0; max-width: none; }
  .flatpickr-calendar:not(.noCalendar) .flatpickr-day { max-width: none; height: 44px; line-height: 44px; flex-basis: 14.2857%; }
}

/* Monitor larghi: contenuti più ampi (prima 960px: i 5 riquadri dei servizi erano stretti e il testo andava a capo di continuo) */
.blocco { max-width: 1240px; }
.griglia { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.carta { padding: 24px 22px; }
.modulo { max-width: 920px; margin-left: auto; margin-right: auto; }   /* il modulo resta di larghezza comoda da leggere */
.griglia.singola { grid-template-columns: minmax(0, 560px); }

/* Barra fissa in basso, solo sul telefono: lingua, Chiama e WhatsApp (tolti dall'intestazione, che su alcuni telefoni era stretta) */
.barra-mobile { display: none; }
@media (max-width: 620px) {
  .testa nav a.tel-testa, .testa details.lingue, .wa-flottante { display: none !important; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .barra-mobile { display: flex; align-items: center; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
                  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(17,18,20,.94); border-top: 1px solid var(--bordo);
                  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .barra-mobile .lingua { height: 44px; padding: 0 10px; }
  .barra-mobile .lingua .cod-l { display: none; }   /* basta la bandiera: lascia spazio ai due pulsanti */
  .barra-mobile .menu-lingue { top: auto; bottom: calc(100% + 10px); left: 0; right: auto; }
  .barra-mobile a.bm-tel, .barra-mobile a.bm-wa { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 10px; flex: 1 1 0; min-width: 0;
                  border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
  .barra-mobile a.bm-tel { background: var(--oro); color: #111; }
  .barra-mobile a.bm-wa { background: #25D366; color: #fff; }
  .barra-mobile .bm-wa .ico-wa path { fill: #fff; }
  .barra-mobile .ico-btn { width: 19px; height: 19px; }
}
@media (max-width: 349px) {   /* telefoni molto stretti: solo le icone */
  .barra-mobile a.bm-tel span, .barra-mobile a.bm-wa span { display: none; }
}

/* Consenso privacy: casella e testo in rosso quando manca (5/11/2026) */
.spunta input.errato { outline: 2px solid var(--errore); outline-offset: 2px; }
.spunta:has(input.errato) { color: var(--errore); }
.spunta a { color: var(--oro); }

/* Avviso cookie in basso (sopra la barra fissa del telefono) */
.avviso-cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; max-width: 760px; margin: 0 auto;
                 display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap;
                 background: rgba(26,27,31,.97); border: 1px solid var(--bordo); border-radius: 14px; padding: 12px 16px;
                 box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 14px; color: #ddd8cf; }
.avviso-cookie p { margin: 0; flex: 1 1 320px; }
.avviso-cookie div { display: flex; gap: 14px; align-items: center; }
.avviso-cookie a { color: var(--oro); }
.avviso-cookie button { font: inherit; font-weight: 600; background: var(--oro); color: #111; border: 0; border-radius: 999px; padding: 8px 18px; cursor: pointer; }
.avviso-cookie button:hover { background: var(--oro-chiaro); }
@media (max-width: 620px) { .avviso-cookie { bottom: calc(76px + env(safe-area-inset-bottom)); left: 10px; right: 10px; } }

/* L'avviso cookie resta SOTTO i menu delle lingue (intestazione e barra del telefono), così un turista
   può cambiare lingua e leggerlo nella sua (5/11/2026) */
.avviso-cookie { z-index: 25; }
.testa { z-index: 35; }
