.testimonials {
  padding: 120px 20px;
  background: linear-gradient(180deg,#ffffff,#f6f8fc);
}

.container {
  max-width: 1200px;
  margin: auto;
  text-align: center;
}

/* Heading */
.section-head {
  margin-bottom: 70px;
}

.badge {
  display: inline-block;
  background: #ffeb3b;
  padding: 6px 18px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 14px;
}

.section-head h2 {
  font-size: 44px;
  font-weight: 800;
  margin: 18px 0 10px;
}

.section-head p {
  color: #666;
}

/* Slider Layout */
.testimonial-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.testimonial-slider {
  position: relative;
  width: 100%;
  max-width: 780px;
}

/* Card */
.testimonial {
  display: none;
  background: #fff;
  padding: 55px 45px 45px;
  border-radius: 32px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.08);
}

.testimonial.active {
  display: block;
  animation: fadeUp 0.7s ease;
}

@keyframes fadeUp {
  from {opacity:0; transform:translateY(20px)}
  to {opacity:1; transform:none}
}

/* Avatar */
.avatar-wrap {
  width: 110px;
  height: 110px;
  margin: -110px auto 10px;
  background: #fff;
  border-radius: 50%;
  padding: 6px;
  box-shadow: 0 15px 40px rgba(0,0,0,.15);
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Text */
.testimonial h4 {
  font-size: 22px;
  margin-top: 20px;
}

.stars {
  color: #ffc107;
  font-size: 20px;
  margin: 10px 0;
}

.testimonial p {
  font-size: 17px;
  line-height: 1.8;
  color: #555;
  margin: 25px 0;
}

.role {
  font-weight: 600;
}

/* Nav Buttons */
.nav {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: #000;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

/* Dots */
.dots {
  margin-top: 35px;
}

.dot {
  width: 10px;
  height: 10px;
  background: #ddd;
  display: inline-block;
  margin: 0 5px;
  border-radius: 50%;
  cursor: pointer;
}

.dot.active {
  background: #000;
}

.review-section {
  margin-top: 120px;
  padding: 60px 20px;
  background: linear-gradient(135deg,#f6f8fc,#ffffff);
}

.review-card {
  max-width: 520px;
  margin: auto;
  background: #fff;
  padding: 45px 40px;
  border-radius: 32px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.08);
  text-align: center;
}

.review-card h3 {
  font-size: 28px;
  font-weight: 800;
}

.review-card p {
  color: #666;
  margin: 8px 0 35px;
}

/* Floating Inputs */
.input-group {
  position: relative;
  margin-bottom: 22px;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid #ddd;
  font-size: 15px;
  outline: none;
}

.input-group label {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: #999;
  font-size: 14px;
  pointer-events: none;
  transition: 0.3s;
  background: #fff;
  padding: 0 6px;
}

.input-group input:focus + label,
.input-group textarea:focus + label,
.input-group input:valid + label,
.input-group textarea:valid + label {
  top: -6px;
  font-size: 12px;
  color: #4facfe;
}

.input-group.textarea textarea {
  min-height: 120px;
  resize: none;
}

/* Rating */
.rating-box {
  text-align: left;
  margin-bottom: 25px;
}

.rating-box span {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
  color: #555;
}

/* Stars */
.stars-input {
  display: inline-flex;
  flex-direction: row-reverse; /* IMPORTANT FIX */
  justify-content: flex-end;
}

.stars-input input {
  display: none;
}

.stars-input label {
  font-size: 30px;
  color: #ddd;
  cursor: pointer;
  transition: color 0.2s;
}

/* Hover effect */
.stars-input label:hover,
.stars-input label:hover ~ label {
  color: #ffc107;
}

/* Checked effect */
.stars-input input:checked ~ label {
  color: #ffc107;
}


/* Upload */
.upload-box {
  margin-bottom: 30px;
  text-align: left;
}

.upload-box input {
  display: none;
}

.upload-box label {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  background: #f0f3ff;
  cursor: pointer;
  font-size: 14px;
}

#preview {
  display: none;
  width: 70px;
  height: 70px;
  margin-top: 12px;
  border-radius: 50%;
  object-fit: cover;
}

/* Button */
.review-card button {
  width: 100%;
  padding: 15px;
  border-radius: 16px;
  background: linear-gradient(135deg,#4facfe,#00f2fe);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}

.review-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(79,172,254,0.4);
}

/* Responsive */
@media(max-width:600px){
  .review-card {
    padding: 35px 25px;
  }
}
