/* Testimonials Marquee Styles */

.testimonials-section {
  padding: 4rem 0 6rem;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.testimonials-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.testimonials-header h2 {
  max-width: 720px;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0;
}

@media (max-width: 768px) {
  .testimonials-header h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .testimonials-header h2 {
    font-size: 1.35rem;
  }
}

@media (min-width: 640px) and (max-width: 767px) {
  .testimonials-header h2 {
    font-size: 2.5rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .testimonials-header h2 {
    font-size: 2.75rem;
  }
}

@media (min-width: 1024px) {
  .testimonials-header h2 {
    font-size: 3rem;
  }
}

.testimonials-header p {
  max-width: 600px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .testimonials-header p {
    font-size: 0.95rem;
    line-height: 1.5;
  }
}

@media (max-width: 480px) {
  .testimonials-header p {
    font-size: 0.9rem;
    line-height: 1.4;
  }
}

@media (min-width: 640px) and (max-width: 767px) {
  .testimonials-header p {
    font-size: 1.125rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .testimonials-header p {
    font-size: 1.1875rem;
  }
}

@media (min-width: 1024px) {
  .testimonials-header p {
    font-size: 1.25rem;
  }
}

/* Marquee Container */
.testimonials-marquee-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
}

.testimonials-marquee {
  display: flex;
  overflow: hidden;
  padding: 1rem 0;
  gap: 1.5rem;
  width: 100%;
}

.testimonials-marquee:hover .testimonials-marquee-track {
  animation-play-state: paused;
}

.testimonials-marquee-track {
  display: flex;
  gap: 1.5rem;
  flex-shrink: 0;
  animation: marquee 40s linear infinite;
  align-items: stretch;
}

/* Mobile optimization for marquee */
@media (max-width: 768px) {
  .testimonials-marquee-wrapper {
    padding: 2rem 0;
  }
  
  .testimonials-marquee {
    gap: 1rem;
  }
  
  .testimonials-marquee-track {
    gap: 1rem;
    animation-duration: 30s;
  }
  
  .testimonial-card {
    width: calc(100vw - 4rem);
    min-width: calc(100vw - 4rem);
    max-width: 350px;
  }
}

@media (max-width: 480px) {
  .testimonials-marquee-wrapper {
    padding: 1.5rem 0;
  }
  
  .testimonials-marquee {
    gap: 0.75rem;
  }
  
  .testimonials-marquee-track {
    gap: 0.75rem;
    animation-duration: 25s;
  }
  
  .testimonial-card {
    width: calc(100vw - 3rem);
    min-width: calc(100vw - 3rem);
    max-width: 300px;
    padding: 1.25rem;
  }
  
  .testimonial-text {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .testimonial-name {
    font-size: 1rem;
  }
  
  .testimonial-handle {
    font-size: 0.85rem;
  }
}

/* Enhanced mobile optimization for small screens */
@media (max-width: 360px) {
  .testimonials-marquee-wrapper {
    padding: 1.25rem 0;
  }
  
  .testimonials-marquee {
    gap: 0.5rem;
  }
  
  .testimonials-marquee-track {
    gap: 0.5rem;
    animation-duration: 20s;
  }
  
  .testimonial-card {
    width: calc(100vw - 2.5rem);
    min-width: calc(100vw - 2.5rem);
    max-width: 280px;
    padding: 1rem;
    min-height: 200px;
  }
  
  .testimonial-text {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  .testimonial-name {
    font-size: 0.95rem;
  }
  
  .testimonial-handle {
    font-size: 0.8rem;
  }
  
  .testimonial-avatar {
    width: 36px;
    height: 36px;
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 1rem));
  }
}

/* Gradient Overlays */
.testimonials-marquee-wrapper::before,
.testimonials-marquee-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  pointer-events: none;
  z-index: 2;
}

.testimonials-marquee-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-primary) 0%, transparent 100%);
}

.testimonials-marquee-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-primary) 0%, transparent 100%);
}

@media (min-width: 640px) {
  .testimonials-marquee-wrapper::before,
  .testimonials-marquee-wrapper::after {
    width: 200px;
  }
}

/* Testimonial Card */
.testimonial-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 1.25rem;
  border: 1px solid var(--card-border);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  padding: 1.75rem;
  text-align: left;
  width: 300px;
  min-width: 300px;
  height: 300px;
  flex-shrink: 0;
  transition: background 0.3s ease;
  text-decoration: none;
  color: inherit;
}

/* Improved mobile responsiveness for testimonial cards */
@media (max-width: 1024px) {
  .testimonial-card {
    width: 280px;
    min-width: 280px;
    height: 280px;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .testimonial-card {
    width: 90vw;
    min-width: 90vw;
    max-width: 350px;
    height: auto;
    min-height: 250px;
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .testimonial-card {
    width: 95vw;
    min-width: 95vw;
    max-width: none;
    min-height: 220px;
    padding: 1rem;
  }
}

@media (max-width: 320px) {
  .testimonial-card {
    width: 260px;
    min-width: 260px;
    height: 260px;
    padding: 1rem;
  }
  
  .testimonial-text {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  .testimonial-name {
    font-size: 0.95rem;
  }
  
  .testimonial-handle {
    font-size: 0.8rem;
  }
}

@media (min-width: 640px) {
  .testimonial-card {
    padding: 1.5rem;
  }
}

.testimonial-card:hover {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.testimonial-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.5rem;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.testimonial-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0;
}

.testimonial-handle {
  font-size: 0.875rem;
  color: var(--text-light);
  margin: 0;
}

.testimonial-text {
  flex: 1;
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
}

@media (max-width: 768px) {
  .testimonial-text {
    font-size: 1rem;
    line-height: 1.7;
  }
}

@media (max-width: 480px) {
  .testimonial-text {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

@media (min-width: 640px) {
  .testimonial-text {
    font-size: 1rem;
  }
}
