/* Sezione eventi: lista (/eventi/) e scheda evento (single-tribe_events.php). Caricato solo lì, dopo style.css.
   Origine: tela docs/design/eventi (costruita con questo stesso file). Le classi del guscio e delle tessere sono in style.css. */

[hidden] { display: none !important; }

/* ---------- PERCORSO (come guida.css) ---------- */
.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; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb .spacer { flex: 1; }
.iconbtn.sm { width: 44px; height: 44px; }
.iconbtn.sm svg { width: 18px; height: 18px; }

/* ---------- TESTATA E FILTRI (/eventi/) ---------- */
.page-head .sub b { color: var(--live); font-weight: 700; }
.page-head .sub .num { font-weight: 700; color: var(--text); }
.filters { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 12px 0 10px; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.filters .quick button.active .dot { background: #fff; }
.filters .quick button svg { width: 16px; height: 16px; }
.fbar { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.fbar::-webkit-scrollbar { display: none; }
.fbar .sel { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px 0 14px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line-strong); font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; }
.fbar .sel svg { width: 16px; height: 16px; color: var(--text-3); }
.fbar .sep { flex: none; width: 1px; height: 24px; background: var(--line); }
.fbar .cat { 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; transition: border-color var(--t), background-color var(--t), color var(--t); }
.fbar .cat svg { width: 14px; height: 14px; }
.fbar .cat:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.fbar .cat.on { background: var(--abisso); color: #fff; border-color: var(--abisso); }
.fbar .cat.free.on { background: var(--monte); border-color: var(--monte); }
.fbar .sel select { appearance: none; -webkit-appearance: none; border: 0; background: none; font: inherit; font-weight: 700; color: inherit; padding: 0; max-width: 180px; cursor: pointer; }
.fbar .sel select:focus-visible { outline: none; }
.filters .quick a.btn { flex: none; height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; background: var(--surface); }
.filters .quick a.btn.active { background: var(--abisso); color: #fff; border-color: var(--abisso); }
.filters .quick a.btn .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); }
.filters .quick button { background: var(--surface); }
.daterange { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.daterange label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.daterange input { height: 44px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; }
.daterange .cta { height: 44px; padding: 0 16px; }
.notice a { color: var(--accent); }
.tile > button.more.center { align-self: center; padding: 12px; margin: -6px 0 -8px; }
@media (max-width: 719px) { .fbar { margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-snap-type: x proximity; } .fbar .cat, .fbar .sel { scroll-snap-align: start; } }

/* ---------- CONSIGLIATI (Open Events "Eventi Consigliati") ---------- */
.evcs { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.evcs::-webkit-scrollbar { display: none; }
.evc { flex: none; width: 240px; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
.evc img { width: 100%; height: 130px; object-fit: cover; display: block; transition: transform 400ms ease; }
.evc .tag { position: absolute; top: 10px; left: 10px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--rosso); color: #fff; font-size: var(--text-micro); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 4px; }
.evc .tag svg { width: 11px; height: 11px; }
.evc .b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.evc .when { font-family: var(--font-display); font-size: 13px; color: var(--smeraldo); }
.evc b { font-size: 16px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.evc span { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evc:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--hover-border); }
.evc:hover img { transform: scale(1.05); }
@media (max-width: 719px) { .evcs { margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-snap-type: x proximity; } .evc { scroll-snap-align: start; } }
@media (min-width: 720px) { .evcs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; } .evc { width: auto; } }

/* ---------- LISTA PER GIORNO ---------- */
.body2 { display: flex; flex-direction: column; gap: 22px; margin-top: 22px; }
.col, .side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.day { display: flex; flex-direction: column; gap: 10px; }
.day-head { display: flex; align-items: baseline; gap: 10px; }
.day-head h2 { font-size: 24px; }
.day-head span { font-size: 13px; color: var(--text-3); font-weight: 600; }
.day-head .n { margin-left: auto; white-space: nowrap; }
.row.ev { grid-template-columns: 64px minmax(0, 1fr) auto; }
.row.ev .ph { display: none; }
.row.ev .t small, .row.week .t small { text-transform: none; letter-spacing: 0; font-size: 12px; white-space: normal; line-height: 1.15; overflow: visible; }
.row.ev.done { opacity: .55; }
.status.done { background: var(--surface-2); color: var(--text-3); text-decoration: line-through; }
.tile > .more.center { align-self: center; padding: 12px; margin: -6px 0 -8px; }
@media (min-width: 720px) {
  .col .row.ev { grid-template-columns: 64px 56px minmax(0, 1fr) auto; }
  .col .row.ev .ph { display: block; }
}
@media (min-width: 1024px) {
  .body2 { flex-direction: row; align-items: flex-start; gap: 28px; margin-top: 28px; }
  .col { flex: 1; gap: 24px; }
  .side { width: 380px; flex: none; gap: 16px; }
  .day-head h2 { font-size: 28px; }
}

/* ---------- STATO VUOTO ---------- */
.empty { align-items: center; text-align: center; padding: 28px 18px; gap: 8px; }
.empty .ico { width: 56px; height: 56px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--text-3); margin-bottom: 4px; }
.empty .ico svg { width: 26px; height: 26px; }
.empty h3 { font-size: 20px; }
.empty p { font-size: 13px; color: var(--text-2); max-width: 36ch; }
.empty .ctas { justify-content: center; margin-top: 8px; }

/* ---------- MINIMAPPA E RICORRENTI (colonna laterale) ---------- */
.minimap { position: relative; height: 150px; border-radius: var(--radius-s); overflow: hidden; background: linear-gradient(160deg, #D8ECF5 0%, #8CC3E0 100%); }
.minimap svg { width: 100%; height: 100%; display: block; }
.minimap .pin { fill: var(--live); stroke: #fff; stroke-width: 1.2; }
.minimap .lake { fill: #2A8C85; opacity: .55; }
.minimap .n { position: absolute; left: 10px; bottom: 8px; font-size: var(--text-micro); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--abisso); background: rgba(255,255,255,.8); padding: 4px 8px; border-radius: 6px; }
.row.week { grid-template-columns: 56px minmax(0, 1fr); min-height: 44px; }
.row.week .t { font-size: 14px; }

/* ---------- SCHEDA EVENTO: HERO (come hero-c di guida.css) ---------- */
.hero-c { position: relative; border-radius: var(--radius-l); overflow: hidden; height: 300px; 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,.86) 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(--live); box-shadow: 0 0 0 0 rgba(217,56,58,.6); animation: ping 1.8s infinite; }
.pill.light { background: rgba(255,255,255,.92); color: var(--abisso); text-transform: none; letter-spacing: 0; font-size: 12px; }
.pill.red { background: var(--rosso); color: #fff; }
.hero-c .body { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.hero-c .eyebrow { color: rgba(255,255,255,.8); }
.hero-c h1 { font-size: 30px; 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; }
.hero-c .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.hero-c .chips::-webkit-scrollbar { display: none; }
.hero-c .chip { flex: none; backdrop-filter: none; background: rgba(255,255,255,.78); color: #0F2A38; border-color: rgba(255,255,255,.35); }
.hero-c .chip b { font-family: var(--font-display); }
.chip svg { width: 16px; height: 16px; flex: none; }
.cta svg { width: 18px; height: 18px; flex: none; }
.ctas { display: flex; gap: 8px; flex-wrap: wrap; }
.cta.on { background: var(--surface-2); border-color: var(--surface-2); color: var(--rosso); }
.under { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.hero-c .dsk { display: none; }
@media (min-width: 1024px) {
  .hero-c { height: 480px; }
  .hero-c .shade { background: linear-gradient(90deg, rgba(15,30,38,.82) 0%, rgba(15,30,38,.32) 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: 680px; gap: 14px; }
  .hero-c h1 { font-size: 48px; }
  .hero-c h1 small { font-size: 16px; margin-top: 6px; }
  .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; }
}

/* ---------- SCHEDA EVENTO: CORPO ---------- */
.kv .s { font-size: 12px; color: var(--text-3); }
.kv.info { grid-template-columns: 1fr 1fr; gap: 14px 12px; }
@media (min-width: 720px) { .kv.info { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kv.info .v { font-size: 15px; }
.kv a .v { color: var(--accent); }
.tile .prose { font-size: 15px; }
.tile .prose p { color: var(--text-2); }
.ways { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .ways.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; } }
.way { display: flex; gap: 12px; align-items: center; min-height: 48px; }
.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); }
.org { display: flex; gap: 12px; align-items: center; }
.org .av { width: 48px; height: 48px; border-radius: 50%; background: var(--abisso); color: #fff; font-family: var(--font-display); font-size: 16px; display: flex; align-items: center; justify-content: center; flex: none; }
.org > div { min-width: 0; }
.org b { display: block; font-size: 16px; }
.org span { font-size: 13px; color: var(--text-2); }
.demo-note { margin-top: 18px; 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; }
