/*
 * Home carousel system — V4.9.0
 * Shared by Trending Stories, Featured Audiobooks, and Latest Stories.
 */

.ehr-home-belt {
  padding: 34px 0 38px;
  background: #fff;
}

.ehr-home-belt + .ehr-home-belt {
  border-top: 1px solid var(--ehr-line);
}

.ehr-home-belt__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.ehr-home-belt__kicker {
  margin: 0 0 5px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.ehr-home-belt__title {
  margin: 0;
  color: var(--ehr-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 820;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.ehr-home-belt__carousel {
  position: relative;
}

.ehr-home-belt .ehr-carousel-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.ehr-home-belt .ehr-carousel-viewport::-webkit-scrollbar {
  display: none;
}

.ehr-home-belt__track {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  width: max-content;
  min-width: 100%;
  padding: 2px 2px 10px;
}

.ehr-home-belt__card {
  flex: 0 0 clamp(172px, 15.7vw, 198px);
  width: clamp(172px, 15.7vw, 198px);
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.ehr-home-belt__media {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 13px;
  background: #eef1f5;
  box-shadow: 0 8px 24px rgba(16, 26, 51, .09);
}

.ehr-home-belt__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 15, 28, .16) 100%);
}

.ehr-home-belt__media img,
.ehr-home-belt__media .ehr-carousel-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ehr-home-belt__media img {
  transition: transform .32s ease;
}

.ehr-home-belt__card:hover .ehr-home-belt__media img {
  transform: scale(1.025);
}

.ehr-home-belt__body {
  min-height: 92px;
  padding: 12px 1px 0;
}

.ehr-home-belt__card-title {
  display: block;
  overflow: visible;
  margin: 0;
  color: var(--ehr-ink);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.34;
  letter-spacing: -.012em;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: pretty;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
}

.ehr-home-belt__card-title a {
  color: inherit;
}

.ehr-home-belt__card-title a:hover,
.ehr-home-belt__card-title a:focus-visible {
  color: var(--ehr-accent);
}

.ehr-home-belt__meta {
  margin: 7px 0 0;
  color: var(--ehr-muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ehr-home-belt .ehr-carousel-progress {
  width: min(310px, 46vw);
  margin-top: 18px;
}

/* Keep the audio hero separate, while the list beneath it uses the same belt. */
.ehr-audiobook-hero {
  position: relative;
  overflow: hidden;
  margin: 12px 0 0;
  background: linear-gradient(90deg, #edf6f5 0%, #d7ece9 49%, #eef5f6 100%);
}

.ehr-audiobook-hero-inner {
  position: relative;
  min-height: 340px;
  padding: 64px 0 54px;
  text-align: center;
}

@media (max-width: 900px) {
  .ehr-home-belt__card {
    flex-basis: clamp(162px, 28.5vw, 188px);
    width: clamp(162px, 28.5vw, 188px);
  }
}

@media (max-width: 600px) {
  .ehr-home-belt {
    padding: 28px 0 31px;
  }

  .ehr-home-belt__header {
    align-items: center;
    gap: 14px;
    margin-bottom: 17px;
  }

  .ehr-home-belt__kicker {
    display: none;
  }

  .ehr-home-belt__title {
    font-size: 26px;
  }

  .ehr-home-belt__track {
    gap: 14px;
  }

  .ehr-home-belt__card {
    flex-basis: min(43vw, 174px);
    width: min(43vw, 174px);
  }

  .ehr-home-belt__body {
    min-height: 86px;
    padding-top: 10px;
  }

  .ehr-home-belt__card-title {
    font-size: 14px;
    line-height: 1.36;
  }

  .ehr-home-belt__meta {
    font-size: 11px;
  }

  .ehr-home-belt .ehr-carousel-progress {
    margin-top: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ehr-home-belt__media img {
    transition: none;
  }
}
