/* ========================================
   TESTIMONIALS SECTION
======================================== */

.creative-testimonials-section {
  padding: 80px 0;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

/* ── Scroll wrapper ── */
.testimonials-scroll-wrapper {
  overflow: hidden;
  position: relative;
  margin-top: 60px;
  padding: 20px 0;
}

/* Fade edges */
.testimonials-scroll-wrapper::before,
.testimonials-scroll-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  width: 120px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}
.testimonials-scroll-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #ffffff, transparent);
}
.testimonials-scroll-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #ffffff, transparent);
}

/* ── Scroll track — scrolls RIGHT (cards move right → left reads as scrolling right) ── */
.testimonials-scroll-track {
  display: flex;
  gap: 28px;
  width: fit-content;
  will-change: transform;
  /* Start at negative offset (right side) scroll back to 0 = moves right */
  animation: scrollRight 55s linear infinite;
}

.testimonials-scroll-wrapper:hover .testimonials-scroll-track {
  animation-play-state: paused;
}

/* Scroll right: start offset left (half of total = 3 cards × (400px + 28px gap)), return to 0 */
@keyframes scrollRight {
  0%   { transform: translateX(calc((-400px - 28px) * 3)); }
  100% { transform: translateX(0); }
}

/* Tablet-specific keyframes — card width 340px, same gap 28px */
@keyframes scrollRightTablet {
  0%   { transform: translateX(calc((-340px - 28px) * 3)); }
  100% { transform: translateX(0); }
}

/* ── Section title ── */
.testimonial-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #e0d4ff 0%, #d4c5ff 100%);
  color: #6b46c1;
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}
.testimonial-badge i { font-size: 16px; }

.testimonial-main-title {
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
  line-height: 1.3;
}

.testimonial-subtitle {
  font-size: 16px;
  color: #666;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Cards ── */
.testimonial-creative-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 24px;
  padding: 36px;
  min-width: 400px;
  max-width: 400px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(12, 51, 101, 0.08);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.testimonial-creative-card:hover {
  box-shadow: 0 20px 50px rgba(12, 51, 101, 0.13);
  transform: translateY(-4px);
}

.testimonial-creative-card.featured {
  background: linear-gradient(145deg, #ffffff 0%, rgba(12, 51, 101, 0.02) 100%);
  border: 1.5px solid rgba(12, 51, 101, 0.18);
}

/* Top accent line on hover */
.testimonial-creative-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0C3365, #1a5fb0);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.testimonial-creative-card:hover::before { transform: scaleX(1); }

/* Quote icon */
.quote-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 52px;
  color: rgba(12, 51, 101, 0.07);
  line-height: 1;
  transition: color 0.4s ease, transform 0.4s ease;
}
.testimonial-creative-card:hover .quote-icon {
  color: rgba(12, 51, 101, 0.14);
  transform: scale(1.1) rotate(-5deg);
}

/* Header */
.testimonial-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  margin-top: 8px;
}

.testimonial-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background: #0C3365;
  box-shadow: 0 4px 12px rgba(12, 51, 101, 0.25);
  transition: transform 0.3s ease;
}
.testimonial-creative-card:hover .testimonial-avatar { transform: scale(1.08); }

.testimonial-author-info { flex: 1; }

.author-name {
  font-size: 17px;
  font-weight: 700;
  color: #1b1535;
  margin-bottom: 3px;
}

.author-position {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

/* Stars */
.rating {
  display: flex;
  gap: 3px;
  margin-bottom: 16px;
}
.rating i { color: #fbbf24; font-size: 15px; }

/* Text */
.testimonial-text {
  font-size: 14.5px;
  color: #4b5563;
  line-height: 1.8;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

/* ── Responsive ── */
@media (max-width: 991px) and (min-width: 768px) {
  .creative-testimonials-section { padding: 60px 0; }

  /* Hide the auto-scroll strip on tablet */
  .testimonials-scroll-wrapper { display: none !important; }

  /* Hide mobile carousel too — we use our own tablet grid */
  .testi-mobile-carousel { display: none !important; }

  /* Show 3-card static grid */
  .testi-tablet-grid {
    display: flex !important;
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
    padding: 0 16px;
  }

  /* Cards inside tablet grid: full width, no fixed min/max */
  .testi-tablet-grid .testimonial-creative-card {
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    padding: 28px;
  }
}

/* Mobile carousel — hidden on desktop/tablet, shown via media query */
.testi-mobile-carousel { display: none; }

/* Tablet grid — hidden everywhere by default; only tablet media query above turns it on */
.testi-tablet-grid { display: none; }

/* Ensure scroll wrapper is visible on desktop (≥992px) */
@media (min-width: 992px) {
  .testimonials-scroll-wrapper { display: block !important; }
  .testi-tablet-grid { display: none !important; }
}

/* =============================================
   MOBILE CAROUSEL (≤767px)
   Replaces auto-scroll with swipe carousel
   ============================================= */
@media (max-width: 767px) {
  .creative-testimonials-section { padding: 48px 0 52px; }

  /* Hide desktop auto-scroll wrapper, show carousel instead */
  .testimonials-scroll-wrapper { display: none; }

  /* Carousel container */
  .testi-mobile-carousel {
    display: block;
    position: relative;
    overflow: hidden;
    margin-top: 32px;
    touch-action: pan-y;
  }

  /* Track — holds only the 6 unique cards side by side */
  .testi-mobile-track {
    display: flex;
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
  }

  /* Each slide */
  .testi-mobile-slide {
    flex: 0 0 100%;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
  }

  /* Card inside slide */
  .testi-mobile-slide .testimonial-creative-card {
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    padding: 28px 24px;
    border-radius: 20px;
    box-shadow: 0 6px 28px rgba(12, 51, 101, 0.10);
    transform: none !important;
  }

  /* Dot indicators */
  .testi-mobile-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
  }
  .testi-mobile-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  .testi-mobile-dot.active {
    width: 24px;
    border-radius: 4px;
    background: #0C3365;
  }

  /* Nav arrows */
  .testi-mobile-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
  }
  .testi-mobile-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(12, 51, 101, 0.2);
    background: #fff;
    color: #0C3365;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 1rem;
  }
  .testi-mobile-btn:hover,
  .testi-mobile-btn:active {
    background: #0C3365;
    border-color: #0C3365;
    color: #fff;
  }
}

@media (max-width: 575px) {
  .testimonial-main-title { font-size: 22px; }
  .testimonial-subtitle { font-size: 13px; }
  .quote-icon { font-size: 40px; }
  .testimonial-avatar { width: 46px; height: 46px; font-size: 16px; }
  .author-name { font-size: 15px; }
  .author-position { font-size: 12px; }
  .testimonial-text { font-size: 13px; }
}

/* Touch — no hover effects */
@media (hover: none) and (pointer: coarse) {
  .testimonial-creative-card:hover {
    transform: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  }
  .testimonial-creative-card:hover::before { transform: scaleX(0); }
}
