/* Review cards row (markup: <section class="reviews" data-reviews>). Behavior
   lives in /reviews.js. Styled for a dark or colored background. */
.reviews {
  position: relative;
}

.reviews-rail {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  /* Room below for the cards' shadow, which the scrolling row would clip. */
  padding: 0.25rem 0 1.75rem;
  scrollbar-width: none;
  /* Fade the right edge so the next card reads as "more this way". */
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
  mask-image: linear-gradient(to right, #000 85%, transparent);
}

.reviews-rail::-webkit-scrollbar {
  display: none;
}

.reviews.at-end .reviews-rail {
  -webkit-mask-image: none;
  mask-image: none;
}

.reviews-rail:focus-visible {
  outline: 2px solid white;
  outline-offset: 4px;
  border-radius: 14px;
}

.review-card {
  flex: 0 0 clamp(260px, 40%, 340px);
  scroll-snap-align: start;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
  background: white;
  color: #1f2937;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(30, 20, 80, 0.18);
  text-align: left;
}

.review-stars {
  color: #f59e0b;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  line-height: 1;
}

.review-card blockquote {
  flex: 1;
  margin: 0;
}

.review-card blockquote p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #374151;
}

.review-card figcaption {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.review-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
}

.review-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
  color: #111827;
}

.review-source {
  display: block;
  font-size: 0.8rem;
  line-height: 1.25;
  color: #6b7280;
}

.reviews-controls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: -0.5rem;
}

.reviews-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.reviews-controls button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reviews-controls button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.25);
}

.reviews-controls button:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (max-width: 600px) {
  .review-card {
    flex-basis: 85%;
  }
}
