/* ==========================================================================
   Stories Slider — testimonial card + image pairs; one slide visible, next
   peeking. Site root font-size is 10px (1rem = 10px).
   ========================================================================== */

.stories-slider {
  --ss-card-bg: #eceafb;
  --ss-navy: var(--blue, #282f41);
  --ss-body: #3c3c4c;
  --ss-arrow-bg: #efedfb;
  --ss-arrow-border: #d6d1f3;
  --ss-radius: 20px;
  position: relative;
  width: 100%;
}

/* --- Header (heading + arrows + divider) ----------------------------------- */
.stories-slider__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  margin-bottom: 4rem;
  border-bottom: 2px solid var(--ss-navy);
}
.stories-slider__heading {
  margin: 0;
  font-size: clamp(2.4rem, 1.6rem + 2vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--ss-navy);
}

.stories-slider__arrows {
  display: flex;
  gap: 1.2rem;
  flex-shrink: 0;
}
.stories-slider__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 50%;
  background: var(--ss-arrow-bg);
  border: 1px solid var(--ss-arrow-border);
  color: var(--ss-navy);
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.stories-slider__arrow:hover:not(:disabled) {
  background: #dedafe;
}
.stories-slider__arrow svg {
  width: 1.8rem;
  height: 1.8rem;
}
.stories-slider__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

/* --- Slider: full-bleed to the right viewport edge so the peek reaches it --- */
.stories-slider__splide {
  margin-right: calc(50% - 50vw);
  overflow: clip;
}
.stories-slider__splide .splide__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.stories-slider__splide .splide__slide {
  list-style: none;
  margin: 0;
  padding: 0;
}
.stories-slider__splide .splide__slide::before,
.stories-slider__splide .splide__slide::marker {
  content: none;
  display: none;
}
/* Fallback layout before Splide mounts */
.stories-slider__splide:not(.is-initialized) .splide__list {
  display: flex;
  gap: 3rem;
  overflow-x: auto;
}
.stories-slider__splide:not(.is-initialized) .splide__slide {
  flex: 0 0 60%;
  min-width: 0;
}

/* --- Slide = text card + image -------------------------------------------- */
.stories-slider__slide {
  display: flex;
  align-items: stretch;
  height: 100%;
}
.stories-slider__card {
  flex: 0 0 57%;
  min-width: 0;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--ss-card-bg);
  border-radius: var(--ss-radius);
  padding: 4.5rem;
}
.stories-slider__media {
  flex: 0 0 53%;
  min-width: 0;
  margin-left: -10%; /* overlap onto the card's right edge */
  position: relative;
  z-index: 0; /* image sits on top of the card */
  display: flex;
}
.stories-slider__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--ss-radius);
}

/* --- Card content ---------------------------------------------------------- */
.stories-slider__quote {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--ss-navy);
  margin-bottom: 2rem;
}
.stories-slider__body {
  font-size: 1.5rem;
  line-height: 1.7;
  color: var(--ss-body);
}
.stories-slider__body > :first-child {
  margin-top: 0;
}
.stories-slider__body > :last-child {
  margin-bottom: 0;
}
.stories-slider__body p {
  margin: 0 0 1.4em;
}
.stories-slider__body strong {
  font-weight: 700;
}
.stories-slider__attribution {
  margin-top: 2.5rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ss-navy);
}

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
  .stories-slider__heading {
    font-size: 2.6rem;
  }
  .stories-slider__slide {
    flex-direction: column;
    gap: 0;
  }
  .stories-slider__card {
    flex-basis: auto;
    margin-block: 0; /* no overhang when stacked */
    border-radius: var(--ss-radius) var(--ss-radius) 0 0;
  }
  .stories-slider__media {
    flex-basis: auto;
    margin-left: 0; /* no overlap when stacked */
    min-height: 26rem;
  }
  .stories-slider__img {
    border-radius: 0 0 var(--ss-radius) var(--ss-radius);
  }
}
