/* ── EOS Carousel — Divi 5 Group Carousel enhancements ─────────────
   Slide gap, equal-height cards, and the custom prev/next buttons
   (Figma: 71×41 outlined chevron pair). The buttons live in a Code
   module and are driven by js/carousel.js through Divi's own
   __groupCarouselInstance API — one slide per click, infinite wrap. */

.et_pb_group_carousel { --eos-carousel-gap: 1.5rem; }

/* ── Slide gap — widen the track by one gap, pad each slide by half.
   Slide widths stay a % of the track, so Divi's translateX math is
   untouched and the outer card edges stay flush with the section. ── */
.et_pb_group_carousel .et_pb_group_carousel_track {
  width: calc(100% + var(--eos-carousel-gap));
  margin-inline: calc(var(--eos-carousel-gap) / -2);
}
.et_pb_group_carousel .et_pb_group_carousel_slide {
  padding-inline: calc(var(--eos-carousel-gap) / 2);
}

/* ── Equal-height cards — the track already stretches every slide to
   the tallest one; the card fills its slide and the white content box
   absorbs the extra height (overrides Divi's flex-basis:50% on nested
   groups in a 2-up carousel). ── */
.et_pb_group_carousel .et_pb_group_carousel_slide { display: flex; }
.et_pb_group_carousel .et_pb_group_carousel_track > .et_pb_group_carousel_slide > .et_pb_group {
  display: flex;
  flex-direction: column;
  flex: 0 0 100%;
  min-width: 0;
}
.et_pb_group_carousel .et_pb_group_carousel_track > .et_pb_group_carousel_slide > .et_pb_group > .et_pb_module {
  flex: 0 0 auto;
}
.et_pb_group_carousel .et_pb_group_carousel_track > .et_pb_group_carousel_slide > .et_pb_group > .et_pb_group {
  flex: 1 1 auto;
}

/* ── Prev / next buttons ── */
.eos-carousel-nav {
  display: flex;
  gap: 0.625rem;
}
.eos-carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.4375rem;   /* 71px */
  height: 2.5625rem;  /* 41px */
  padding: 0;
  background: transparent;
  border: 1px solid var(--white);
  border-radius: 0;
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s ease-out;
}
.eos-carousel-btn svg {
  display: block;
  width: 0.5rem;      /* 8px  */
  height: 1.0625rem;  /* 17px */
  overflow: visible;
  transition: transform 0.3s ease;
}
.eos-carousel-btn path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}

/* hover: box fills white, chevron turns brown and nudges its way */
.eos-carousel-btn:hover {
  background: var(--white);
  color: var(--brown);
}
.eos-carousel-btn--prev:hover svg { transform: translateX(-0.125rem); }
.eos-carousel-btn--next:hover svg { transform: translateX(0.125rem); }

/* click: quick press-in */
.eos-carousel-btn:active { transform: scale(0.92); }

.eos-carousel-btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .eos-carousel-btn,
  .eos-carousel-btn svg { transition: none; }
  .eos-carousel-btn:active { transform: none; }
  .eos-carousel-btn--prev:hover svg,
  .eos-carousel-btn--next:hover svg { transform: none; }
}
