/* Scoped destination tabs; load after home and theme styles. */
html.home-page #home-shell #discovery-slider {
  --dest-tab-width: clamp(168px, 38vw, 280px);
  --dest-tab-height: clamp(112px, 24vw, 160px);
  --dest-tab-extra: 24px;
  display: flex;
  flex-flow: row nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 16px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 6px 0 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
}

html.home-page #home-shell #discovery-slider > .discovery-card {
  --dest-card-height: var(--dest-tab-height);
  position: relative;
  box-sizing: border-box;
  display: block;
  flex: 0 0 var(--dest-tab-width);
  width: var(--dest-tab-width);
  min-width: var(--dest-tab-width);
  max-width: var(--dest-tab-width);
  height: var(--dest-card-height);
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transform: none;
  scroll-snap-align: start;
}

html.home-page #home-shell #discovery-slider > .discovery-card.is-active {
  --dest-card-height: calc(var(--dest-tab-height) + var(--dest-tab-extra));
  box-shadow: none;
}

html.home-page #home-shell #discovery-slider .discovery-card-media {
  position: relative;
  box-sizing: border-box;
  display: block;
  flex: none;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: var(--dest-card-height);
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  box-shadow: none;
  overflow: hidden;
  transform: none;
  isolation: isolate;
}

html.home-page #home-shell #discovery-slider .discovery-card-img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: none;
  max-height: none;
  object-fit: cover;
  transform: none;
}

html.home-page #home-shell #discovery-slider .discovery-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 30%, rgb(0 0 0 / 55%) 100%);
}

html.home-page #home-shell #discovery-slider .is-active .discovery-card-media::after {
  background: linear-gradient(180deg, rgb(60 87 210 / 45%), rgb(48 79 207 / 78%));
}

html.home-page #home-shell #discovery-slider .discovery-card-name {
  position: absolute;
  inset: auto 16px 16px;
  z-index: 2;
  margin: 0;
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 3px rgb(0 0 0 / 25%);
}

html.home-page #home-shell #discovery-slider > .discovery-card::before,
html.home-page #home-shell #discovery-slider > .discovery-card::after {
  content: none;
}

html.home-page #home-shell #discovery-slider > .discovery-card.is-active::after {
  content: '';
  position: absolute;
  inset: 100% auto auto 50%;
  width: 28px;
  height: 15px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #3454cf;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: translateX(-50%);
  pointer-events: none;
}

/* Replaced by the pointer attached to each selected card. */
html.home-page #home-shell #discovery-pointer {
  display: none !important;
}

html.home-page #home-shell #discovery-slider > .discovery-card:focus-visible {
  outline: 3px solid var(--color-primary, #5b7fff);
  outline-offset: 3px;
}

/* Preserve the selected-card pointer despite the later mobile editorial reset. */
@media (max-width: 1024px) {
  html.home-page #home-shell #discovery-slider {
    padding-bottom: 24px !important;
  }

  html.home-page #home-shell #discovery-slider > .discovery-card.is-active::after {
    content: '' !important;
    display: block !important;
  }
}


/* Selected destination: trailing room for left alignment. */
html.home-page #home-shell #discovery-slider {
  scroll-padding-left: 0;
}
html.home-page #home-shell #discovery-slider::after {
  content: '';
  display: block;
  flex: 0 0 max(0px, calc(
    100% - var(--dest-tab-width) - var(--dest-align-gap, 16px)
  ));
  width: auto;
  min-width: 0;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
  scroll-snap-align: none;
}

/* Destination final-cover policy v1: geometry stays unchanged. */
html.home-page #home-shell #discovery-slider .discovery-card-media.is-cover-pending,
html.home-page #home-shell #discovery-slider [data-bootstrap-dest] .discovery-card-media {
  background: linear-gradient(110deg, #dce2ef 8%, #eef1f8 18%, #dce2ef 33%) !important;
  background-size: 200% 100% !important;
}
html[data-theme="dark"].home-page #home-shell #discovery-slider .discovery-card-media.is-cover-pending,
html[data-theme="dark"].home-page #home-shell #discovery-slider [data-bootstrap-dest] .discovery-card-media {
  background: linear-gradient(110deg, #25304a 8%, #37435d 18%, #25304a 33%) !important;
}
html.home-page #home-shell #discovery-slider .discovery-card-media.is-cover-unavailable {
  background: #46516b !important;
}
html.home-page #home-shell #discovery-slider [data-cover-status] {
  position: absolute;
  inset: 12px 12px auto;
  z-index: 2;
  color: #fff;
  font: 12px/1.4 system-ui, sans-serif;
}
