/* Professional Testimonials Section (v2) */
:root {
  --testimonial-surface: rgba(15, 21, 33, 0.72);
  --testimonial-surface-hover: rgba(15, 21, 33, 0.86);
  --testimonial-border: rgba(0, 188, 212, 0.18);
  --testimonial-border-hover: rgba(0, 188, 212, 0.35);
  --testimonial-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
  --testimonial-shadow-hover: 0 26px 70px rgba(0, 0, 0, 0.5);

  /* Matching global gradient: Cyan to Blue */
  --primary-gradient: linear-gradient(90deg, #00bcd4 0%, #1e88e5 100%);
  --testimonial-border-gradient: linear-gradient(135deg,
      rgba(0, 188, 212, 0.65) 0%,
      rgba(30, 136, 229, 0.5) 45%,
      rgba(253, 216, 53, 0.22) 100%);
}

.testimonials-section {
  position: relative;
  padding: 80px 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, rgba(0, 188, 212, 0.08) 0%, transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(30, 136, 229, 0.06) 0%, transparent 60%);
}

.testimonials-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 14px;
  position: relative;
  z-index: 1;
}

.testimonials-grid {
  display: grid;
  gap: 28px;
  align-items: stretch;
  justify-items: stretch;
  grid-template-columns: 1fr;
  margin-top: 30px;
}

@media (min-width: 992px) {
  .testimonials-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 32px;
  }
}

.testimonials-left {
  background: linear-gradient(150deg, rgba(15, 21, 33, 0.9), rgba(15, 21, 33, 0.75));
  border: 1px solid rgba(0, 188, 212, 0.18);
  border-radius: 24px;
  padding: 22px 22px 20px;
  box-shadow: var(--testimonial-shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: space-between;
  min-height: 100%;
}

.testimonials-left::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(0, 188, 212, 0.12), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(30, 136, 229, 0.12), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.testimonials-left > * {
  position: relative;
  z-index: 1;
}

.testimonials-right {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Background decorations */
.testimonials-bg-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  opacity: 0.35;
}

.bg-circle-1 {
  width: 300px;
  height: 300px;
  background: rgba(0, 188, 212, 0.2);
  /* Cyan */
  top: -50px;
  left: -50px;
}

.bg-circle-2 {
  width: 250px;
  height: 250px;
  background: rgba(30, 136, 229, 0.2);
  /* Blue */
  bottom: -50px;
  right: -50px;
}

.testimonials-header {
  text-align: center;
  position: relative;
  z-index: 2;
  margin-bottom: 26px;
}

.testimonials-header--center {
  text-align: center;
  margin-bottom: 14px;
}

.testimonials-header--center .testimonials-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.testimonials-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 188, 212, 0.12);
  border: 1px solid rgba(0, 188, 212, 0.22);
  color: var(--primary-color);
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  font-size: 0.85rem;
}

html[dir="rtl"] .testimonials-eyebrow {
  letter-spacing: 0;
  text-transform: none;
}

.testimonials-section h2 {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  margin: 14px 0 0;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 10px rgba(0, 188, 212, 0.2);
}

.testimonials-subtitle {
  margin: 12px auto 0;
  max-width: 680px;
  color: var(--text-secondary-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

.testimonials-side-title {
  margin: 10px 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main-light);
  line-height: 1.3;
}

@media (min-width: 768px) {
  .testimonials-left .testimonials-header {
    text-align: left;
  }

  .testimonials-left .testimonials-subtitle {
    margin-left: 0;
    margin-right: 0;
    text-align: left;
  }
}

.testimonials-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.metric-chip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--testimonial-border);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.metric-chip i {
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-top: 2px;
}

.metric-label {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary-light);
}

.metric-value {
  margin: 2px 0 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main-light);
}

.testimonials-proof {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  margin-top: 16px;
  border-radius: 16px;
  border: 1px dashed rgba(0, 188, 212, 0.35);
  background: rgba(0, 188, 212, 0.07);
}

.proof-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-gradient);
  color: #06101b;
  font-weight: 800;
  font-size: 0.9rem;
  white-space: nowrap;
}

.proof-text {
  margin: 2px 0 0;
  color: var(--text-secondary-light);
  line-height: 1.6;
}

.testimonials-slider-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(var(--testimonial-surface), var(--testimonial-surface));
  border: 1px solid rgba(0, 188, 212, 0.2);
  border-radius: 22px;
  padding: 16px 18px 12px;
  box-shadow: var(--testimonial-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  align-self: stretch;
  flex: 1;
}

.slider-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.slider-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 188, 212, 0.16);
  color: var(--text-main-light);
  font-weight: 700;
  font-size: 0.9rem;
}

.slider-meta {
  color: var(--text-secondary-light);
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .slider-top-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Slider Container */
.testimonials-slider-container {
  position: relative;
  z-index: 2;
  padding: 6px 10px;
  outline: none;
  width: 100%;
}

.testimonials-slider-container:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.32);
  border-radius: 20px;
}

.testimonials-track-wrapper {
  overflow: hidden;
  padding: 10px 0 20px;
  /* Space for shadow/hover */
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.testimonials-track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: grab;
  align-items: stretch;
}

.testimonials-track:active {
  cursor: grabbing;
}

.testimonials-track.marquee-track {
  animation: testimonials-marquee var(--marquee-duration, 40s) linear infinite;
  will-change: transform;
}

.testimonials-slider-shell.marquee-enabled .slider-controls,
.testimonials-slider-shell.marquee-enabled .slider-dots {
  display: none;
}

@keyframes testimonials-marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(var(--marquee-distance, -50%));
  }
}

/* A11y helper */
.testimonials-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Testimonial Card */
.testimonial-card-pro {
  flex: 0 0 100%;
  /* Mobile default */
  min-width: 0;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--testimonial-surface), var(--testimonial-surface)) padding-box,
    var(--testimonial-border-gradient) border-box;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 24px 22px 22px;
  box-shadow: var(--testimonial-shadow);
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
  position: relative;
  overflow: hidden;
  user-select: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 420px;
  margin: 0 auto;
}

.testimonial-card-pro::before {
  content: '';
  position: absolute;
  inset: -1px;
  background:
    radial-gradient(circle at top left, rgba(0, 188, 212, 0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(30, 136, 229, 0.14), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
}

.testimonial-card-pro > * {
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .testimonial-card-pro {
    flex: 0 0 calc(48% - 12px);
    max-width: 380px;
  }
}

@media (min-width: 1024px) {
  .testimonial-card-pro {
    flex: 0 0 calc(45% - 12px);
    max-width: 360px;
  }
}

.testimonial-card-pro:hover {
  transform: translateY(-4px);
  box-shadow: var(--testimonial-shadow-hover);
  background:
    linear-gradient(var(--testimonial-surface-hover), var(--testimonial-surface-hover)) padding-box,
    var(--testimonial-border-gradient) border-box;
}

/* Quote Icon */
.quote-icon-bg {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 4rem;
  color: var(--primary-color);
  /* Cyan */
  opacity: 0.1;
  font-family: serif;
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}

html[dir="rtl"] .quote-icon-bg {
  right: auto;
  left: 20px;
}

/* Card Header */
.testimonial-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.testimonial-avatar-wrapper {
  position: relative;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
}

.testimonial-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  background-image: linear-gradient(#0f1521, #0f1521), var(--primary-gradient);
  /* Dark bg for image circle */
  background-origin: border-box;
  background-clip: content-box, border-box;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.testimonial-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.testimonial-name {
  font-size: 0.98rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-main-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.testimonial-role {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary-light);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Rating */
.testimonial-rating {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--accent-color);
  /* Yellow/Gold */
  font-size: 0.85rem;
  opacity: 0.95;
  white-space: nowrap;
}

html[dir="rtl"] .testimonial-rating {
  margin-left: 0;
  margin-right: auto;
}

/* Quote Text */
.testimonial-quote {
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary-light);
  flex: 1;
}

.testimonial-quote p {
  margin: 0;
}

/* Controls */
.slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 8px;
  flex-wrap: wrap;
}

@media (max-width: 991px) {
  .testimonials-grid {
    gap: 18px;
  }
}

.slider-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(0, 188, 212, 0.28);
  background: rgba(15, 21, 33, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--primary-color);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.slider-btn:hover {
  background: var(--primary-gradient);
  color: #06101b;
  transform: translateY(-1px) scale(1.08);
  box-shadow: 0 0 15px rgba(0, 188, 212, 0.4);
  border-color: rgba(0, 188, 212, 0.45);
}

.slider-btn:focus-visible {
  outline: 2px solid rgba(0, 188, 212, 0.8);
  outline-offset: 3px;
}

.slider-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(1);
}

/* Pagination Dots */
.slider-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.slider-dot:hover {
  background: rgba(255, 255, 255, 0.35);
}

.slider-dot:focus-visible {
  outline: 2px solid rgba(0, 188, 212, 0.8);
  outline-offset: 3px;
}

.slider-dot.active {
  background: var(--primary-gradient);
  width: 25px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 188, 212, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  .testimonials-track {
    transition: none;
  }

  .testimonial-card-pro {
    transition: none;
  }
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  .testimonials-section {
    padding: 64px 15px;
  }

  .testimonials-inner {
    padding: 0 10px;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-right {
    width: 100%;
    min-width: 0;
    margin-top: 8px;
  }

  .testimonials-left {
    padding: 20px;
    gap: 16px;
  }

  .testimonials-left .testimonials-header,
  .testimonials-left .testimonials-subtitle {
    text-align: center;
  }

  .testimonials-metrics {
    grid-template-columns: 1fr;
  }

  .metric-chip {
    align-items: center;
  }

  .testimonials-proof {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .testimonials-slider-shell {
    padding: 14px 14px 10px;
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
  }

  .slider-top-row {
    align-items: center;
    text-align: center;
  }

  .testimonials-track-wrapper {
    padding: 6px 0 16px;
    mask-image: none;
    overflow: hidden;
  }

  .testimonials-track {
    width: 100%;
  }

  .testimonial-card-pro {
    padding: 22px 20px;
    max-width: 100%;
    margin: 0;
  }

  .testimonial-header {
    flex-wrap: wrap;
    align-items: center;
  }

  .testimonial-name,
  .testimonial-role {
    white-space: normal;
  }

  .testimonial-rating {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  html[dir="rtl"] .testimonial-rating {
    margin-right: 0;
    justify-content: flex-end;
  }
}
