/* Testimonial Slider - Brewtopia v4.0 (native CSS scroll-snap) */

/* padding:0 28px keeps the clip 6px clear of the ±22px nav buttons on every breakpoint */
.testimonial-slider-wrapper { position: relative; padding: 0 28px; }

/* The clip is now a native horizontal scroll-snap container.
   - overflow-x:auto + scroll-snap drives the carousel (no JS transforms)
   - overflow-y:hidden + padding-bottom/margin-bottom trick keeps card
     shadows visible while still clipping vertically
   - scrollbar hidden cross-browser (we drive it with buttons/dots/swipe) */
.testimonial-track-clip {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* legacy Edge */
  padding-bottom: 30px;
  margin-bottom: -30px;
}
.testimonial-track-clip::-webkit-scrollbar { display: none; } /* Chrome/Safari */

/* width:100% pins the flex container to the clip width.
   gap:0 overrides a STALE `gap:1.5rem` rule still living in style.css that
   pushed cards wider than the clip and clipped the last one. Inter-card spacing
   comes from each slide's `padding:0 12px` instead. JS also enforces exact
   pixel widths inline (see applySizes) as the definitive guarantee. */
.testimonial-slider-track { display: flex; width: 100%; gap: 0; }

/* ---- slide widths ---- */
.testimonial-slide {
  flex: 0 0 100%;
  min-width: 0;
  padding: 0 12px;
  box-sizing: border-box;
  scroll-snap-align: start;
}
@media (min-width: 640px)  { .testimonial-slide { flex: 0 0 50%; } }
@media (min-width: 1024px) { .testimonial-slide { flex: 0 0 33.333%; } }
@media (min-width: 1280px) { .testimonial-slide { flex: 0 0 25%; } }
@media (min-width: 1536px) { .testimonial-slide { flex: 0 0 20%; } }

/* Last card gets an END snap point so the final page rests flush-right
   (never clipped) even when the card count doesn't divide evenly. */
.testimonial-slide:last-child { scroll-snap-align: end; }

/* ---- card ---- */
.testimonial-slide .testimonial-card {
  height: 100%;
  box-shadow: 0 4px 20px rgba(1,61,124,.12), 0 1px 6px rgba(0,0,0,.07);
  transition: box-shadow .3s ease, transform .3s ease;
}
.testimonial-slide .testimonial-card:hover {
  box-shadow: 0 8px 32px rgba(1,61,124,.2), 0 2px 10px rgba(0,0,0,.1);
  transform: translateY(-3px);
}

/* ---- nav buttons ---- */
.testimonial-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: #013d7c; border: 2px solid #013d7c; color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .3s ease;
  box-shadow: 0 4px 12px rgba(1,61,124,.35); z-index: 10;
}
.testimonial-nav-btn:hover {
  background: #002d5f; border-color: #002d5f;
  box-shadow: 0 6px 20px rgba(1,61,124,.5);
  transform: translateY(-50%) scale(1.08);
}
.testimonial-prev { left: -22px; }
.testimonial-next { right: -22px; }
@media (max-width: 639px) {
  .testimonial-nav-btn { display: none; }
}

/* ---- dots / controls ---- */
.testimonial-dots { display: flex; align-items: center; gap: 8px; }
.testimonial-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gray-300); border: none; cursor: pointer;
  transition: all .3s ease; padding: 0;
}
.testimonial-dot:hover  { background: var(--primary-light); transform: scale(1.2); }
.testimonial-dot.active { background: var(--primary-blue); width: 28px; border-radius: 14px; }
.testimonial-pause-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gray-100); border: 2px solid var(--gray-200);
  color: var(--gray-600); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .3s ease;
}
.testimonial-pause-btn:hover { background: var(--primary-blue); border-color: var(--primary-blue); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .testimonial-track-clip { scroll-behavior: auto; }
  .testimonial-dot, .testimonial-nav-btn, .testimonial-pause-btn,
  .testimonial-slide .testimonial-card { transition: none; }
}
