/* ==========================================================================
   Travilioo – Pagina tour (Opzione A)
   Used by Views/Home/TourDetail.cshtml inside the main site layout.
   One responsive stylesheet: desktop ≥ 1100 px, tablet 900–1099 px, mobile < 900 px.
   All classes are prefixed "tp-" to avoid clashes with Bootstrap and the theme CSS.
   --tp-top / --tp-sticky-top are updated by tour-page.js when the site header becomes fixed.
   ========================================================================== */

:root {
  --tp-blue: #0b4899;
  --tp-blue-dark: #08356f;
  --tp-blue-soft: #e8f0fb;
  --tp-blue-pale: #dbe7f8;
  --tp-ink: #1d2433;
  --tp-ink-2: #3c4658;
  --tp-muted: #5b6577;
  --tp-line: #e3e7ef;
  --tp-line-2: #eef1f6;
  --tp-line-3: #d3d9e4;
  --tp-bg: #f6f7fb;
  --tp-white: #ffffff;
  --tp-amber: #f5a524;
  --tp-green: #1b6e3c;
  --tp-green-bg: #e4f4ea;
  --tp-green-mid: #9fd3b1;
  --tp-red: #a1281c;
  --tp-red-bg: #fdecea;
  --tp-star: #9a5b00;
  --tp-sea: #aadde6;
  --tp-font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --tp-font-head: "Space Grotesk", var(--tp-font);
  --tp-top: 0px;           /* height of the fixed site header (set by JS) */
  --tp-sticky-top: 72px;   /* site header + section bar + gap (set by JS) */
  --tp-wrap: 1200px;       /* same width as the site header .container */
  --tp-pad: 12px;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
.tp { margin: 0; font-family: var(--tp-font); background: var(--tp-bg); color: var(--tp-ink); -webkit-text-size-adjust: 100%; }
.tp *, .tp *::before, .tp *::after { box-sizing: border-box; }
.tp a { color: var(--tp-blue); }
.tp a:hover { color: var(--tp-blue-dark); }
.tp h1, .tp h2, .tp h3, .tp h4, .tp p { margin: 0; }
.tp h1, .tp h2, .tp h3, .tp h4 { color: var(--tp-ink); font-weight: 700; line-height: 1.25; }
.tp img { max-width: 100%; }
.tp h2 { font-family: var(--tp-font-head); font-size: 22px; line-height: 1.25; }
.tp button { font: inherit; color: inherit; }
.tp :focus-visible { outline: 3px solid var(--tp-amber); outline-offset: 2px; }
.tp [id] { scroll-margin-top: calc(var(--tp-sticky-top) + 12px); }
.tp-wrap { max-width: var(--tp-wrap); margin: 0 auto; padding-left: var(--tp-pad); padding-right: var(--tp-pad); }
.tp-muted { color: var(--tp-muted); font-weight: 500; }
.tp-small { font-size: 13px; }
.tp-xsmall { font-size: 12px; }
.tp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tp-skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--tp-white); padding: 10px 14px; font-weight: 700; }
.tp-skip:focus { top: 8px; }

/* Image placeholder (in production: <img> with fixed width/height or aspect-ratio) */
.tp-ph { background: var(--bg, #c9a46a); }
.tp-ph > span { font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .88); color: var(--tp-ink); border-radius: 6px; padding: 4px 8px; }

/* Icons */
.tp svg { flex: none; }
.tp-ico { width: 18px; height: 18px; fill: none; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.tp-ico--ok { stroke: var(--tp-green); stroke-width: 2.4; }
.tp-ico--no { stroke: var(--tp-red); stroke-width: 2.8; width: 14px; height: 14px; margin-top: 4px; }
.tp-ico--plus { stroke: var(--tp-star); stroke-width: 2.4; width: 16px; height: 16px; }

/* ---------- Buttons ---------- */
.tp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px; border-radius: 10px; border: 1px solid transparent; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; background: transparent; }
.tp a.tp-btn--amber, .tp-btn--amber { background: var(--tp-amber); color: var(--tp-ink); font-weight: 700; }
.tp a.tp-btn--amber:hover { background: #e8961a; color: var(--tp-ink); }
.tp-btn--line-blue, .tp a.tp-btn--line-blue { border-color: var(--tp-blue); color: var(--tp-blue); background: var(--tp-white); }
.tp-btn--line { border-color: var(--tp-line-3); background: var(--tp-white); color: var(--tp-ink); }
.tp-btn--soft { background: var(--tp-blue-soft); color: var(--tp-blue); }
.tp-btn--soft svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.tp-btn--ghost { color: var(--tp-muted); padding-left: 6px; padding-right: 6px; }
.tp-btn--sm { min-height: 40px; padding: 8px 16px; }
.tp-btn--lg { font-size: 16px; padding: 15px; border-radius: 12px; width: 100%; }
.tp-btn--block { width: 100%; border-radius: 12px; }
.tp-btn.disabled { opacity: .65; pointer-events: none; }
.tp-sq { flex: none; width: 44px; height: 44px; border: 1px solid var(--tp-line-3); background: var(--tp-white); border-radius: 10px; font-size: 20px; cursor: pointer; color: var(--tp-ink); }
.tp-sq--blue { border-color: var(--tp-blue); background: var(--tp-blue); color: var(--tp-white); }
.tp-link-strong { font-size: 15px; font-weight: 700; }

/* ---------- Hero slider ---------- */
.tp-hero { position: relative; height: 540px; overflow: hidden; background: var(--tp-ink); }
.tp-slide { position: absolute; inset: 0; display: block; opacity: 0; visibility: hidden; transition: opacity .35s; }
.tp-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tp-hero__empty { background: linear-gradient(135deg, #c9a46a, #4f86a8); }
.tp-slide.is-active { opacity: 1; visibility: visible; }
.tp-hero__arrow { position: absolute; top: 50%; margin-top: -26px; width: 52px; height: 52px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .92); font-size: 26px; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.tp-hero__arrow--prev { left: 24px; }
.tp-hero__arrow--next { right: 24px; }
.tp-hero__dots { position: absolute; left: 0; right: 0; bottom: 20px; display: flex; justify-content: center; gap: 8px; }
.tp-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; cursor: pointer; background: rgba(255, 255, 255, .55); transition: width .2s; }
.tp-dot.is-active { width: 28px; background: var(--tp-white); }
.tp-hero__meta { position: absolute; right: 24px; bottom: 16px; display: flex; gap: 8px; }
.tp-hero__count { background: rgba(29, 36, 51, .75); color: var(--tp-white); border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 600; }
.tp-hero__all { background: var(--tp-white); color: var(--tp-ink); border: 0; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }

/* ---------- Sticky section bar ---------- */
.tp-sections { position: sticky; top: var(--tp-top); z-index: 10; background: var(--tp-white); border-bottom: 1px solid var(--tp-line); }
.tp-sections__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tp-sections__tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tp a.tp-tab { display: block; padding: 16px 12px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--tp-ink-2); border-bottom: 3px solid transparent; }
.tp a.tp-tab.is-active { color: var(--tp-blue); border-bottom-color: var(--tp-blue); }
.tp-sections__cta { display: flex; align-items: center; gap: 14px; padding: 8px 0; font-size: 13px; color: var(--tp-muted); }
.tp-sections__cta b { font-size: 16px; color: var(--tp-ink); }

/* ---------- Breadcrumb ---------- */
.tp-crumbs { padding-top: 16px; font-size: 13px; color: var(--tp-muted); }
.tp-crumbs ol { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.tp-crumbs li + li::before { content: "›"; margin-right: 4px; }
.tp-crumbs a { color: var(--tp-muted) !important; }
.tp-crumbs [aria-current] { color: var(--tp-ink); }

/* ---------- Save / share rail (desktop) ---------- */
.tp-save { position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; background: var(--tp-white); border: 1px solid var(--tp-line); border-left: 0; border-radius: 0 14px 14px 0; box-shadow: 0 8px 24px rgba(16, 32, 64, .14); }
.tp-save__btn { position: relative; width: 52px; height: 52px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tp-save__btn:hover, .tp-save__btn[aria-expanded="true"] { background: var(--tp-bg); }
.tp-save__btn + .tp-save__btn { border-top: 1px solid var(--tp-line-2); }
.tp-save__btn svg, .tp-mbar__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--tp-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[data-wish].is-saved svg { fill: #d64545; stroke: #d64545; }
.tp-share { position: absolute; left: 60px; top: 52px; background: var(--tp-white); border: 1px solid var(--tp-line); border-radius: 12px; box-shadow: 0 10px 28px rgba(16, 32, 64, .18); padding: 6px; display: flex; gap: 4px; }
.tp-share[hidden] { display: none; }
.tp a.tp-share__btn, .tp-share__btn { position: relative; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--tp-ink); text-decoration: none; cursor: pointer; }
.tp a.tp-share__btn:hover, .tp-share__btn:hover { background: var(--tp-bg); color: var(--tp-blue); }
.tp-share__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Tooltip for icon-only buttons (text comes from data-tip; the accessible name is aria-label) */
.tp-tip::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px); background: var(--tp-ink); color: var(--tp-white); font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; padding: 6px 8px; border-radius: 6px; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .15s, transform .15s; z-index: 5; }
.tp-tip:hover::after, .tp-tip:focus-visible::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.tp-save__btn.tp-tip::after { left: calc(100% + 10px); bottom: auto; top: 50%; transform: translate(-4px, -50%); }
.tp-save__btn.tp-tip:hover::after, .tp-save__btn.tp-tip:focus-visible::after { transform: translate(0, -50%); }
.tp-save__btn[aria-expanded="true"].tp-tip::after { display: none; }

/* ---------- Common blocks ---------- */
.tp-box { background: var(--tp-white); border: 1px solid var(--tp-line); padding: 22px 24px; }
.tp-box__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tp-ticks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.5; color: var(--tp-ink-2); }
.tp-ticks li { display: flex; gap: 10px; }
.tp-ticks--2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; color: var(--tp-ink); line-height: 1.45; }
.tp-ticks--clamp:not(.is-all) li:nth-child(n+7) { display: none; } /* text stays in the HTML for Google */
.tp-more { align-self: flex-start; border: 0; background: transparent; padding: 4px 0; font-size: 15px; font-weight: 700; color: var(--tp-blue) !important; cursor: pointer; min-height: 44px; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 600; }
.tp-chip { background: var(--tp-white); border: 1px solid var(--tp-line); border-radius: 999px; padding: 6px 12px; }
.tp-chip--green { background: var(--tp-green-bg); border-color: var(--tp-green-bg); color: var(--tp-green); }
.tp-chip--grey { background: var(--tp-bg); border-color: var(--tp-bg); }
.tp-badge { background: var(--tp-green-bg); color: var(--tp-green); font-size: 12px; font-weight: 700; padding: 2px 8px; white-space: nowrap; }
.tp-star { color: var(--tp-star); }

/* ---------- Block 1: overview + sticky price ---------- */
.tp-intro { padding-top: 20px; display: grid; grid-template-columns: minmax(0, 1fr) 400px; column-gap: 40px; align-items: start; }
.tp-intro__main { min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.tp-overview { display: flex; flex-direction: column; gap: 12px; }
.tp-overview h1 { font-family: var(--tp-font-head); font-size: 40px; line-height: 1.1; }
.tp-places { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--tp-muted); }
.tp-places a { font-weight: 600; }
.tp-trust { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: 14px; color: var(--tp-ink-2); }
.tp-trust > a { font-weight: 600; text-decoration: none; }
.tp-trust a { font-weight: 600; }
.tp-lead { font-size: 18px; line-height: 1.6; }
.tp-overview .tp-link-strong { align-self: flex-start; }
.tp-brief { display: flex; flex-direction: column; gap: 10px; }
.tp-agent { background: var(--tp-white); border: 1px solid var(--tp-line); border-radius: 18px; padding: 18px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.tp-agent__avatar { flex: none; width: 56px; height: 56px; object-fit: cover; border-radius: 999px; background: var(--tp-blue-pale); color: var(--tp-blue); font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.tp-agent__info { flex: 1 1 240px; min-width: 0; }
.tp-agent__name { font-weight: 700; font-size: 16px; }
.tp-agent__small { font-size: 13px; color: var(--tp-muted); }
.tp-agent__small:first-child { font-size: 12px; }
.tp-price { position: sticky; top: var(--tp-sticky-top); display: flex; flex-direction: column; gap: 16px; }
@media (max-height: 760px) { .tp-price { position: static; } } /* short screens: no sticky, so nothing is cut off */
.tp-price .tp-agent { border-radius: 0; padding: 18px 20px; gap: 12px; }
.tp-price .tp-agent .tp-btn { width: 100%; }
.tp-intro__main .tp-brief { background: var(--tp-white); border: 1px solid var(--tp-line); padding: 18px 20px; gap: 12px; }
.tp-intro__main .tp-brief h2 { font-size: 17px; }
.tp-price__box { background: var(--tp-white); border: 1px solid var(--tp-line); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.tp-price__from, .tp-price__note { font-size: 13px; color: var(--tp-muted); }
.tp-price__note { font-size: 12px; }
.tp-price__amount { font-family: var(--tp-font-head); font-size: 34px; font-weight: 700; }
.tp-price__amount span { font-size: 15px; font-weight: 500; color: var(--tp-muted); }
.tp-price__ticks { padding-top: 14px; border-top: 1px solid var(--tp-line-2); font-size: 14px; }

/* ---------- Block 2: itinerary + sticky map ---------- */
.tp-trip { padding-top: 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "head map" "days map"; column-gap: 32px; row-gap: 12px; align-items: start; }
.tp-trip__head { grid-area: head; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tp-trip__head > div { display: flex; flex-direction: column; gap: 2px; }
.tp-trip__head .tp-muted { font-size: 13px; font-weight: 400; }
.tp-trip--nomap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "days"; } /* no map: full container width */
.tp-trip__days { grid-area: days; min-width: 0; display: flex; flex-direction: column; gap: 12px; }

/* Day row */
.tp-day { background: var(--tp-white); border: 1px solid var(--tp-line); overflow: hidden; scroll-margin-top: calc(var(--tp-sticky-top) + 8px); }
.tp-day.is-current { border: 2px solid var(--tp-blue); box-shadow: 0 8px 24px rgba(11, 72, 153, .12); }
.tp-day__h { font-size: inherit; font-weight: inherit; }
.tp-day__btn { display: flex; width: 100%; gap: 16px; align-items: center; text-align: left; background: transparent; border: 0; padding: 12px 16px; cursor: pointer; }
.tp-day__thumb { flex: none; display: block; width: 88px; height: 88px; object-fit: cover; background: var(--tp-blue-pale); }
.tp-day__thumb--empty { display: flex; align-items: center; justify-content: center; font-family: var(--tp-font-head); font-size: 26px; font-weight: 700; color: var(--tp-blue); }
.tp-day.is-current .tp-day__thumb { outline: 3px solid var(--tp-amber); outline-offset: -3px; }
.tp-day__txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.tp-day__title { font-size: 17px; font-weight: 700; color: var(--tp-ink); }
.tp-day__meta { font-size: 14px; color: var(--tp-ink-2); }
.tp-day__meta b { color: var(--tp-ink); }
.tp-day__chev { flex: none; width: 36px; height: 36px; border-radius: 999px; background: var(--tp-bg); display: flex; align-items: center; justify-content: center; transition: transform .2s; }
.tp-day__chev svg { width: 18px; height: 18px; fill: none; stroke: var(--tp-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tp-day.is-open .tp-day__chev { transform: rotate(90deg); }
.tp-day__body { display: none; padding: 4px 20px 20px; flex-direction: column; gap: 16px; } /* closed = hidden with CSS only, text stays in the HTML */
.tp-day.is-open .tp-day__body { display: flex; }
.tp-day__body > p { font-size: 15px; line-height: 1.65; color: var(--tp-ink-2); }
.tp-day__img { display: block; width: 100%; height: 260px; object-fit: cover; }
.tp-day__sub { font-weight: 600; color: var(--tp-ink); }
.tp-day__text { font-size: 15px; line-height: 1.65; color: var(--tp-ink-2); }
.tp-day__text p { margin: 0 0 10px; }
.tp-day__text > :last-child { margin-bottom: 0; }
.tp-day__incl { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tp-day__incl li { display: flex; align-items: center; gap: 6px; background: var(--tp-bg); padding: 6px 10px; font-size: 14px; font-weight: 600; }
.tp-day__incl .tp-ico { margin: 0; width: 16px; height: 16px; }
.tp-facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tp-facts > div { background: var(--tp-bg); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tp-facts dt { font-size: 12px; font-weight: 700; color: var(--tp-muted); text-transform: uppercase; letter-spacing: .04em; }
.tp-facts dd { margin: 0; font-size: 14px; font-weight: 600; }
.tp-day__lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tp-day__lists h4 { margin: 0 0 6px; font-size: 14px; }
.tp-day__lists .tp-ticks { gap: 6px; font-size: 14px; }
.tp-day__lists .tp-ico { width: 16px; height: 16px; }
.tp-day__actions { display: flex; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--tp-line-2); padding-top: 14px; }
.tp-day__actions .tp-btn--ghost { margin-left: auto; }

/* Mobile day picker (hidden on desktop) */
.tp-picker { display: none; }

/* Map */
.tp-map { grid-area: map; position: sticky; top: var(--tp-sticky-top); min-width: 0; background: var(--tp-white); border: 1px solid #d3dceb; overflow: hidden; display: flex; flex-direction: column; }
.tp-map__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--tp-line); flex-wrap: wrap; }
.tp-map__title { font-size: 15px; font-weight: 700; }
.tp-map__sub { font-size: 12px; color: var(--tp-muted); }
.tp-map__hint { font-size: 12px; color: var(--tp-ink-2); }
.tp-map__canvas { position: relative; height: clamp(520px, calc(100vh - var(--tp-sticky-top) - 150px), 800px); background: #e9eef3; overflow: hidden; }
.tp-map__fallback { padding: 16px; font-size: 14px; color: var(--tp-muted); }
.tp-map__fallback ol { margin: 8px 0 0; padding-left: 20px; color: var(--tp-ink-2); }
.tp-map__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tp-map__valley { stroke-width: 16; }
.tp-map__delta { stroke-width: 22; }
.tp-map__label { position: absolute; font-size: 12px; color: #34507a; white-space: nowrap; pointer-events: none; }
.tp-map__label--city { font-size: 13px; font-weight: 700; color: #1f3d6b; }
.tp-map__label--stop { font-weight: 700; color: #1f3d6b; }
.tp-map__label--sea { font-size: 13px; font-style: italic; letter-spacing: .12em; color: #4c6f8f; }
.tp-map__label--water { font-style: italic; color: #4c6f8f; }
.tp-map__label--region { font-size: 13px; font-style: italic; letter-spacing: .2em; color: #a39d8c; }
.tp-map__label--country { font-size: 15px; font-weight: 600; letter-spacing: .35em; color: #a39d8c; }
.tp-pin { position: absolute; left: var(--x); top: var(--y); width: 36px; height: 36px; margin-left: -18px; margin-top: -43px; padding: 0; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid var(--tp-white); background: var(--tp-blue); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(16, 32, 64, .3); transition: width .15s, height .15s; }
.tp-pin span { display: block; width: 13px; height: 13px; border-radius: 999px; background: var(--tp-white); }
.tp-pin.is-active { width: 46px; height: 46px; margin-left: -23px; margin-top: -55px; background: var(--tp-amber); z-index: 2; }
.tp-pin.is-active span { width: 17px; height: 17px; }
.tp-map__tip { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, calc(-100% - 64px)); background: var(--tp-white); border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.4; white-space: nowrap; box-shadow: 0 6px 18px rgba(16, 32, 64, .18); z-index: 3; pointer-events: none; display: flex; flex-direction: column; }
.tp-map__tip span { color: var(--tp-muted); }
.tp-map__zoom { position: absolute; right: 16px; top: 16px; display: flex; flex-direction: column; background: var(--tp-white); border-radius: 12px; box-shadow: 0 6px 18px rgba(16, 32, 64, .12); overflow: hidden; }
.tp-map__zoom button { width: 44px; height: 44px; border: 0; background: var(--tp-white); font-size: 20px; cursor: pointer; }
.tp-map__zoom button + button { border-top: 1px solid var(--tp-line); }
.tp-map__credit { position: absolute; right: 8px; bottom: 6px; font-size: 11px; color: var(--tp-ink-2); background: rgba(255, 255, 255, .8); border-radius: 4px; padding: 2px 6px; }
.tp-map__foot { border-top: 1px solid var(--tp-line); padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.tp-map__n { flex: none; width: 34px; height: 34px; border-radius: 999px; background: var(--tp-amber); font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.tp-map__cur { flex: 1; min-width: 0; }
.tp-map__cur-meta, .tp-map__cur-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-map__cur-meta { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tp-muted); }
.tp-map__cur-title { font-size: 15px; font-weight: 700; }
.tp-map__foot .tp-btn { flex: none; }

/* ---------- Block 3: full-width sections ---------- */
.tp-more-info { padding-top: 56px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 32px; }
.tp-desc { border-radius: 18px; padding: 28px 32px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.tp-desc__text { max-width: 780px; display: flex; flex-direction: column; gap: 12px; }
.tp-desc__text h2 { font-size: 24px; }
.tp-desc__text h3 { margin-top: 8px; font-size: 18px; }
.tp-desc__text p { font-size: 16px; line-height: 1.7; color: var(--tp-ink-2); }
.tp-figures { margin: 0; background: var(--tp-bg); border-radius: 14px; padding: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tp-figures dt { font-size: 12px; font-weight: 700; color: var(--tp-muted); text-transform: uppercase; }
.tp-figures dd { margin: 0; font-size: 16px; font-weight: 700; }
.tp-figures__wide { grid-column: 1 / -1; }
.tp-services { display: flex; flex-direction: column; gap: 14px; }
.tp-services__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.tp-services__grid .tp-box { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.tp-services__h { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.tp-round { width: 28px; height: 28px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.tp-round .tp-ico { margin: 0; width: 16px; height: 16px; }
.tp-round--ok { background: var(--tp-green-bg); }
.tp-round--no { background: var(--tp-red-bg); }
.tp-conds { display: flex; flex-direction: column; gap: 14px; }
.tp-conds__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 36px; border-top: 1px solid var(--tp-line-2); padding-top: 16px; }
.tp-conds__grid h3 { margin-bottom: 6px; font-size: 15px; }
.tp-conds__grid p, .tp-conds__grid .tp-rich { margin-bottom: 8px; font-size: 14px; line-height: 1.65; color: var(--tp-ink-2); }
.tp-faq { display: flex; flex-direction: column; gap: 6px; }
.tp-faq__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.tp-faq__item { border-bottom: 1px solid var(--tp-line-2); }
.tp-faq__item summary { cursor: pointer; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.tp-faq__item summary::-webkit-details-marker { display: none; }
.tp-faq__item summary::after { content: "+"; font-weight: 700; color: var(--tp-blue); }
.tp-faq__item[open] summary::after { content: "−"; }
.tp-faq__item h3 { font-size: 14px; font-weight: 600; }
.tp-faq__item p { margin: 0 0 12px; font-size: 13px; line-height: 1.6; color: var(--tp-ink-2); }
.tp-info { display: flex; flex-direction: column; gap: 14px; }
.tp-info__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 24px; }
.tp-info__grid h3 { margin-bottom: 4px; font-size: 14px; }
.tp-info__grid p { font-size: 13px; line-height: 1.55; color: var(--tp-ink-2); }
.tp-when { border-radius: 18px; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.tp-legend { display: flex; gap: 14px; font-size: 12px; color: var(--tp-ink-2); }
.tp-legend span { display: flex; align-items: center; gap: 6px; }
.tp-legend i { width: 12px; height: 12px; border-radius: 3px; }
.tp-months { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
.tp-month { text-align: center; padding: 10px 0; border-radius: 8px; font-size: 13px; font-weight: 600; }
.tp-month abbr { text-decoration: none; }
.tp-month--3 { background: var(--tp-green); color: var(--tp-white); }
.tp-month--2, .tp-month--1 { background: var(--tp-green-mid); color: #123d22; }
.tp-month--0 { background: var(--tp-line); color: var(--tp-ink-2); }
.tp-reviews { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; align-items: start; }
.tp-reviews__sum { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.tp-reviews__score { font-family: var(--tp-font-head); font-size: 44px; }
.tp-bars { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--tp-ink-2); }
.tp-bar { display: flex; align-items: center; gap: 8px; }
.tp-bar > span:first-child, .tp-bar > span:last-child { width: 28px; }
.tp-bar > span:last-child { text-align: right; }
.tp-bar__track { flex: 1; height: 8px; background: var(--tp-line-2); }
.tp-bar__track span { display: block; height: 8px; background: var(--tp-star); }
.tp-reviews__sum .tp-btn--block { border-radius: 0; }
.tp-reviews__list { display: flex; flex-direction: column; gap: 12px; }
.tp-review { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.tp-review__top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--tp-muted); }
.tp-review__top b { color: var(--tp-ink); }
.tp-review h3 { font-size: 16px; }
.tp-review p { font-size: 14px; line-height: 1.6; color: var(--tp-ink-2); }
.tp-review__reply { background: var(--tp-bg); padding: 10px 12px; font-size: 13px; color: var(--tp-ink-2); }
.tp-guides, .tp-related { display: flex; flex-direction: column; gap: 14px; }
.tp-guides > .tp-link-strong { align-self: flex-start; font-size: 14px; }
.tp-guides__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.tp a.tp-guide { position: relative; display: block; height: 180px; overflow: hidden; text-decoration: none; }
.tp a.tp-guide > span { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px 12px 10px; border-radius: 0; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .7)); color: var(--tp-white); font-size: 14px; font-weight: 700; line-height: 1.25; }
.tp-related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tp-card { background: var(--tp-white); border: 1px solid var(--tp-line); display: flex; flex-direction: column; }
.tp-card__img { height: 160px; }
.tp-card__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.tp-card__tag { font-size: 12px; font-weight: 700; color: var(--tp-blue); text-transform: uppercase; letter-spacing: .04em; }
.tp-card h3 { font-size: 16px; }
.tp-card h3 a { color: var(--tp-ink) !important; text-decoration: none; }
.tp-card__d { font-size: 13px; color: var(--tp-ink-2); }
.tp-card__a { font-size: 13px; color: var(--tp-muted); }
.tp-cta { background: var(--tp-blue); color: var(--tp-white); border-radius: 18px; padding: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.tp-cta__title { font-family: var(--tp-font-head); font-size: 22px; font-weight: 700; }
.tp-cta__sub { font-size: 14px; color: var(--tp-blue-pale); }

.tp-rich { font-size: 15px; line-height: 1.65; color: var(--tp-ink-2); }
.tp-rich p { margin: 0 0 10px; }
.tp-rich ul, .tp-rich ol { margin: 0 0 10px; padding-left: 20px; }
.tp-rich li { margin-bottom: 6px; }
.tp-rich > :last-child { margin-bottom: 0; }
.tp-rich--ok ul, .tp-rich--no ul { list-style: none; padding-left: 0; }
.tp-rich--ok li, .tp-rich--no li { position: relative; padding-left: 26px; }
.tp-rich--ok li::before, .tp-rich--no li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; background-repeat: no-repeat; background-size: contain; }
.tp-rich--ok li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b6e3c' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }
.tp-rich--no li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1281c' stroke-width='2.8' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
[data-clamp-list]:not(.is-all) li:nth-child(n+7) { display: none; } /* text stays in the HTML for Google */
.tp-desc__text .tp-rich { font-size: 16px; line-height: 1.7; }
.tp-conds__wide { grid-column: 1 / -1; }

/* Preview bar (admin / agent "Anteprima") */
.tp-preview { background: #fff6e5; border-bottom: 1px solid #f3d9a4; }
.tp-preview__in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 10px; padding-bottom: 10px; font-size: 14px; color: var(--tp-ink-2); }
.tp-preview__label { background: var(--tp-ink); color: var(--tp-white); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 8px; }
.tp-preview__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.tp-chip--off { background: var(--tp-red-bg); border-color: var(--tp-red-bg); color: var(--tp-red); font-weight: 600; font-size: 13px; }
@media (max-width: 899px) { .tp-preview__text { display: none; } .tp-preview__actions { margin-left: 0; } }

/* Mobile bottom bar (hidden on desktop) */
.tp-mbar { display: none; }

/* ==========================================================================
   Tablet: 900–1099 px
   ========================================================================== */
@media (max-width: 1099px) {
  :root { --tp-pad: 24px; }
  .tp { --tp-pad: 24px; }
  .tp-intro { grid-template-columns: minmax(0, 1fr) 340px; column-gap: 24px; }
  .tp-tab { padding: 14px 8px !important; font-size: 13px !important; }
  .tp-sections__cta { display: none; } /* price card is visible on tablet */
  .tp-map__hint { display: none; }
  .tp-map__foot { gap: 8px; padding: 10px 12px; }
  .tp-map__foot .tp-btn { padding: 8px 10px; font-size: 13px; }
  .tp-info__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tp-guides__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-day__lists { grid-template-columns: 1fr; }
  .tp-conds__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-reviews { grid-template-columns: 280px minmax(0, 1fr); gap: 20px; }
}

/* ==========================================================================
   Mobile: < 900 px  (design: Mobile.dc.html, 390 px)
   ========================================================================== */
@media (max-width: 899px) {
  :root { --tp-pad: 16px; }
  .tp { --tp-pad: 16px; }
  .tp { padding-bottom: 72px; } /* room for the fixed bottom bar */
  .tp h2 { font-size: 20px; }
  .tp [id] { scroll-margin-top: calc(var(--tp-top) + 16px); }


  .tp-hero { height: 240px; }
  .tp-slide { padding: 16px 16px 40px; }
  .tp-slide > span { font-size: 12px; }
  .tp-hero__arrow { width: 44px; height: 44px; margin-top: -22px; font-size: 22px; }
  .tp-hero__arrow--prev { left: 10px; }
  .tp-hero__arrow--next { right: 10px; }
  .tp-hero__dots { bottom: 12px; gap: 6px; }
  .tp-hero__meta { top: 12px; right: 12px; bottom: auto; }
  .tp-hero__count { padding: 4px 10px; font-size: 12px; }
  .tp-hero__all { display: none; }

  .tp-sections, .tp-save { display: none; }
  .tp-crumbs { padding-top: 12px; font-size: 12px; }

  .tp-intro { display: flex; flex-direction: column; padding-top: 10px; }
  .tp-intro__main { gap: 22px; }
  .tp-overview { gap: 10px; }
  .tp-overview h1 { font-size: 26px; line-height: 1.15; }
  .tp-trust { gap: 4px 12px; font-size: 13px; }
  .tp-chips { gap: 6px; font-size: 12px; }
  .tp-chip { padding: 5px 10px; }
  .tp-lead { font-size: 16px; }
  .tp-overview .tp-link-strong { min-height: 44px; display: flex; align-items: center; }
  .tp-ticks--2col { grid-template-columns: 1fr; gap: 8px; }
  .tp-agent { border-radius: 0; padding: 14px; gap: 12px; flex-wrap: nowrap; }
  .tp-agent__avatar { width: 48px; height: 48px; font-size: 16px; }
  .tp-agent .tp-btn { display: none; }
  .tp-intro { gap: 22px; }
  .tp-price { position: static; gap: 22px; }
  .tp-price__box { display: none; } /* price + CTA live in the fixed bottom bar */
  .tp-intro__main .tp-brief { padding: 14px; }

  /* Itinerary: title → map → day picker → days */
  .tp-trip, .tp-trip--nomap { padding-top: 26px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "map" "days"; row-gap: 0; }
  .tp-trip__head { padding-bottom: 10px; flex-wrap: nowrap; }
  .tp-trip__head .tp-muted { display: none; }
  .tp-trip__head .tp-btn { flex: none; min-height: 40px; border-radius: 0; font-size: 13px; padding: 0 12px; white-space: nowrap; }
  .tp-map { position: static; margin: 0 calc(-1 * var(--tp-pad)); border-left: 0; border-right: 0; border-bottom: 0; }
  .tp-map__head { padding: 8px 16px; border-bottom: 0; }
  .tp-map__title, .tp-map__hint { display: none; }
  .tp-map__canvas { height: 340px; }
  .tp-map__valley { stroke-width: 10; }
  .tp-map__delta { stroke-width: 14; }
  .tp-map__label { font-size: 11px; }
  .tp-map__label--minor, .tp-map__zoom, .tp-map__foot, .tp-map__credit { display: none; }
  .tp-map__tip { flex-direction: row; gap: 4px; font-size: 12px; padding: 6px 10px; transform: translate(-50%, calc(-100% - 56px)); }
  .tp-map__tip span::before { content: "· "; }

  .tp-trip__days { gap: 8px; }
  .tp-picker { display: block; margin: 0 calc(-1 * var(--tp-pad)) 4px; background: var(--tp-white); border-top: 1px solid var(--tp-line); border-bottom: 1px solid var(--tp-line); }
  .tp-picker__bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
  .tp-picker .tp-sq { border-radius: 0; }
  .tp-picker__toggle { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--tp-blue); background: #f2f7fe; padding: 0 12px; display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; }
  .tp-picker__pos { flex: none; font-size: 12px; font-weight: 700; color: var(--tp-blue); }
  .tp-picker__label { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tp-picker__toggle[aria-expanded="true"] > span:last-child { transform: rotate(180deg); }
  .tp-picker__list { margin: 0; padding: 0 12px 12px; list-style: none; max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
  .tp-picker__list[hidden] { display: none; }
  .tp-picker__list button { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 8px; text-align: left; border: 1px solid var(--tp-line); background: var(--tp-white); padding: 0 10px; cursor: pointer; }
  .tp-picker__list button[aria-current="true"] { border-color: var(--tp-blue); background: #f2f7fe; }
  .tp-picker__list button span:first-child { flex: none; width: 74px; font-size: 13px; font-weight: 700; color: var(--tp-blue); }
  .tp-picker__list button span:last-child { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .tp-day { scroll-margin-top: calc(var(--tp-top) + 16px); }
  .tp-day__btn { gap: 12px; padding: 10px; }
  .tp-day__thumb { width: 64px; height: 64px; }
  .tp-day__title { font-size: 15px; }
  .tp-day__meta { font-size: 13px; }
  .tp-day__chev { width: 32px; height: 32px; }
  .tp-day__body { padding: 4px 12px 14px; gap: 12px; }
  .tp-day__body > p { font-size: 14px; line-height: 1.6; }
  .tp-day__img { height: 190px; }
  .tp-day__text { font-size: 14px; line-height: 1.6; }
  .tp-facts { gap: 6px; }
  .tp-facts > div { border-radius: 0; padding: 8px 10px; }
  .tp-facts dt { font-size: 11px; }
  .tp-facts dd { font-size: 13px; }
  .tp-day__actions [data-act="map"], .tp-day__actions [data-act="close"] { display: none; }
  .tp-day__actions [data-act="next"] { width: 100%; border-radius: 0; }

  .tp-more-info { padding-top: 30px; padding-bottom: 32px; gap: 26px; }
  .tp-box { padding: 18px 16px; }
  .tp-desc { border-radius: 0; grid-template-columns: 1fr; gap: 14px; }
  .tp-desc__text { gap: 10px; }
  .tp-desc__text h2 { font-size: 20px; }
  .tp-desc__text p { font-size: 15px; line-height: 1.65; }
  .tp-figures { border-radius: 0; padding: 14px; gap: 12px; }
  .tp-figures dd { font-size: 14px; }
  .tp-services__grid { grid-template-columns: 1fr; }
  .tp-services__grid .tp-box { padding: 16px; }
  .tp-ticks { font-size: 14px; }
  .tp-conds__grid { grid-template-columns: 1fr; gap: 14px; }
  .tp-faq__grid { grid-template-columns: 1fr; }
  .tp-faq__item summary { min-height: 44px; align-items: center; }
  .tp-info__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
  .tp-when { border-radius: 0; padding: 18px 16px; }
  .tp-legend { flex-wrap: wrap; gap: 8px 12px; }
  .tp-months { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tp-reviews { grid-template-columns: 1fr; gap: 12px; }
  .tp-reviews__list .tp-review:nth-child(n+2) { display: none; } /* mobile shows 1 review + link */
  .tp-guides__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tp a.tp-guide { height: 110px; }
  .tp a.tp-guide > span { font-size: 13px; padding: 24px 10px 8px; }
  .tp-related__grid { grid-template-columns: 1fr; gap: 12px; }
  .tp-cta { border-radius: 0; padding: 18px 16px; }
  .tp-cta .tp-btn { width: 100%; }

  /* Fixed bottom bar */
  .tp-mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; align-items: center; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--tp-white); border-top: 1px solid var(--tp-line); box-shadow: 0 -6px 18px rgba(16, 32, 64, .08); }
  .tp-mbar__price { flex: 1; font-size: 12px; color: var(--tp-muted); }
  .tp-mbar__price b { font-family: var(--tp-font-head); font-size: 20px; color: var(--tp-ink); }
  .tp-mbar__icon { flex: none; width: 44px; height: 44px; border: 1px solid var(--tp-line-3); background: var(--tp-white); display: flex; align-items: center; justify-content: center; cursor: pointer; }
  .tp-mbar .tp-btn { border-radius: 0; padding: 10px 18px; }
}
