/* Interactive Testimonials Section with User Submission */

.testimonials {
  background: linear-gradient(180deg, #fdf8f4 0%, #ffffff 100%);
  padding: 80px 50px;
  overflow: visible;
}

body.dark-theme .testimonials {
  background: linear-gradient(180deg, #3a322d 0%, #2b2623 100%);
}

/* Testimonials Container */
.testimonials-container {
  position: relative;
  max-width: 900px;
  margin: 40px auto 30px;
  padding: 0 80px;
}

.testimonials-track {
  position: relative;
  overflow: visible;
  border-radius: 16px;
}

.testimonial-card {
  background: #ffffff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  display: none;
  animation: fadeIn 0.5s ease;
  border: 1px solid rgba(212, 163, 115, 0.1);
}

.testimonial-card.active {
  display: block;
}

body.dark-theme .testimonial-card {
  background: #3a322d;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  border-color: rgba(205, 166, 121, 0.15);
}

.testimonial-stars {
  color: #ffd700;
  font-size: 1.5rem;
  margin-bottom: 20px;
  letter-spacing: 4px;
}

.testimonial-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 30px;
  font-style: italic;
  position: relative;
}

.testimonial-text::before {
  content: '"';
  font-size: 4rem;
  color: rgba(212, 163, 115, 0.2);
  position: absolute;
  top: -20px;
  left: -10px;
  font-family: Georgia, serif;
  line-height: 1;
}

body.dark-theme .testimonial-text {
  color: #eae2d8;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e1306c, #ff7abf);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.author-info h4 {
  margin: 0;
  font-size: 1.05rem;
  color: #000;
}

.author-info p {
  margin: 4px 0 0 0;
  font-size: 0.9rem;
  color: #d4a373;
}

body.dark-theme .author-info h4 {
  color: #eae2d8;
}

/* Navigation */
.testimonial-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #d4a373;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 2.2rem;
  color: #d4a373;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  line-height: 1;
  padding: 0;
  user-select: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.testimonial-nav:hover {
  background: #d4a373;
  color: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(212, 163, 115, 0.4);
}

.testimonial-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.testimonial-prev {
  left: -10px;
}

.testimonial-next {
  right: -10px;
}

body.dark-theme .testimonial-nav {
  background: rgba(58, 50, 45, 0.95);
  border-color: #cda679;
  color: #cda679;
}

body.dark-theme .testimonial-nav:hover {
  background: #cda679;
  color: #2b2623;
}

/* Dots */
.testimonials-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(212, 163, 115, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: #d4a373;
  transform: scale(1.3);
}

/* Add Review Button */
.btn-add-review {
  background: #d4a373;
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(212, 163, 115, 0.3);
}

.btn-add-review:hover {
  background: #c37a50;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 163, 115, 0.4);
}

/* Review Form Overlay */
.review-form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: flex-start;
  z-index: 10000;
  padding: 40px 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.review-form-overlay.active {
  display: flex;
  opacity: 1;
}

.review-form-container {
  background: white;
  padding: 35px 40px 40px;
  border-radius: 16px;
  max-width: 550px;
  width: 100%;
  max-height: none;
  overflow: visible;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

body.dark-theme .review-form-container {
  background: #3a322d;
  color: #eae2d8;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.review-form-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #999;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 50%;
  z-index: 10;
  line-height: 1;
  padding: 0;
}

.review-form-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
  transform: rotate(90deg);
}

body.dark-theme .review-form-close {
  color: #ccc;
}

body.dark-theme .review-form-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.review-form-container h3 {
  margin: 0 0 8px 0;
  font-size: 1.6rem;
  color: #d4a373;
}

body.dark-theme .review-form-container h3 {
  color: #cda679;
}

.review-form-container > p {
  color: #666;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

body.dark-theme .review-form-container > p {
  color: #aaa;
}

/* Form Styles */
.review-form .form-group {
  margin-bottom: 18px;
}

.review-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

body.dark-theme .review-form label {
  color: #eae2d8;
}

.review-form input,
.review-form textarea,
.review-form select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: 'Montserrat', sans-serif;
  transition: all 0.3s ease;
}

.review-form input:focus,
.review-form textarea:focus,
.review-form select:focus {
  outline: none;
  border-color: #d4a373;
  box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.1);
}

body.dark-theme .review-form input,
body.dark-theme .review-form textarea,
body.dark-theme .review-form select {
  background: #2b2623;
  border-color: #4a4139;
  color: #eae2d8;
}

.review-form small {
  display: block;
  margin-top: 5px;
  color: #999;
  font-size: 0.85rem;
}

.char-counter {
  text-align: right;
}

/* Star Rating */
.star-rating {
  display: flex;
  gap: 8px;
  font-size: 2rem;
  margin: 8px 0;
}

.star {
  cursor: pointer;
  color: #ddd;
  transition: all 0.2s ease;
  user-select: none;
}

.star:hover,
.star.active {
  color: #ffd700;
  transform: scale(1.1);
}

/* Submit Button */
.btn-submit-review {
  width: 100%;
  background: #d4a373;
  color: white;
  border: none;
  padding: 13px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
}

.btn-submit-review:hover {
  background: #c37a50;
  transform: translateY(-2px);
}

.btn-submit-review:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Form Messages */
.form-message {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  display: none;
}

.form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .testimonials {
    padding: 60px 20px;
  }
  
  .testimonials-container {
    padding: 0 55px;
  }
  
  .testimonial-nav {
    width: 42px;
    height: 42px;
    font-size: 1.8rem;
  }
  
  .testimonial-prev {
    left: -5px;
  }
  
  .testimonial-next {
    right: -5px;
  }
  
  .review-form-overlay {
    padding: 20px 15px;
  }
  
  .review-form-container {
    padding: 25px 20px 30px;
    max-width: 100%;
  }
  
  .star-rating {
    font-size: 1.8rem;
    gap: 6px;
  }
  
  .review-form-container h3 {
    font-size: 1.4rem;
  }
  
  .btn-add-review {
    padding: 12px 28px;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .testimonials-container {
    padding: 0 50px;
  }
  
  .testimonial-card {
    padding: 30px 20px;
  }
  
  .testimonial-nav {
    width: 38px;
    height: 38px;
    font-size: 1.6rem;
  }
}