/*
 * The home page's sections below the deal rows (adc-api#3482): why travelers book with us, trip
 * ideas, and featured destinations. Headings match the deal rows' (deal-rows.css), cards share
 * their 14px corners, and content keeps the page's 1040px column, the search box's and the deal
 * rows' width, so every section's edges line up.
 */

.home-section-title {
  margin: 0;
  color: #004a83;
  font-size: 24px;
  font-weight: bold;
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
}

.home-section-sub {
  margin: 6px 0 24px;
  color: #4b5b6b;
  font-size: 15px;
  text-align: center;
}

/*
 * The deal cards' highlighted phrases ("FREE AT SEA"), which staff color red inline in the deal
 * text, show in bold navy on the home page: red is kept for the actions (View Details, Search), so
 * they stand out. !important, since only that outranks an inline style; the admin's text is left as
 * it is, and other pages showing the deals keep its colors.
 */
.deal-row-text [style*="color"],
.deal-row-details-text [style*="color"] {
  color: #004a83 !important;
  font-weight: bold;
}

/* Why travelers book with us */
.home-trust {
  box-sizing: border-box;
  padding-top: 44px;
  padding-bottom: 44px;
}

.home-trust-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  margin: 12px 0 0;
  color: #1f2a37;
  font-size: 15px;
  text-align: center;
}

.home-trust-rating a {
  color: #004a83;
  text-decoration: underline;
}

.home-stars {
  display: inline-flex;
  gap: 2px;
  color: #f2a900;
  font-size: 16px;
}

.home-trust-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 30px auto 0;
  max-width: 1040px;
}

.home-trust-group {
  padding: 0 22px;
  border-left: 1px solid #dbe5ef;
}

.home-trust-group:first-child {
  border-left: 0;
}

.home-trust-group svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: #004a83;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.home-trust-group h3 {
  margin: 8px 0 6px;
  color: #1f2a37;
  font-size: 17px;
  font-weight: bold;
  line-height: 1.3;
}

.home-trust-group p {
  margin: 0;
  color: #4b5b6b;
  font-size: 14px;
  line-height: 1.5;
}

.home-reviews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 32px auto 0;
  max-width: 1040px;
}

.home-review {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid #b9d6f2;
  border-radius: 14px;
  background: #f5f9fd;
}

.home-review blockquote {
  margin: 10px 0 0;
  padding: 0;
  border: 0;
}

.home-review blockquote p {
  margin: 0;
  color: #1f2a37;
  font-size: 15px;
  font-style: normal;
  line-height: 1.5;
}

.home-review figcaption {
  margin-top: 10px;
  color: #4b5b6b;
  font-size: 13px;
  font-weight: bold;
}

/* A quiet arrow link under the content it belongs to: the credentials, then the reviews. */
.home-more {
  margin: 22px 0 0;
  font-size: 15px;
  text-align: center;
}

.home-more a,
.home-dest-all a {
  color: #004a83;
  font-weight: bold;
  text-decoration: none;
}

.home-more a:hover,
.home-more a:focus-visible,
.home-dest-all a:hover,
.home-dest-all a:focus-visible {
  color: #003563;
  text-decoration: underline;
}

/*
 * Trip ideas. The sections alternate white and the deal band's blue (deal-rows.css), down to the
 * footer's newsletter bar in the same blue: deals blue, trust white, trips blue, destinations white.
 */
.home-trips {
  padding: 44px 0;
  background: #d0e8ff;
}

.home-trip-grid,
.home-dest-grid,
.home-ports-grid {
  display: grid;
  align-items: stretch;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0 auto;
  padding: 0;
  max-width: 1040px;
  list-style: none;
}

/*
 * A trip card: the photo above, full brightness, and the text below it on white, like the deal
 * cards above. Text over most of a small photo needs the whole photo darkened to stay readable
 * (NN/g, "Ensure High Contrast for Text Over Images": keep text near an edge so less of the image
 * needs treating), so nothing sits on the photo. The card is one link.
 */
.home-trip,
.home-port {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid #b9d6f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 74 131 / 8%);
  color: #1f2a37;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.home-trip-media {
  display: block;
  position: relative;
  overflow: hidden;
}

.home-trip img,
.home-dest-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* The trip's kind, above its title: off the photo, so it never covers a face. */
.home-trip-kind {
  color: #2f6ea5;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-trip-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px 16px;
}

.home-trip-title {
  color: #1f2a37;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.25;
}

.home-trip-line {
  color: #4b5b6b;
  font-size: 14px;
  line-height: 1.45;
}

/* Pushed to the bottom, so the actions line up across a row whatever the text above them. */
.home-trip-action {
  margin-top: auto;
  padding-top: 8px;
  color: #004a83;
  font-size: 14px;
  font-weight: bold;
}

/* A destination card: only its name, at the bottom edge over a short navy fade. */
.home-dest-card {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #0b3d63;
  box-shadow: 0 2px 10px rgb(0 40 80 / 14%);
  color: #fff;
  text-decoration: none;
}

.home-dest-card img {
  aspect-ratio: 5 / 6;
}

.home-dest-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(4 30 52 / 0%) 50%, rgb(4 30 52 / 60%) 72%, rgb(4 30 52 / 90%) 100%);
  content: "";
}

.home-dest-text {
  display: flex;
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
}

.home-dest-name {
  font-size: 19px;
  font-weight: bold;
  line-height: 1.2;
}

.home-dest-kind {
  font-size: 14px;
}

/* "7 nights · 5,100+ cruises" over "from $350", rather than wrapping wherever the card runs out. */
.home-dest-count {
  display: block;
}

/* The site colors every link red on hover (main.css); these keep their own colors. */
.home-trip:hover,
.home-trip:focus,
.home-port:hover,
.home-port:focus {
  color: #1f2a37;
  text-decoration: none;
}

.home-dest-card:hover,
.home-dest-card:focus {
  color: #fff;
  text-decoration: none;
}

.home-trust-rating a:hover {
  color: #003563;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .home-trip:hover,
  .home-port:hover {
    box-shadow: 0 8px 22px rgb(0 40 80 / 16%);
    transform: translateY(-2px);
  }

  .home-trip:hover img,
  .home-dest-card:hover img,
  .home-port:hover img {
    transform: scale(1.04);
  }
}

.home-trip:hover .home-trip-action {
  text-decoration: underline;
}

/* Featured destinations */
.home-dest {
  padding: 44px 0;
  background: #fff;
}

.home-dest-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.home-dest-tabs [role="tab"] {
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid #b9d6f2;
  border-radius: 999px;
  background: #fff;
  color: #004a83;
  font: bold 15px/1 Arial, sans-serif;
  cursor: pointer;
}

.home-dest-tabs [role="tab"][aria-selected="true"] {
  border-color: #004a83;
  background: #004a83;
  color: #fff;
}

.home-dest-panel {
  border-radius: 14px;
}

/* Each tab's link under its cards, then its price terms, as the section's footnote. */
.home-dest-all {
  margin: 24px 0 0;
  font-size: 15px;
  text-align: center;
}

.home-dest-fine {
  max-width: 760px;
  margin: 28px auto 0;
  color: #5b6b7b;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

/*
 * Departure ports, in the trip ideas' blue between the white destinations and the navy call. A card
 * is a trip card (above) with its port's photo, and below it the port, its distance when the visitor
 * shared a location, its cruises and price, and the offers most of them carry.
 */
.home-ports {
  padding: 44px 0;
  background: #d0e8ff;
}

/* The ZIP or postal code form under the subtitle: one row, wrapping on a phone. */
.home-ports-find {
  display: flex;
  position: relative;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: -8px auto 24px;
  max-width: 760px;
}

.home-ports-find[hidden] {
  display: none;
}

/* The country list as the site's other dropdowns (Select2, homepage.js), opening inside the form:
   a box matching the ZIP field beside it, and a list with a search field, as the search card's
   lists are (tour-search-filters.css .tsx-list). */
/* stylelint-disable no-descending-specificity */
.home-ports-find .select2-container {
  width: 210px !important;
  max-width: 100%;
  font-family: Arial, Helvetica, sans-serif;
}

.home-ports-find .select2-container--default .select2-selection--single {
  box-sizing: border-box;
  height: 42px;
  border: 1px solid #9fc2e3;
  border-radius: 8px;
  background: #fff;
}

.home-ports-find .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 0 36px 0 12px;
  color: #1f2a37;
  font-size: 15px;
  line-height: 40px;
  text-align: left;
}

/* Shown again: the search box's stylesheets hide Select2's arrow on every page. */
.home-ports-find .select2-container--default .select2-selection--single .select2-selection__arrow {
  display: block;
  position: absolute;
  top: 0;
  right: 6px;
  width: 26px;
  height: 40px;
}

/* A chevron, as the search card's rows have, in place of Select2's small triangle. */
.home-ports-find .select2-container--default .select2-selection--single .select2-selection__arrow b {
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -6px 0 0 -4px;
  border: solid #004a83;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.home-ports-find .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  margin-top: -2px;
  border-width: 2px 0 0 2px;
  border-color: #004a83;
}

.home-ports-find .select2-container--default.select2-container--focus .select2-selection--single,
.home-ports-find .select2-container--default.select2-container--open .select2-selection--single {
  border-color: #004a83;
  box-shadow: 0 0 0 3px rgb(0 74 131 / 18%);
  outline: 0;
}

.home-ports-find .select2-dropdown {
  box-sizing: border-box;
  min-width: 260px;
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid #c9d8e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgb(0 40 80 / 18%);
}

.home-ports-find .select2-dropdown--above {
  margin-top: -4px;
}

.home-ports-find .select2-search--dropdown {
  padding: 10px;
}

/* An older rule sets margin-left: 11px !important on every input in a Select2 box. */
.home-ports-find .select2-search--dropdown .select2-search__field {
  box-sizing: border-box;
  height: 40px;
  margin: 0 !important;
  padding: 0 12px;
  border: 1px solid #c9d8e6;
  border-radius: 6px;
  color: #1f2a37;
  font-size: 16px;
}

.home-ports-find .select2-search--dropdown .select2-search__field:focus {
  border-color: #004a83;
  outline: 0;
}

.home-ports-find .select2-results > .select2-results__options {
  max-height: 300px;
  overflow-x: hidden;
}

.home-ports-find .select2-results__option {
  padding: 9px 14px;
  color: #1f2a37;
  font-size: 15px;
  line-height: 1.3;
  text-align: left;
}

.home-ports-find .select2-results__option--highlighted,
.home-ports-find .select2-results__option--highlighted[aria-selected],
.home-ports-find .select2-results__option.select2-results__option--highlighted {
  background: #004a83 !important;
  color: #fff !important;
}

.home-ports-find .select2-results__option[aria-selected="true"]:not(.select2-results__option--highlighted),
.home-ports-find .select2-results__option--selected:not(.select2-results__option--highlighted) {
  background: #eef4fa;
  color: #004a83;
  font-weight: bold;
}

.home-ports-find .select2-results__message {
  color: #5b6b78;
}
/* stylelint-enable no-descending-specificity */

.home-ports-find-label {
  color: #1f2a37;
  font-size: 15px;
  font-weight: bold;
}

.home-ports-find select,
.home-ports-find input {
  box-sizing: border-box;
  height: 42px;
  padding: 0 10px;
  border: 1px solid #9fc2e3;
  border-radius: 8px;
  background: #fff;
  color: #1f2a37;
  font-size: 15px;
}

.home-ports-find select {
  max-width: 200px;
}

.home-ports-find input {
  width: 170px;
}

.home-ports-find button {
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: #004a83;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}

.home-ports-find button:hover,
.home-ports-find button:focus-visible {
  background: #003563;
}

.home-ports-find-error {
  margin: -14px 0 20px;
  color: #a4161a;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
}

.home-ports-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.home-section-title:focus {
  outline: none;
}

.home-port-media {
  display: block;
  position: relative;
  overflow: hidden;
}

.home-port img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.home-port-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px 16px 16px;
}

.home-port-name {
  display: block;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.25;
}

.home-port-miles {
  display: block;
  margin-top: 2px;
  color: #4b5b6b;
  font-size: 13px;
}

.home-port-miles i {
  margin-right: 4px;
  color: #2f6ea5;
}

.home-port-count {
  display: block;
  margin-top: 12px;
  color: #4b5b6b;
  font-size: 14px;
}

/* A little room above the large price, so it doesn't crowd the count it belongs to. */
.home-port-price {
  display: block;
  margin-top: 4px;
  color: #004a83;
  font-size: 14px;
  line-height: 1.2;
}

.home-port-price strong {
  font-size: 22px;
}

.home-port-offers {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e3edf7;
}

/* The trip cards' kind label, in the same blue. */
.home-port-offers-label {
  display: block;
  margin-bottom: 4px;
  color: #2f6ea5;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The check beside its offer, and a long offer's next line under its text rather than the check. */
.home-port-offer {
  display: flex;
  gap: 6px;
  color: #1f2a37;
  font-size: 13.5px;
  line-height: 1.5;
}

/* A price tag, not a check mark: a check reads as "included", and these are on select sailings
   only. Green, as the port, ship and line pages show offers (adc-api#3516). */
.home-port-offer i {
  flex: none;
  margin-top: 0.4em;
  color: #1f7a3a;
  font-size: 12px;
}

/* Pushed to the bottom, so the actions line up across a row whatever the text above them. */
.home-port-action {
  display: block;
  margin-top: auto;
  padding-top: 12px;
  color: #004a83;
  font-size: 14px;
  font-weight: bold;
}

.home-port-offers + .home-port-action {
  padding-top: 18px;
}

.home-port:hover .home-port-action {
  text-decoration: underline;
}

.home-ports-fine {
  max-width: 760px;
  margin: 26px auto 0;
  color: #4b5b6b;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

/* The closing call to action: navy, after the blue departure ports, before the newsletter's blue. */
.home-call {
  padding: 40px 0;
  background: #004a83;
  color: #fff;
}

.home-call-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  box-sizing: border-box;
  max-width: 1040px;
}

.home-call-text {
  flex: 1 1 420px;
  min-width: 0;
}

.home-call h2 {
  margin: 0;
  color: #fff;
  font-size: 26px;
  font-weight: bold;
  line-height: 1.2;
}

.home-call-lede {
  margin: 8px 0 0;
  color: #dbe8f5;
  font-size: 16px;
  line-height: 1.5;
}

.home-call-actions {
  flex: 0 1 auto;
  text-align: center;
}

.home-call-button,
.home-call-button:hover,
.home-call-button:focus {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  background: #e8283f;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.home-call-button::before {
  font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free", sans-serif;
  font-size: 18px;
  font-weight: 900;
  content: "\f095";
}

.home-call-button:hover {
  background: #c91f34;
}

.home-call-note {
  margin: 10px 0 0;
  color: #dbe8f5;
  font-size: 14px;
}

.home-call-link,
.home-call-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* Keyboard focus, after the rules it outlines. */
.home-trip:focus-visible,
.home-dest-card:focus-visible,
.home-dest-tabs [role="tab"]:focus-visible,
.home-dest-panel:focus-visible,
.home-reviews:focus-visible,
.home-call a:focus-visible {
  outline: 3px solid #1e88e5;
  outline-offset: 3px;
}

@media (width <= 1024px) {
  .home-trust-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 26px;
  }

  .home-trust-group:nth-child(3) {
    border-left: 0;
  }

  .home-trip-grid,
  .home-dest-grid,
  .home-ports-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 16px;
  }

  .home-trust {
    padding-right: 16px;
    padding-left: 16px;
  }

  .home-reviews {
    grid-template-columns: minmax(0, 1fr);
    max-width: 640px;
  }
}

@media (width <= 560px) {
  .home-section-title {
    font-size: 20px;
  }

  .home-trust,
  .home-trips,
  .home-dest,
  .home-call {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .home-call-inner {
    padding: 0 16px;
    text-align: center;
  }

  .home-call h2 {
    font-size: 20px;
  }

  .home-call-actions {
    flex-basis: 100%;
  }

  .home-call-note span:first-child,
  .home-call-link {
    display: block;
  }

  .home-call-link {
    margin-top: 6px;
  }

  .home-call-dot {
    display: none;
  }

  /*
   * The trust section was the page's longest on a phone (four groups and three reviews stacked,
   * about 1,360px). Here the groups are a 2 by 2 of icon and title, their details a tap away on the
   * About page ("See all our awards and credentials" follows), and the reviews a row to swipe.
   */
  .home-trust-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
    margin-top: 22px;
  }

  .home-trust-group,
  .home-trust-group:nth-child(3) {
    padding: 0;
    border-left: 0;
    text-align: center;
  }

  .home-trust-group h3 {
    margin-top: 6px;
    font-size: 15px;
  }

  .home-trust-group p {
    display: none;
  }

  .home-reviews {
    display: flex;
    gap: 12px;
    margin-right: -16px;
    margin-left: -16px;
    padding: 0 16px 6px;
    overflow-x: auto;
    scroll-padding: 0 16px;
    scroll-snap-type: x mandatory;
  }

  .home-review {
    flex: 0 0 82%;
    box-sizing: border-box;
    scroll-snap-align: start;
  }


  .home-trip-grid,
  .home-dest-grid,
  .home-ports-grid {
    gap: 12px;
  }

  .home-trip-body,
  .home-port-body {
    padding: 10px 12px 12px;
  }

  .home-dest-text {
    padding: 10px 12px;
  }

  .home-trip-title,
  .home-dest-name,
  .home-port-name {
    font-size: 16px;
  }

  .home-port-count,
  .home-port-miles {
    font-size: 13px;
  }

  .home-port-price strong {
    font-size: 20px;
  }

  .home-port-offers-label {
    font-size: 10px;
  }

  .home-port-offer {
    font-size: 12.5px;
  }

  .home-ports-find {
    padding: 0 12px;
  }

  .home-ports-find-label {
    flex-basis: 100%;
    text-align: center;
  }

  .home-ports-find select {
    flex: 1 1 100%;
    max-width: none;
  }

  .home-ports-find .select2-container {
    flex: 1 1 100%;
    width: 100% !important;
  }

  .home-ports-find input {
    flex: 1 1 0;
    min-width: 0;
  }

  .home-dest-arrow {
    display: none;
  }

  .home-dest-kind {
    font-size: 13px;
  }

  /*
   * A cruise card's "3–4 nights · 1,800+ cruises" can wrap on a half-width card, so each keeps room for
   * three lines and the names above stay level whichever ones wrap.
   */
  #home-dest-cruise .home-dest-kind {
    min-height: 3lh;
  }

  .home-trip-line {
    font-size: 13px;
  }

  /* The whole card is the link, and two columns leave the action no room on one line. */
  .home-trip-action {
    display: none;
  }

  .home-trip-kind {
    font-size: 10px;
  }
}
