/*
 * Canonical tour card component.
 *
 * Home and Day Tours deliberately share the .fi-tour-card class. Page styles
 * may choose the grid and the Day Tours list variant, but card presentation
 * belongs here so the two views cannot drift apart again.
 */

:root {
  --fi-tour-card-ink: #123f70;
  --fi-tour-card-copy: #526b85;
  --fi-tour-card-line: #d8e2eb;
  --fi-tour-card-icon: #236aa8;
  --fi-tour-card-cta: #fb5426;
  --fi-tour-card-cta-hover: #e8481c;
  --fi-tour-card-radius: 6px;
  --fi-tour-card-shadow: 0 5px 16px rgba(25, 54, 82, 0.13);
}

/* Shared shell */
.fi-tour-card {
  background: #fff !important;
  border: 1px solid var(--fi-tour-card-line) !important;
  border-radius: var(--fi-tour-card-radius) !important;
  box-shadow: var(--fi-tour-card-shadow) !important;
  color: var(--fi-tour-card-copy);
  display: flex !important;
  flex-direction: column;
  height: 100%;
  min-height: 520px;
  overflow: hidden;
  position: relative;
  text-align: left;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.fi-tour-card:hover {
  box-shadow: 0 9px 25px rgba(25, 54, 82, 0.18) !important;
  transform: translateY(-2px);
}

.fi-tour-card .fi-home-tour-card__link {
  inset: 0;
  position: absolute;
  z-index: 1;
}

.fi-tour-card > *:not(.fi-home-tour-card__link) {
  position: relative;
  z-index: 2;
}

.fi-tour-card > .image-wrapper {
  aspect-ratio: 5 / 3;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  flex: 0 0 auto;
  height: auto !important;
  overflow: hidden;
  position: relative;
}

.fi-tour-card > .image-wrapper > a,
.fi-tour-card .image-wrapper .image-overlay {
  display: none !important;
}

.fi-tour-card .image-wrapper .location {
  background-color: rgba(255, 255, 255, 0.83);
  bottom: 0;
  height: 48px;
  left: 0;
  position: absolute;
  width: 70px;
}

.fi-tour-card .add-to-favorites {
  align-items: center;
  background: rgba(255, 255, 255, 0.93);
  border-radius: 50%;
  color: var(--fi-tour-card-icon);
  display: flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 11px;
  top: 11px;
  width: 34px;
  z-index: 4;
}

.fi-tour-card .add-to-favorites .material-icons {
  font-size: 21px;
}

.fi-tour-card .add-to-favorites.added {
  color: #df4e48;
}

/* Shared content hierarchy */
.fi-tour-card .title {
  color: var(--fi-tour-card-ink);
  margin: 0;
  min-height: 67px;
  padding: 20px 18px 0;
}

.fi-tour-card .title h3,
.fi-tour-card .title h3 a,
.fi-tour-card .title h3 a.high-text-count {
  color: var(--fi-tour-card-ink) !important;
  display: -webkit-box;
  font-family: "Akagi Pro", "Open Sans", Arial, sans-serif;
  font-size: 21px !important;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.24;
  margin: 0;
  overflow: hidden;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.fi-tour-card .title h3 a:hover,
.fi-tour-card .title h3 a:focus {
  color: #0d315a !important;
}

.fi-tour-card .page-summary {
  color: var(--fi-tour-card-copy);
  font-size: 15px;
  height: 96px;
  line-height: 1.5;
  margin: 12px 18px 0;
  overflow: hidden;
}

.fi-tour-card .page-summary p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.fi-tour-card .fi-home-tour-card__facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin: auto 18px 0;
  min-height: 76px;
}

.fi-tour-card .fi-home-tour-card__fact {
  align-items: center;
  border-top: 1px solid var(--fi-tour-card-line);
  color: #48627d;
  display: flex;
  font-size: 13px;
  gap: 7px;
  line-height: 1.2;
  min-height: 37px;
  overflow: hidden;
  padding: 9px 0;
  white-space: nowrap;
}

.fi-tour-card .fi-home-tour-card__fact:nth-child(even) {
  border-left: 1px solid var(--fi-tour-card-line);
  padding-left: 14px;
}

.fi-tour-card .fi-home-tour-card__fact .material-icons {
  color: var(--fi-tour-card-icon);
  flex: 0 0 auto;
  font-size: 17px;
}

.fi-tour-card .fi-home-tour-card__location-icon {
  background: var(--fi-tour-card-icon);
  border-radius: 50% 50% 50% 0;
  display: inline-block;
  flex: 0 0 auto;
  height: 15px;
  position: relative;
  transform: rotate(-45deg);
  width: 15px;
}

.fi-tour-card .fi-home-tour-card__location-icon::after {
  background: #fff;
  border-radius: 50%;
  content: "";
  height: 5px;
  left: 5px;
  position: absolute;
  top: 5px;
  width: 5px;
}

.fi-tour-card .fi-home-tour-card__fact span:not(.fi-home-tour-card__location-icon) {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Shared price and CTA footer */
.fi-tour-card .fi-home-tour-card__footer {
  align-items: center;
  border-top: 1px solid var(--fi-tour-card-line);
  display: flex;
  justify-content: space-between;
  margin-top: 0;
  min-height: 82px;
  padding: 14px 18px;
}

.fi-tour-card .item-info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.fi-tour-card .duration-info {
  display: none;
}

.fi-tour-card .item-info .title {
  color: #61778e;
  font-family: "Akagi Pro", "Open Sans", Arial, sans-serif;
  font-size: 10px !important;
  font-weight: 700;
  line-height: 1.1;
  min-height: 0;
  padding: 0;
  text-align: left;
  text-transform: uppercase;
}

.fi-tour-card :is(.item-info .value, .price-from) {
  color: var(--fi-tour-card-ink);
  font-family: "Akagi Pro", "Open Sans", Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.fi-tour-card .price-from .currency {
  color: #526b85;
  font-size: 11px;
  margin-left: 3px;
}

.fi-tour-card .actions {
  flex: 0 0 auto;
  margin-left: 12px;
}

.fi-tour-card .actions .book-now {
  margin: 0;
}

.fi-tour-card .actions .cta {
  align-items: center;
  background: var(--fi-tour-card-cta) !important;
  border: 0;
  border-radius: 8px;
  color: #fff !important;
  display: inline-flex;
  font-family: "Akagi Pro", "Open Sans", Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  min-height: 42px;
  min-width: 116px;
  padding: 12px 17px;
  text-decoration: none !important;
  white-space: nowrap;
}

.fi-tour-card .actions .cta:hover,
.fi-tour-card .actions .cta:focus {
  background: var(--fi-tour-card-cta-hover) !important;
  color: #fff !important;
}

/* Day Tours list is a landscape layout around the same canonical card markup. */
.fi-day-tours-app .fi-tour-results--list .fi-tour-card {
  display: grid !important;
  grid-template-areas:
    "image title"
    "image summary"
    "image facts"
    "footer footer";
  grid-template-columns: minmax(220px, 28%) minmax(0, 1fr);
  min-height: 300px;
  width: 100%;
}

.fi-day-tours-app .fi-tour-results--list .fi-tour-card > .image-wrapper {
  aspect-ratio: auto;
  grid-area: image;
  height: 100% !important;
}

.fi-day-tours-app .fi-tour-results--list .fi-tour-card > .title {
  grid-area: title;
  min-height: 0;
  padding: 28px 28px 0;
}

.fi-day-tours-app .fi-tour-results--list .fi-tour-card > .page-summary {
  grid-area: summary;
  height: auto;
  margin: 12px 28px 0;
}

.fi-day-tours-app .fi-tour-results--list .fi-home-tour-card__facts {
  grid-area: facts;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin: auto 28px 0;
}

.fi-day-tours-app .fi-tour-results--list .fi-home-tour-card__footer {
  align-items: flex-end;
  grid-area: footer;
  margin: 0;
  min-height: 84px;
  padding: 13px 18px 14px;
}

.fi-day-tours-app .fi-tour-results--list .item-info,
.fi-day-tours-app .fi-tour-results--list .price-info {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  width: auto !important;
}

.fi-day-tours-app .fi-tour-results--list .price-info > .title {
  line-height: 1 !important;
  margin: 0 0 1px !important;
  padding: 0 !important;
}

.fi-day-tours-app .fi-tour-results--list .price-from {
  display: inline-block;
  font-size: 26px !important;
  line-height: 1 !important;
}

.fi-day-tours-app .fi-tour-results--list .price-from .currency {
  font-size: 11px !important;
  font-weight: 700 !important;
}

/*
 * The legacy theme still targets `.fi-item-box-wrapper .fi-item-box` with
 * older card dimensions, centred typography and a separate price layout.
 * Keep the compatibility boundary here rather than maintaining a second
 * Day Tours card stylesheet.
 */
.fi-item-box-wrapper .fi-tour-card {
  height: 100% !important;
  margin: 0 !important;
  max-width: none !important;
  min-height: 520px;
}

.fi-item-box-wrapper .fi-tour-card .title {
  margin: 0 !important;
  max-width: none !important;
  padding: 20px 18px 0 !important;
  text-align: left !important;
}

.fi-item-box-wrapper .fi-tour-card .title h3 {
  height: auto !important;
  max-height: none !important;
  text-align: left !important;
}

.fi-item-box-wrapper .fi-tour-card .page-summary {
  height: 96px !important;
  margin: 12px 18px 0 !important;
  text-align: left !important;
}

.fi-item-box-wrapper .fi-tour-card .page-summary p {
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  text-align: left !important;
}

.fi-item-box-wrapper .fi-tour-card .item-info {
  border: 0 !important;
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  font-size: inherit !important;
  font-weight: inherit !important;
  height: auto !important;
  min-width: 0;
  padding: 0 !important;
}

.fi-item-box-wrapper .fi-tour-card .item-info > div,
.fi-item-box-wrapper .fi-tour-card .item-info > div:nth-child(2) {
  float: none !important;
  text-align: left !important;
  width: auto !important;
}

.fi-item-box-wrapper .fi-tour-card .item-info .price-info {
  display: flex !important;
  flex-direction: column;
}

.fi-home-top-picks .fi-tour-card .fi-home-tour-card__footer {
  align-items: flex-end !important;
  min-height: 84px;
  padding: 13px 18px 14px !important;
}

.fi-home-top-picks .fi-tour-card .item-info,
.fi-home-top-picks .fi-tour-card .price-info {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  width: auto !important;
}

.fi-home-top-picks .fi-tour-card .price-info > .title {
  line-height: 1 !important;
  margin: 0 0 1px !important;
  padding: 0 !important;
}

.fi-home-top-picks .fi-tour-card .price-from {
  display: inline-block;
  font-size: 26px !important;
  line-height: 1 !important;
}

.fi-home-top-picks .fi-tour-card .price-from .currency {
  font-size: 11px !important;
  font-weight: 700 !important;
}

.fi-item-box-wrapper .fi-tour-card .actions {
  margin: 0 0 0 12px !important;
}

.fi-item-box-wrapper .fi-tour-card .actions .book-now {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (max-width: 767px) {
  .fi-tour-card {
    min-height: 0;
  }

  .fi-tour-card:hover {
    transform: none;
  }

  .fi-tour-card .image-wrapper .location {
    height: 40px;
    width: 57px;
  }

  .fi-tour-card .add-to-favorites {
    height: 29px;
    right: 8px;
    top: 8px;
    width: 29px;
  }

  .fi-tour-card .add-to-favorites .material-icons {
    font-size: 18px;
  }

  .fi-tour-card .title {
    min-height: 0;
    padding: 16px 16px 0;
  }

  .fi-item-box-wrapper .fi-tour-card .title {
    padding: 16px 16px 0 !important;
  }

  .fi-tour-card .title h3,
  .fi-tour-card .title h3 a,
  .fi-tour-card .title h3 a.high-text-count {
    font-size: 20px !important;
    -webkit-line-clamp: 3;
  }

  .fi-tour-card .page-summary {
    font-size: 14px;
    height: 68px;
    margin: 9px 16px 0;
  }

  .fi-item-box-wrapper .fi-tour-card .page-summary {
    height: 68px !important;
    margin: 9px 16px 0 !important;
  }

  .fi-tour-card .fi-home-tour-card__facts {
    margin-left: 16px;
    margin-right: 16px;
    min-height: 0;
  }

  .fi-tour-card .fi-home-tour-card__fact {
    font-size: 12px;
    min-height: 35px;
    padding: 8px 0;
  }

  .fi-tour-card .fi-home-tour-card__footer {
    min-height: 76px;
    padding: 12px 16px;
  }

  .fi-tour-card :is(.item-info .value, .price-from) {
    font-size: 20px;
  }

  .fi-tour-card .actions .cta {
    font-size: 14px;
    min-width: 126px;
    padding: 11px 16px;
  }

  .fi-day-tours-app .fi-tour-results--list .fi-tour-card {
    display: flex !important;
    min-height: 0;
  }

  .fi-day-tours-app .fi-tour-results--list .fi-tour-card > .image-wrapper {
    aspect-ratio: 5 / 3;
    height: auto !important;
  }

  .fi-day-tours-app .fi-tour-results--list .fi-home-tour-card__footer {
    padding: 12px 16px;
  }
}
