/* ========== SISTEMA DE RESEÑAS ========== */

.reviews-section {
  padding: 60px 20px;
  background-color: #f8f9fa;
}

.reviews-container {
  max-width: 1200px;
  margin: 0 auto;
}

.reviews-header {
  text-align: center;
  margin-bottom: 40px;
}

.reviews-header h2 {
  color: #333;
  font-size: 2.5rem;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.reviews-header h2:after {
  content: '';
  position: absolute;
  width: 80px;
  height: 4px;
  background-color: #007bff;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

/* Estilos para las estadísticas */
.satisfaction-stats {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.satisfaction-stats:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.rating-overview {
  text-align: center;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.average-rating {
  font-size: 52px;
  font-weight: bold;
  color: #2c3e50;
  line-height: 1;
  margin-bottom: 10px;
  font-family: 'Arial', sans-serif;
}

.star-display {
  margin: 12px 0;
  color: #ffc107;
  font-size: 24px;
  letter-spacing: 2px;
}

.review-count {
  color: #777;
  font-size: 15px;
  margin-top: 8px;
}

.review-count span {
  font-weight: bold;
  color: #2c3e50;
}

.rating-bars {
  max-width: 550px;
  margin: 0 auto;
}

.rating-bar {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  transition: transform 0.2s ease;
}

.rating-bar:hover {
  transform: scale(1.02);
}

.rating-label {
  width: 50px;
  text-align: center;
  font-weight: bold;
  color: #444;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.rating-label i {
  color: #ffc107;
  font-size: 12px;
}

.rating-progress {
  flex-grow: 1;
  height: 14px;
  background-color: #f0f3f6;
  border-radius: 7px;
  margin: 0 12px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rating-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd43b, #ffc107);
  border-radius: 7px;
  transition: width 0.8s ease-in-out;
}

.rating-percent {
  width: 50px;
  text-align: right;
  font-size: 15px;
  font-weight: 600;
  color: #555;
}

/* Filtros de servicio */
.filter-container {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.filter-btn {
  background-color: #fff;
  border: 1px solid #dee2e6;
  color: #495057;
  padding: 8px 16px;
  margin: 0 5px 10px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.filter-btn:hover {
  background-color: #f8f9fa;
  border-color: #adb5bd;
}

.filter-btn.active {
  background-color: #007bff;
  color: #fff;
  border-color: #007bff;
}

.filter-btn i {
  margin-right: 5px;
}

/* Carrusel de reseñas */
.reviews-carousel {
  position: relative;
  overflow: hidden;
  padding: 20px 0;
}

.carousel-container {
  display: flex;
  transition: transform 0.5s ease;
}

.review-card {
  flex: 0 0 calc(33.333% - 20px);
  margin: 0 10px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  padding: 25px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.review-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.review-service {
  display: inline-block;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 20px;
  background-color: #e9f5ff;
  color: #007bff;
  margin-bottom: 10px;
}

.review-service i {
  margin-right: 5px;
}

.review-rating {
  color: #ffc107;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.review-title {
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
}

.review-content {
  color: #6c757d;
  margin-bottom: 15px;
  line-height: 1.6;
}

.review-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eee;
  padding-top: 15px;
  font-size: 0.9rem;
}

.review-customer {
  display: flex;
  align-items: center;
}

.customer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
}

.customer-name {
  font-weight: 600;
  color: #495057;
}

.verified-badge {
  color: #28a745;
  font-size: 0.8rem;
  margin-left: 5px;
}

.review-date {
  color: #adb5bd;
}

/* Controles del carrusel */
.carousel-controls {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.carousel-control {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #fff;
  border: 1px solid #dee2e6;
  color: #495057;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 5px;
}

.carousel-control:hover {
  background-color: #007bff;
  color: #fff;
  border-color: #007bff;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #dee2e6;
  margin: 0 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background-color: #007bff;
  transform: scale(1.2);
}

/* Modal para añadir reseñas */
.review-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.review-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.review-modal {
  background-color: #fff;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.review-modal-overlay.active .review-modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.5rem;
  color: #333;
  font-weight: bold;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #adb5bd;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #dc3545;
}

.review-form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 20px;
}

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

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ced4da;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  border-color: #80bdff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.star-rating-container {
  display: flex;
  align-items: center;
}

.star-rating {
  display: flex;
  margin-right: 15px;
}

.star-rating input {
  display: none;
}

.star-rating label {
  cursor: pointer;
  color: #e4e5e9;
  font-size: 1.5rem;
  padding: 0 3px;
  transition: color 0.3s ease;
}

.star-rating input:checked ~ label,
.star-rating input:checked + label,
.star-rating label:hover,
.star-rating label:hover ~ label {
  color: #ffc107;
}

.rating-text {
  font-weight: 600;
  color: #6c757d;
}

.form-submit {
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

.form-submit:hover {
  background-color: #0069d9;
}

.add-review-btn {
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 12px 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px auto 0;
}

.add-review-btn i {
  margin-right: 8px;
}

.add-review-btn:hover {
  background-color: #0069d9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

/* Responsive */
@media (max-width: 992px) {
  .review-card {
    flex: 0 0 calc(50% - 20px);
  }
  
  .rating-overview {
    flex: 0 0 100%;
    border-right: none;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .review-card {
    flex: 0 0 calc(100% - 20px);
  }
  
  .satisfaction-stats {
    flex-direction: column;
  }
  
  .reviews-header h2 {
    font-size: 2rem;
  }
  
  .average-rating {
    font-size: 3rem;
  }
}

@media (max-width: 576px) {
  .reviews-section {
    padding: 40px 15px;
  }
  
  .review-modal {
    padding: 20px;
  }
  
  .modal-title {
    font-size: 1.3rem;
  }
  
  .filter-btn {
    margin-bottom: 8px;
  }
}