/* ==========================================================================
   WithFeeling Slider v2.9
   - Mobile (≤600px) nav now auto-displays "01", "02", "03"... via CSS counter
     instead of the (overlapping) client-name labels.
   - Desktop/tablet keep client names as-is. No HTML changes needed.
   ========================================================================== */

.wf-slider {
  --wf-blue: #24A1DE;
  --wf-radius: 12px;
  --wf-progress: 25000ms;
  --wf-slide-duration: 1100ms;

  position: relative;
  width: 100%;
  height: clamp(480px, 88vh, 1080px);
  background: transparent;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  color: #fff;
  z-index: 1;
}

.wf-slider *,
.wf-slider *::before,
.wf-slider *::after {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* ----- Slides layer ----- */

.wf-slides {
  position: absolute;
  inset: 0;
  border-radius: var(--wf-radius);
  overflow: hidden;
  background: #000;
}

.wf-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(0) scale(1);
  transition:
    transform var(--wf-slide-duration) cubic-bezier(0.65, 0, 0.35, 1),
    opacity calc(var(--wf-slide-duration) * 0.75) ease-in-out;
  pointer-events: none;
  z-index: 1;
  will-change: transform, opacity;
}

.wf-slide.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
  z-index: 2;
}

.wf-slide.is-leaving-fwd {
  opacity: 0;
  transform: translateX(-15%) scale(1.05);
  z-index: 1;
}

.wf-slide.is-leaving-back {
  opacity: 0;
  transform: translateX(15%) scale(1.05);
  z-index: 1;
}

.wf-slide.is-entering-fwd {
  opacity: 0;
  transform: translateX(15%) scale(0.95);
  transition: none;
}

.wf-slide.is-entering-back {
  opacity: 0;
  transform: translateX(-15%) scale(0.95);
  transition: none;
}

.wf-slide__video,
.wf-slide__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.wf-slide__poster {
  z-index: 0;
}

.wf-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0.55) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}

.wf-slide__link {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ----- Slide content ----- */

.wf-slide__content {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(3rem, 6vh, 5rem) clamp(1rem, 4vw, 3rem) clamp(5rem, 9vh, 7.5rem);
  text-align: center;
  pointer-events: none;
}

.wf-slide__label {
  position: absolute;
  top: clamp(1.5rem, 3vh, 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(0.7rem, 0.95vw, 0.85rem) !important;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}

/* Title — desktop default. !important to beat Salient theme h2 rules. */
.wf-slider .wf-slide__title {
  font-size: clamp(2.36rem, 6.5vw, 6.5rem) !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  margin: 0 0 clamp(1.5rem, 3vh, 2.5rem) !important;
  max-width: 95% !important;
  letter-spacing: -0.015em !important;
  color: #ffffff !important;
  text-shadow: 0 2px 16px rgba(0,0,0,0.45) !important;
}

.wf-slider .wf-slide__title strong {
  font-weight: inherit !important;
}

/* ----- Credits ----- */

.wf-slide__credits {
  display: grid;
  grid-template-columns: auto auto;
  width: fit-content;
  margin: 0 auto;
  column-gap: clamp(1.2rem, 2.2vw, 2.4rem);
  row-gap: 0.4em;
  align-items: center;
  border-left: 2px solid var(--wf-blue);
  padding-left: clamp(1.2rem, 1.8vw, 1.7rem);
  text-align: left;
  font-size: clamp(1.08rem, 1.38vw, 1.32rem);
  line-height: 1.4;
}

.wf-slide__credits .label {
  color: var(--wf-blue);
  font-weight: 700;
  font-size: 1em;
  text-transform: none;
  letter-spacing: 0.02em;
  opacity: 1;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

.wf-slide__credits .label + strong {
  margin: 0;
}

.wf-slide__credits strong {
  color: #ffffff;
  font-weight: 700;
  font-size: 1em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}

/* ----- Bottom navigation ----- */

.wf-slider__nav {
  position: absolute;
  bottom: clamp(1rem, 2.5vh, 2rem);
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  gap: 0;
}

.wf-slider__nav::before {
  content: '';
  position: absolute;
  left: clamp(1rem, 3vw, 2.5rem);
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.30);
  pointer-events: none;
}

.wf-slider__nav-item {
  flex: 1;
  position: relative;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: clamp(0.75rem, 1vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: none;
  padding: clamp(0.65rem, 1.2vh, 0.95rem) 0.5rem;
  cursor: pointer;
  border-radius: 0;
  transition: color 250ms ease;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  white-space: nowrap;
  min-width: 0;
}

.wf-slider__nav-item:hover {
  color: rgba(255, 255, 255, 0.85);
}

.wf-slider__nav-item.is-active {
  color: #ffffff;
  font-weight: 700;
}

.wf-slider__nav-item::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--wf-blue);
  border-radius: 2px;
  pointer-events: none;
}

.wf-slider__nav-item.is-active::after {
  animation: wf-progress-fill var(--wf-progress) linear forwards;
}

.wf-slider.is-paused .wf-slider__nav-item.is-active::after {
  animation-play-state: paused;
}

@keyframes wf-progress-fill {
  from { width: 0; }
  to   { width: 100%; }
}

/* ===== Tablet override (≤ 1024px) ===== */
@media (max-width: 1024px) {
  .wf-slider .wf-slide__title {
    font-size: clamp(5rem, 12vw, 8rem) !important;
    line-height: 1.05 !important;
  }
}

/* ===== Mobile override (≤ 600px) ===== */
@media (max-width: 600px) {
  .wf-slider {
    height: clamp(500px, 85svh, 800px);
  }
  .wf-slides {
    border-radius: 8px;
  }
  .wf-slide__credits {
    column-gap: 1rem;
    padding-left: 0.9rem;
  }
  .wf-slider .wf-slide__title {
    font-size: clamp(3.3rem, 10.5vw, 4.8rem) !important;
    line-height: 1.05 !important;
  }

  /* Mobile nav: replace client-name labels with auto-numbered "01–07" */
  .wf-slider__nav {
    counter-reset: wf-nav-counter;
  }
  .wf-slider__nav-item {
    font-size: 0 !important;          /* hide the actual button text */
    color: transparent !important;
  }
  .wf-slider__nav-item::before {
    counter-increment: wf-nav-counter;
    content: counter(wf-nav-counter, decimal-leading-zero);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  }
  .wf-slider__nav-item.is-active::before {
    color: #ffffff;
    font-weight: 700;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .wf-slide {
    transition: opacity 250ms ease;
    transform: none !important;
  }
  .wf-slide.is-leaving-fwd,
  .wf-slide.is-leaving-back,
  .wf-slide.is-entering-fwd,
  .wf-slide.is-entering-back {
    transform: none !important;
  }
  .wf-slider__nav-item.is-active::after {
    animation: none;
    width: 100%;
  }
}
