.testimonial-carousel {
    color: rgba(0, 0, 0, 0.656);
    overflow: hidden;
    width: 100%;
    margin: auto;
    position: relative;
    background-color: var(--primary-color);
    padding: 10px 10px 40px 10px;
}

.testimonial-heading-div {
    color: white;
    padding: 20px;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px;
}

.testimonial {
    flex: 0 0 calc(33.33% - 20px);
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: calc(33.33% - 20px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.small {
    font-size: 70%;
}

/* Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.left-btn {
    left: 10px;
}

.right-btn {
    right: 10px;
}

@media (max-width: 768px) {
    .testimonial {
        flex: 0 0 100%;
        min-width: 100%;
    }
}

.reviews-summary {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  background: #fff;
  margin-top: 18px;
  margin-bottom: 18px;
}

.reviews-summary-left {
  min-width: 220px;
}

.reviews-average {
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1;
}

.reviews-average-number {
  font-size: 36px;
  font-weight: 700;
}

.reviews-average-outof {
  font-size: 16px;
  opacity: 0.7;
}

.reviews-stars {
  margin-top: 6px;
}

.reviews-count {
  margin-top: 6px;
  font-size: 14px;
  opacity: 0.75;
}

.reviews-summary-right {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reviews-row {
  display: grid;
  grid-template-columns: 14px 1fr 26px;
  gap: 10px;
  align-items: center;
}

.reviews-row-label {
  font-weight: 600;
  opacity: 0.9;
}

.reviews-row-meta {
  text-align: right;
  font-size: 13px;
  opacity: 0.75;
}

.reviews-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.08);
  overflow: hidden;
}

.reviews-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: orange;
}

.reviews-row.muted {
  opacity: 0.5;
}

.testimonial-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 30px;
}

.testimonial-topbar .testimonial-heading-div {
    align-items: start;
  min-width: 220px;
}

.testimonial-topbar .reviews-summary {
  flex: 0 0 auto;
  margin-bottom: 0; /* since it’s now in the top bar */
}

/* Stack on mobile */
@media (max-width: 768px) {
  .testimonial-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .testimonial-topbar .reviews-summary {
    width: 100%;
  }
}