/**
 * DJ Refresh — audience cards.
 * Figma: three 384x500 cards, 24px gutters, 16px radius. Photo fills the card, a top-down
 * dark gradient anchors the copy at the bottom.
 */

.djr-audience {
  --djr-audience-h: 500px;
  --djr-audience-radius: 16px;

  background: var(--djr-white);
}
a.djr-audience__card:hover {
    text-decoration: none;
}
.djr-audience__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  /* The comp insets this row from the section gutters. */
  max-width: 1200px;
  margin: 0 auto;
}

.djr-audience__item {
  min-width: 0;
}

.djr-audience__card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: var(--djr-audience-h);
  padding: 24px;
  border-radius: var(--djr-audience-radius);
  overflow: hidden;
  /* background-color, not shorthand — keeps the .djr-skeleton shimmer gradient intact. */
  background-color: var(--djr-dark-alt);
  isolation: isolate;
}

.djr-audience__image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.djr-audience__card:hover .djr-audience__image {
  transform: scale(1.05);
}

.djr-audience__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.djr-audience__copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.djr-audience__title {
  font-size: var(--djr-h3);
  font-weight: 700;
  line-height: 32px;
  color: var(--djr-white);
}

.djr-audience__text {
  font-size: var(--djr-body-size);
  line-height: 24px;
  color: var(--djr-muted);
}

/* The 1200px cap is on the grid; the scroller wrapper stays full-width so the rail can
   bleed to the section gutters on mobile. */
.djr-audience__scroller {
  max-width: 1200px;
  margin: 0 auto;
}

.djr-audience__scroller .djr-scroller__bar {
  display: none;
  margin-top: 28px;
}

/* ---------- Responsive ---------- */

/*
 * Below 900px the three cards become a full-width swipe rail — one card per view, snapping,
 * with the progress bar beneath. Matches the revised mobile design.
 */
@media (max-width: 900px) {
  .djr-audience {
    --djr-audience-h: 380px;
  }

  .djr-audience__scroller {
    max-width: none;
  }

  .djr-audience__grid {
    display: flex;
    grid-template-columns: none;
    max-width: none;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    /* Proximity so touch swipes move freely instead of snapping back to a card edge. */
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .djr-audience__grid::-webkit-scrollbar {
    display: none;
  }

  .djr-audience__item {
    flex: 0 0 100%;
    scroll-snap-align: center;
  }

  .djr-audience__scroller .djr-scroller__bar {
    display: block;
  }
}
