/* Scheda viaggio (/tours/:slug): mosaico di foto, titolo e fatti chiave, navigazione a pillole (sticky), sezioni, itinerario con mappa, biglietti di partenza,
   colonna di prenotazione (da 900 px) e dock sul telefono. Regole iPhone: pillole ≤ 86% dello schermo, staccate di 10 px dai bordi, nessun velo fisso. */
.tour { padding-bottom: clamp(24px, 4vw, 48px); }
.tour__crumbs { padding: 6px 0 14px; }
.tlayout { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: start; margin-top: clamp(20px, 3vw, 32px); }
@media (min-width: 900px) { .tlayout { grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; } }
@media (min-width: 1080px) { .tlayout { grid-template-columns: minmax(0, 1fr) 372px; gap: 40px; } }
.tmain { min-width: 0; }   /* blocco normale (non griglia): la navigazione sticky resta incollata per tutta la lunghezza delle sezioni */
.tmain > * + * { margin-top: clamp(32px, 5vw, 56px); }
.tmain > .thead + .tfacts, .tmain > .tfacts + .pnav { margin-top: 20px; }
.tmain > .pnav + .tsec { margin-top: clamp(24px, 4vw, 36px); }
/* il salto a una sezione somma scroll-padding-top di html (sotto la testata) e questo scarto (sotto la pillola di navigazione) */
.tsec { scroll-margin-top: 58px; }
.tsec > h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.4rem); margin-bottom: 18px; }
.tsec__lead { color: var(--muted); max-width: 66ch; margin: -6px 0 20px; }
.tsec__h3 { font-size: 1.3rem; margin: 28px 0 14px; }
.prose > * + * { margin-top: 14px; } .prose p { color: var(--ink-2); font-size: 1.04rem; max-width: 72ch; }

/* ---- galleria a mosaico: 1 foto grande + fino a 4 piccole (da 700 px); sul telefono la grande con il pulsante «Tutte le foto» */
.tgal { position: relative; }
.tgal__grid { display: grid; gap: 8px; border-radius: var(--r-xl); overflow: hidden; grid-template-columns: minmax(0, 1fr); }
.tgal__tile { position: relative; display: block; padding: 0; border: 0; overflow: hidden; background: var(--sea-100); min-width: 0; min-height: 0; }
button.tgal__tile { cursor: zoom-in; }
.tgal__tile img, .tgal__tile .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.tgal__tile .ph { border-radius: 0; }
.tgal__tile--main { aspect-ratio: 4 / 3; }
.tgal__tile--1 .ph { background: linear-gradient(135deg, var(--sun-100), var(--sea-100)); } .tgal__tile--2 .ph { background: linear-gradient(135deg, var(--sea-100), #e8dccb); }
.tgal__tile--3 .ph { background: linear-gradient(135deg, #e8dccb, var(--sea-50)); } .tgal__tile--4 .ph { background: linear-gradient(135deg, var(--sea-50), var(--sun-100)); }
.tgal__tile:not(.tgal__tile--main) { display: none; }
@media (hover: hover) { button.tgal__tile:hover img { transform: scale(1.04); } }
.tgal__tile:focus-visible { outline-offset: -4px; }
.tgal__all { position: absolute; right: 14px; bottom: 14px; box-shadow: var(--shadow-md); }
@media (min-width: 700px) {
  .tgal__grid { height: clamp(320px, 38vw, 540px); grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .tgal__tile:not(.tgal__tile--main) { display: block; }
  .tgal__tile--main { aspect-ratio: auto; grid-area: 1 / 1 / 3 / 3; }
  .tgal__grid--1 .tgal__tile--main { grid-area: 1 / 1 / 3 / 5; }
  .tgal__grid--2 .tgal__tile--main { grid-area: 1 / 1 / 3 / 4; } .tgal__grid--2 .tgal__tile--1 { grid-area: 1 / 4 / 3 / 5; }
  .tgal__grid--3 .tgal__tile--1 { grid-area: 1 / 3 / 2 / 5; } .tgal__grid--3 .tgal__tile--2 { grid-area: 2 / 3 / 3 / 5; }
  .tgal__grid--4 .tgal__tile--1 { grid-area: 1 / 3 / 2 / 4; } .tgal__grid--4 .tgal__tile--2 { grid-area: 1 / 4 / 2 / 5; } .tgal__grid--4 .tgal__tile--3 { grid-area: 2 / 3 / 3 / 5; }
  .tgal__grid--5 .tgal__tile--1 { grid-area: 1 / 3; } .tgal__grid--5 .tgal__tile--2 { grid-area: 1 / 4; } .tgal__grid--5 .tgal__tile--3 { grid-area: 2 / 3; } .tgal__grid--5 .tgal__tile--4 { grid-area: 2 / 4; }
}

/* ---- titolo e fatti chiave */
.thead { display: grid; gap: 12px; }
.thead__badges { display: flex; flex-wrap: wrap; gap: 8px; }
.thead h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.3rem); line-height: 1.07; overflow-wrap: break-word; }
.thead__sub { max-width: 62ch; font-size: clamp(1.05rem, .95rem + .45vw, 1.25rem); color: var(--ink-2); line-height: 1.5; }
.thead__line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; color: var(--muted); font-size: .9rem; }
.thead__line a.rating { padding: 8px 0; } @media (hover: hover) { .thead__line a.rating:hover { color: var(--ink); } }
.thead__act { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
.tfav[aria-pressed='true'] .i { fill: currentColor; color: var(--terra); }
.tfacts { display: flex; flex-wrap: wrap; gap: 16px 28px; padding: 20px 24px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.tfacts li { display: flex; align-items: center; gap: 12px; flex: 1 1 168px; min-width: 0; }
.tfacts .i { width: 26px; height: 26px; color: var(--aegean-500); }
.tfacts span { display: grid; line-height: 1.25; min-width: 0; } .tfacts small { color: var(--muted); font-size: .76rem; letter-spacing: .02em; } .tfacts b { font-size: .95rem; font-weight: 650; overflow-wrap: anywhere; }

/* ---- navigazione di pagina: pillola sticky larga ≤ 86% dello schermo, sempre ≥ 10 px dal bordo alto; scorre dentro se le voci non entrano */
.pnav { position: sticky; z-index: 40; top: calc(var(--header-space) - 8px); width: calc(100% - 2 * (var(--edge) - var(--gutter))); margin-inline: auto; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, .94); border: 1px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 1px rgba(10, 37, 64, .07), 0 12px 28px -14px rgba(10, 37, 64, .4); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); transition: top .3s var(--ease); }
.js.header-hidden .pnav { top: calc(10px + env(safe-area-inset-top)); }
@media (min-width: 900px) { .pnav { width: 100%; } }
.pnav ul { position: relative; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pnav ul::-webkit-scrollbar { display: none; }
.pnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; font: 650 .9rem/1 var(--font-body); color: var(--ink-2); white-space: nowrap; transition: background-color .2s, color .2s; }
.pnav a[aria-current='true'] { background: var(--navy-900); color: #fff; }
@media (hover: hover) { .pnav a:not([aria-current='true']):hover { background: var(--paper-2); color: var(--ink); } }

/* ---- panoramica */
.thl { display: grid; gap: 10px 24px; }
@media (min-width: 700px) { .thl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.thl li { display: flex; align-items: flex-start; gap: 12px; line-height: 1.5; font-size: .98rem; }
.thl .i { flex: none; width: 24px; height: 24px; padding: 4px; margin-top: 1px; border-radius: 50%; background: var(--olive-100); color: var(--olive); stroke-width: 2.4; }
.tfeats { display: grid; gap: 14px; margin-top: 30px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.tfeat { display: grid; gap: 8px; align-content: start; padding: 22px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.tfeat__i { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--sun-100); color: var(--sun-700); }
.tfeat h3 { font-size: 1.2rem; } .tfeat p { color: var(--ink-2); font-size: .94rem; line-height: 1.55; }
.tfeat ul { display: grid; gap: 6px; color: var(--muted); font-size: .88rem; line-height: 1.4; } .tfeat li { padding-left: 14px; position: relative; } .tfeat li::before { content: ''; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--sun); }

/* ---- itinerario: mappa (sopra su telefono, a destra e incollata da 1080 px) + giorni */
.titin { display: grid; gap: 18px; }
.tmap { --map-h: 280px; border-radius: var(--r-xl); background: linear-gradient(135deg, var(--sea-100), var(--sea-50)); border: 1px solid var(--line-2); }
.tmap:not(.map--tall) { height: var(--map-h); }
.titin__days { min-width: 0; }
.titin__tools { display: flex; justify-content: flex-end; margin-bottom: 8px; }
@media (min-width: 1080px) {
  .titin.has-map { grid-template-columns: minmax(0, 1fr) minmax(290px, 41%); gap: 22px 28px; }
  .titin.has-map .titin__map { order: 2; position: sticky; top: calc(var(--header-space) + 72px); align-self: start; }
  .tmap { --map-h: min(66svh, 560px); }
}
.days { display: grid; gap: 10px; }
.day { background: var(--white); border: 1.5px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .25s; scroll-margin-top: 58px; }
.day[open] { border-color: var(--aegean-300); box-shadow: var(--shadow-md); }
.day.is-active { border-color: var(--sun); box-shadow: 0 0 0 3px rgba(238, 164, 58, .28), var(--shadow-md); }
.day summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px 12px 12px; min-height: 68px; cursor: pointer; list-style: none; border-radius: var(--r-lg); }
.day summary::-webkit-details-marker { display: none; }
.day summary::after { content: ''; width: 30px; height: 30px; border-radius: 50%; background: var(--sea-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23104f86' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 16px no-repeat; transition: transform .3s var(--ease); }
.day[open] summary::after { transform: rotate(180deg); }
.day__n { display: grid; place-items: center; align-content: center; gap: 2px; width: 54px; height: 54px; border-radius: 16px; background: var(--navy-900); color: #fff; text-align: center; }
.day__n small { font: 700 .56rem/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--sun); } .day__n b { font: 500 1.4rem/1 var(--font-display); }
.day__t { display: grid; gap: 3px; min-width: 0; } .day__t strong { font: 500 1.1rem/1.25 var(--font-display); overflow-wrap: break-word; }
.day__place { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: .84rem; line-height: 1.35; } .day__place .i { width: 1em; height: 1em; margin-top: .15em; }
.day__ic { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 92px; color: var(--aegean-500); } .day__ic .i { width: 1.15em; height: 1.15em; }
.day__body { padding: 2px 20px 20px 80px; color: var(--ink-2); font-size: .97rem; line-height: 1.65; }
.day__body p + p { margin-top: 10px; }
.day__facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--muted); font-size: .85rem; font-weight: 600; }
.day__facts li { display: inline-flex; align-items: center; gap: 7px; } .day__facts .i { color: var(--aegean-500); }
@media (max-width: 639px) { .day__body { padding: 2px 16px 18px; } .day__ic { display: none; } .day summary { grid-template-columns: auto minmax(0, 1fr) auto; } }

/* ---- date e prezzi */
.dmonths { display: none; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.js .dmonths { display: flex; }
.tdeps { display: grid; gap: 14px; }
.js .tdeps:not(.is-all) .dep.is-extra { display: none; }
.tdeps .dep[hidden] { display: none; }
.tdeps__more { display: none; justify-content: center; margin-top: 16px; }
.js .tdeps__more { display: flex; } .js .tdeps__more[hidden] { display: none; }
.dep__flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.dep__price { display: grid; gap: 4px; justify-items: end; text-align: right; } .dep__price .price { justify-content: flex-end; } .dep__price .price strong { font-size: 1.55rem; }
@media (max-width: 719px) { .dep__price { justify-items: start; text-align: left; } .dep__price .price { justify-content: flex-start; } }
.dep__note { font-size: .84rem; color: var(--muted); line-height: 1.4; }
.dep--soldout .dep__date, .dep--closed .dep__date { background: var(--ink-2); }
.dep--soldout .dep__title, .dep--closed .dep__title { color: var(--ink-2); }
.dep__main { align-content: center; }
.tinfo-list { display: grid; gap: 10px; margin-top: 24px; padding: 18px 22px; background: var(--sea-50); border-radius: var(--r-lg); }
.tinfo-list li { display: flex; gap: 12px; align-items: flex-start; font-size: .94rem; line-height: 1.45; color: var(--navy-800); } .tinfo-list .i { margin-top: 2px; color: var(--aegean-500); }

/* ---- incluso / non incluso e servizi facoltativi */
.tinc { display: grid; gap: 16px; }
@media (min-width: 760px) { .tinc { grid-template-columns: 1.15fr 1fr; } }
.tinc__col { display: grid; gap: 14px; align-content: start; padding: 24px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-lg); }
.tinc__col h3 { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; }
.tinc__col--yes h3 .i { color: var(--olive); } .tinc__col--no { background: transparent; border-style: dashed; } .tinc__col--no h3 .i { color: var(--terra); }
.tinc li { display: flex; gap: 12px; align-items: flex-start; padding: 5px 0; font-size: .95rem; line-height: 1.5; }
.tinc li .i { flex: none; margin-top: 3px; width: 1.1em; height: 1.1em; stroke-width: 2.4; } .tinc__col--yes li .i { color: var(--olive); } .tinc__col--no li .i { color: var(--terra); }
.tinc__col--no li { color: var(--ink-2); }
.textras { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.textras li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-md); }
.textras .i { flex: none; width: 24px; height: 24px; color: var(--aegean-500); margin-top: 2px; }
.textras span { display: grid; gap: 2px; line-height: 1.35; } .textras b { font-weight: 650; font-size: .94rem; } .textras small { color: var(--muted); font-size: .82rem; }

/* ---- informazioni utili */
.tinfo { display: grid; gap: 14px; }
@media (min-width: 700px) { .tinfo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tinfo__c { display: grid; gap: 8px; align-content: start; padding: 22px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.tinfo__i { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--sea-50); color: var(--aegean-600); }
.tinfo__c h3 { font-size: 1.2rem; } .tinfo__c p { color: var(--ink-2); font-size: .94rem; line-height: 1.6; }

/* ---- recensioni */
.trev { display: grid; gap: 22px 40px; align-items: center; padding: 24px; margin-bottom: 18px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-lg); }
@media (min-width: 640px) { .trev { grid-template-columns: auto minmax(0, 1fr); } }
.trev__sum { display: grid; gap: 6px; justify-items: start; } .trev__avg { display: flex; align-items: baseline; gap: 6px; } .trev__avg strong { font: 500 3.4rem/1 var(--font-display); color: var(--navy-900); } .trev__avg span { color: var(--muted); font-weight: 600; }
.trev__dist { display: grid; gap: 7px; max-width: 420px; width: 100%; }
.trev__dist li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 28px; gap: 10px; align-items: center; font-size: .86rem; font-weight: 650; color: var(--ink-2); }
.trev__dist li > span:first-child { display: inline-flex; align-items: center; gap: 3px; } .trev__dist .i { width: .95em; height: .95em; color: var(--sun); fill: var(--sun); } .trev__dist li > span:last-child { text-align: right; color: var(--muted); }
.trev__bar { display: block; height: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; } .trev__bar b { display: block; height: 100%; width: var(--w); border-radius: 99px; background: var(--sun); }
.trev__list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-bottom: 14px; }
.rcard__title { font-weight: 700; color: var(--ink); }
.tfaq { margin-bottom: 14px; }

/* ---- colonna di prenotazione (da 900 px): incollata sotto la testata, ≤ 372 px di larghezza */
.tbook { display: none; }
@media (min-width: 900px) {
  .tbook { display: grid; gap: 16px; position: sticky; top: calc(var(--header-space) + 8px); align-self: start; padding: 24px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-md); transition: top .3s var(--ease); }
  .js.header-hidden .tbook { top: calc(24px + env(safe-area-inset-top)); }
}
.tbook__price .price strong { font-size: 2.3rem; } .tbook__sub { margin-top: 4px; font-size: .84rem; color: var(--muted); }
.tbook__deps { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.tbook__deps legend { padding: 0 0 8px; font: 700 .72rem/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dpick { position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--white); cursor: pointer; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.dpick input { position: absolute; opacity: 0; pointer-events: none; }
.dpick:has(input:checked) { border-color: var(--aegean-500); background: var(--sea-50); box-shadow: 0 0 0 3px rgba(29, 116, 185, .14); }
.dpick:has(input:focus-visible) { outline: 3px solid var(--aegean-500); outline-offset: 2px; }
.dpick.is-off { opacity: .55; cursor: not-allowed; }
.dpick__d { display: grid; flex: 1; min-width: 0; line-height: 1.3; } .dpick__d b { font-size: .9rem; font-weight: 700; } .dpick__d small { color: var(--olive); font-weight: 650; font-size: .78rem; } .dpick__d small.few { color: #a8412a; }
.dpick.is-off .dpick__d small { color: var(--muted); }
.dpick__p { font-weight: 800; white-space: nowrap; }
.tbook__more { text-align: center; font-size: .9rem; margin-top: -6px; } .tbook__more a { display: inline-block; padding: 10px 6px; font-weight: 700; color: var(--aegean-600); text-decoration: underline; text-underline-offset: 3px; }
.tbook__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; } .tbook__row .btn { padding-inline: 16px; min-height: 48px; font-size: .92rem; }
.tbook__trust { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: .84rem; line-height: 1.45; color: var(--ink-2); }
.tbook__trust li { display: flex; gap: 10px; align-items: flex-start; } .tbook__trust .i { flex: none; margin-top: 1px; color: var(--olive); }

/* ---- barra in basso (telefono e tablet): prezzo e «Scegli la data» */
.dock--tour { justify-content: space-between; }
.dock--tour .btn { margin-left: 0; }
.dock--tour .price small { font-size: .74rem; }

/* ---- lightbox: carta flottante (.modal--xl), mai a tutto schermo */
.modal--lb .modal__body { padding: 0 14px 14px; gap: 10px; }
.lb__stage { position: relative; display: grid; place-items: center; min-height: 220px; border-radius: var(--r-lg); background: var(--navy-950); overflow: hidden; touch-action: pan-y; }
.lb__img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100svh - 250px); object-fit: contain; }
.lb__nav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--navy-900); box-shadow: var(--shadow-md); }
.lb__prev { left: 12px; } .lb__next { right: 12px; }
@media (hover: hover) { .lb__nav:hover { background: var(--sun); } }
.lb__cap { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 6px; color: var(--muted); font-size: .88rem; } .lb__cap b { color: var(--ink); font-weight: 700; }
.lb__thumbs { position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.lb__thumbs button { flex: none; width: 72px; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: var(--paper-2); opacity: .7; } .lb__thumbs button[aria-current='true'] { border-color: var(--navy-900); opacity: 1; }
.lb__thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* ---- finestra «Chiedi informazioni» / lista d'attesa (inquiry.js) */
.inq { display: grid; gap: 14px; }
.inq .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inq__done { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 14px 0 6px; } .inq__done .i { width: 48px; height: 48px; color: var(--olive); }
.inq__ctx { padding: 12px 16px; border-radius: var(--r-md); background: var(--sea-50); color: var(--navy-800); font-size: .92rem; line-height: 1.45; }

/* contrasto AA: testi piccoli su fondo tinto (le tinte del design system sono pensate per fondi pieni) */
.badge--red { color: #9a3a22; } .badge--green { color: #1d5a3b; } .seats--few, .tcard__next .few { color: #a8412a; }
