/* Reviews Slider — endless carousel of text review cards. Theme tokens from style.css. */

/* ---- heading ----------------------------------------------------------- */
.rs-head { display: grid; justify-items: center; text-align: center; gap: .9rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.rs-pill {
  margin: 0; padding: .5rem 1.05rem; border-radius: var(--r-pill);
  background: var(--violet-050); color: var(--violet-700);
  font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.rs-title { margin: 0; font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.1; letter-spacing: -.02em; color: var(--ink); }
.rs-sub { margin: 0; font-size: .95rem; color: var(--ink-50); }
.rs-empty { text-align: center; color: var(--ink-50); }

/* ---- slider ------------------------------------------------------------ */
/* The clip is exactly as wide as the cards: nothing of the next card shows at
   rest. --rs-fade is a narrow soft edge on the outer sides, so cards slide in
   and out of view gently. It is kept under the card padding so the text of the
   first and last card stays fully opaque. */
.rs { --rs-gap: clamp(.8rem, 1.6vw, 1.15rem); --rs-fade: clamp(12px, 1.4vw, 18px); --rs-n: 1.12; }
@media (min-width: 640px)  { .rs { --rs-n: 2; } }
@media (min-width: 1000px) { .rs { --rs-n: 3; } }

.rs-viewport { position: relative; }

.rs-clip {
  overflow: hidden; touch-action: pan-y; cursor: grab;
  padding-block: 1rem; margin-block: -.4rem -.6rem;   /* room for the card shadows */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--rs-fade), #000 calc(100% - var(--rs-fade)), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 var(--rs-fade), #000 calc(100% - var(--rs-fade)), transparent 100%);
}
.rs-clip:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; border-radius: var(--r-md); }
.rs-clip.is-dragging { cursor: grabbing; user-select: none; }
.rs-clip.is-dragging .rs-card { pointer-events: none; }

.rs-track {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: var(--rs-gap);
  will-change: transform; transform: translate3d(0, 0, 0);
}

.rs-item {
  flex: 0 0 calc((100% - (var(--rs-n) - 1) * var(--rs-gap)) / var(--rs-n));
  margin: 0; padding: 0; min-width: 0; display: flex;
}

/* Few reviews, nothing to slide: centre them and drop the fade and arrows. */
.rs.is-static .rs-clip { -webkit-mask-image: none; mask-image: none; cursor: auto; }
.rs.is-static .rs-track { justify-content: center; }

/* ---- card -------------------------------------------------------------- */
.rs-card {
  width: 100%; display: flex; flex-direction: column; gap: 1rem;
  padding: 1.3rem 1.3rem 1.15rem; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  transition: box-shadow .4s var(--ease), border-color .3s;
}
.rs-card:hover { box-shadow: var(--shadow-md); border-color: var(--violet-100); }

.rs-top { display: flex; align-items: center; justify-content: space-between; min-height: 28px; }
.rs-quote { width: 26px; height: 26px; color: var(--violet-100); flex: none; }

/* Wordmark-style label, set in type (not Google's logo artwork). */
.rs-source { display: inline-flex; font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.rs-source i { font-style: normal; }
.rs-source i:nth-child(1), .rs-source i:nth-child(4) { color: #4285f4; }
.rs-source i:nth-child(2), .rs-source i:nth-child(6) { color: #ea4335; }
.rs-source i:nth-child(3) { color: #fbbc05; }
.rs-source i:nth-child(5) { color: #34a853; }

.rs-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.rs-text {
  margin: 0; font-size: .9rem; line-height: 1.65; color: var(--ink);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden;
}
.rs-card.is-open .rs-text { display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; }
.rs-more {
  all: unset; cursor: pointer; font-size: .78rem; font-weight: 700; color: var(--violet-700);
  text-decoration: underline; text-underline-offset: 3px;
}
.rs-more[hidden] { display: none; } /* "all: unset" above would otherwise override the hidden attribute */
.rs-more:hover { color: var(--violet-900); }
.rs-more:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 3px; }

.rs-foot { display: flex; align-items: center; gap: .7rem; padding-top: .2rem; }
.rs-ava { width: 36px; height: 36px; border-radius: 50%; flex: none; object-fit: cover; }
.rs-ava--ini {
  display: grid; place-items: center; color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  background: linear-gradient(135deg, var(--violet-700), var(--violet-900));
}
.rs-who { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.rs-who b { font-size: .84rem; color: var(--ink); overflow-wrap: anywhere; }
.rs-who small { font-size: .72rem; color: var(--ink-50); }

.rs-stars { display: inline-flex; gap: 1px; flex: none; }
.rs-stars span { display: block; width: 13px; height: 13px; }
.rs-stars svg { width: 100%; height: 100%; display: block; fill: currentColor; }
.rs-stars .on { color: var(--amber); }
.rs-stars .off { color: var(--soft-2); }

/* ---- arrows ------------------------------------------------------------ */
.rs-arrow {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; padding: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s;
}
.rs-arrow svg { width: 16px; height: 16px; }
.rs-arrow:hover { background: var(--violet); border-color: var(--violet); color: #fff; }
.rs-arrow:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
/* Centred on the card edge: half in the page margin, half over the card's own
   padding, so it never covers any text. */
.rs-arrow--prev { left: -21px; }
.rs-arrow--next { right: -21px; }
@media (max-width: 599px) { .rs-arrow { display: none; } }

@media (prefers-reduced-motion: reduce) { .rs-card, .rs-arrow { transition: none; } }
