/* ── TICKER ──────────────────────────────────────────────────────────────── */
.ticker-strip {
  width: 100%; background: oklch(0.22 0.018 64);
  display: flex; align-items: center; height: 40px;
  overflow: hidden; flex-shrink: 0;
}
.ticker-label {
  flex-shrink: 0; height: 100%; padding: 0 18px;
  background: var(--gold); display: flex; align-items: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--bg); font-weight: 600; gap: 7px;
}
.ticker-track { display: flex; align-items: center; flex: 1; overflow: hidden; min-width: 0; }
.ticker-inner {
  display: flex; align-items: center; flex-shrink: 0;
  white-space: nowrap; will-change: transform;
}
.ticker-item { display: inline-flex; align-items: center; gap: 9px; margin-right: 14px; }
.ticker-sep  { color: rgba(255,255,255,.22); font-size: 1.1rem; margin-right: 28px; }

/* Tema scuro — ticker in negativo (chiaro su scuro) */
[data-theme="notte"] .ticker-strip { background: oklch(0.91 0.014 84); }
[data-theme="notte"] .ticker-label { color: oklch(0.20 0.015 64); }
[data-theme="notte"] .ticker-text  { color: oklch(0.30 0.018 64); }
[data-theme="notte"] .ticker-sep   { color: oklch(0.65 0.014 66); }
[data-theme="notte"] .ticker-badge.novita {
  background: color-mix(in oklab, oklch(0.48 0.13 150) 14%, transparent);
  color: oklch(0.34 0.13 150);
}
[data-theme="notte"] .ticker-badge.avviso {
  background: color-mix(in oklab, oklch(0.55 0.11 68) 14%, transparent);
  color: oklch(0.40 0.11 68);
}
.ticker-badge {
  font-family: var(--mono); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 600;
  padding: 2px 8px; border-radius: 99px; flex-shrink: 0;
}
.ticker-badge.novita {
  background: color-mix(in oklab, oklch(0.48 0.13 150) 20%, transparent);
  color: oklch(0.78 0.11 150);
}
.ticker-badge.avviso {
  background: color-mix(in oklab, oklch(0.55 0.11 68) 20%, transparent);
  color: oklch(0.82 0.10 68);
}
.ticker-text { font-size: .78rem; color: rgba(255,255,255,.82); }
.ticker-sep  { color: rgba(255,255,255,.22); font-size: 1.1rem; }

/* =========================================================================
   Tabaccheria Aurora — stili di pagina
   ========================================================================= */

/* ---------- HERO ---------- */
.hero { padding: clamp(48px, 6vw, 86px) 0 clamp(52px, 7vw, 96px); position: relative; isolation: isolate; }
.hero::before {
  content: "";
  position: absolute; inset: -1px 0 auto 0; height: 130%;
  z-index: -1; pointer-events: none;
  background:
    radial-gradient(110% 80% at 82% -8%, var(--tint) 0%, transparent 56%),
    radial-gradient(80% 70% at -8% 14%, color-mix(in oklab, var(--gold) 14%, transparent) 0%, transparent 52%);
}
.hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--line-soft); z-index: -1;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.9rem, 6.2vw, 5.1rem);
  line-height: 1.0;
  margin: 22px 0 24px;
}
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 500; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

.hero-visual { position: relative; }
.hero-photo { aspect-ratio: 4 / 5; width: 100%; }
.hero-badge {
  position: absolute; left: -18px; bottom: 26px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 18px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px;
  white-space: nowrap;
}
.hero-stamp {
  position: absolute; top: -16px; right: -16px;
  width: 92px; height: 92px; border-radius: 50%;
  background: var(--gold); color: var(--on-accent);
  display: grid; place-items: center; text-align: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  box-shadow: var(--shadow); transform: rotate(-8deg);
  line-height: 1.3;
}

/* ---------- SECTION HEADER ---------- */
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.sec-head p { margin-top: 12px; }
.sec-link { font-weight: 600; color: var(--accent-ink); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.sec-link::after { content: "→"; font-family: var(--mono); transition: transform .2s; }
.sec-link:hover::after { transform: translateX(4px); }

/* ---------- CATEGORY CARDS (home) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(158px, auto); gap: 16px; }
.cat-card {
  background: linear-gradient(158deg, color-mix(in oklab, var(--cc) 15%, var(--surface)) 0%, var(--surface) 65%);
  border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 22px 20px;
  cursor: pointer; transition: transform .18s, border-color .2s, box-shadow .25s;
  display: flex; flex-direction: column; gap: 14px; min-height: 158px;
}
.cat-card:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--cc, var(--ink-faint)) 45%, var(--line)); box-shadow: var(--shadow); }
.cat-card .mk { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 13px; background: var(--tint); }
.cat-card-cta { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.cat-card-cta:hover { border-color: var(--ink); }
.cat-card h3 { font-family: var(--sans); font-weight: 700; font-size: 1.08rem; letter-spacing: -.02em; }
.cat-card .count { font-family: var(--mono); font-size: 13px; color: var(--ink-faint); margin-top: auto; letter-spacing: .04em; }

/* card in evidenza — 2×2 */
.cat-card.feature {
  grid-column: span 2; grid-row: span 2;
  padding: 30px 30px 26px; justify-content: flex-start; gap: 16px;
  background: linear-gradient(158deg, color-mix(in oklab, var(--cc) 15%, var(--surface)) 0%, var(--surface) 65%);
}
.cat-card.feature .mk { width: 58px; height: 58px; border-radius: 16px; }
.cat-card.feature h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); letter-spacing: -.03em; line-height: 1.05; }
.cat-card.feature .feature-desc { color: var(--ink-soft); font-size: 1rem; line-height: 1.5; max-width: 32ch; margin-top: -4px; }
.cat-card.feature .count { font-size: 12.5px; }
/* CTA larga in coda */
.cat-card-cta { grid-column: span 1; flex-direction: column; align-items: flex-start; gap: 14px; }
.cat-card-cta h3 { margin-right: 0; }
.cat-card-cta .count { margin-top: auto; }

/* ---------- VALUES — fascia firma a colore ---------- */
.band-accent { background: var(--accent); color: var(--on-accent); }
.band-accent .eyebrow { color: var(--on-accent); opacity: .8; }
.band-accent .eyebrow::before { background: var(--on-accent); opacity: .6; }
.values-head { max-width: 70ch; margin-bottom: clamp(34px, 4vw, 48px); }
.values-head h2 { color: var(--on-accent); margin-top: 14px; font-size: clamp(1.9rem, 3.6vw, 2.9rem); max-width: 20ch; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 40px); }
.value { padding-top: 22px; border-top: 1px solid color-mix(in oklab, var(--on-accent) 28%, transparent); }
.value h3 { font-family: var(--serif); font-size: 1.45rem; margin-bottom: 8px; color: var(--on-accent); }
.value .num { font-family: var(--mono); font-size: 12px; color: var(--on-accent); opacity: .58; letter-spacing: .14em; display: block; margin-bottom: 14px; }
.value p { color: color-mix(in oklab, var(--on-accent) 74%, var(--accent)); }

/* ---------- HOURS BAND ---------- */
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hours-band { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table tr { border-bottom: 1px solid var(--line-soft); }
.hours-table tr:last-child { border-bottom: 0; }
.hours-table td { padding: 16px 18px; font-size: 1rem; vertical-align: middle; }
.hours-table td:first-child { font-weight: 600; }
.hours-table td:last-child { text-align: right; font-family: var(--mono); font-size: 1rem; color: var(--ink-soft); letter-spacing: .02em; white-space: nowrap; }
.hours-table tr.today td { background: var(--tint); }
.hours-table tr.today td:first-child { border-top-left-radius: 9px; border-bottom-left-radius: 9px; }
.hours-table tr.today td:last-child { border-top-right-radius: 9px; border-bottom-right-radius: 9px; }
.hours-table tr.today td:first-child::after { content: " · oggi"; font-family: var(--mono); font-size: 12px; color: var(--accent-ink); font-weight: 700; letter-spacing: .04em; }

/* ---------- SERVICES PAGE ---------- */
.svc-toolbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 28px; }
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 99px; padding: 11px 18px; flex: 1; min-width: 220px; max-width: 360px;
}
.search input { border: 0; background: transparent; outline: none; width: 100%; font-size: 1.05rem; }
.search input::placeholder { color: var(--ink-faint); }
.search .ic { color: var(--ink-faint); font-family: var(--mono); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 1rem; font-weight: 500;
  padding: 9px 15px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-soft); cursor: pointer;
  display: inline-flex; align-items: center; gap: 9px;
  transition: all .16s; white-space: nowrap;
}
.chip:hover { border-color: color-mix(in oklab, var(--cc, var(--ink-faint)) 55%, var(--line)); color: var(--ink); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.active .ico { color: var(--bg) !important; }
.chip .ico { flex: 0 0 auto; }

.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.svc-card {
  background: linear-gradient(158deg, color-mix(in oklab, var(--cc, transparent) 15%, var(--surface)) 0%, var(--surface) 65%); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 22px 24px;
  display: flex; flex-direction: column; gap: 9px;
  animation: cardReveal .65s cubic-bezier(.22,1,.36,1) both;
}
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(28px) scale(0.97); filter: blur(1px); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    filter: blur(0);   }
}
/* le svc-card NON sono cliccabili: l'effetto di sollevamento è solo un
   accento al passaggio del mouse. Su touch (hover: none) niente animazione
   al tap, così non sembrano pulsanti. */

.svc-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 5px; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--cc) 16%, transparent); }
.svc-top { display: flex; align-items: center; gap: 10px; }
.svc-tag { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 500; }
.svc-card h3 { font-family: var(--sans); font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em; }
.svc-card p { color: var(--ink-soft); font-size: 1rem; line-height: 1.5; }
.svc-empty { text-align: center; padding: 60px 0; color: var(--ink-soft); font-family: var(--mono); }
.svc-count { font-family: var(--mono); font-size: 13px; color: var(--ink-faint); letter-spacing: .04em; margin-left: auto; }

/* ---------- ORARI / DOVE PAGE ---------- */
.locate-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
.orari-top { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 3.5vw, 40px); align-items: start; }
.orari-top > * { min-width: 0; }
.map-ph { aspect-ratio: 16 / 11; width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }

/* mappa OpenStreetMap / Leaflet */
.osm {
  width: 100%; aspect-ratio: 16 / 11; min-height: 240px;
  border-radius: var(--radius); border: 1px solid var(--line);
  overflow: hidden; position: relative; z-index: 0; background: var(--bg-2);
  box-shadow: var(--shadow-soft);
}
.osm .leaflet-container { width: 100%; height: 100%; background: var(--bg-2); font-family: var(--sans); }
.osm .leaflet-control-attribution { font-size: 10px; font-family: var(--mono); }
.osm .leaflet-bar a { color: var(--ink); }
.info-row { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.info-row:last-child { border-bottom: 0; }
.info-row .k { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); width: 96px; flex: 0 0 auto; padding-top: 3px; }
.info-row .v { font-size: 1.08rem; }
.info-row .v a { color: var(--accent-ink); font-weight: 600; }

/* ---------- STORIA / TIMELINE ---------- */
.timeline { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 120px 1fr; gap: 28px; padding: 28px 0; border-top: 1px solid var(--line); position: relative; }
.tl-item:last-child { border-bottom: 1px solid var(--line); }
.tl-year { font-family: var(--serif); font-size: 2rem; color: var(--accent); line-height: 1; }
.tl-body h3 { font-family: var(--sans); font-weight: 700; font-size: 1.25rem; margin-bottom: 8px; }
.tl-body p { color: var(--ink-soft); max-width: 60ch; }

.story-hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
.story-photo { aspect-ratio: 5/4; width: 100%; }

.quote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.5rem, 3.2vw, 2.3rem); line-height: 1.32;
  max-width: 22ch; color: var(--ink);
}
.quote-by { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-top: 20px; }

/* ---------- CONTATTI ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.field input, .field textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 15px; font-size: 1rem; outline: none; transition: border-color .18s, box-shadow .18s;
  font-family: var(--sans);
}
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.field textarea { resize: vertical; min-height: 120px; }
.contact-card { padding: 30px; }
.contact-line { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.contact-line:last-child { border-bottom: 0; }
.contact-line .lbl { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.contact-line .val { font-size: 1.1rem; font-weight: 600; }
.toast { background: oklch(0.62 0.13 150 / .14); border: 1px solid oklch(0.55 0.13 150 / .4); color: var(--ink); border-radius: 10px; padding: 14px 16px; font-size: 1rem; margin-top: 6px; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 0; cursor: pointer; font-weight: 600; font-size: 1.05rem; }
.faq-q > span:first-child { flex: 1; min-width: 0; text-wrap: pretty; }
.faq-q .pm { flex: 0 0 auto; }
.faq-q .pm { font-family: var(--mono); color: var(--accent); font-size: 1.3rem; transition: transform .2s; }
.faq-item.open .pm { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; }
.faq-item.open .faq-a { max-height: 240px; padding-bottom: 15px; }
.faq-a p { color: var(--ink-soft); max-width: 64ch; }

/* ---------- PARTNERS / FASCIA LOGHI ---------- */
.marquee {
  position: relative; overflow-x: auto; overflow-y: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  scrollbar-width: none; -ms-overflow-style: none;        /* barra di scroll nascosta */
  overscroll-behavior-x: contain; scroll-behavior: auto;
  cursor: grab; -webkit-overflow-scrolling: touch;
}
.marquee::-webkit-scrollbar { display: none; }
.marquee.dragging, .marquee:active { cursor: grabbing; }
.marquee-track { display: flex; gap: 22px; width: max-content; user-select: none; -webkit-user-select: none; }
.logo-tile {
  flex: 0 0 auto; width: 158px; height: 78px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  display: grid; place-items: center; overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.logo-tile img {
  max-height: 42px; max-width: 118px; object-fit: contain;
  filter: grayscale(1); opacity: .72; transition: filter .25s, opacity .25s;
  -webkit-user-drag: none; user-drag: none; pointer-events: none;
}
.logo-tile:hover img { filter: grayscale(0); opacity: 1; }
.logo-tile img[alt="SuperEnalotto"] { max-height: 72px; max-width: 72px; }
.logo-tile img[alt="Ricariche"] { max-height: 52px; max-width: 140px; }
.logo-tile img[alt="DHL"] { border-radius: 8px; }
.logo-tile .ph-name {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); opacity: .7; padding: 0 10px; text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  /* niente scorrimento automatico, ma la fascia resta scorrevole a mano */
  .marquee { cursor: default; }
}
@media (max-width: 620px) { .logo-tile { width: 132px; height: 66px; } }

/* ---------- BIG CTA ---------- */
.cta {
  background: var(--ink); color: var(--bg);
  border-radius: 22px; padding: clamp(40px, 6vw, 72px);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
}
.cta h2 { color: var(--bg); font-size: clamp(2rem, 4vw, 3rem); }
.cta p { color: color-mix(in oklab, var(--bg) 75%, var(--ink)); margin-top: 14px; max-width: 44ch; }
.cta .btn-primary { background: var(--gold); color: var(--on-accent); }
.cta .btn-primary:hover { background: var(--gold-ink); }
.cta .btn-ghost { background: color-mix(in oklab, var(--bg) 14%, transparent); border-color: color-mix(in oklab, var(--bg) 55%, transparent); color: var(--bg); box-shadow: none; }
.cta .btn-ghost:hover { background: color-mix(in oklab, var(--bg) 24%, transparent); border-color: color-mix(in oklab, var(--bg) 70%, transparent); }

/* ---------- RESPONSIVE pages ---------- */
/* evita che una colonna grid si allarghi oltre al genitore per via del
   contenuto largo (es. mappe Leaflet): i figli possono restringersi */
.hero-grid > *, .hours-band > *, .locate-grid > *,
.story-hero > *, .contact-grid > *, .cta > *, .values-grid > * { min-width: 0; }

@media (max-width: 980px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  /* rete di sicurezza: nessuno scorrimento orizzontale su mobile
     (clip non crea un contenitore di scroll, quindi l'header sticky resta ok) */
  body { overflow-x: clip; }
  .hero-grid { grid-template-columns: 1fr; }
  /* immagine in alto, centrata, con spazio perché i decori non escano dallo schermo */
  .hero-visual { order: -1; max-width: 430px; width: 100%; margin: 0 auto 8px; }
  .hero-badge { left: 10px; bottom: 18px; }
  .hero-stamp { right: 8px; top: -12px; }
  .hours-band, .locate-grid, .orari-top, .story-hero, .contact-grid, .cta { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; gap: 0; }
  .value { padding: 22px 0; }
  .value:first-child { padding-top: 0; border-top: 0; }
}
@media (max-width: 620px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-card.feature { grid-column: 1 / -1; grid-row: auto; }
  .cat-card-cta { grid-column: 1 / -1; }
  .svc-grid { grid-template-columns: 1fr; }
  .tl-item { grid-template-columns: 1fr; gap: 8px; }
  .tl-year { font-size: 1.6rem; }
}
@media (max-width: 480px) {
  /* hero: titolo più contenuto + decori dentro lo schermo */
  .hero h1 { font-size: clamp(2.25rem, 9vw, 3rem); }
  .hero-stamp { width: 76px; height: 76px; top: -6px; right: 10px; font-size: 9px; }
  .hero-badge { left: 6px; bottom: 14px; padding: 11px 14px; gap: 10px; }

  /* tabella orari: la colonna oraria può andare a capo */
  .hours-table td { padding: 13px 12px; }
  .hours-table td:last-child { white-space: normal; font-size: .9rem; line-height: 1.45; }

  /* FAQ: spazio sufficiente per risposte lunghe su schermo stretto */
  .faq-item.open .faq-a { max-height: 420px; }

  /* card categoria un filo più compatte */
  .cat-card { padding: 18px 18px 16px; min-height: 140px; }
}

/* In ORIZZONTALE su mobile c'è spazio in larghezza: teniamo la hero
   affiancata (titolo + immagine), come su desktop, invece di impilarla. */
@media (orientation: landscape) and (min-width: 600px) and (max-width: 860px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; align-items: center; }
  .hero-visual { order: 0; max-width: none; margin: 0; }
}
