/* Pagina guida comune (single-comune.php). Origine: prototipo guida-comune.src.html, dal blocco PERCORSO in poi.
   Si carica dopo style.css e ridefinisce alcune classi delle tessere per questa pagina. */

/* ---------- PERCORSO ---------- */
.crumb { display: flex; align-items: center; gap: 6px; min-height: 44px; font-size: 13px; font-weight: 600; color: var(--text-3); }
@media (max-width: 519px) { .crumb .sp { display: none; } }
.crumb > svg { width: 18px; height: 18px; }
.crumb a { display: inline-flex; align-items: center; min-height: 44px; }
.crumb a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.crumb b { color: var(--text); font-weight: 700; }
.crumb .spacer { flex: 1; }
.crumb .view { font-size: var(--text-micro); font-weight: 700; padding: 5px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }

/* ---------- HERO DEL COMUNE ---------- */
.hero-c { position: relative; border-radius: var(--radius-l); overflow: hidden; height: 270px; box-shadow: var(--shadow); color: #fff; background: var(--abisso); }
.hero-c > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-c .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,30,38,.05) 0%, rgba(15,30,38,0) 30%, rgba(15,30,38,.84) 100%); }
.hero-c .top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: var(--text-micro); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(15,30,38,.55); color: var(--sabbia); white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--smeraldo); }
.pill.light { background: rgba(255,255,255,.92); color: var(--abisso); text-transform: none; letter-spacing: 0; font-size: 12px; }
.hero-c .body { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.hero-c h1 { font-size: 34px; letter-spacing: -.01em; }
.hero-c h1 small { display: block; font-family: var(--font-body); font-size: 14px; font-weight: 500; line-height: 1.4; opacity: .9; margin-top: 4px; letter-spacing: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 13px; border-radius: 999px; background: rgba(255,255,255,.72); color: #0F2A38; font-size: 13px; font-weight: 600; border: 1px solid rgba(255,255,255,.35); white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.chip b { font-family: var(--font-display); }
.chip.btn:hover { background: rgba(255,255,255,.9); }
.facts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.lead { font-size: 15px; line-height: 1.5; color: var(--text-2); }
.ctas { display: flex; gap: 8px; flex-wrap: wrap; }
.under { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.hero-c .dsk { display: none; }
@media (min-width: 1024px) {
  .hero-c { height: 520px; }
  .hero-c .shade { background: linear-gradient(90deg, rgba(15,30,38,.80) 0%, rgba(15,30,38,.30) 55%, rgba(15,30,38,0) 80%), linear-gradient(180deg, rgba(15,30,38,0) 60%, rgba(15,30,38,.35) 100%); }
  .hero-c .top { top: 24px; left: 32px; right: 32px; }
  .hero-c .body { left: 32px; right: auto; bottom: 32px; max-width: 640px; gap: 14px; }
  .hero-c h1 { font-size: 56px; }
  .hero-c h1 small { font-size: 16px; margin-top: 6px; }
  .hero-c .facts { color: rgba(255,255,255,.85); font-size: 13px; }
  .hero-c .lead { color: rgba(255,255,255,.92); }
  .hero-c .chips { margin: 0; padding: 0; flex-wrap: wrap; overflow: visible; }
  .hero-c .dsk { display: flex; }
  .hero-c .cta.ghost { border-color: rgba(255,255,255,.65); color: #fff; }
  .hero-c .cta.ghost:hover { background: rgba(255,255,255,.14); }
  .under { display: none; }
}

/* ---------- SEZIONI E TESSERE (come la home) ---------- */
.body2 { display: flex; flex-direction: column; gap: 22px; margin-top: 22px; }
.col, .side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
@media (min-width: 1024px) {
  .body2 { flex-direction: row; align-items: flex-start; gap: 28px; margin-top: 28px; }
  .body2.residente { flex-direction: row-reverse; }
  .col { flex: 1; gap: 24px; }
  .side { width: 380px; flex: none; gap: 16px; }
}
.section { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 720px) { .section { gap: 14px; } }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.section-head h2 { font-size: 24px; }
@media (min-width: 720px) { .section-head h2 { font-size: 28px; } }
.more { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; padding: 12px 0 12px 12px; min-height: 44px; }
.more:hover { color: var(--abisso); text-decoration: underline; text-underline-offset: 3px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@media (min-width: 720px) { .tile { padding: 18px; gap: 12px; } }
.tile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tile-head h3 { font-size: 20px; }
.tile-head .more { margin: -10px 0; flex: none; }
.tile-head > div:first-child { min-width: 0; }
.tile .sub { font-size: 13px; color: var(--text-3); font-weight: 600; }
.notice { font-size: 13px; color: var(--text-2); padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface-2); }
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-weight: 700; font-size: 16px; box-shadow: var(--shadow-soft); white-space: nowrap; }
.cta::after { content: '\2192'; font-weight: 700; }
.cta.ghost { background: transparent; border: 1.5px solid var(--line-strong); color: var(--text); box-shadow: none; }
.cta.ghost::after { content: none; }
.cta.ghost.on { background: var(--smeraldo); border-color: var(--smeraldo); color: #fff; }
.cta svg { width: 18px; height: 18px; }
.cta:hover { transform: translateY(-1px); box-shadow: var(--shadow); filter: brightness(1.05); }
.cta.ghost:hover { background: var(--surface-2); box-shadow: none; }
.quick { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick a, .quick button { flex: none; height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.quick a:hover, .quick button:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.quick .on, .quick .on:hover { background: var(--abisso); color: #fff; border-color: var(--abisso); }
@media (min-width: 720px) { .quick.wrap-chips { flex-wrap: wrap; overflow: visible; } }
.pcs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.pcs::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .pcs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; overflow: visible; } }
.pc { flex: none; width: 172px; padding: 0 0 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; overflow: hidden; cursor: pointer; transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
@media (min-width: 720px) { .pc { width: auto; } .pc img { height: 140px; } }
.pc img { width: 100%; height: 96px; object-fit: cover; display: block; margin-bottom: 8px; transition: transform 400ms ease; }
.pc b, .pc span { padding: 0 12px; }
.pc b { font-size: 16px; }
.pc span { font-size: 13px; color: var(--text-3); line-height: 1.3; }
.pc:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--hover-border); }
.pc:hover img { transform: scale(1.05); }
.rows { display: flex; flex-direction: column; gap: 2px; }
.row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 48px; padding: 6px 8px; margin: 0 -8px; border-radius: var(--radius-s); border-top: 1px solid var(--line); cursor: pointer; }
.row > * { min-width: 0; }
.row:first-child { border-top: 0; }
.row:hover { background: var(--surface-2); }
.row .t { font-weight: 700; font-size: 16px; font-family: var(--font-display); }
.row .t small { display: block; font-family: var(--font-body); font-weight: 600; font-size: var(--text-micro); color: var(--text-3); letter-spacing: .06em; text-transform: uppercase; }
.row .title { font-weight: 600; font-size: 16px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row .meta { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta b { color: var(--text); font-weight: 700; }
.status { font-size: var(--text-micro); font-weight: 700; padding: 5px 9px; border-radius: 999px; white-space: nowrap; letter-spacing: .02em; }
.status.live { background: rgba(217,56,58,.12); color: var(--live); }
.status.soon { background: rgba(42,140,133,.14); color: var(--smeraldo); }
.status.later { background: var(--surface-2); color: var(--text-2); }
.status.free { background: rgba(110,133,104,.16); color: var(--monte); }
.rep { display: flex; gap: 10px; padding: 10px 8px; margin: 0 -8px; border-radius: var(--radius-s); border-top: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.rep:first-child { border-top: 0; }
.rep:hover { background: var(--surface-2); }
.rep .tag { font-size: var(--text-micro); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--smeraldo); white-space: nowrap; padding-top: 2px; min-width: 52px; }
.rep > div { min-width: 0; font-weight: 600; line-height: 1.35; }
.rep small { display: block; color: var(--text-3); font-size: 12px; font-weight: 500; margin-top: 2px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 13px; }
@media (min-width: 720px) { .kv { gap: 14px 12px; } }
.kv > * { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kv .k { font-size: var(--text-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.kv .v { font-weight: 700; overflow-wrap: anywhere; }
.kv .s { font-size: 12px; color: var(--text-3); }
.kv a:hover .v { color: var(--smeraldo); }
.ways { display: flex; flex-direction: column; }
@media (min-width: 720px) { .ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; } }
.way { display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 8px 0; border-top: 1px solid var(--line); }
.way:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 720px) { .way { border-top: 0; padding: 0; } }
.way .ico { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex: none; }
.way .ico svg { width: 20px; height: 20px; }
.way > div { min-width: 0; }
.way b { display: block; font-size: 16px; font-weight: 700; }
.way span { font-size: 13px; color: var(--text-2); }
.place { display: flex; gap: 12px; align-items: center; padding: 8px 8px; margin: 0 -8px; border-radius: var(--radius-s); border-top: 1px solid var(--line); cursor: pointer; }
.place:first-child { border-top: 0; }
.place:hover { background: var(--surface-2); }
.place img { width: 60px; height: 60px; border-radius: var(--radius-s); flex: none; object-fit: cover; display: block; }
.place > div { min-width: 0; }
.place .name { font-weight: 700; font-size: 16px; }
.place .d { font-size: 13px; color: var(--text-2); }
.badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; font-size: var(--text-micro); font-weight: 700; color: var(--rosso); }
.badge svg { width: 11px; height: 11px; }
.partners { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .partners { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.partner { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
.partner img { width: 76px; height: 76px; border-radius: var(--radius-s); object-fit: cover; flex: none; display: block; transition: transform 400ms ease; }
.partner > div { min-width: 0; }
.partner b { font-size: 16px; display: block; }
.partner span { font-size: 13px; color: var(--text-2); }
.partner:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--hover-border); }
.partner:hover img { transform: scale(1.05); }
.ring { display: flex; align-items: center; gap: 14px; }
.ring svg { width: 72px; height: 72px; flex: none; }
.ring .lbl { font-size: 13px; color: var(--text-2); min-width: 0; }
.ring .lbl b { display: block; font-family: var(--font-display); font-size: 28px; color: var(--text); line-height: 1.1; }
.stamps { display: flex; flex-wrap: wrap; gap: 6px; }
.stories { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .stories { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
.story { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; cursor: pointer; transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
.story .img { height: 150px; position: relative; overflow: hidden; }
.story .img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 400ms ease; }
.story .img::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,30,38,0) 45%, rgba(15,30,38,.6) 100%); z-index: 1; }
.story .img span { position: absolute; left: 12px; bottom: 10px; z-index: 2; font-size: var(--text-micro); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.28); padding: 4px 8px; border-radius: var(--radius-s); }
.story .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.story h3 { font-size: 20px; }
.story p { font-size: 13px; color: var(--text-2); }
.story .by { font-size: 12px; color: var(--text-3); font-weight: 600; }
.story:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--hover-border); }
.story:hover .img img { transform: scale(1.03); }
.faq { padding: 4px 16px; gap: 0; }
@media (min-width: 720px) { .faq { padding: 4px 18px; } }
.q { border-top: 1px solid var(--line); }
.q:first-child { border-top: 0; }
.q .qh { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; font-weight: 600; font-size: 15px; width: 100%; text-align: left; }
.q .qh svg { width: 18px; height: 18px; flex: none; color: var(--text-3); transition: transform var(--t); }
.q.open .qh svg { transform: rotate(180deg); }
.q p { display: none; font-size: 13px; color: var(--text-2); padding: 0 0 14px; max-width: 640px; }
.q.open p { display: block; }
.wa { background: var(--abisso); color: #F4F1EA; border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.wa h3 { font-size: 20px; }
.wa p { font-size: 13px; color: rgba(244,241,234,.78); }
.wa .cta { background: #fff; color: var(--abisso); align-self: flex-start; }
.wa .cta:hover { filter: none; background: var(--sabbia); }
.demo-note { margin-top: 6px; font-size: 13px; color: var(--text-3); display: flex; gap: 8px; align-items: flex-start; }
.demo-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
@media (max-width: 719px) {
  .quick, .pcs, .chips { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; scroll-snap-type: x proximity; }
  .quick a, .quick button, .pc, .chip { scroll-snap-align: start; }
  footer { gap: 14px 24px; }
  footer .lang { margin-left: 0; }
}
@media (hover: none) {
  .pc:hover, .partner:hover, .story:hover, .cta:hover { transform: none; box-shadow: none; }
  .pc:active, .partner:active, .story:active, .cta:active, .quick a:active, .quick button:active, .iconbtn:active { transform: scale(.97); transition-duration: 80ms; }
}
@media (prefers-reduced-motion: reduce) { .pc, .partner, .story, .cta, .pc img, .partner img, .story .img img { transition: none; } .pc:hover, .partner:hover, .story:hover, .cta:hover { transform: none; } }
