/*
 * CMS-IR-FIGMA homepage pass.
 *
 * This is intentionally a final, front-page-only layer. The Drupal views and
 * booking widget remain the source of content and behaviour; these rules
 * provide the visual language and proportions from the supplied Figma export.
 */
body.path-frontpage {
  --figma-ink: #24253d;
  --figma-copy: #585a69;
  --figma-muted: #91929e;
  --figma-teal: #008576;
  --figma-red: #d30741;
  --figma-pink: #ec005e;
  --figma-surface: #ffffff;
  --figma-gray: #f3f3f6;
  --figma-line: #e4e4e7;
}

body.path-frontpage .wp-homepage {
  color: var(--figma-ink);
  font-family: Arial, Helvetica, sans-serif;
}

body.path-frontpage .wp-homepage__content {
  background: var(--figma-surface);
}

body.path-frontpage .wp-home-section-inner {
  max-width: 1320px;
  padding-left: 24px;
  padding-right: 24px;
}

body.path-frontpage .wp-home-section-title h2,
body.path-frontpage .wp-home-faq h2,
body.path-frontpage .wp-home-community h2 {
  color: var(--figma-ink);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.25;
}

/* Figma hero: compact image header with the existing booking widget layered
 * inside it. The old ItaliaPass hero card is repeated lower on the page in
 * the supplied design, so keep the lower, functional version only. */
body.path-frontpage .wp-homepage .bookingwidget-paragraph .main-form-area {
  background-position: center 42%;
  min-height: 368px;
  padding: 78px 24px 28px !important;
}

body.path-frontpage .wp-homepage .bookingwidget-paragraph .main-form-area > .container {
  max-width: 1320px;
}

body.path-frontpage .wp-homepage .bookingwidget-paragraph .main-form-area h1,
body.path-frontpage .wp-homepage .bookingwidget-paragraph .main-form-area .homepage-title {
  color: #fff;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.3;
  margin: 0 auto 70px;
  max-width: 1320px;
  text-align: left;
}

body.path-frontpage .wp-homepage #ip-pass {
  display: none !important;
}

body.path-frontpage .wp-homepage #itinerary.card {
  background: #fff;
  border: 0;
  border-radius: 48px;
  box-shadow: 0 6px 18px rgba(36, 37, 61, .18);
  margin: 0 auto;
  max-width: 1320px;
  padding: 16px 24px;
}

body.path-frontpage .wp-homepage #faresearch-header,
body.path-frontpage .wp-homepage #itinerary .faresearch-header {
  display: none;
}

body.path-frontpage .wp-homepage #itinerary .faresearch-form-left {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-width: 0;
}

body.path-frontpage .wp-homepage #itinerary .faresearch-form-left > div {
  border-right: 1px solid var(--figma-line);
  min-width: 0;
  padding: 7px 28px;
}

body.path-frontpage .wp-homepage #itinerary .faresearch-form-left > div:first-child {
  padding-left: 14px;
}

body.path-frontpage .wp-homepage #itinerary label,
body.path-frontpage .wp-homepage #itinerary .booking-label,
body.path-frontpage .wp-homepage #itinerary .form-label {
  color: var(--figma-copy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

body.path-frontpage .wp-homepage #itinerary input,
body.path-frontpage .wp-homepage #itinerary select {
  color: var(--figma-ink);
  font-size: 16px;
}

body.path-frontpage .wp-homepage #itinerary .passengers_toggle_group,
body.path-frontpage .wp-homepage #itinerary .faresearch-form-right {
  border-right: 1px solid var(--figma-line);
  min-width: 0;
  padding: 7px 28px;
}

body.path-frontpage .wp-homepage #itinerary .submit-button {
  padding: 0 0 0 14px;
}

body.path-frontpage .wp-homepage #itinerary #submitButton,
body.path-frontpage .wp-homepage #itinerary button[type="submit"] {
  background: var(--figma-pink);
  border: 0;
  border-radius: 32px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  min-height: 54px;
  padding: 0 30px;
  width: 100%;
}

body.path-frontpage .wp-home-benefits {
  background: #fff;
  border-bottom: 1px solid var(--figma-line);
  padding: 24px 0 22px;
}

body.path-frontpage .wp-home-benefits__grid {
  gap: 0;
  grid-template-columns: repeat(3, 1fr);
}

body.path-frontpage .wp-home-benefits__grid article {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  min-height: 116px;
  padding: 10px 36px;
  text-align: left;
}

body.path-frontpage .wp-home-benefits__grid article + article {
  border-left: 1px solid var(--figma-line);
}

body.path-frontpage .wp-home-benefits__icon {
  background: transparent;
  color: var(--figma-teal);
  float: left;
  font-size: 24px;
  height: 38px;
  margin: 0 14px 24px 0;
  width: 38px;
}

body.path-frontpage .wp-home-benefits__grid h3 {
  font-size: 16px;
  line-height: 1.35;
  margin: 4px 0 7px;
}

body.path-frontpage .wp-home-benefits__grid p {
  font-size: 14px;
  line-height: 1.45;
}

body.path-frontpage .wp-home-routes {
  background: var(--figma-gray);
  padding: 52px 0 54px;
}

body.path-frontpage .wp-home-route-tabs {
  border: 0;
  margin: 0 0 28px;
}

body.path-frontpage .wp-home-route-tabs ul {
  gap: 10px;
}

body.path-frontpage .wp-home-route-tabs button {
  border: 1px solid var(--figma-line);
  border-radius: 24px;
  padding: 9px 22px;
}

body.path-frontpage .wp-home-route-tabs li.active button,
body.path-frontpage .wp-home-route-tabs button:hover,
body.path-frontpage .wp-home-route-tabs button:focus {
  background: var(--figma-teal);
  border-color: var(--figma-teal);
  color: #fff;
}

body.path-frontpage .wp-home-routes .pr-teaser {
  border: 0;
  box-shadow: 0 2px 7px rgba(36, 37, 61, .12);
  min-height: 248px;
}

body.path-frontpage .wp-home-routes .pr-image {
  height: 164px;
}

body.path-frontpage .wp-home-community {
  background: var(--figma-gray);
  padding: 0 0 58px;
}

body.path-frontpage .wp-home-community .wp-home-section-inner {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  padding-bottom: 30px;
  padding-right: 190px;
  position: relative;
  padding-top: 30px;
}

body.path-frontpage .wp-home-community .wp-home-section-inner::before,
body.path-frontpage .wp-home-community .wp-home-section-inner::after {
  border-radius: 50%;
  content: "";
  pointer-events: none;
  position: absolute;
  right: -92px;
  z-index: 0;
}

body.path-frontpage .wp-home-community .wp-home-section-inner::before {
  background: rgba(0, 133, 118, .13);
  height: 280px;
  top: -92px;
  width: 280px;
}

body.path-frontpage .wp-home-community .wp-home-section-inner::after {
  background: rgba(82, 185, 143, .16);
  height: 220px;
  right: -18px;
  top: 72px;
  width: 220px;
}

body.path-frontpage .wp-home-community .wp-home-section-title {
  align-items: center;
  position: relative;
  z-index: 1;
}

body.path-frontpage .wp-home-community .wp-home-section-title h2 {
  color: var(--figma-teal);
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 12px;
}

body.path-frontpage .wp-home-pass__included {
  color: var(--figma-copy);
  font-size: 16px;
  text-decoration: underline;
}

body.path-frontpage .wp-home-pass__cta {
  background: var(--figma-pink);
  border-radius: 24px;
  bottom: 30px;
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 22px;
  position: absolute;
  right: 30px;
  text-decoration: none !important;
  z-index: 2;
}

body.path-frontpage .wp-home-pass__grid {
  gap: 12px 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.path-frontpage .wp-home-pass-card {
  border: 0;
  border-radius: 0;
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 84px;
  padding: 12px 8px;
  position: relative;
  z-index: 1;
}

body.path-frontpage .wp-home-pass-card__icon {
  flex: 0 0 36px;
  background: #e6f4f2;
  color: var(--figma-teal);
  font-size: 14px;
  height: 36px;
  width: 36px;
}

body.path-frontpage .wp-home-pass-card h3 {
  display: inline;
  align-self: center;
  font-size: 15px;
  line-height: 1.25;
  margin: 0;
  white-space: nowrap;
}

body.path-frontpage .wp-home-pass-card p {
  display: inline;
  font-size: 13px;
  margin-left: 4px;
  white-space: nowrap;
}

body.path-frontpage .wp-home-experiences,
body.path-frontpage .wp-home-articles {
  background: var(--figma-gray);
  padding: 54px 0 58px;
}

body.path-frontpage .wp-home-guides {
  background: #fff;
  padding: 54px 0 64px;
}

body.path-frontpage .wp-home-card-grid,
body.path-frontpage .wp-home-tour-grid,
body.path-frontpage .wp-home-experiences .wp-home-card-scroller {
  gap: 18px;
}

body.path-frontpage .wp-home-image-card,
body.path-frontpage .wp-home-experience {
  border: 0;
  box-shadow: 0 2px 7px rgba(36, 37, 61, .12);
}

body.path-frontpage .wp-home-image-card__media,
body.path-frontpage .wp-home-experience__media {
  height: 172px;
}

body.path-frontpage .wp-home-image-card__body,
body.path-frontpage .wp-home-experience__body {
  padding: 16px 18px 18px;
}

body.path-frontpage .wp-home-image-card__body h3,
body.path-frontpage .wp-home-experience__body h3 {
  font-size: 17px;
  line-height: 1.35;
}

body.path-frontpage .wp-home-faq {
  background: var(--figma-gray);
  padding: 54px 0 58px;
}

body.path-frontpage .wp-home-faq__layout {
  gap: 32px;
}

body.path-frontpage .wp-home-faq details {
  border-bottom: 1px solid var(--figma-line);
}

body.path-frontpage .wp-home-faq summary {
  font-size: 16px;
  font-weight: 400;
  padding: 20px 30px 20px 0;
}

body.path-frontpage .wp-home-newsletter {
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(36, 37, 61, .14);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 274px;
  padding: 30px 24px;
}

body.path-frontpage .wp-home-newsletter > h2 {
  color: #fff;
  display: block;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 14px;
}

body.path-frontpage .wp-home-newsletter > p {
  margin: 0;
}


body.path-frontpage .wp-home-articles .wp-home-card-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.path-frontpage .wp-home-guides__grid {
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.path-frontpage .wp-home-guides__grid > a {
  border: 1px solid var(--figma-line);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(36, 37, 61, .08);
  min-height: 154px;
}

body.path-frontpage .footer {
  background: var(--figma-ink);
}

body.path-frontpage .footer_top,
body.path-frontpage .footer_bottom {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}

body.path-frontpage .footer_text_title {
  color: #90c9f3;
}

body.path-frontpage .footer_top .menu a,
body.path-frontpage .footer_right_a,
body.path-frontpage .footer_copy {
  color: #fff;
}

@media (max-width: 991px) {
  body.path-frontpage .wp-homepage .bookingwidget-paragraph .main-form-area {
    min-height: 470px;
    padding: 42px 16px 22px !important;
  }

  body.path-frontpage .wp-homepage .bookingwidget-paragraph .main-form-area h1,
  body.path-frontpage .wp-homepage .bookingwidget-paragraph .main-form-area .homepage-title {
    font-size: 30px;
    margin-bottom: 30px;
  }

  body.path-frontpage .wp-homepage #itinerary.card {
    border-radius: 18px;
    padding: 12px;
  }

  body.path-frontpage .wp-home-benefits__grid,
  body.path-frontpage .wp-home-pass__grid {
    grid-template-columns: 1fr;
  }

  body.path-frontpage .wp-home-community .wp-home-section-title {
    align-items: flex-start;
    gap: 18px;
  }

  body.path-frontpage .wp-home-pass__cta {
    bottom: 24px;
    position: static;
    white-space: nowrap;
  }

  body.path-frontpage .wp-home-community .wp-home-section-inner {
    padding-right: 24px;
  }

  body.path-frontpage .wp-home-pass-card h3,
  body.path-frontpage .wp-home-pass-card p {
    display: block;
    white-space: normal;
  }

  body.path-frontpage .wp-home-pass-card p {
    margin-left: 0;
  }

  body.path-frontpage .wp-home-benefits__grid article {
    border-left: 0 !important;
    border-top: 1px solid var(--figma-line);
    min-height: 86px;
    padding: 16px 0;
  }

  body.path-frontpage .wp-home-benefits__grid article:first-child {
    border-top: 0;
  }

  body.path-frontpage .wp-home-guides__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.path-frontpage .wp-home-section-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.path-frontpage .wp-home-section-title h2,
  body.path-frontpage .wp-home-faq h2,
  body.path-frontpage .wp-home-community h2 {
    font-size: 25px;
  }

  body.path-frontpage .wp-home-route-tabs ul {
    flex-wrap: wrap;
  }

  body.path-frontpage .wp-home-card-grid--three,
  body.path-frontpage .wp-home-articles .wp-home-card-grid--three {
    grid-template-columns: 1fr;
  }

  body.path-frontpage .wp-home-faq__layout {
    grid-template-columns: 1fr;
  }

  body.path-frontpage .wp-home-guides__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Match the final hero footprint before fonts and booking JS arrive. */
body.path-frontpage .wp-homepage .ir-bookingwidget.bookingwidget-paragraph .main-form-area {
  min-height: 375px;
  aspect-ratio: 1512 / 375;
}
@media (max-width: 991px) {
  body.path-frontpage .wp-homepage .ir-bookingwidget.bookingwidget-paragraph .main-form-area { min-height: 490px; aspect-ratio: auto; }
}
@media (max-width: 600px) {
  body.path-frontpage .wp-homepage .ir-bookingwidget.bookingwidget-paragraph .main-form-area { min-height: 740px; aspect-ratio: 390 / 740; }
}
