/* ============================================
   REVIEWS COMPACT SCROLL SECTION
   Compact horizontal auto-scrolling reviews
   ============================================ */

.reviews-compact-scroll {
  position: relative;
  z-index: var(--z-10);
  overflow: hidden;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}

/* Override global overlays */
.reviews-compact-scroll::after {
  display: none !important;
}

/* Section background image overlay */
.reviews-compact-scroll[data-bg]::after {
  content: "";
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  z-index: var(--z-0);
  background-color: color-mix(in srgb, var(--clr-black) 60%, transparent);
  pointer-events: none;
  display: block !important;
}

/* Inner container */
.reviews-compact-scroll__inner {
  position: relative;
  z-index: var(--z-10);
}

/* Container background image overlay */
.reviews-compact-scroll__inner[data-bg]:after {
  content: "";
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  z-index: var(--z-0);
  background-color: color-mix(in srgb, var(--clr-black) 60%, transparent);
  pointer-events: none;
}

/* Ensure content stays above overlays */
.reviews-compact-scroll__inner > * {
  position: relative;
  z-index: var(--z-10);
}

/* ============================================
   HEADER SECTION
   ============================================ */

.reviews-compact-scroll__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
  text-align: center;
}

@media (min-width: 991px) {
  .reviews-compact-scroll__header {
    margin-bottom: var(--space-2xl);
  }
}

/* Heading */
.reviews-compact-scroll__heading {
  margin: 0;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

/* Subheading */
.reviews-compact-scroll__subheading {
  margin: 0;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

/* ============================================
   HORIZONTAL SCROLLING REVIEWS (COMPACT)
   ============================================ */

.reviews-compact-scroll__reviews-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 5%,
    black 95%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 5%,
    black 95%,
    transparent
  );
}

.reviews-compact-scroll__reviews {
  display: flex;
  gap: var(--space-sm);
  animation: scroll-left-compact 50s linear infinite;
  will-change: transform;
}

/* Pause animation on hover */
.reviews-compact-scroll__reviews:hover {
  animation-play-state: paused;
}

/* Keyframes for infinite scroll */
@keyframes scroll-left-compact {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (min-width: 991px) {
  .reviews-compact-scroll__reviews {
    gap: var(--space-md);
    animation-duration: 70s;
  }
}

/* ============================================
   COMPACT REVIEW CARDS (50% HEIGHT)
   ============================================ */

.reviews-compact-scroll__review {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex-shrink: 0;
  width: 260px;
  padding: var(--space-xs) var(--space-md);
}

@media (min-width: 768px) {
  .reviews-compact-scroll__review {
    width: 300px;
  }
}

@media (min-width: 991px) {
  .reviews-compact-scroll__review {
    width: 320px;
  }
}

/* ============================================
   COMPACT HEADER (Avatar + Author + Stars)
   ============================================ */

.reviews-compact-scroll__compact-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
}

/* Avatar Wrapper (Smaller) */
.reviews-compact-scroll__avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

/* Avatar Circle (Compact 28px) */
.reviews-compact-scroll__avatar {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.reviews-compact-scroll__avatar span {
  line-height: 1.4;
}

/* Avatar Image */
.reviews-compact-scroll__avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Verified Badge (Smaller 14px) */
.reviews-compact-scroll__verified-badge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  border: 1.5px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.reviews-compact-scroll__verified-badge svg {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
}

/* Header Content (Author + Stars) */
.reviews-compact-scroll__header-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

/* Author Line (Name + Verified inline) */
.reviews-compact-scroll__author-line {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.reviews-compact-scroll__author-name {
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.reviews-compact-scroll__verified-text {
  margin: 0;
  line-height: 1.3;
  opacity: 0.5;
  white-space: nowrap;
}

/* Stars (Smaller 14px) */
.reviews-compact-scroll__stars {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.reviews-compact-scroll__stars svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

/* ============================================
   REVIEW TEXT (COMPACT - 2 LINES MAX)
   ============================================ */

.reviews-compact-scroll__review-text {
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   BUTTON
   ============================================ */

.reviews-compact-scroll__button-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-xl);
}

@media (min-width: 991px) {
  .reviews-compact-scroll__button-wrapper {
    margin-top: var(--space-2xl);
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Mobile adjustments */
@media (max-width: 767px) {
  .reviews-compact-scroll__reviews {
    gap: var(--space-xs);
    animation-duration: 35s;
  }
  
  .reviews-compact-scroll__review {
    width: 260px;
    padding: var(--space-xs) var(--space-sm);
    min-height: 100px;
  }
  
  .reviews-compact-scroll__avatar {
    width: 24px;
    height: 24px;
  }
  
  .reviews-compact-scroll__verified-badge {
    width: 12px;
    height: 12px;
  }
  
  .reviews-compact-scroll__verified-badge svg {
    width: 8px;
    height: 8px;
  }
  
  .reviews-compact-scroll__stars svg {
    width: 12px;
    height: 12px;
  }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 990px) {
  .reviews-compact-scroll__reviews {
    animation-duration: 50s;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .reviews-compact-scroll__reviews {
    animation: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  
  .reviews-compact-scroll__review {
    scroll-snap-align: start;
  }
  
  .reviews-compact-scroll__reviews-wrapper {
    mask-image: none;
    -webkit-mask-image: none;
  }
}

