/* ===========================================================================
   THEME B — "How it works" illustrato (template-parts/how-it-works-b.php)
   ---------------------------------------------------------------------------
   Stampato inline dal template part la prima volta che compare in pagina
   (home e pagine con lo shortcode [how_it_works]). Niente screenshot dell'app:
   scelta del veicolo, tabellone arrivi con cartello, mappa del percorso.
   =========================================================================== */

/* ===== How it works (template-parts/how-it-works-visual.php) ===== */
body.tf-theme-b .tf-journey-steps {
  background: var(--b-base);
  color: var(--b-text);
  padding: 120px 0 0;
}
body.tf-theme-b .tf-section-heading {
  margin-bottom: 44px;
}
body.tf-theme-b .tf-section-heading h2 {
  color: var(--b-text);
  font-size: clamp(32px, 3.8vw, 52px);
  line-height: 1.02;
}
body.tf-theme-b .tf-eyebrow {
  color: var(--b-ter);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
body.tf-theme-b .tf-section-intro {
  color: var(--b-sec);
  font-size: 17px;
}
/* Taller panels: more of the app screen is visible. */
body.tf-theme-b .tf-step-media {
  aspect-ratio: 0.8;
  background: var(--b-raised);
  border: 1px solid var(--b-hair);
  border-radius: 16px;
}
body.tf-theme-b .tf-phone {
  width: 72%;
  max-width: 320px;
  margin-top: 34px;
  transform: none;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.14);
}
body.tf-theme-b .tf-step-card:hover .tf-phone {
  transform: translateY(-4px);
}
body.tf-theme-b .tf-step-copy {
  padding-top: 24px;
}
body.tf-theme-b .tf-step-copy h3 {
  color: var(--b-text);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.012em;
}
body.tf-theme-b .tf-step-copy h3 > span {
  color: var(--b-ter);
}
body.tf-theme-b .tf-step-copy p {
  color: var(--b-sec);
  font-size: 16px;
}

/* ===== How it works — illustrated process (template-parts/how-it-works-b.php) =====
   No app screenshots: the vehicle choice, an arrivals board with the name sign and
   the street-grid route map. Sizes are in cqw (the panel is an inline-size
   container), so every mockup scales with its card. */
body.tf-theme-b .tfb-mock {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 62%),
    var(--b-mock);
}

/* 1 — Scelta del veicolo: la tratta e tre classi col prezzo fisso reale (Economy
   selezionata), come nel passo di prenotazione. Nessun pulsante: e' un'illustrazione,
   non deve sembrare da premere. Scheda scura in tema scuro e bianca in chiaro, come il
   widget di ricerca. Misure in cqw: scala con la card (desktop ~420px, telefono ~300px). */
body.tf-theme-b .tfb-pick {
  --pk-ter: rgba(242, 241, 238, 0.6);
  --pk-hair: rgba(255, 255, 255, 0.1);
  --pk-line: rgba(255, 255, 255, 0.2);
  --pk-img: rgba(255, 255, 255, 0.13);
  --pk-on: rgba(255, 255, 255, 0.05);
  width: 84%;
  box-sizing: border-box;
  padding: 4.6cqw;
  border-radius: 4cqw;
  background: #212125;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6cqw 11cqw rgba(0, 0, 0, 0.55);
  color: #f2f1ee;
  font-size: max(11px, 3.4cqw);
  line-height: 1.25;
  text-align: left;
  transition: transform 0.45s ease;
}
html[data-tf-theme="light"] body.tf-theme-b .tfb-pick {
  --pk-ter: rgba(18, 17, 16, 0.6);
  --pk-hair: rgba(18, 17, 16, 0.1);
  --pk-line: rgba(18, 17, 16, 0.2);
  --pk-img: #f3f2ee;
  --pk-on: rgba(18, 17, 16, 0.02);
  background: #fff;
  border-color: rgba(18, 17, 16, 0.08);
  box-shadow: 0 5.5cqw 10cqw rgba(18, 17, 16, 0.14);
  color: #121110;
}
body.tf-theme-b .tf-step-card:hover .tfb-pick {
  transform: translateY(-4px);
}
body.tf-theme-b .tfb-pick-route {
  display: flex;
  gap: 2.7cqw;
}
body.tf-theme-b .tfb-pick-rail {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.9cqw 0;
}
body.tf-theme-b .tfb-pick-rail i {
  display: block;
  width: 2.3cqw;
  height: 2.3cqw;
  box-sizing: border-box;
  border-radius: 50%;
  background: currentColor;
}
body.tf-theme-b .tfb-pick-rail i:first-child {
  background: none;
  border: max(1.5px, 0.45cqw) solid var(--pk-ter);
}
body.tf-theme-b .tfb-pick-rail i:nth-child(2) {
  flex: 1 1 auto;
  width: max(1.5px, 0.45cqw);
  height: auto;
  min-height: 3cqw;
  margin: 0.9cqw 0;
  border-radius: 0;
  background: var(--pk-line);
}
body.tf-theme-b .tfb-pick-stops {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3.2cqw;
}
body.tf-theme-b .tfb-pick-stop {
  font-weight: 600;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.tf-theme-b .tfb-pick-when,
body.tf-theme-b .tfb-pick-cap {
  display: flex;
  align-items: center;
  gap: 1.2cqw;
  color: var(--pk-ter);
  font-variant-numeric: tabular-nums;
}
body.tf-theme-b .tfb-pick-when {
  margin: 2.3cqw 0 0;
  font-size: max(10.5px, 2.95cqw);
}
body.tf-theme-b .tfb-pick-when svg,
body.tf-theme-b .tfb-pick-cap svg {
  flex: none;
  width: 1.15em;
  height: 1.15em;
}
body.tf-theme-b .tfb-pick-cap svg:not(:first-child) {
  margin-left: 1.4cqw;
}
body.tf-theme-b .tfb-pick-list {
  list-style: none;
  margin: 3.6cqw 0 0;
  padding: 3.6cqw 0 0;
  border-top: 1px solid var(--pk-hair);
  display: flex;
  flex-direction: column;
  gap: 1.8cqw;
}
body.tf-theme-b .tfb-pick-car {
  display: flex;
  align-items: center;
  gap: 2.7cqw;
  margin: 0;
  padding: 2cqw 3cqw 2cqw 2cqw;
  border-radius: 2.7cqw;
  border: 1px solid var(--pk-hair);
}
body.tf-theme-b .tfb-pick-car.is-on {
  border: 1.5px solid currentColor;
  background: var(--pk-on);
  padding: calc(2cqw - 0.5px) calc(3cqw - 0.5px) calc(2cqw - 0.5px) calc(2cqw - 0.5px);
}
body.tf-theme-b .tfb-pick-img {
  flex: none;
  width: 17.7cqw;
  height: 11.4cqw;
  border-radius: 2cqw;
  background: var(--pk-img);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
body.tf-theme-b .tfb-pick-img img {
  display: block;
  width: 92%;
  height: 92%;
  object-fit: contain;
}
body.tf-theme-b .tfb-pick-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7cqw;
}
body.tf-theme-b .tfb-pick-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.tf-theme-b .tfb-pick-cap {
  font-size: max(10px, 2.85cqw);
}
body.tf-theme-b .tfb-pick-price {
  flex: none;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
body.tf-theme-b .tfb-pick-note {
  margin: 3.6cqw 0 0;
  text-align: center;
  font-size: max(10px, 2.75cqw);
  line-height: 1.35;
  color: var(--pk-ter);
}

/* 2 — Arrivals board + name sign */
body.tf-theme-b .tfb-mock--arrivals {
  flex-direction: column;
  /* % (not cqw): cqw on the container itself would resolve against the viewport. */
  padding: 0 7%;
}
body.tf-theme-b .tfb-board {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 4cqw 4cqw 2.4cqw;
  border-radius: 12px;
  background: #0c0c0e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.85);
}
body.tf-theme-b .tfb-board-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2.4cqw;
  font-size: 3cqw;
  font-weight: 600;
  color: rgba(242, 241, 238, 0.62); /* il tabellone e' scuro anche in modalita' chiara */
  font-variant-numeric: tabular-nums;
}
body.tf-theme-b .tfb-board-row {
  display: flex;
  justify-content: space-between;
  gap: 2.4cqw;
  padding: 1.8cqw 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
body.tf-theme-b .tfb-board-cell {
  display: flex;
  gap: 0.45cqw;
}
body.tf-theme-b .tfb-board-cell--city {
  flex: 1 1 auto;
}
body.tf-theme-b .tfb-flap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 3.3cqw;
  height: 5cqw;
  border-radius: 2px;
  background: linear-gradient(180deg, #1e1e22 0 49%, #18181b 51% 100%);
  color: rgba(242, 241, 238, 0.5);
  font-size: 3.1cqw;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
body.tf-theme-b .tfb-flap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.65);
}
body.tf-theme-b .tfb-board-row.is-on .tfb-flap {
  color: #f2f1ee;
}
body.tf-theme-b .tfb-sign {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.4cqw;
  width: 70%;
  margin-top: -3cqw;
  padding: 5.5cqw 5cqw 4.5cqw;
  border-radius: 10px;
  background: #f7f6f2;
  color: #121110;
  text-align: center;
  transform: rotate(3deg) translateY(5cqw);
  box-shadow: 0 34px 60px -24px rgba(0, 0, 0, 0.8);
  transition: transform 0.45s ease;
}
body.tf-theme-b .tf-step-card:hover .tfb-sign {
  transform: rotate(1deg) translateY(3cqw);
}
body.tf-theme-b .tfb-sign-logo {
  display: block;
  width: auto;
  height: 3.2cqw;
}
body.tf-theme-b .tfb-sign-name {
  font-stretch: 112%;
  font-weight: 600;
  font-size: 9.5cqw;
  line-height: 1;
  letter-spacing: -0.01em;
}
body.tf-theme-b .tfb-sign-meta {
  font-size: 2.8cqw;
  color: #6b6760;
}

/* 3 — Route map (street grid + amber route: the one accent of this section) */
body.tf-theme-b .tfb-mock--route {
  display: block;
  padding: 0;
}
body.tf-theme-b .tfb-map {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
body.tf-theme-b .tfb-map-blocks rect {
  fill: rgba(255, 255, 255, 0.035);
}
body.tf-theme-b .tfb-map-blocks rect.t1 {
  fill: rgba(255, 255, 255, 0.05);
}
body.tf-theme-b .tfb-map-blocks rect.t2 {
  fill: rgba(255, 255, 255, 0.025);
}
body.tf-theme-b .tfb-map-streets path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1.5;
}
body.tf-theme-b .tfb-map-avenues path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.11);
  stroke-width: 6;
}
body.tf-theme-b .tfb-route-glow {
  fill: none;
  stroke: rgba(249, 180, 66, 0.16);
  stroke-width: 14;
  stroke-linejoin: round;
  stroke-linecap: round;
}
body.tf-theme-b .tfb-route {
  fill: none;
  stroke: var(--b-gold);
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
}
body.tf-theme-b .tfb-map-start {
  fill: #f2f1ee;
}
body.tf-theme-b .tfb-map-start-ic path {
  fill: none;
  stroke: #0b0b0c;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
body.tf-theme-b .tfb-map-halo {
  fill: rgba(249, 180, 66, 0.12);
}
body.tf-theme-b .tfb-map-halo--2 {
  fill: rgba(249, 180, 66, 0.24);
}
body.tf-theme-b .tfb-map-end {
  fill: var(--b-gold);
}
body.tf-theme-b .tfb-map-car circle,
body.tf-theme-b .tfb-map-car-static circle {
  fill: #f2f1ee;
}
body.tf-theme-b .tfb-map-car circle.tfb-map-car-core,
body.tf-theme-b .tfb-map-car-static circle.tfb-map-car-core {
  fill: #0b0b0c;
}
body.tf-theme-b .tfb-map-car-static {
  display: none;
}
body.tf-theme-b .tfb-map-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 1.4cqw;
  padding: 18cqw 7cqw 6.5cqw;
  background: linear-gradient(180deg, transparent 0%, var(--b-mock) 58%);
}
body.tf-theme-b .tfb-map-dest {
  font-stretch: 112%;
  font-weight: 600;
  font-size: 6.4cqw;
  line-height: 1.05;
  color: var(--b-text);
}
body.tf-theme-b .tfb-map-eta {
  font-size: 3.4cqw;
  color: var(--b-sec);
  font-variant-numeric: tabular-nums;
}
/* Map in light mode: dark ink on the light panel. */
html[data-tf-theme="light"] body.tf-theme-b .tfb-map-blocks rect {
  fill: rgba(18, 17, 16, 0.05);
}
html[data-tf-theme="light"] body.tf-theme-b .tfb-map-blocks rect.t1 {
  fill: rgba(18, 17, 16, 0.07);
}
html[data-tf-theme="light"] body.tf-theme-b .tfb-map-blocks rect.t2 {
  fill: rgba(18, 17, 16, 0.035);
}
html[data-tf-theme="light"] body.tf-theme-b .tfb-map-streets path {
  stroke: rgba(18, 17, 16, 0.08);
}
html[data-tf-theme="light"] body.tf-theme-b .tfb-map-avenues path {
  stroke: rgba(18, 17, 16, 0.12);
}
html[data-tf-theme="light"] body.tf-theme-b .tfb-map-start,
html[data-tf-theme="light"] body.tf-theme-b .tfb-map-car circle,
html[data-tf-theme="light"] body.tf-theme-b .tfb-map-car-static circle {
  fill: #121110;
}
html[data-tf-theme="light"] body.tf-theme-b .tfb-map-start-ic path {
  stroke: #fff;
}
html[data-tf-theme="light"] body.tf-theme-b .tfb-map-car circle.tfb-map-car-core,
html[data-tf-theme="light"] body.tf-theme-b .tfb-map-car-static circle.tfb-map-car-core {
  fill: #fff;
}
@media (prefers-reduced-motion: reduce) {
  body.tf-theme-b .tfb-map-car {
    display: none;
  }
  body.tf-theme-b .tfb-map-car-static {
    display: inline;
  }
  body.tf-theme-b .tfb-pick,
  body.tf-theme-b .tfb-sign {
    transition: none;
  }
}

/* Dentro le altre pagine ([how_it_works]): padding simmetrico. */
/* Home in tema scuro: la sezione segue subito la hero (stesso nero), meno spazio sopra. */
html:not([data-tf-theme="light"]) body.tf-theme-b.tf-home-b .tfb-hiw:not(.tfb-hiw--inline) {
  padding-top: 96px;
}
/* Dentro le pagine: stesso ritmo delle sezioni dei template (py-14 / sm:py-20). */
body.tf-theme-b .tfb-hiw--inline {
  padding: 80px 0;
}
@media (max-width: 700px) {
  body.tf-theme-b .tf-journey-steps {
    padding-top: 72px;
  }
  body.tf-theme-b .tfb-hiw--inline {
    padding: 56px 0;
  }
  body.tf-theme-b .tf-step-media {
    aspect-ratio: 0.86;
  }
}
