/*--------------------------------------------------------------
# Professional Testimonials Section
--------------------------------------------------------------*/

.testimonials {
  padding: 80px 0;
  background-color: var(--light-surface-color);
  overflow: hidden;
  transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Testimonials Container - Horizontal Scrolling */
.testimonials-container {
  position: relative;
  height: 500px;
  overflow: hidden;
  margin: 0 auto;
  max-width: 100%;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(var(--accent-color-rgb), 0.05) 0%, transparent 100%);
  border: 1px solid rgba(var(--border-color-rgb), 0.1);
  box-shadow: 0 20px 60px rgba(var(--shadow-color-rgb), 0.1);
}

.testimonials .section-title h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 1rem;
}

.testimonials .section-title p {
  font-size: 1.1rem;
  color: var(--default-color);
  opacity: 0.8;
}

/* Testimonial Card Design - Vertical Rectangle */
.testimonial-card {
  background: var(--surface-color);
  border-radius: 20px;
  padding: 30px 25px;
  box-shadow: 0 12px 40px rgba(var(--shadow-color-rgb), 0.15);
  border: 1px solid var(--border-color);
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 400px;
  width: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px 20px 0 0;
}

/* Testimonial Header - Improved Layout */
.testimonial-header {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(var(--border-color-rgb), 0.1);
}

.testimonial-avatar {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent-color);
  box-shadow: 0 6px 20px rgba(var(--shadow-color-rgb), 0.15);
  margin-right: 15px;
  flex-shrink: 0;
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.testimonial-info h4 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--heading-color);
  margin: 0 0 6px 0;
  text-align: left;
}

.testimonial-role {
  font-size: 0.95rem;
  color: var(--accent-color);
  font-weight: 500;
  display: block;
  margin-bottom: 10px;
  text-align: left;
}

.testimonial-rating {
  display: flex;
  gap: 3px;
  justify-content: flex-start;
}

.testimonial-rating i {
  color: #ffc107;
  font-size: 1rem;
}

/* Testimonial Content - Perfect Text Alignment */
.testimonial-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.testimonial-quote {
  font-size: 2.5rem;
  color: var(--accent-color);
  opacity: 0.4;
  margin-bottom: 18px;
  line-height: 1;
  text-align: left;
}

.testimonial-content p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--default-color);
  margin: 0;
  font-style: italic;
  flex-grow: 1;
  display: flex;
  align-items: center;
  text-align: left;
  font-weight: 400;
}

/* Swiper Customization */
.testimonials-swiper {
  padding: 20px 0 60px 0;
  overflow: hidden;
}

.testimonials-swiper .swiper-slide {
  height: auto;
  display: flex;
}

.testimonials-swiper .swiper-pagination {
  bottom: 10px;
}

.testimonials-swiper .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: var(--accent-color);
  opacity: 0.3;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.testimonials-swiper .swiper-pagination-bullet-active {
  opacity: 1;
  transform: scale(1.2);
  background: var(--accent-color);
}

.testimonials-swiper .swiper-button-next,
.testimonials-swiper .swiper-button-prev {
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  color: var(--accent-color);
  font-size: 16px;
  margin-top: -22px;
  transition: all 0.3s ease;
}

.testimonials-swiper .swiper-button-next:hover,
.testimonials-swiper .swiper-button-prev:hover {
  background: var(--accent-color);
  color: #fff;
  transform: scale(1.1);
}

.testimonials-swiper .swiper-button-next::after,
.testimonials-swiper .swiper-button-prev::after {
  font-size: 16px;
  font-weight: 600;
}

/* HORIZONTAL SCROLLING - ONE BY ONE VERTICAL CARDS */
.testimonials-track {
  display: flex;
  gap: 30px;
  width: fit-content;
  animation: scrollHorizontalCards 40s linear infinite;
  will-change: transform;
  padding: 50px 30px;
  height: 100%;
  align-items: center;
}

.testimonials-track:hover {
  animation-play-state: paused;
}

@keyframes scrollHorizontalCards {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-350px * 9)); /* Card width + gap * number of cards including duplicates */
  }
}

/* Remove column layout - cards are now individual */
.testimonial-column {
  display: contents; /* This makes the column wrapper invisible */
}

/* Staggered vertical animation for cards */
.testimonial-column:nth-child(even) {
  margin-top: 40px;
}

.testimonial-column:nth-child(3n) {
  margin-top: 20px;
}

/* Mobile Testimonials */
.testimonials-mobile {
  padding: 0 15px;
}

.testimonial-mobile-card {
  margin-bottom: 25px;
  padding: 25px;
}

.testimonial-mobile-card .testimonial-avatar {
  width: 50px;
  height: 50px;
  margin-right: 12px;
}

.testimonial-mobile-card .testimonial-info h4 {
  font-size: 1rem;
}

.testimonial-mobile-card .testimonial-role {
  font-size: 0.85rem;
}

.testimonial-mobile-card .testimonial-content p {
  font-size: 0.95rem;
  line-height: 1.5;
}

.testimonial-mobile-card .testimonial-quote {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 1199px) {
  .testimonials-swiper .swiper-button-next,
  .testimonials-swiper .swiper-button-prev {
    display: none;
  }
}

@media (max-width: 991px) {
  .testimonials {
    padding: 60px 0;
  }
  
  .testimonials .section-title h2 {
    font-size: 2rem;
  }
  
  .testimonial-card {
    padding: 25px;
  }
  
  .testimonials-swiper {
    padding: 15px 0 50px 0;
  }
}

@media (max-width: 768px) {
  .testimonials {
    padding: 50px 0;
  }
  
  .testimonials .section-title h2 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
  }
  
  .testimonials .section-title p {
    font-size: 1rem;
  }
  
  .testimonial-mobile-card {
    padding: 20px;
    border-radius: 15px;
  }
  
  .testimonial-mobile-card .testimonial-header {
    margin-bottom: 15px;
  }
  
  .testimonial-mobile-card .testimonial-avatar {
    width: 45px;
    height: 45px;
    margin-right: 10px;
  }
  
  .testimonial-mobile-card .testimonial-info h4 {
    font-size: 0.95rem;
  }
  
  .testimonial-mobile-card .testimonial-role {
    font-size: 0.8rem;
    margin-bottom: 6px;
  }
  
  .testimonial-mobile-card .testimonial-rating i {
    font-size: 0.8rem;
  }
  
  .testimonial-mobile-card .testimonial-content p {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  .testimonial-mobile-card .testimonial-quote {
    font-size: 1.3rem;
    margin-bottom: 8px;
  }
}

@media (max-width: 576px) {
  .testimonials {
    padding: 40px 0;
  }
  
  .testimonials .section-title h2 {
    font-size: 1.6rem;
  }
  
  .testimonials-mobile {
    padding: 0 10px;
  }
  
  .testimonial-mobile-card {
    padding: 18px;
    margin-bottom: 20px;
  }
  
  .testimonial-mobile-card .testimonial-header {
    margin-bottom: 12px;
  }
  
  .testimonial-mobile-card .testimonial-avatar {
    width: 40px;
    height: 40px;
    margin-right: 8px;
  }
  
  .testimonial-mobile-card .testimonial-info h4 {
    font-size: 0.9rem;
  }
  
  .testimonial-mobile-card .testimonial-role {
    font-size: 0.75rem;
  }
  
  .testimonial-mobile-card .testimonial-content p {
    font-size: 0.85rem;
  }
  
  .testimonial-mobile-card .testimonial-quote {
    font-size: 1.2rem;
  }
}

/* Animation Enhancements */
.testimonial-card {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.testimonial-card:nth-child(1) { animation-delay: 0.1s; }
.testimonial-card:nth-child(2) { animation-delay: 0.2s; }
.testimonial-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover Effects */
.testimonial-avatar {
  transition: all 0.3s ease;
}

.testimonial-card:hover .testimonial-avatar {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.testimonial-rating i {
  transition: all 0.3s ease;
}

.testimonial-card:hover .testimonial-rating i {
  color: #ff6b35;
  transform: scale(1.1);
}

/* Gradient Background Variations */
.testimonial-card:nth-child(even)::before {
  background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
}

.testimonial-card:nth-child(3n)::before {
  background: linear-gradient(135deg, #48cae4 0%, #0077b6 100%);
}

.testimonial-card:nth-child(4n)::before {
  background: linear-gradient(135deg, #06ffa5 0%, #0d9488 100%);
}

/* Enhanced visibility for animated testimonials */
.testimonial-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .testimonials {
    padding: 40px 0; /* Reduce section padding on mobile */
  }
  
  .testimonials-container {
    height: 350px; /* Smaller on mobile */
    margin: 0 -1rem; /* Full width on mobile */
  }
  
  .testimonial-column {
    min-width: 280px; /* Smaller cards on mobile */
  }
  
  .testimonial-card {
    padding: 1rem;
    margin: 0.5rem;
  }
  
  .testimonials-track {
    animation-duration: 25s; /* Slower scroll for better readability */
  }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
  .testimonials-container {
    height: 450px;
  }
  
  .testimonial-column {
    min-width: 300px;
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .testimonials {
    padding: 60px 0;
  }
  
  .testimonials-container {
    height: 400px;
    margin: 0 -1rem;
    border-radius: 16px;
  }
  
  .testimonials-track {
    padding: 20px 15px;
    gap: 20px;
    animation-duration: 35s;
  }
  
  .testimonial-card {
    height: 320px;
    width: 280px;
    padding: 20px 18px;
  }
  
  .testimonial-header {
    margin-bottom: 18px;
    padding-bottom: 15px;
  }
  
  .testimonial-avatar {
    width: 55px;
    height: 55px;
  }
  
  .testimonial-info h4 {
    font-size: 1.05rem;
  }
  
  .testimonial-role {
    font-size: 0.9rem;
  }
  
  .testimonial-content p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  .testimonial-quote {
    font-size: 2rem;
    margin-bottom: 12px;
  }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
  .testimonials-container {
    height: 450px;
  }
  
  .testimonial-card {
    height: 350px;
    width: 300px;
  }
  
  .testimonials-track {
    gap: 25px;
  }
}

/* Large screen optimizations */
@media (min-width: 1200px) {
  .testimonials-container {
    height: 550px;
  }
  
  .testimonial-card {
    height: 420px;
    width: 340px;
  }
  
  .testimonials-track {
    animation-duration: 45s;
    gap: 35px;
  }
}
