/**
 * Carousel — scoped port of components/sections/Carousel.module.css.
 * Module ROOT (.wrap) and its children are inner-scoped under `.s-carousel`.
 * The slide-card styles (.card/.iconTile/.cardTitle/.cardBody/.cardCta) are
 * carried over from the Engage page module so a carousel renders standalone as
 * a reusable partial; the .eyebrow above the track reuses the green kicker.
 */

/* Masthead above the track */
.s-carousel .eyebrow {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--c-green);
  margin: 0 0 var(--s-6);
}
.s-carousel .carouselHeading {
  margin: 0 0 var(--s-6);
}

/* ── Module: .wrap ──────────────────────────────────────────────────────── */
.s-carousel .wrap {
  position: relative;
}

.s-carousel .track {
  display: flex;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 0;
  padding-bottom: var(--s-3);
  /* Hide the scrollbar — the arrows + swipe are the affordance. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.s-carousel .track::-webkit-scrollbar {
  display: none;
}

/* Size whatever cards are passed in and snap them to the left edge. */
.s-carousel .track > * {
  flex: 0 0 clamp(270px, 82%, 360px);
  scroll-snap-align: start;
}
@media (min-width: 900px) {
  .s-carousel .track > * {
    flex-basis: clamp(320px, 31%, 380px);
  }
}

.s-carousel .controls {
  display: flex;
  gap: var(--s-3);
  margin-top: var(--s-5);
}

.s-carousel .arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--c-border);
  background: var(--c-surface-raised);
  color: var(--c-text);
  cursor: pointer;
  transition: background var(--d-fast) var(--e-standard),
    color var(--d-fast) var(--e-standard),
    border-color var(--d-fast) var(--e-standard);
}
.s-carousel .arrow:hover {
  background: var(--c-green);
  border-color: var(--c-green);
  color: #fff;
}

/* ── Slide cards (from the Engage page module, so slides render standalone) ─ */
.s-carousel .card {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--c-surface-raised);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  transition: transform var(--d-fast) var(--e-standard),
    box-shadow var(--d-fast) var(--e-standard),
    border-color var(--d-fast) var(--e-standard);
}
.s-carousel .card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
  border-color: color-mix(in srgb, var(--c-green) 40%, var(--c-border));
}

/* The give ask leads — feature it with the heritage green. */
.s-carousel .cardDonate {
  border-color: color-mix(in srgb, var(--c-green) 45%, var(--c-border));
  background: color-mix(in srgb, var(--c-green) 6%, var(--c-surface-raised));
}

.s-carousel .iconTile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--c-green) 12%, var(--c-surface-raised));
  color: var(--c-green);
}
.s-carousel .cardDonate .iconTile {
  background: var(--c-green);
  color: #fff;
}

.s-carousel .mediaTile {
  display: block;
  overflow: hidden;
  border-radius: var(--r-md);
  aspect-ratio: 16 / 10;
  background: var(--c-surface-raised);
}
.s-carousel .mediaTile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.s-carousel .cardTitle {
  margin: 0;
}

.s-carousel .cardBody {
  margin: 0;
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--c-text);
  text-wrap: pretty;
}

/* Push the CTA to the bottom so cards in a row align. */
.s-carousel .cardCta {
  margin-top: auto;
  padding-top: var(--s-2);
}
