.testimonial-wrap {
  width: 100%;
  max-width: 1180px;
}

/* Carousel row: slides keep their positions */
.carousel {
  display: flex;
  gap: 18px;
  align-items: stretch;
  height: 500px;
  width: 100%;
  overflow: hidden;
}

/* Each slide's width is controlled by --flex custom property */
.slide {
  --flex: 0.8;
  flex: var(--flex);
  min-width: 150px;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: flex 420ms cubic-bezier(0.2, 0.9, 0.2, 1), filter 260ms ease,
    box-shadow 260ms ease;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.28)),
    linear-gradient(180deg, #0f1720, #0b0b0d);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.slide img.bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* meta overlay (name + role) */
.meta {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 4;
  pointer-events: none;
  color: #fff;
  transition: transform 300ms ease, opacity 300ms ease;
  opacity: 0;

  & > div {
    display: flex;
    align-items: center;
    gap: 8px;
  }
}
.avatar {
  --primary: rgb(0, 132, 255);
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background-color: var(--primary);
}
.name {
  font-weight: 600;
  font-size: 24px;
  display: block;
}
.role {
  font-size: 18px;
  color: #EDF2FF;
  display: block;
  margin-top: 12px;
}

/* non-active slides look dimmer */
.slide:not(.active) {
  /* filter: grayscale(0.36) contrast(0.92) brightness(0.85); */
  filter: grayscale(1);
}
.slide.active {
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  .meta {
    opacity: 1;
  }
}

/* responsive tweaks */
@media (max-width: 900px) {
  .carousel {
    height: 380px;
    gap: 12px;
  }
  .slide {
    min-width: 60px;
  }
}
@media (max-width: 520px) {
  .carousel {
    height: 320px;
    gap: 8px;
  }
  .slide {
    min-width: 48px;
  }
}
