/* ===========================================================
   Reviews carousel — continuous sliding track (mobile-adapted)

   Reference interaction: https://cleanerguru.universeapps.limited/9eb49/
   Flex track slides via translateX(centerOffset − offsetLeft);
   neighbour cards peek at the edges and are faded by gradient
   shadow overlays.

   SIZING RULE — everything in this file is PX, not rem.
   flexible.js scales 1rem with the FULL browser viewport, but the
   landing page (.page/.download) is a fixed 375×812 canvas with a
   baked background image. Any rem-sized element explodes when the
   page is opened on a desktop / wide browser window. Using px keeps
   every interactive element pixel-identical to the 375 design grid
   (Figure-2 / 1.png) no matter where the file is viewed.

   Design-grid measurements (375×812, pixel-scanned from 1.png):
     card           x 43..332 (289 px)    y 406..558 (152 px)
     card content   left inset 27 px (text starts x=70), top inset 15 px
     stars          y 421..433            name 19 px y 448..462
     nav buttons    Ø 31 px, centres x 36 / 338, y ≈ card centre (482)
     dots           Ø 11 px, centres 28 px apart, row centre y ≈ 605.5
     section cover  y 400..663 (hides baked card y410..540 + baked dots y645)
   =========================================================== */

.reviews-section {
  position: absolute;
  top: 400px;             /* 4 px above the HTML card top, still covers baked card */
  left: 0;
  right: 0;
  height: 263px;          /* covers y=400..663 */
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

/* Cover rectangle — paints over the baked-in card + baked dot row in
   the EXACT page background colour so the seam is invisible. */
.reviews-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #f9f9f9;
  z-index: 1;
  pointer-events: none;
}

/* Viewport — clips the sliding track; sits over the card-body row */
.reviews-viewport {
  position: absolute;
  top: 6px;               /* y=406 in design grid */
  left: 0;
  right: 0;
  height: 150px;          /* y=406..556 */
  overflow: hidden;
  z-index: 2;
  pointer-events: none;
  touch-action: pan-y;    /* vertical scroll passes, horizontal captured */
}

/* Sliding track — flex row of cards; JS writes translateX here.
   width:100% (not max-content) so first-paint layout is stable. */
.reviews-list {
  display: flex;
  gap: 11px;
  padding-left: 8px;
  padding-right: 8px;
  align-items: center;
  height: 100%;
  width: 100%;
  transform: translateX(0);
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* While the user drags, kill the transition so the track follows
   the finger 1:1. Class is toggled by JS. */
.reviews-list.is-dragging {
  transition: none;
}

/* Card — 289×150 px matches 1.png exactly; neighbours peek ~32 px per
   side and fade under the shadows. Content inset 27 px left/right so
   text starts at x=70 like the target and wraps identically. */
.review-card {
  flex: 0 0 289px;
  height: 150px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e7e8ec;
  box-shadow: 0 6px 19px rgba(0, 0, 0, 0.10);
  padding: 15px 27px 0;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  scroll-snap-align: center;
}

.review-card .stars {
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
  line-height: 0;
}

.review-card .stars svg {
  width: 15px;
  height: 15px;
  fill: #f5b400;
  display: block;
}

.review-card .name {
  font-size: 19px;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 13px 0;
  line-height: 1.1;
}

.review-card .text {
  font-size: 13.5px;
  line-height: 1.40;
  color: #2a2a2a;
  margin: 0;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Edge shadow gradients — fade the peeking neighbours into the page
   background (#f9f9f9), like the reference's shadow-left/right.png. */
.reviews-shadow {
  position: absolute;
  top: 6px;
  height: 150px;
  width: 38px;
  z-index: 4;
  pointer-events: none;
}

.reviews-shadow-left {
  left: 0;
  background: linear-gradient(
    to right,
    #f9f9f9 0%,
    rgba(249, 249, 249, 0.85) 40%,
    rgba(249, 249, 249, 0) 100%
  );
}

.reviews-shadow-right {
  right: 0;
  background: linear-gradient(
    to left,
    #f9f9f9 0%,
    rgba(249, 249, 249, 0.85) 40%,
    rgba(249, 249, 249, 0) 100%
  );
}

/* Dots row — measured from 1.png: Ø 11 px dots, centres 28 px apart,
   row centre y≈605.5 in the design grid → 200 px from section top
   (605.5 − 400 − 5.5). Active dot is the SAME size, only colour. */
.reviews-dots {
  position: absolute;
  top: 200px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 17px;
  align-items: center;
  pointer-events: auto;
  z-index: 6;
}

.reviews-dots .dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d9d9d9;
  cursor: pointer;
  transition: background 0.2s ease;
}

.reviews-dots .dot.active {
  background: #4b71ff;
}

/* Nav buttons — 31 px circles, vertically centred on the card
   (card centre y=482 → 82 px from section top). */
.review-nav {
  position: absolute;
  top: 82px;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e7e8ec;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.10);
  z-index: 10;
  transform: translateY(-50%);
  transition: background 0.18s ease, transform 0.18s ease;
  pointer-events: auto;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* Card spans x 43..332; measured from 1.png the button centres sit at
   x≈36 / x≈338 — overlapping the card's left / right edge by ~8 px. */
.review-nav.prev { left: 20px; }
.review-nav.next { right: 20px; }

.review-nav:active {
  background: #f0f1f3;
  transform: translateY(-50%) scale(0.92);
}

.review-nav svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: #2c2c2c;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

/* Hide focus ring on mouse, keep accessible for keyboard nav */
.review-nav:focus:not(:focus-visible),
.reviews-dots .dot:focus:not(:focus-visible) {
  outline: none;
}
