/* ROOT VARIABLES */
:root {
  --primary: #6a4dcf;
  --primary-dark: #5839b8;
  --primary-light: #8f6ad6;
  --text-dark: #1b1b1b;
  --text-medium: #4f4f4f;
  --text-light: #5f6368;
  --bg-white: #ffffff;
  --bg-off-white: #fafbfc;
  --gold: #fbbf24;
  --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* TESTIMONIALS SECTION */
.testimonials-premium {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  padding: 150px 0;
  position: relative;
  overflow: hidden;
}

/* ANIMATED BACKGROUND ORBS */
.testimonial-orbs {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.testimonial-orbs .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
  animation: floatOrb 25s ease-in-out infinite;
}

.testimonial-orbs .orb-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, #6a4dcf, #8f6ad6);
  top: -150px;
  right: -150px;
  animation-delay: 0s;
}

.testimonial-orbs .orb-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #8f6ad6, #b794f4);
  bottom: -100px;
  left: -100px;
  animation-delay: 12s;
}

@keyframes floatOrb {
  0%, 100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  33% {
    transform: translate(40px, -60px) scale(1.15) rotate(120deg);
  }
  66% {
    transform: translate(-50px, 40px) scale(0.9) rotate(240deg);
  }
}

/* HEADER */
.testimonial-header {
  max-width: 780px;
  margin: 0 auto 80px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.testimonial-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--primary);
  text-transform: uppercase;
  padding: 10px 24px;
  background: rgba(106, 77, 207, 0.08);
  border: 1px solid rgba(106, 77, 207, 0.2);
  border-radius: 50px;
  animation: fadeInDown 0.8s var(--transition-smooth);
}

.testimonial-eyebrow svg {
  width: 16px;
  height: 16px;
}

.testimonial-header h2 {
  font-size: 48px;
  font-weight: 700;
  margin: 24px 0;
  color: var(--text-dark);
  line-height: 1.2;
  animation: fadeInUp 0.8s var(--transition-smooth) 0.2s backwards;
}

.testimonial-description {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-light);
  max-width: 680px;
  margin: 0 auto;
  animation: fadeInUp 0.8s var(--transition-smooth) 0.4s backwards;
}

/* TESTIMONIALS WRAPPER */
.testimonials-wrapper {
  position: relative;
  max-width: 1200px;
  margin: 0 auto 100px;
  padding: 0 80px;
}

/* NAVIGATION ARROWS */
.testimonial-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(106, 77, 207, 0.2);
  background: var(--bg-white);
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s var(--transition-smooth);
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.testimonial-prev {
  left: 0;
}

.testimonial-next {
  right: 0;
}

.testimonial-nav:hover {
  background: var(--primary);
  color: var(--bg-white);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 24px rgba(106, 77, 207, 0.4);
}

.testimonial-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.testimonial-nav svg {
  transition: transform 0.3s var(--transition-bounce);
}

.testimonial-nav:hover svg {
  transform: translateX(3px);
}

.testimonial-prev:hover svg {
  transform: translateX(-3px);
}

/* TESTIMONIALS GRID */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  position: relative;
  min-height: 550px;
}

/* TESTIMONIAL CARD */
.testimonial-card {
  position: absolute;
  width: 100%;
  padding: 56px 48px;
  border-radius: 28px;
  background: var(--bg-white);
  border: 1.5px solid rgba(106, 77, 207, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateX(100px) scale(0.9);
  transition: all 0.7s var(--transition-smooth);
  pointer-events: none;
  overflow: hidden;
}

.testimonial-card.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: all;
  z-index: 2;
}

.testimonial-card.prev {
  opacity: 0;
  transform: translateX(-100px) scale(0.9);
}

/* CARD GLOW */
.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(106, 77, 207, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.testimonial-card:hover .card-glow {
  opacity: 1;
  animation: rotateGlow 8s linear infinite;
}

@keyframes rotateGlow {
  to {
    transform: rotate(360deg);
  }
}

/* QUOTE ICON */
.quote-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(106, 77, 207, 0.1), rgba(143, 106, 214, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  transition: all 0.5s var(--transition-bounce);
}

.quote-icon svg {
  color: var(--primary);
  opacity: 0.8;
  transition: all 0.5s var(--transition-bounce);
}

.testimonial-card:hover .quote-icon {
  transform: scale(1.1) rotate(-5deg);
  background: linear-gradient(135deg, rgba(106, 77, 207, 0.15), rgba(143, 106, 214, 0.2));
}

.testimonial-card:hover .quote-icon svg {
  transform: scale(1.1);
  opacity: 1;
}

/* RATING STARS */
.testimonial-rating {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}

.star {
  color: var(--gold);
  transition: all 0.3s var(--transition-bounce);
  animation: starPulse 2s ease-in-out infinite;
}

.star:nth-child(1) { animation-delay: 0s; }
.star:nth-child(2) { animation-delay: 0.1s; }
.star:nth-child(3) { animation-delay: 0.2s; }
.star:nth-child(4) { animation-delay: 0.3s; }
.star:nth-child(5) { animation-delay: 0.4s; }

@keyframes starPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.8;
  }
}

.testimonial-card:hover .star {
  transform: scale(1.2) rotate(15deg);
}

/* TESTIMONIAL TEXT */
.testimonial-text {
  font-size: 19px;
  line-height: 1.8;
  color: var(--text-dark);
  margin: 0 0 36px;
  font-style: italic;
  position: relative;
  padding-left: 24px;
  border-left: 3px solid var(--primary);
  transition: all 0.4s ease;
}

.testimonial-card:hover .testimonial-text {
  padding-left: 32px;
  border-left-width: 4px;
}

/* AUTHOR SECTION */
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 20px;
}

.author-avatar {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(106, 77, 207, 0.2);
  transition: all 0.4s var(--transition-smooth);
}

.testimonial-card:hover .author-avatar img {
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(106, 77, 207, 0.3);
}

/* AVATAR BADGE */
.avatar-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 50%;
  border: 3px solid var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s var(--transition-bounce);
}

.avatar-badge svg {
  width: 14px;
  height: 14px;
  color: white;
}

.testimonial-card:hover .avatar-badge {
  transform: scale(1.2) rotate(360deg);
}

/* AUTHOR INFO */
.author-info {
  flex: 1;
}

.author-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 4px;
  transition: color 0.3s ease;
}

.testimonial-card:hover .author-name {
  color: var(--primary);
}

.author-role {
  font-size: 14px;
  color: var(--text-medium);
  margin: 0 0 8px;
  font-weight: 500;
}

.author-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-light);
}

.author-location svg {
  width: 14px;
  height: 14px;
  fill: var(--primary);
  opacity: 0.7;
}

/* DECORATIVE PATTERN */
.card-pattern {
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(106, 77, 207, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transition: all 0.6s ease;
}

.testimonial-card:hover .card-pattern {
  transform: scale(1.3);
  opacity: 0.7;
}

/* PAGINATION DOTS */
.testimonial-pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 48px;
}

.pagination-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(106, 77, 207, 0.3);
  background: transparent;
  cursor: pointer;
  transition: all 0.4s var(--transition-smooth);
  padding: 0;
}

.pagination-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  width: 32px;
  border-radius: 8px;
}

.pagination-dot:not(.active):hover {
  background: rgba(106, 77, 207, 0.3);
  transform: scale(1.3);
}

/* ANIMATIONS */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .testimonials-wrapper {
    padding: 0 70px;
  }

  .testimonial-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .testimonials-premium {
    padding: 100px 0;
  }

  .testimonial-header h2 {
    font-size: 36px;
  }

  .testimonials-wrapper {
    padding: 0 20px;
    margin-bottom: 70px;
  }

  .testimonial-nav {
    width: 48px;
    height: 48px;
    position: static;
    transform: none;
  }

  .testimonial-nav:hover {
    transform: scale(1.1);
  }

  .testimonials-grid {
    min-height: 600px;
  }

  .testimonial-card {
    padding: 40px 32px;
  }

  .testimonial-text {
    font-size: 17px;
  }

  .testimonial-stats {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stat-item {
    padding: 24px;
  }

  .stat-number {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .testimonial-header h2 {
    font-size: 30px;
  }

  .testimonial-card {
    padding: 32px 24px;
  }

  .quote-icon {
    width: 56px;
    height: 56px;
  }

  .testimonial-text {
    font-size: 16px;
  }

  .author-avatar {
    width: 56px;
    height: 56px;
  }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
