/**
 * Testimonials Slider Styles
 */

.testimonials-section {
  position: relative;
  overflow: hidden;
}

.testimonials-slider-container {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.testimonials-track {
  display: flex;
  gap: 2rem;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

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

.testimonial-card {
  flex: 0 0 calc(33.333% - 1.333rem); /* 3 cards visible by default */
  opacity: 0.4;
  transform: scale(0.9);
  transition: opacity 0.4s ease, transform 0.4s ease;
  will-change: opacity, transform;
}

.testimonial-card.is-visible {
  opacity: 1;
  transform: scale(0.95);
}

.testimonial-card.is-center {
  /* Center card stands out more - larger and elevated */
  z-index: 2;
  transform: scale(1.08) !important;
  opacity: 1 !important;
}

.testimonial-content {
  background: var(--map-surface);
  border: 1px solid var(--map-border);
  border-radius: var(--map-radius-lg, 16px);
  padding: 2.5rem 2rem;
  height: 550px; /* Fixed height for all cards */
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  position: relative;
}

.testimonial-content:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-content {
    transition: none;
  }
  
  .testimonial-content:hover {
    transform: none;
  }
}

.testimonial-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60px;
  margin-bottom: 1rem;
}

.testimonial-logo {
  max-width: 180px;
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

/* Center card logo is in full color */
.testimonial-card.is-center .testimonial-logo {
  filter: grayscale(0%);
  opacity: 1;
}

.testimonial-content:hover .testimonial-logo {
  filter: grayscale(0%);
  opacity: 1;
}

.testimonial-quote {
  flex: 1;
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--map-text-primary);
  font-style: italic;
  max-height: 280px; /* Fixed height for scrollable area */
  overflow-y: auto; /* Enable vertical scrolling */
  padding-right: 0.5rem; /* Space for scrollbar */
}

/* Custom scrollbar styling */
.testimonial-quote::-webkit-scrollbar {
  width: 6px;
}

.testimonial-quote::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.testimonial-quote::-webkit-scrollbar-thumb {
  background: var(--map-color-brand);
  border-radius: 3px;
}

.testimonial-quote::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--map-color-brand) 80%, black);
}

/* Firefox scrollbar */
.testimonial-quote {
  scrollbar-width: thin;
  scrollbar-color: var(--map-color-brand) rgba(0, 0, 0, 0.05);
}

.testimonial-quote p {
  margin: 0;
}

.testimonial-attribution {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-top: auto;
  padding-top: 1.5rem;
  font-style: normal;
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.testimonial-author {
  font-weight: 600;
  font-size: 1rem;
  color: var(--map-text-primary);
  margin-bottom: 0.125rem;
  background: none !important;
}

.testimonial-title,
.testimonial-company {
  font-size: 0.875rem;
  color: var(--map-text-subtle);
  line-height: 1.5;
  background: none !important;
}

/* Tier Badge */
.testimonial-tier-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  box-shadow: none !important;
  text-shadow: none !important;
  z-index: 10;
}

/* Navigation Controls */
.testimonials-nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-top: 3rem;
}

.testimonials-nav-top {
  margin-top: 0;
  margin-bottom: 2rem;
}

.testimonials-nav-prev,
.testimonials-nav-next {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--map-border);
  background: var(--map-surface);
  color: var(--map-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.testimonials-nav-prev:hover,
.testimonials-nav-next:hover {
  background: var(--map-color-brand);
  border-color: var(--map-color-brand);
  color: white;
  transform: scale(1.1);
}

.testimonials-nav-prev:active,
.testimonials-nav-next:active {
  transform: scale(0.95);
}

@media (prefers-reduced-motion: reduce) {
  .testimonials-nav-prev:hover,
  .testimonials-nav-next:hover {
    transform: none;
  }
  
  .testimonials-nav-prev:active,
  .testimonials-nav-next:active {
    transform: none;
  }
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .testimonial-card {
    flex: 0 0 calc(50% - 1rem); /* 2 cards on tablet */
  }
}

@media (max-width: 767px) {
  .testimonial-card {
    flex: 0 0 100%; /* 1 card on mobile */
  }
  
  .testimonials-track {
    gap: 1rem;
  }
  
  .testimonial-content {
    padding: 2rem 1.5rem;
  }
  
  .testimonial-quote {
    font-size: 1rem;
  }
  
  .testimonials-nav {
    margin-top: 2rem;
  }
}

/* Dark mode support */
[data-bs-theme="dark"] .testimonial-content {
  background: #f2f2f2 !important;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .testimonial-content:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="dark"] .testimonial-quote,
[data-bs-theme="dark"] .testimonial-quote p {
  color: #333 !important;
}

[data-bs-theme="dark"] .testimonial-author {
  color: #1a1a1a !important;
  background: none !important;
}

[data-bs-theme="dark"] .testimonial-title,
[data-bs-theme="dark"] .testimonial-company {
  color: #555 !important;
  background: none !important;
}

[data-bs-theme="dark"] .testimonial-attribution {
  background: none !important;
  background-color: transparent !important;
}

[data-bs-theme="dark"] .testimonial-author strong {
  color: #222 !important;
}

/* Dark mode testimonial logos - DISABLED (always show light logos as-is) */

[data-bs-theme="dark"] .testimonials-nav-prev,
[data-bs-theme="dark"] .testimonials-nav-next {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}
