/* Match the hero’s wave profile while leaving a white band above the photos. */
#main-resorts {
  --resort-hero-wave: clamp(85px, 12vw, 175px);
}

#main-resorts #trip-types {
  padding-block-start: 0;
}

#main-resorts #trip-types:has(+ .planning-explained:not(.cms-section-hidden)) {
  --resort-divider-fill: var(--sand);
  padding-block-end: 0;
}

#main-resorts .resorts-cinematic-hero__wave {
  height: var(--resort-hero-wave);
}

.resort-showcase {
  --resort-overlap: 0px;
  --resort-mask-height: 0px;
  --resort-bottom-wave: clamp(48px, 6vw, 88px);
  position: relative;
  isolation: isolate;
  display: flex;
  min-block-size: clamp(500px, 51vw, 735px);
  margin-top: calc(-1 * var(--resort-overlap));
}

.resorts-cinematic-hero:not(.cms-section-hidden) + #trip-types .resort-showcase,
.resorts-cinematic-hero:not(.cms-section-hidden) + script + #trip-types .resort-showcase {
  --resort-white-band: clamp(24px, calc(2vw + 9px), 41px);
  --resort-overlap: calc(var(--resort-hero-wave) - var(--resort-white-band) - 1px);
  --resort-mask-height: var(--resort-hero-wave);
  --resort-top-wave-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 180' preserveAspectRatio='none'%3E%3Cpath d='M0 91 C220 162 394 185 586 166 C817 142 1026 67 1162 68 C1292 68 1383 101 1440 117 L1440 180 L0 180 Z'/%3E%3C/svg%3E");
}

.resort-showcase__images,
.resort-showcase__frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.resort-showcase__images {
  z-index: -1;
  background: #153b56;
  mask-image: var(--resort-top-wave-mask, none), linear-gradient(#000, #000);
  mask-repeat: no-repeat;
  mask-position: top, bottom;
  mask-size: 100% var(--resort-mask-height), 100% calc(100% - var(--resort-mask-height) + 2px);
}

.resort-showcase__images::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 53%, rgba(9, 30, 42, .46) 100%);
}

.resort-showcase__image {
  position: absolute;

  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.resort-showcase [hidden] {
  display: none;
}

.resort-showcase__inner {
  width: calc(100% - 2 * clamp(14px, 2.25vw, 32px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(100px, 11vw, 160px);
  padding-block: calc(var(--resort-overlap) + clamp(24px, 2.6vw, 38px)) calc(var(--resort-bottom-wave) * .7);
}

.resort-showcase__heading,
.resort-showcase__caption,
.resort-showcase__controls {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .34);
  background: rgba(9, 31, 44, .79);
  backdrop-filter: blur(14px);
}

.resort-showcase .resort-showcase__heading {
  width: fit-content;
  max-width: min(100%, 620px);
  margin: 0 auto;
  padding: clamp(12px, 1.4vw, 20px) clamp(16px, 2.15vw, 31px);
  border-radius: 16px;
}

@supports (backdrop-filter: blur(14px)) {
  .resort-showcase__heading,
  .resort-showcase__caption,
  .resort-showcase__controls {
    background-color: rgba(9, 31, 44, .72);
  }
}

.resort-showcase__heading .eyebrow,
.resort-showcase__heading em,
.resort-showcase__destination {
  color: #f6d39e;
}

.resort-showcase__heading .eyebrow {
  margin-bottom: 10px;
}

.resort-showcase__heading h2 {
  margin-block: 0 8px;
  color: #fff;
  font-size: clamp(32px, 3.7vw, 54px);
  line-height: 1.09;
  text-wrap: balance;
}

.resort-showcase .resort-showcase__heading > p:not(.eyebrow) {
  max-width: 48ch;
  margin-block: 0;
  color: #fff;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.45;
  text-wrap: balance;
}

.resort-showcase__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.resort-showcase__caption {
  padding: 7px 11px 8px;
  border-radius: 7px;
}

.resort-showcase__destination {
  margin: 0 0 2px;
  font: 700 .75rem/1.3 var(--accent);
  letter-spacing: .065em;
  text-transform: uppercase;
}

.resort-showcase__name {
  margin: 0;
  font: 600 clamp(1rem, 1.5vw, 1.375rem)/1.15 var(--serif);
}

.resort-showcase__controls:not([hidden]) {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  border-radius: 100px;
  padding-inline: 3px;
}

.resort-showcase__controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.resort-showcase__controls button:hover {
  background: rgba(255, 255, 255, .18);
}

.resort-showcase__controls button:focus-visible {
  outline: 2px solid #f6d39e;
  outline-offset: -3px;
}

.resort-showcase__arrow svg {
  width: 19px;
  height: 19px;
}

.resort-showcase__dot::after {
  width: 9px;
  height: 9px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
}

.resort-showcase__dot[aria-current="true"]::after {
  color: #f6d39e;
  background: currentColor;
}

.resort-showcase__wave {
  position: absolute;
  inset: auto 0 -1px;
  width: 100%;
  height: var(--resort-bottom-wave);
  pointer-events: none;
}

.resort-showcase__wave-ribbon {
  fill: var(--brand-wave);
}

#trip-types > .shell {
  padding-block-start: clamp(20px, 4vw, 56px);
}

@media (max-width: 700px) {
  #main-resorts {
    --resort-hero-wave: clamp(74px, 18vw, 125px);
  }

  .resort-showcase__inner {
    gap: 104px;
    padding-block-end: calc(var(--resort-bottom-wave) * .8);
  }

  .resort-showcase .resort-showcase__heading {
    max-width: min(100%, 350px);
  }

  .resort-showcase__footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .resort-showcase__controls {
    align-self: flex-end;
  }

  .resort-showcase__image--riviera-maya {
    object-position: 57% center;
  }

  .resort-showcase__image--la-romana {
    object-position: 25% center;
  }
}

/* Tile the resort photography alongside the planning advice. */
#main-resorts .planning-explained .split-layout {
  width: min(calc(100% - 2 * var(--site-hero-gutter)), 1450px);
  margin-inline-start: var(--site-hero-gutter);
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 5vw, 84px);
}

#main-resorts .planning-explained .split-layout__copy {
  order: -1;
}

.resort-help-collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(7px, 1vw, 14px);
}

.resort-help-collage img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.6;
  object-fit: cover;
  border: 3px solid var(--cream);
  box-shadow: 0 2px 10px #624d3022;
}

.resort-help-collage__snorkel {
  object-position: 30% center;
}

@media (min-width: 861px) {
  #main-resorts .planning-explained .split-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.32fr);
    align-items: stretch;
  }

  .resort-help-collage {
    position: absolute;
    inset: 0;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  .resort-help-collage img {
    height: 100%;
    min-width: 0;
    min-height: 0;
  }
}

.resort-showcase__controls button.resort-showcase__playback {
  border-radius: 4px;
}
