/* ============================================ */
/* TESTIMONIALS CAROUSEL SECTION - FITMETRICS */
/* Premium horizontal auto-scrolling carousel */
/* ============================================ */

.testimonials-section {
  background: linear-gradient(135deg, #f5e6d3 0%, #e8d5b7 50%, #dcc9a8 100%);
  position: relative;
  z-index: 10;
}

.testimonials-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(139,111,71,0.05)"/></svg>');
  background-size: 40px 40px;
  opacity: 0.5;
  pointer-events: none;
}

.testimonials-container {
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ============================================ */
/* SECTION HEADER */
/* ============================================ */

.testimonials-header {
  text-align: center;
  margin-bottom: 80px;
  margin-top: 3rem;
}

.testimonials-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: #4a3c2a;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

.testimonials-subtitle {
  font-size: 1.25rem;
  color: #6b5744;
  font-weight: 400;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

/* ============================================ */
/* CAROUSEL WRAPPER & CONTAINER */
/* ============================================ */

.carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 24px;
  margin-bottom: 60px;
}

.carousel-track-container {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 32px;
  padding: 20px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  margin: 0 20px;
}

.carousel-track.is-dragging {
  transition: none;
  cursor: grabbing !important;
}

.carousel-track.is-paused {
  animation-play-state: paused !important;
}

/* ============================================ */
/* TESTIMONIAL CARD */
/* ============================================ */

.testimonial-card {
  flex: 0 0 420px;
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 36px;
  box-shadow: 0 8px 32px rgba(139, 111, 71, 0.12);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid transparent;
  min-height: 240px;
  height: auto;
  user-select: none;
  margin: 16px;
  overflow: visible;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 20px;
  left: 30px;
  font-size: 80px;
  font-family: Georgia, serif;
  color: rgba(109, 231, 93, 0.15);
  line-height: 1;
  pointer-events: none;
}

.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(139, 111, 71, 0.2);
  border-color: #6de75d;
}

/* ============================================ */
/* CARD HEADER (User Info) */
/* ============================================ */

.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 2;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(139, 111, 71, 0.1);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6de75d 0%, #8b6f47 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow: 0 4px 8px rgba(109, 231, 93, 0.3);
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.user-name {
  font-size: 1rem;
  font-weight: 600;
  color: #2c2416;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  margin-bottom: 2px;
}

.user-role {
  font-size: 0.8rem;
  color: #8b6f47;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* ============================================ */
/* STAR RATING */
/* ============================================ */

.card-rating {
  display: flex;
  gap: 6px;
  margin-top: auto;
}

.star {
  color: #6de75d;
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.testimonial-card:hover .star {
  transform: scale(1.1);
}

.testimonial-card:hover .star:nth-child(1) {
  transition-delay: 0s;
}
.testimonial-card:hover .star:nth-child(2) {
  transition-delay: 0.05s;
}
.testimonial-card:hover .star:nth-child(3) {
  transition-delay: 0.1s;
}
.testimonial-card:hover .star:nth-child(4) {
  transition-delay: 0.15s;
}
.testimonial-card:hover .star:nth-child(5) {
  transition-delay: 0.2s;
}

/* ============================================ */
/* CARD CONTENT */
/* ============================================ */

.card-content {
  flex: 1;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: visible;
  padding: 8px 0;
  margin: 0;
  min-height: 120px;
  max-height: none;
}

.card-text {
  font-size: 0.95rem;
  color: #4a3c2a;
  line-height: 1.7;
  margin: 0;
  font-weight: 400;
  height: auto;
  max-height: 5.1em;
  overflow: hidden;
  padding: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.card-highlight {
  font-weight: 700;
  color: #2c2416;
  background: linear-gradient(
    120deg,
    rgba(109, 231, 93, 0.2) 0%,
    transparent 100%
  );
  padding: 2px 4px;
  border-radius: 4px;
}

/* Date element removed */

/* ============================================ */
/* CAROUSEL CONTROLS */
/* ============================================ */

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 40px;
}

.carousel-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #e8d5b7;
  color: #6de75d;
  font-size: 1.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(139, 111, 71, 0.1);
  line-height: 1;
  padding: 0;
}

.carousel-btn:hover {
  background: #6de75d;
  color: #ffffff;
  border-color: #6de75d;
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(109, 231, 93, 0.4);
}

.carousel-btn:active {
  transform: scale(0.95);
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: scale(1);
}

/* ============================================ */
/* CAROUSEL INDICATORS (DOTS) */
/* ============================================ */

.carousel-indicators {
  display: flex;
  gap: 12px;
  align-items: center;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #dcc9a8;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-dot:hover {
  background: #8b6f47;
  transform: scale(1.2);
}

.carousel-dot.active {
  width: 36px;
  border-radius: 6px;
  background: #6de75d;
  transform: scale(1);
}

/* ============================================ */
/* PAUSE INDICATOR */
/* ============================================ */

.pause-indicator {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10;
  pointer-events: none;
}

.carousel-wrapper:hover .pause-indicator,
.carousel-wrapper:focus-within .pause-indicator,
.carousel-track.is-paused ~ .pause-indicator {
  opacity: 1;
  visibility: visible;
}

/* ============================================ */
/* SCROLL REVEAL ANIMATIONS */
/* ============================================ */

.reveal-fade {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-fade.active {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================ */
/* RESPONSIVE DESIGN */
/* ============================================ */

@media screen and (max-width: 1200px) {
  .testimonials-title {
    font-size: 3rem;
  }

  .testimonial-card {
    flex: 0 0 400px;
    min-height: 300px;
  }
}

@media screen and (max-width: 968px) {
  .testimonials-section {
    padding: 80px 5%;
  }

  .testimonials-header {
    margin-bottom: 60px;
  }

  .testimonials-title {
    font-size: 2.5rem;
  }

  .testimonials-subtitle {
    font-size: 1.1rem;
  }

  .testimonial-card {
    flex: 0 0 360px;
    padding: 32px;
    min-height: 280px;
  }

  .carousel-controls {
    gap: 24px;
    margin-top: 32px;
  }

  .carousel-btn {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 640px) {
  .testimonials-section {
    padding: 60px 4%;
  }

  .testimonials-header {
    margin-bottom: 50px;
  }

  .testimonials-title {
    font-size: 2rem;
  }

  .testimonials-subtitle {
    font-size: 1rem;
  }

  .carousel-track {
    gap: 20px;
  }

  .testimonial-card {
    flex: 0 0 320px;
    padding: 28px;
    min-height: 260px;
  }

  .testimonial-card::before {
    font-size: 60px;
    top: 15px;
    left: 20px;
  }

  .user-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }

  .user-name {
    font-size: 1.1rem;
  }

  .user-role {
    font-size: 0.85rem;
  }

  .card-text {
    font-size: 0.95rem;
  }

  .star {
    font-size: 1.2rem;
  }

  .carousel-controls {
    gap: 20px;
    margin-top: 28px;
  }

  .carousel-btn {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }

  .carousel-dot {
    width: 10px;
    height: 10px;
  }

  .carousel-dot.active {
    width: 30px;
  }
}

@media screen and (max-width: 480px) {
  .testimonials-section {
    padding: 50px 3%;
  }

  .testimonials-title {
    font-size: 1.75rem;
  }

  .testimonial-card {
    flex: 0 0 280px;
    padding: 24px;
  }
}

/* ============================================ */
/* ACCESSIBILITY */
/* ============================================ */

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

  .testimonial-card,
  .carousel-btn,
  .carousel-dot,
  .star {
    transition: none;
  }

  .testimonial-card:hover {
    transform: none;
  }
}

.carousel-btn:focus,
.carousel-dot:focus {
  outline: 3px solid #6de75d;
  outline-offset: 4px;
}

.carousel-btn:focus-visible,
.carousel-dot:focus-visible {
  outline: 3px solid #6de75d;
  outline-offset: 4px;
}

/* ============================================ */
/* TOUCH DEVICE OPTIMIZATIONS */
/* ============================================ */

@media (hover: none) and (pointer: coarse) {
  .testimonial-card {
    transition: box-shadow 0.3s ease;
  }

  .testimonial-card:hover {
    transform: none;
  }

  .carousel-track {
    cursor: grab;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .testimonial-card {
    scroll-snap-align: center;
  }
}

/* ============================================ */
/* LOADING STATE (SKELETON) */
/* ============================================ */

.testimonial-card.skeleton {
  pointer-events: none;
  overflow: hidden;
  position: relative;
}

.testimonial-card.skeleton::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
