/* ========================================
   TESTIMONIALS SECTION - FIXED
======================================== */

.testimonials {
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
  padding: 100px 0;
}

/* Background Decoration - Fixed Position */
.testimonials::before {
  content: '"';
  position: absolute;
  top: 50px;
  left: 30px;
  font-size: 15rem;
  font-family: Georgia, serif;
  color: var(--primary-color);
  opacity: 0.05;
  z-index: 0;
  line-height: 1;
  pointer-events: none;
}

/* Testimonials Slider Container - FIXED */
.testimonials-slider {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* Swiper Container - FIXED */
.testimonialSwiper {
  width: 100%;
  padding: 20px 0 60px 0;
  overflow: visible;
}

.testimonialSwiper .swiper-wrapper {
  align-items: stretch;
}

.testimonialSwiper .swiper-slide {
  height: auto;
  box-sizing: border-box;
}

/* Testimonial Card - FIXED */
.testimonial-card {
  background: var(--bg-card, #ffffff);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

[data-theme="dark"] .testimonial-card {
  background: var(--bg-card, #1e293b);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.testimonial-card:hover {
  border-color: var(--primary-color, #6366f1);
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.2);
}

/* Quote Icon */
.testimonial-header {
  margin-bottom: 20px;
}

.quote-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
  transition: transform 0.3s ease;
}

.testimonial-card:hover .quote-icon {
  transform: scale(1.1) rotate(10deg);
}

/* Testimonial Text */
.testimonial-text {
  font-size: 15px;
  color: var(--text-secondary, #6b7280);
  line-height: 1.8;
  margin-bottom: 20px;
  font-style: italic;
  flex-grow: 1;
}

/* Rating Stars */
.testimonial-rating {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 20px;
}

.testimonial-rating i {
  color: #fbbf24;
  font-size: 16px;
}

/* Author Section */
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  text-align: left;
}

[data-theme="dark"] .testimonial-author {
  border-top-color: rgba(255, 255, 255, 0.1);
}

/* Author Image */
.author-image {
  flex-shrink: 0;
}

.author-image img {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color, #6366f1);
}

/* Author Info */
.author-info {
  flex: 1;
  min-width: 0;
}

.author-info h4 {
  font-size: 16px;
  color: var(--text-primary, #1f2937);
  margin: 0 0 3px 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .author-info h4 {
  color: #f1f5f9;
}

.author-info p {
  font-size: 13px;
  color: var(--primary-color, #6366f1);
  margin: 0 0 2px 0;
  font-weight: 500;
}

.author-company {
  font-size: 12px;
  color: var(--text-light, #9ca3af);
  display: block;
}

/* ========================================
   SWIPER NAVIGATION - FIXED
======================================== */

.testimonialSwiper .swiper-button-prev,
.testimonialSwiper .swiper-button-next {
  width: 45px;
  height: 45px;
  background: var(--bg-card, #ffffff);
  border-radius: 50%;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  top: 50%;
  transform: translateY(-50%);
  margin-top: -30px;
}

[data-theme="dark"] .testimonialSwiper .swiper-button-prev,
[data-theme="dark"] .testimonialSwiper .swiper-button-next {
  background: #334155;
}

.testimonialSwiper .swiper-button-prev::after,
.testimonialSwiper .swiper-button-next::after {
  font-size: 16px;
  font-weight: bold;
  color: var(--text-primary, #1f2937);
}

[data-theme="dark"] .testimonialSwiper .swiper-button-prev::after,
[data-theme="dark"] .testimonialSwiper .swiper-button-next::after {
  color: #f1f5f9;
}

.testimonialSwiper .swiper-button-prev:hover,
.testimonialSwiper .swiper-button-next:hover {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.testimonialSwiper .swiper-button-prev:hover::after,
.testimonialSwiper .swiper-button-next:hover::after {
  color: #ffffff;
}

.testimonialSwiper .swiper-button-prev {
  left: 10px;
}

.testimonialSwiper .swiper-button-next {
  right: 10px;
}

/* ========================================
   SWIPER PAGINATION - FIXED
======================================== */

.testimonialSwiper .swiper-pagination {
  bottom: 10px;
  left: 0;
  right: 0;
  width: 100%;
}

.testimonialSwiper .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: #d1d5db;
  opacity: 1;
  transition: all 0.3s ease;
  margin: 0 5px;
}

[data-theme="dark"] .testimonialSwiper .swiper-pagination-bullet {
  background: #4b5563;
}

.testimonialSwiper .swiper-pagination-bullet-active {
  background: var(--primary-color, #6366f1);
  width: 30px;
  border-radius: 5px;
}

/* ========================================
   TESTIMONIALS STATS - FIXED
======================================== */

.testimonials-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 60px;
  padding: 30px;
  background: var(--bg-card, #ffffff);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .testimonials-stats {
  background: var(--bg-card, #1e293b);
}

.stat-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 15px;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 50px;
  background: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .stat-item:not(:last-child)::after {
  background: rgba(255, 255, 255, 0.1);
}

.stat-icon {
  width: 55px;
  height: 55px;
  border-radius: 15px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-info {
  text-align: left;
}

.stat-info h3 {
  font-size: 28px;
  color: var(--text-primary, #1f2937);
  margin: 0;
  font-weight: 700;
  line-height: 1;
}

[data-theme="dark"] .stat-info h3 {
  color: #f1f5f9;
}

.stat-info h3::after {
  content: '+';
  color: var(--primary-color, #6366f1);
  font-size: 20px;
}

.stat-info p {
  font-size: 13px;
  color: var(--text-secondary, #6b7280);
  margin: 5px 0 0 0;
}

/* ========================================
   RESPONSIVE - FIXED
======================================== */

@media (max-width: 1199px) {
  .testimonials-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-item:nth-child(2)::after {
    display: none;
  }
  
  .stat-item:nth-child(1),
  .stat-item:nth-child(2) {
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  [data-theme="dark"] .stat-item:nth-child(1),
  [data-theme="dark"] .stat-item:nth-child(2) {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 991px) {
  .testimonials {
    padding: 80px 0;
  }
  
  .testimonials::before {
    font-size: 10rem;
    top: 20px;
    left: 10px;
  }
  
  .testimonialSwiper .swiper-button-prev,
  .testimonialSwiper .swiper-button-next {
    width: 40px;
    height: 40px;
  }
  
  .testimonialSwiper .swiper-button-prev::after,
  .testimonialSwiper .swiper-button-next::after {
    font-size: 14px;
  }
}

@media (max-width: 767px) {
  .testimonials {
    padding: 60px 0;
  }
  
  .testimonials::before {
    display: none;
  }
  
  .testimonial-card {
    padding: 25px 20px;
  }
  
  .quote-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  .testimonial-text {
    font-size: 14px;
  }
  
  .testimonialSwiper .swiper-button-prev,
  .testimonialSwiper .swiper-button-next {
    display: none;
  }
  
  .author-image img {
    width: 50px;
    height: 50px;
  }
  
  .author-info h4 {
    font-size: 14px;
  }
  
  .author-info p {
    font-size: 12px;
  }
  
  .testimonials-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
    margin-top: 40px;
  }
  
  .stat-item {
    flex-direction: column;
    text-align: center;
    padding: 15px 10px;
  }
  
  .stat-item:not(:last-child)::after {
    display: none;
  }
  
  .stat-item:nth-child(1),
  .stat-item:nth-child(2) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 20px;
  }
  
  .stat-info {
    text-align: center;
  }
  
  .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  .stat-info h3 {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .testimonials-stats {
    grid-template-columns: 1fr;
  }
  
  .stat-item {
    flex-direction: row;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 15px;
  }
  
  [data-theme="dark"] .stat-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  
  .stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  
  .stat-item:nth-child(1),
  .stat-item:nth-child(2) {
    padding-bottom: 15px;
  }
  
  .stat-info {
    text-align: left;
  }
}