/* Option A: preserve the booking engine and CMS content beneath ItaliaPass. */
body.path-frontpage .wp-homepage .ir-bookingwidget.bookingwidget-paragraph .main-form-area {
  aspect-ratio: auto;
  min-height: 0;
  height: auto !important;
  display: block;
  padding: 72px 32px 120px !important;
  background-color: #24253d;
}
body.path-frontpage .options-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 32px;
  padding-bottom: 0;
  color: #fff;
  text-align: left;
}
body.path-frontpage .wp-homepage .bookingwidget-paragraph .main-form-area .options-hero h1 {
  font-size: 40px;
  font-weight: 400 !important;
  line-height: 1.2;
  margin: 0 0 16px;
  text-align: left;
}
body.path-frontpage .options-phrase { color: #70cbbd; font-weight: 600; }
body.path-frontpage .options-extras { font-size: 16px; line-height: 24px; }
body.path-frontpage .options-extras p { margin: 0 0 4px; font-weight: 600; }
body.path-frontpage .options-extras ul { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; padding: 0; margin: 0; }
body.path-frontpage .options-extras li::before { content: '✓'; color: #70cbbd; margin-right: 8px; }
body.path-frontpage .options-review { margin: 0; }
body.path-frontpage .options-stars { color: #f6b301; font-size: 16px; line-height: 24px; letter-spacing: 2px; margin-bottom: 8px; }
body.path-frontpage .options-review blockquote { border: 0; padding: 0; margin: 0 0 8px; color: #fff; font-size: 16px; line-height: 1.5; }
body.path-frontpage .options-review figcaption { font-size: 16px; line-height: 24px; color: #d6d6da; }
body.path-frontpage .wp-homepage #itinerary.card { border-radius: 8px; min-height: 80px; }
body.path-frontpage .wp-homepage #itinerary #submitButton { background: #ff0068 !important; }
body.path-frontpage .wp-homepage #itinerary #submitButton:hover { background: #ab0232 !important; }
body.path-frontpage .wp-home-routes { padding-top: 88px; padding-bottom: 48px; }
body.path-frontpage .options-routes-intro { color: #585a69; margin: -8px 0 24px; max-width: 760px; font-size: 16px; line-height: 1.5; }
body.path-frontpage .wp-home-benefits { padding: 40px 0; border-bottom: 0; }
body.path-frontpage .wp-home-benefits h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
body.path-frontpage .wp-home-benefits__grid article { min-height: 0; }
body.path-frontpage .wp-route-pass { padding: 16px; background: #edf9f8; color: #0d4e47; font-size: 14px; line-height: 20px; }
body.path-frontpage .wp-route-pass strong { display: block; margin-bottom: 4px; }
@media (min-width: 1025px) {
  body.path-frontpage .wp-homepage #itinerary.card { grid-template-columns: minmax(300px, 2fr) minmax(150px, .8fr) minmax(160px, .8fr) 144px; }
  body.path-frontpage .wp-homepage #itinerary .faresearch-form-right { grid-column: 2; grid-row: 1; }
  body.path-frontpage .wp-homepage #itinerary .passengers_toggle_group { grid-column: 3; grid-row: 1; }
}
@media (max-width: 1024px) {
  body.path-frontpage .wp-homepage .ir-bookingwidget.bookingwidget-paragraph .main-form-area { padding: 40px 24px 0 !important; }
  body.path-frontpage .options-hero { grid-template-columns: 1fr; gap: 0; padding-bottom: 32px; }
  body.path-frontpage .options-review { display: none; }
  body.path-frontpage .wp-homepage .bookingwidget-paragraph .booking_panel { position: relative; inset: auto; width: 100%; }
  body.path-frontpage .wp-homepage .bookingwidget-paragraph .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary.card { transform: translateY(24px); border-radius: 8px; }
  body.path-frontpage .wp-home-routes { padding-top: 64px; }
}
@media (max-width: 767px) {
  body.path-frontpage .wp-homepage .ir-bookingwidget.bookingwidget-paragraph .main-form-area { padding: 32px 16px 0 !important; }
  body.path-frontpage .wp-homepage .bookingwidget-paragraph .main-form-area .options-hero h1 { font-size: clamp(28px, 7vw, 36px); margin-bottom: 16px; }
  body.path-frontpage .options-extras { font-size: 14px; line-height: 20px; }
  body.path-frontpage .options-extras ul { gap: 4px 16px; }
  body.path-frontpage .wp-homepage #itinerary.card { min-height: 0; }
  body.path-frontpage .wp-home-section-title h2 { font-size: 26px; }
}

/* Use the photograph supplied with Option A at every breakpoint. */
body.path-frontpage .wp-homepage .ir-bookingwidget.bookingwidget-paragraph .main-form-area {
  background-image: linear-gradient(180deg, rgba(36,37,61,.62), rgba(36,37,61,.66)), url("../img/figma/options-hero.webp") !important;
  background-size: cover;
  background-position: center 45%;
}
body.path-frontpage .wp-homepage .bookingwidget-paragraph .booking_center {
  height: auto !important;
  width: 100%;
  max-width: 1312px;
}
/* Benefit strips add content below the original fixed-ratio route carousel. */
body.path-frontpage .wp-home-sections .wp-home-routes .popular-train-routes {
  aspect-ratio: auto;
  height: auto;
}
@media (max-width: 767px) {
  body.path-frontpage .wp-homepage .ir-bookingwidget.bookingwidget-paragraph .main-form-area {
    background-color: #f3f3f6;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
  }
  body.path-frontpage .wp-homepage #itinerary .faresearch-form-right { grid-row: 2; }
  body.path-frontpage .wp-homepage #itinerary .passengers_toggle_group { grid-row: 3; }
}
@media (max-width: 767px) {
  body.path-frontpage .wp-homepage #itinerary .faresearch-form-left { order: 0; }
  body.path-frontpage .wp-homepage #itinerary .faresearch-form-right { order: 1; }
  body.path-frontpage .wp-homepage #itinerary .passengers_toggle_group { order: 2; }
  body.path-frontpage .wp-homepage #itinerary .submit-button { order: 3; }
}

/* Keep the complete headline on one line; JS fits its widest phrase. */
body.path-frontpage .wp-homepage .bookingwidget-paragraph .main-form-area .options-hero h1 {
  font-size: var(--options-headline-size, clamp(13px, 2.15vw, 40px));
  white-space: nowrap;
}
body.path-frontpage .options-hero-copy { min-width: 0; }
body.path-frontpage .options-phrase {
  display: inline-block;
  position: relative;
  vertical-align: top;
  height: 1.2em;
  overflow: hidden;
  white-space: nowrap;
  transition: width .7s cubic-bezier(.2,.7,.2,1);
}
body.path-frontpage .options-word {
  position: absolute;
  left: 0;
  top: 0;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(105%);
  transition: transform .9s cubic-bezier(.2,.7,.2,1), opacity .7s;
}
body.path-frontpage .options-word.is-in { opacity: 1; transform: translateY(0); }
body.path-frontpage .options-word.is-out { opacity: 0; transform: translateY(-105%); }
body.path-frontpage .options-review-slides { display: grid; }
body.path-frontpage .options-review-slide {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease, visibility 0s linear .6s;
}
body.path-frontpage .options-review-slide.is-on { opacity: 1; visibility: visible; transition: opacity .6s ease; }
body.path-frontpage .options-review-dots { display: flex; align-items: center; margin: 8px 0 0 -8px; }
body.path-frontpage .options-review-dot { display: grid; place-items: center; width: 32px; height: 44px; border: 0; background: transparent; padding: 0; }
body.path-frontpage .options-review-dot::before { content: ''; width: 8px; height: 8px; border-radius: 99px; background: #91929e; transition: width .2s, background-color .2s; }
body.path-frontpage .options-review-dot:hover::before { background: white; }
body.path-frontpage .options-review-dot[aria-current="true"]::before { width: 16px; background: white; }
body.path-frontpage .options-review-dot:focus-visible { outline: 2px solid #66b2eb; outline-offset: 0; }
@media (prefers-reduced-motion: reduce) {
  body.path-frontpage .options-word,
  body.path-frontpage .options-phrase,
  body.path-frontpage .options-review-slide { transition: none; }
}

/* Stretch every route to the tallest card while Slick retains its swipe track. */
body.path-frontpage .wp-home-routes .popular-train-routes .slick-track {
  display: flex !important;
  align-items: stretch;
}
body.path-frontpage .wp-home-routes .popular-train-routes .slick-track::before,
body.path-frontpage .wp-home-routes .popular-train-routes .slick-track::after { content: none; }
body.path-frontpage .wp-home-routes .popular-train-routes .slick-slide {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  height: auto;
}
body.path-frontpage .wp-home-routes .popular-train-routes .slick-slide .pr-teaser { flex: 1 0 auto; }

/* Leave room inside Slick's clipping viewport for resting and hover shadows. */
body.path-frontpage .wp-home-routes .popular-train-routes .slick-list {
  padding: 4px 0 20px !important;
}

/* Option A route section. */
body.path-frontpage .options-routes-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
body.path-frontpage .options-routes-heading h2 { color: #24253d; font-size: 32px; line-height: 40px; font-weight: 400; margin: 0; }
body.path-frontpage .options-routes-heading .wp-home-route-tabs { display: flex; align-items: center; gap: 24px; position: static; margin: 0; padding: 2px; border: 0; width: auto; }
body.path-frontpage .options-routes-heading .wp-home-route-tabs ul { display: flex; flex-wrap: nowrap; gap: 8px; margin: 0; padding: 0; }
body.path-frontpage .options-routes-heading .wp-home-route-tabs .pr-tab { background: white; border: 0; border-radius: 999px; box-shadow: inset 0 0 0 1px #c8c8ce; min-height: 40px; padding: 0 16px; font-size: 14px; line-height: 20px; color: #0a7ac4; }
body.path-frontpage .options-routes-heading .wp-home-route-tabs .pr-tab[aria-selected="true"] { background: #23527c; color: white; box-shadow: none; }
body.path-frontpage .options-routes-heading .wp-home-route-tabs .pr-tab:focus-visible { outline: none; box-shadow: 0 0 0 4px #66b2eb; }
body.path-frontpage .options-routes-all { color: #0a7ac4; font-size: 16px; font-weight: 600; white-space: nowrap; text-decoration: none; }
body.path-frontpage .options-pass-tip { position: relative; display: inline-block; }
body.path-frontpage .options-pass-term { font: inherit; color: inherit; padding: 0; border: 0; background: transparent; text-decoration: underline dotted; text-underline-offset: 5px; }
body.path-frontpage .options-pass-description { display: flex; flex-direction: column; gap: 8px; position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translateX(-50%); width: 320px; max-width: calc(100vw - 32px); padding: 16px; border-radius: 4px; background: #23527c; color: white; text-align: center; font-size: 14px; line-height: 24px; font-weight: 400; z-index: 2147483500; box-shadow: 0 2px 6px #14273933; }
body.path-frontpage .options-pass-description[hidden] { display: none; }
body.path-frontpage .options-pass-description::after { content: ''; position: absolute; top: 100%; left: 50%; margin-left: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: #23527c; }
body.path-frontpage .options-pass-description strong { font-size: 16px; }
body.path-frontpage .options-pass-description a { color: #b4dcf9; font-weight: 600; }
body.path-frontpage .wp-home-routes .pr-teaser { display: flex; flex-direction: column; border: 0; border-radius: 8px; box-shadow: 0 1px 3px #14273933, 0 2px 2px #1427391f; }
body.path-frontpage .wp-home-routes .pr-image { height: 120px; }
body.path-frontpage .wp-home-routes .wp-route-title { font-size: 16px; line-height: 24px; padding: 24px 12px 16px; }
body.path-frontpage .wp-home-routes .pr-arrow { color: white; }
body.path-frontpage .wp-home-routes .pr-info { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 16px; min-height: 48px; }
body.path-frontpage .wp-home-routes .wp-route-duration { display: inline-flex !important; align-items: center; gap: 8px; color: #585a69; font-size: 14px; }
body.path-frontpage .options-duration-icon { flex: none; }
body.path-frontpage .wp-home-routes .pr-info .price.exchange { font-size: 24px; line-height: 32px; font-weight: 600; white-space: nowrap; }
body.path-frontpage .wp-home-routes .pr-info .price.exchange::before { font-size: 12px; font-weight: 400; color: #585a69; }
body.path-frontpage .wp-home-routes .wp-route-pass { flex: 1; border-top: 1px solid #e4e4e7; background: #edf9f8; padding: 16px; }
body.path-frontpage .wp-route-pass-heading { font-weight: 600; color: #008576; font-size: 14px; line-height: 20px; margin: 0 0 8px; }
body.path-frontpage .wp-route-pass-description { color: #24253d; font-size: 14px; line-height: 24px; min-height: 48px; margin: 0; }
@media (max-width: 767px) {
  body.path-frontpage .options-routes-heading { display: block; }
  body.path-frontpage .options-routes-heading h2 { font-size: 24px; line-height: 32px; margin-bottom: 16px; }
  body.path-frontpage .options-routes-heading .wp-home-route-tabs { overflow-x: auto; gap: 16px; padding: 4px; margin: -4px -8px -4px -4px; scrollbar-width: none; }
  body.path-frontpage .options-routes-heading .wp-home-route-tabs ul { flex: none; }
  body.path-frontpage .wp-home-routes .popular-train-routes .views-row { width: min(304px, calc(100vw - 64px)) !important; }
  body.path-frontpage .wp-home-routes .popular-train-routes .slick-list { margin-right: -12px; }
  body.path-frontpage .options-pass-description { left: auto; right: -8px; transform: none; }
  body.path-frontpage .options-pass-description::after { left: auto; right: 24px; }
}

body.path-frontpage .options-pass-description::after { left: var(--options-tip-arrow, 50%); right: auto; margin-left: -8px; }

/* The translated booking card creates a stacking context. Raise that context,
 * not just its dropdowns, above the route heading, cards and ItaliaPass tip. */
body.path-frontpage .wp-homepage .bookingwidget-paragraph #itinerary.card {
  z-index: 12000;
}
body.path-frontpage .wp-homepage #itinerary.card:focus-within {
  z-index: 2147483000;
}
body.path-frontpage .wp-homepage #faresearch-left-departure:focus-within,
body.path-frontpage .wp-homepage #faresearch-right-arrival:focus-within {
  z-index: 12020 !important;
}
/* jQuery UI appends typed station results to body, outside the raised card. */
body.path-frontpage .ui-autocomplete.ui-front,
body.path-frontpage.wp-home-booking-sticky-active > .ui-autocomplete.ui-front,
body.path-frontpage.wp-home-booking-sticky-active > .ui-autocomplete.ui-menu {
  z-index: 2147483647 !important;
}

/* Keep the route index beside the chips on desktop; omit it on mobile. */
body.path-frontpage .options-routes-heading .wp-home-route-tabs {
  display: flex;
  gap: 16px;
  overflow: visible;
}
@media (max-width: 767px) {
  body.path-frontpage .options-routes-heading .options-routes-all { display: none; }
  body.path-frontpage .options-routes-heading .wp-home-route-tabs { width: 100%; margin: 0; padding: 0; }
  body.path-frontpage .options-routes-heading .wp-home-route-tabs ul {
    overflow-x: auto;
    max-width: 100%;
    padding: 4px;
    margin: -4px;
    scrollbar-width: none;
  }
  body.path-frontpage .wp-home-routes .popular-train-routes .slick-slide {
    width: min(304px, calc(100vw - 64px)) !important;
  }
}

/* Modal dialogs and their backdrops sit above booking cards, sticky bars,
 * mobile booking sheets and inline tooltips. */
body.path-frontpage #blanket,
body.path-frontpage .modal-backdrop,
body.path-frontpage .ui-widget-overlay { z-index: 2147483646 !important; }
body.path-frontpage .ir_popup_window,
body.path-frontpage .modal,
body.path-frontpage .ui-dialog { z-index: 2147483647 !important; }

/* Option A booking typography: Open Sans Regular labels and values,
 * with SemiBold reserved for the primary action. */
body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch,
body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch input,
body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch button,
body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch .faresearch-label,
body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch .passenger_toggle,
body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch .passengers_toggle_slide span {
  font-family: "Open Sans WP Home", "Open Sans", "Segoe UI", Arial, sans-serif;
}
body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch .faresearch-label {
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: .5px;
  color: #91929e;
}
body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch .inputs,
body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch .departure_date,
body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch .passenger_toggle,
body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch .passengers_toggle_slide span {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: normal;
}
body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch .inputs::placeholder {
  color: #91929e;
  opacity: 1;
  font-weight: 400;
}
body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch #submitButton {
  font-size: 16px;
  font-weight: 600 !important;
  line-height: 24px;
  letter-spacing: normal;
}

body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch #faresearch_route-origin,
body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch #faresearch_route-destination,
body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch #faresearch_route-departure_date,
body.path-frontpage .wp-homepage .bookingwidget-paragraph #faresearch #faresearch_route-return_date {
  line-height: 24px;
}

/* Latest Option A:1: compact hero and a full-width routes subtitle. */
body.path-frontpage .options-hero { text-shadow: 0 1px 2px rgba(18,19,31,.35); }
body.path-frontpage .options-review { padding-top: 8px; }
body.path-frontpage .options-review-dots { margin-top: 0; }
body.path-frontpage .options-review-dot { width: 24px; height: 28px; }
body.path-frontpage .options-extras-mobile { display: none; }
body.path-frontpage .options-routes-heading { align-items: end; gap: 16px 24px; }
body.path-frontpage .options-routes-subtitle {
  flex-basis: 100%; margin: -8px 0 0; font-size: 18px; line-height: 24px;
  font-weight: 600; color: #585a69;
}
body.path-frontpage .wp-home-routes .wp-route-pass-description { line-height: 20px; min-height: 40px; }
body.path-frontpage .options-routes-heading .wp-home-route-tabs .pr-tab { font-weight: 600; }
@media (min-width: 1025px) {
  body.path-frontpage .wp-homepage .bookingwidget-paragraph .booking_panel { left: 32px; right: 32px; width: calc(100% - 64px); min-height: 0; }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary.card {
    padding: 0 16px 0 0; align-items: center; gap: 0;
    grid-template-columns: minmax(0, 1fr) 168px minmax(200px, auto) 160px;
  }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary .faresearch-form-left { gap: 0; }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary .faresearch-form-left > div,
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary .faresearch-form-right,
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary .passengers_toggle_group { padding: 12px 24px; }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary .faresearch-form-right { border-inline: 1px solid #e4e4e7 !important; }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #faresearch .submit-button { margin: 0 !important; padding: 0 0 0 16px !important; align-self: center; }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary input.inputs,
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary input.departure_date,
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary .passenger_toggle { height: 24px; padding: 0; border-radius: 0; }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary .faresearch-label { margin-bottom: 4px; }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary #submitButton { height: 48px; min-height: 48px; }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #swapbutton { top: 40px; }
  body.path-frontpage .wp-home-routes > .wp-home-section-inner,
  body.path-frontpage .wp-home-benefits > .wp-home-section-inner { padding-inline: 32px; max-width: 1376px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  body.path-frontpage .wp-homepage .ir-bookingwidget.bookingwidget-paragraph .main-form-area { padding: 48px 32px 0 !important; }
}
@media (max-width: 767px) {
  body.path-frontpage .wp-homepage .ir-bookingwidget.bookingwidget-paragraph .main-form-area { padding: 40px 24px 0 !important; }
  body.path-frontpage .options-hero { padding-bottom: 24px; }
  body.path-frontpage .options-hero-copy .options-extras { display: none; }
  body.path-frontpage .options-extras-mobile { display: block; padding-top: 48px; }
  body.path-frontpage .options-extras-mobile .options-extras { padding-bottom: 24px; border-bottom: 1px solid #e4e4e7; color: #24253d; font-size: 16px; line-height: 24px; }
  body.path-frontpage .options-extras-mobile .options-extras p { margin-bottom: 8px; }
  body.path-frontpage .options-extras-mobile .options-extras li::before { color: #008576; }
  body.path-frontpage .wp-home-routes { padding-top: 32px; padding-bottom: 32px; }
  body.path-frontpage .options-routes-heading { display: flex; flex-direction: column; align-items: stretch; margin-bottom: 8px; }
  body.path-frontpage .options-routes-heading h2 { margin-bottom: 0; }
  body.path-frontpage .options-routes-subtitle { order: 1; margin: -8px 0 0; }
  body.path-frontpage .options-routes-heading .wp-home-route-tabs { order: 2; }
}
@media (max-width: 767px) {
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary.card { padding: 0 16px 16px; gap: 0; }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary .faresearch-form-left > div,
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary .faresearch-form-right,
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary .passengers_toggle_group {
    padding: 12px 0 !important; margin: 0 !important; border-bottom: 1px solid #e4e4e7 !important;
  }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary input.inputs,
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary input.departure_date,
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary .passenger_toggle { border: 0 !important; height: 28px; padding: 2px 0; }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #faresearch .submit-button {
    margin: 16px 0 0 !important; padding: 0 !important;
  }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary #submitButton { margin: 0 !important; height: 56px; }
  body.path-frontpage .options-extras-mobile { padding-inline: 24px; }
  body.path-frontpage .wp-home-routes > .wp-home-section-inner { padding-inline: 24px; }
}

/* Destination photography from the latest supplied design. */
body.path-frontpage .wp-home-routes a[href$="-to-florence"] .pr-image { background: url("../img/figma/options-route-florence.webp") center/cover; }
body.path-frontpage .wp-home-routes a[href$="-to-florence"] .pr-image img { opacity: 0; }
body.path-frontpage .wp-home-routes a[href$="-to-rome"] .pr-image { background: url("../img/figma/options-route-rome.webp") center/cover; }
body.path-frontpage .wp-home-routes a[href$="-to-rome"] .pr-image img { opacity: 0; }
body.path-frontpage .wp-home-routes a[href$="-to-venice"] .pr-image { background: url("../img/figma/options-route-venice.webp") center/cover; }
body.path-frontpage .wp-home-routes a[href$="-to-venice"] .pr-image img { opacity: 0; }
body.path-frontpage .wp-home-routes a[href$="-to-naples"] .pr-image { background: url("../img/figma/options-route-naples.webp") center/cover; }
body.path-frontpage .wp-home-routes a[href$="-to-naples"] .pr-image img { opacity: 0; }
body.path-frontpage .wp-home-routes a[href$="-to-milan"] .pr-image { background: url("../img/figma/options-route-milan.webp") center/cover; }
body.path-frontpage .wp-home-routes a[href$="-to-milan"] .pr-image img { opacity: 0; }
body.path-frontpage .wp-home-routes a[href$="-to-pisa"] .pr-image { background: url("../img/figma/options-route-pisa.webp") center/cover; }
body.path-frontpage .wp-home-routes a[href$="-to-pisa"] .pr-image img { opacity: 0; }
@media (min-width: 1025px) {
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary .passengers_toggle_slide { height: 24px !important; }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary #faresearch_route-origin,
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary #faresearch_route-destination,
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary #faresearch_route-departure_date,
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary .passenger_toggle { padding-inline: 0 !important; }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary #date_icon_arrow { position: absolute; right: 0; top: 3px; }
}
@media (min-width: 1025px) {
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary.card { height: 80px !important; }
}
@media (max-width: 767px) {
  /* Give every field the same left edge, including the nested From/To group. */
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary .faresearch-form-left { padding-inline: 0 !important; }
  /* Lift the initial card 24px, leaving breathing room before the extras. */
  body.path-frontpage .wp-homepage .bookingwidget-paragraph .booking_panel_top:not(.wp-home-booking-is-sticky):not(.wp-home-booking-mobile-open) #itinerary.card { transform: none; }
  body.path-frontpage .options-extras-mobile { padding-top: 24px; }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary #faresearch-left-departure,
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary #faresearch-right-arrival { padding: 12px 0 !important; }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary #faresearch_route-origin,
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary #faresearch_route-destination,
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary #faresearch_route-departure_date,
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary .passenger_toggle { padding-inline: 0 !important; }
}

/* Desktop city divider and controls share one anchor, with room for clearing. */
@media (min-width: 1025px) {
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary .faresearch-form-left {
    grid-template-columns: calc(50% - 12px) minmax(0, 1fr);
  }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary #faresearch-left-departure {
    border-right: 1px solid #e4e4e7 !important;
    padding-right: 48px;
  }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary #faresearch-right-arrival { padding-left: 32px; }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #itinerary .passengers_toggle_group { border-right: 1px solid #e4e4e7 !important; }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #swapbutton {
    left: calc(50% - 12px); top: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
  }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-is-sticky) #clearButtonLeft {
    right: 28px; top: calc(50% + 12px);
  }
}

/* Leave the ItaliaPass destination clear of the sticky booking bar. */
body.path-frontpage #homepage-italiapass { scroll-margin-top: 120px; }

/* Mobile booking height follows its fields, rather than the legacy card ratio. */
@media (max-width: 767px) {
  body.path-frontpage .wp-homepage .bookingwidget-paragraph .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary.card {
    aspect-ratio: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding-bottom: 16px !important;
  }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #faresearch .submit-button {
    height: auto !important;
    min-height: 0;
  }
  body.path-frontpage .wp-homepage .booking_panel_top:not(.wp-home-booking-mobile-open) #itinerary #submitButton {
    height: 56px !important;
    min-height: 56px !important;
  }
}

/* Portrait tablet header: left-aligned brand and evenly distributed links. */
@media (min-width: 768px) and (max-width: 991px) {
  body.path-frontpage .region-header .navbar-default > .container { width: 100%; padding-inline: 24px; }
  body.path-frontpage .region-header .navbar-header { margin: 0; width: 100%; }
  body.path-frontpage .region-header .navbar-header .navbar-brand {
    position: static !important; float: left; left: auto !important;
    margin: 0 !important; padding-inline: 0;
  }
  body.path-frontpage #bs-example-navbar-collapse-1 > .nav.visible-xs-block {
    display: flex !important; width: 100%; margin: 0; padding: 0;
  }
  body.path-frontpage #bs-example-navbar-collapse-1 > .nav.visible-xs-block > .menu--main { display: contents !important; }
  body.path-frontpage #bs-example-navbar-collapse-1 > .nav.visible-xs-block li {
    flex: 1 1 0; min-width: 0; float: none; margin: 0; text-align: center;
  }
  body.path-frontpage #bs-example-navbar-collapse-1 > .nav.visible-xs-block li:has(> .dangler-new) { display: none; }
  body.path-frontpage #bs-example-navbar-collapse-1 > .nav.visible-xs-block a {
    display: block; font-size: 21px; line-height: 28px; white-space: nowrap;
    padding: 10px 4px; margin: 0;
  }
}
