/*
 * ill: Card Slider
 * Active card aligned to container left, track can extend to the right.
 */

.ill-card-slider {
  padding: clamp(2rem, 4vw, 4rem) 0;
  overflow-x: clip;
}

.ill-card-slider__headline {
  margin: 0 0 2rem;
}

/* Extend right side to viewport edge while keeping left aligned */
.ill-card-slider__viewport {
  width: calc(100% + (50vw - 50%));
  overflow: visible;
}

.ill-card-slider__track {
  display: flex;
  align-items: stretch;
  gap: clamp(1.25rem, 2vw, 2rem);
  width: max-content;
  will-change: transform;
  transition: transform 320ms ease;
}


.ill-card-slider__track > .ill-card-slide {
  flex: 0 0 clamp(260px, 28vw, 420px);
  /* Keep all slides the same physical size; we only "fade" via background/text, not by shrinking */
  opacity: 1;
  transform: none;
}
.ill-card-slider__controls {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  /* Place controls under the first (active) card and center them within that card */
  width: clamp(260px, 28vw, 420px);
  justify-content: center;
  gap: 0.9rem;
}

.ill-card-slider__btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ill-card-slider__icon {
  font-size: 1.5rem;
  line-height: 1;
}

.ill-card-slider__counter {
  font-size: 0.95rem;
  color: var(--ill-primary, #AC9777);
  letter-spacing: 0.02em;
}


/* Controls: prevent Bootstrap from stretching buttons full width */
.ill-card-slider__controls .ill-card-slider__btn {
  flex: 0 0 56px;
  min-width: 56px;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 0;
  border: 1px solid var(--ill-primary, #AC9777);
  background: var(--ill-primary, #AC9777);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ill-card-slider__controls .ill-card-slider__btn:hover,
.ill-card-slider__controls .ill-card-slider__btn:focus,
.ill-card-slider__controls .ill-card-slider__btn:active {
  background: var(--ill-primary, #AC9777);
  color: #fff;
  outline: 0;
  box-shadow: none;
}


/* Backend preview */
.editor-styles-wrapper .ill-card-slider__viewport {
  width: 100%;
}

.editor-styles-wrapper .ill-card-slider__track {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scroll-snap-type: x mandatory;
}

.editor-styles-wrapper .ill-card-slider__track > .ill-card-slide {
  opacity: 1;
  scroll-snap-align: start;
}
