/* The three offer cards share one scrollable, centered portrait deck. */
.spa-carousel {
  max-width: 1200px;
  margin-inline: auto;
}

.spa-carousel .spa-home-panels {
  --deck-card-width: min(38vw, 440px);
  --deck-gap: 24px;
  position: relative;
  display: flex;
  gap: var(--deck-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px calc((100% - var(--deck-card-width)) / 2) 8px;
  margin: 0;
  -webkit-overflow-scrolling: touch;
}

.spa-carousel .spa-home-panels::-webkit-scrollbar { display: none; }

.spa-carousel .spa-home-panel {
  position: relative;
  flex: 0 0 var(--deck-card-width);
  min-width: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  scroll-snap-align: center;
  border-radius: 16px;
  isolation: isolate;
  background: #243747;
}

.spa-carousel .spa-home-panel:nth-child(3n + 2) { background: #253b36; }
.spa-carousel .spa-home-panel:nth-child(3n) { background: #333d4b; }

.spa-carousel .spa-home-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  aspect-ratio: auto;
}

.spa-carousel .spa-home-panel::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgb(6 15 24 / .15), rgb(6 15 24 / .73) 36%, rgb(6 15 24 / .73) 68%, rgb(6 15 24 / .32));
}

.spa-carousel .spa-home-panel-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 48px 28px 110px;
  text-align: center;
}

.spa-carousel .spa-home-panel h3 {
  max-width: 14ch;
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.06;
  font-weight: 600;
  text-wrap: balance;
}

.spa-carousel .spa-home-panel p {
  max-width: 25ch;
  margin: 0;
  color: #fff;
  font-size: 17px;
  line-height: 1.45;
  text-wrap: pretty;
}

.spa-carousel .spa-home-panel .spa-home-text-link {
  position: absolute;
  inset-inline: 20px;
  bottom: 30px;
  width: fit-content;
  max-width: calc(100% - 40px);
  min-height: 48px;
  margin: 0 auto;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f0f5f6;
  color: #162633;
  font-size: 16px;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.spa-carousel .spa-home-text-link span { color: inherit; }
.spa-carousel .spa-home-text-link:hover { background: #d7e8ed; }

.spa-carousel-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.spa-carousel-controls[hidden] { display: none; }

.spa-carousel-arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #82919b;
  border-radius: 50%;
  color: #f0f5f6;
  background: #1c272e;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.spa-carousel-arrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateX(-2px) rotate(-45deg);
}

.spa-carousel-arrow[data-carousel-prev]::before { transform: translateX(2px) rotate(135deg); }
.spa-carousel-arrow:hover { background: #344a58; border-color: #c8d8e0; }

.spa-carousel :is(a, button):focus-visible {
  outline: 3px solid #a7d9ff;
  outline-offset: 4px;
}

.spa-carousel .spa-home-panels:focus-visible { outline: 2px solid #a7d9ff; outline-offset: 4px; }

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

@media (max-width: 767px) {
  .spa-carousel .spa-home-panels {
    --deck-card-width: 72vw;
    --deck-gap: 14px;
  }
  .spa-carousel .spa-home-panel { aspect-ratio: 3 / 4; }
  .spa-carousel .spa-home-panel-copy { padding: 26px 20px 84px; }
  .spa-carousel .spa-home-panel h3 { margin-bottom: 12px; font-size: clamp(26px, 6.9vw, 36px); }
  .spa-carousel .spa-home-panel p { font-size: 16px; }
  .spa-carousel .spa-home-panel .spa-home-text-link {
    bottom: 22px;
    inset-inline: 14px;
    max-width: calc(100% - 28px);
    min-height: 44px;
    padding: 10px 14px;
    font-size: 15px;
  }
  .spa-carousel-controls { margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .spa-carousel :is(.spa-home-text-link, .spa-carousel-arrow) { transition: none; }
}
