/* Section 5 — Testimonials (clean) */
.testimonial-section {
  padding: 80px 0;
  overflow: hidden;
  position: relative;
}

.testimonial-section .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.testimonial-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #222;
}

.testimonial-description {
  color: #555;
  margin-bottom: 2rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Batches wrapper */
.testimonial-wrapper {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
}

/* Hide all batches by default; JS will add .active */
.testimonial-batch {
  display: none; /* hidden until activated */
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}

/* When active: layout as two columns */
.testimonial-batch.active {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  animation: fadeInUp 420ms ease forwards;
}

/* Individual item */
.testimonial-item {
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  max-width: 520px;
  min-width: 260px;
  flex: 1 1 420px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transform: translateY(0);
  transition: transform .28s ease, box-shadow .28s ease;
  /* floating animation applied while visible via .floating */
}

/* hover push up */
.testimonial-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

/* photo */
.testimonial-photo img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-bottom: 8px;
}

/* text */
.testimonial-message {
  color: #333;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 6px;
}
.testimonial-name {
  font-weight: 700;
  color: #222;
}
.testimonial-company a, .testimonial-company {
  color: #7a3cff;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
}

/* continuous alternate floating for items in active batch */
@keyframes floatY {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-18px); }
  100% { transform: translateY(0px); }
}
.testimonial-batch.active .testimonial-item {
  animation: floatY 4s ease-in-out infinite alternate;
  /* stagger via nth-child */
}
.testimonial-batch.active .testimonial-item:nth-child(1) { animation-delay: 0s; }
.testimonial-batch.active .testimonial-item:nth-child(2) { animation-delay: 0.4s; }

/* small fade-in */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Responsive: stack on small screens */
@media (max-width: 880px) {
  .testimonial-batch.active {
    flex-direction: column;
    align-items: center;
  }
  .testimonial-item {
    min-width: 100%;
    max-width: 720px;
  }
  .testimonial-batch.active .testimonial-item { animation: floatY 5s ease-in-out infinite alternate; }
}
