/* Testimonials (Trang chủ) */
.testimonials {
  padding: 50px 0;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  overflow: hidden;
}

/* CONTAINER CHO CAROUSEL */
.testimonials-carousel {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 20px;
}

/* WRAPPER CHO TẤT CẢ TESTIMONIALS */
.testimonials-track {
  display: flex;
  width: calc(420px * 8);
  animation: autoScroll 30s linear infinite;
  gap: 30px;
}
@keyframes autoScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-420px * 4));
  }
}
.testimonials-track:hover {
  animation-play-state: paused;
}

.testimonial-card {
  background: white;
  padding: 35px 30px;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid rgba(0, 159, 201, 0.1);
  min-width: 390px;
  max-width: 390px;
  flex-shrink: 0;
  min-height: clamp(320px, 36vh, 380px);
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.testimonial-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(135deg, #009fc9, #3498db);
  border-radius: 24px 24px 0 0;
}
.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 72px rgba(0, 159, 201, 0.14),
    0 6px 16px rgba(15, 33, 58, 0.08);
  border-color: rgba(0, 159, 201, 0.25);
}

.testimonial-content {
  margin-bottom: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}
.testimonial-content::before {
  content: "\201C";
  font-size: 4rem;
  color: rgba(0, 159, 201, 0.1);
  font-family: "Times New Roman", serif;
  position: absolute;
  top: -15px;
  left: -5px;
  line-height: 1;
  z-index: 1;
}
.testimonial-content p {
  font-style: italic;
  color: #4a5568;
  line-height: 1.7;
  font-size: 1.05rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 2;
  margin-top: 10px;
  font-weight: 400;
}

/* Tác giả */
.testimonial-author {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
  flex-shrink: 0;
  text-align: left;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  position: relative;
}
.testimonial-author::before {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #009fc9, #3498db);
  margin-bottom: 14px;
  opacity: 0.9;
}
.author-info {
  text-align: left;
  width: 100%;
}
.author-info h4 {
  font-weight: 800;
  color: #0f213a;
  margin: 0 0 10px;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}
.author-info .author-role {
  display: block;
  color: #009fc9;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.35;
  margin-top: 2px;
}
.author-info .author-company {
  display: block;
  color: #009fc9;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.35;
  margin-top: 2px;
  opacity: 0.95;
}

/* Responsive */
@media (max-width: 768px) {
  .author-info h4 {
    font-size: 1.05rem;
  }
  .author-info .author-role,
  .author-info .author-company {
    font-size: 13px;
  }
  .testimonial-content p {
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }
}
@media (max-width: 480px) {
  .author-info h4 {
    font-size: 1rem;
  }
  .author-info .author-role,
  .author-info .author-company {
    font-size: 12px;
  }
}
.testimonials .testimonial-card .author-info .author-role,
.testimonials .testimonial-card .author-info .author-company {
  display: block;
  line-height: 1.35;
}
@media (min-width: 0) {
  .testimonials .testimonial-card .author-info .author-role,
  .testimonials .testimonial-card .author-info .author-company {
    display: block !important;
  }
}
