/* =========================================================================
   Kundenstimmen Slider — scroll-pinned horizontal testimonial component.

   Self-contained, reusable component. Drop the markup with
   data-kundenstimmen-slider and include this file + kundenstimmen-slider.js.

   Principle:
   - All slides live in static HTML for SEO (no JS-rendered content).
   - Without JS (or with prefers-reduced-motion): slides wrap into a normal
     grid so every testimonial stays accessible.
   - With JS: the section becomes scroll-pinned and the track is translated
     horizontally in sync with the vertical scroll progress.
   ========================================================================= */

.kundenstimmen-slider {
  width: 100%;
  position: relative;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
  padding-top: 100px;
}

.kundenstimmen-slider__pin {
  width: 100%;
}

.kundenstimmen-slider__stage {
  width: 100%;
  padding: 0 5% 200px 5%;
  box-sizing: border-box;
}

.kundenstimmen-slider__intro {
  font-size: 16px;
  line-height: 26px;
  font-family: proxima-nova, sans-serif;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.5);
  width: 28%;
  margin: 0 0 100px 0;
}

.kundenstimmen-slider__intro span {
  color: rgba(0, 0, 0, 0.95);
}

/* -- viewport + track --------------------------------------------------- */

.kundenstimmen-slider__viewport {
  width: 100%;
}

.kundenstimmen-slider__track {
  display: flex;
  flex-wrap: wrap;
  column-gap: 15px;
  row-gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* -- slide -------------------------------------------------------------- */

.kundenstimmen-slider__slide {
  flex: 0 0 calc(50% - 7.5px);
  min-width: 0;
  height: 380px;
  background-color: rgba(227, 249, 82, 1);
  border-radius: 10px;
  padding: 20px;
  position: relative;
  box-sizing: border-box;
  margin: 0;
}

.kundenstimmen-slider__stars {
  width: auto;
}

.kundenstimmen-slider__stars img {
  height: 10px;
  margin-right: 5px;
  width: auto;
}

.kundenstimmen-slider__logo {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 130px;
  height: auto;
  max-height: 60px;
  object-fit: contain;
  object-position: right top;
}

.kundenstimmen-slider__quote {
  margin: 0;
  padding: 0;
  position: static;
}

.kundenstimmen-slider__quote p {
  color: rgba(0, 0, 0, 0.95);
  font-size: 22px;
  line-height: 28px;
  font-family: "proxima-nova";
  font-weight: 600;
  position: absolute;
  bottom: 50px;
  left: 20px;
  right: 20px;
  margin: 0;
  padding: 0;
  z-index: 2;
}

.kundenstimmen-slider__attribution {
  color: rgba(0, 0, 0, 0.95);
  font-size: 13px;
  font-family: "proxima-nova";
  font-weight: 600;
  z-index: 2;
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  margin: 0;
  padding: 0;
}

.kundenstimmen-slider__attribution cite {
  font-style: normal;
}

.kundenstimmen-slider__name {
  display: inline;
}

.kundenstimmen-slider__role {
  color: rgba(0, 0, 0, 0.5);
  display: inline;
  margin-left: 10px;
}

/* =========================================================================
   Dark variant — add class .kundenstimmen-slider--dark to the section for
   a black background with light headline text.
   ========================================================================= */

.kundenstimmen-slider--dark {
  background: #000;
}

.kundenstimmen-slider--dark .kundenstimmen-slider__intro {
  color: rgba(255, 255, 255, 0.5);
}

.kundenstimmen-slider--dark .kundenstimmen-slider__intro span {
  color: rgba(255, 255, 255, 0.95);
}

/* =========================================================================
   Enhanced state — JS adds .is-enhanced once it has measured and taken over.
   ========================================================================= */

.kundenstimmen-slider.is-enhanced {
  /* JS sets the pixel height of the section inline so the sticky pin has a
     precise scroll runway. Fallback here is just "no fixed height". */
  padding-top: 0;
}

.kundenstimmen-slider.is-enhanced .kundenstimmen-slider__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh; /* small viewport height for mobile URL bar */
  overflow: hidden;
  display: block;
}

.kundenstimmen-slider.is-enhanced .kundenstimmen-slider__stage {
  height: 100%;
  padding: calc(var(--header-height, 80px) + 40px) 0 60px 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.kundenstimmen-slider.is-enhanced .kundenstimmen-slider__intro {
  margin: 0 5% 40px 5%;
  flex: 0 0 auto;
}

.kundenstimmen-slider.is-enhanced .kundenstimmen-slider__viewport {
  flex: 1 1 auto;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.kundenstimmen-slider.is-enhanced .kundenstimmen-slider__track {
  display: inline-flex;
  flex-wrap: nowrap;
  column-gap: 15px;
  row-gap: 0;
  padding: 0 5vw;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.kundenstimmen-slider.is-enhanced .kundenstimmen-slider__slide {
  flex: 0 0 calc((90vw - 15px) / 2);
  height: 380px;
}

/* =========================================================================
   Mobile
   ========================================================================= */

@media (max-width: 900px) {

  .kundenstimmen-slider {
    padding-top: 0;
  }

  .kundenstimmen-slider__stage {
    padding: 0 5% 80px 5%;
  }

  .kundenstimmen-slider__intro {
    font-size: 14px;
    line-height: 22px;
    width: 80%;
    margin-bottom: 80px;
  }

  .kundenstimmen-slider__track {
    flex-wrap: wrap;
  }

  .kundenstimmen-slider__slide {
    flex: 0 0 100%;
    height: auto;
    min-height: 320px;
    padding-bottom: 140px;
  }

  .kundenstimmen-slider__quote p {
    font-size: 18px;
    line-height: 24px;
  }

  .kundenstimmen-slider__logo {
    width: 100px;
    max-height: 40px;
  }

  /* Enhanced on mobile: 1 slide per viewport, full-bleed travel. */

  .kundenstimmen-slider.is-enhanced .kundenstimmen-slider__stage {
    padding: calc(var(--header-height, 60px) + 24px) 0 40px 0;
  }

  .kundenstimmen-slider.is-enhanced .kundenstimmen-slider__intro {
    margin: 0 5% 24px 5%;
  }

  .kundenstimmen-slider.is-enhanced .kundenstimmen-slider__track {
    padding: 0 5vw;
    flex-wrap: nowrap;
  }

  .kundenstimmen-slider.is-enhanced .kundenstimmen-slider__slide {
    flex: 0 0 90vw;
    height: auto;
    min-height: 320px;
    padding-bottom: 140px;
  }
}

/* =========================================================================
   Reduced motion — disable the scroll-pinning entirely.
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {

  .kundenstimmen-slider.is-enhanced {
    height: auto !important;
  }

  .kundenstimmen-slider.is-enhanced .kundenstimmen-slider__pin {
    position: static;
    height: auto;
    overflow: visible;
  }

  .kundenstimmen-slider.is-enhanced .kundenstimmen-slider__stage {
    height: auto;
    padding: 0 5% 200px 5%;
    display: block;
  }

  .kundenstimmen-slider.is-enhanced .kundenstimmen-slider__intro {
    margin: 0 0 100px 0;
  }

  .kundenstimmen-slider.is-enhanced .kundenstimmen-slider__viewport {
    overflow: visible;
    display: block;
  }

  .kundenstimmen-slider.is-enhanced .kundenstimmen-slider__track {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    transform: none !important;
  }

  .kundenstimmen-slider.is-enhanced .kundenstimmen-slider__slide {
    flex: 0 0 calc(50% - 7.5px);
    height: 380px;
  }

  @media (max-width: 900px) {
    .kundenstimmen-slider.is-enhanced .kundenstimmen-slider__slide {
      flex: 0 0 100%;
      height: auto;
      min-height: 320px;
      padding-bottom: 140px;
    }
  }
}
