/* =====================================================
   REVIEWS SYSTEM STYLES
   ===================================================== */

/* ---- REVIEWS SECTION ---- */
.reviews-section {
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.reviews-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
  flex-wrap: wrap;
}

.reviews-header .section-header {
  margin-bottom: 0;
}

/* ---- REVIEWS STATS ---- */
.reviews-stats {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-4) var(--space-6);
  background: rgba(201, 162, 39, 0.06);
  border: 1px solid rgba(201, 162, 39, 0.15);
  border-radius: var(--radius-xl);
}

.reviews-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.reviews-stat-item .stat-number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-gold);
  line-height: 1;
}

.reviews-stat-item .stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-stars {
  display: flex;
  gap: 2px;
  color: var(--color-gold);
}

.reviews-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(201, 162, 39, 0.2);
}

/* ---- REVIEWS SLIDER ---- */
.reviews-slider-wrapper {
  position: relative;
  margin-bottom: var(--space-8);
}

.reviews-swiper {
  overflow: hidden;
  padding: var(--space-2) 0;
}

.reviews-swiper .swiper-wrapper {
  align-items: stretch;
}

.reviews-swiper .swiper-slide {
  height: auto;
  opacity: 0.4;
  transform: scale(0.92);
  transition:
    opacity 0.5s var(--ease-out),
    transform 0.5s var(--ease-out);
}

.reviews-swiper .swiper-slide-active,
.reviews-swiper .swiper-slide-next,
.reviews-swiper .swiper-slide-prev {
  opacity: 1;
  transform: scale(1);
}

.reviews-swiper .swiper-slide .testimonial-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.reviews-swiper .swiper-slide .testimonial-content {
  flex: 1;
}

/* ---- CUSTOM NAVIGATION ARROWS ---- */
.reviews-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 15, 0.85);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 50%;
  color: var(--color-gold);
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.reviews-nav:hover {
  background: rgba(201, 162, 39, 0.15);
  border-color: rgba(201, 162, 39, 0.5);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 30px rgba(201, 162, 39, 0.15);
}

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

.reviews-nav.swiper-button-disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.reviews-nav svg {
  transition: transform 0.3s var(--ease-out);
}

.reviews-nav-prev:hover svg {
  transform: translateX(-2px);
}

.reviews-nav-next:hover svg {
  transform: translateX(2px);
}

.reviews-nav-prev {
  left: -26px;
}

.reviews-nav-next {
  right: -26px;
}

/* ---- PAGINATION DOTS ---- */
.reviews-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-6);
  padding: var(--space-2) 0;
}

.reviews-pagination .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(201, 162, 39, 0.2);
  border: 1px solid rgba(201, 162, 39, 0.15);
  opacity: 1;
  transition: all 0.4s var(--ease-out);
  cursor: pointer;
}

.reviews-pagination .swiper-pagination-bullet:hover {
  background: rgba(201, 162, 39, 0.4);
  transform: scale(1.3);
}

.reviews-pagination .swiper-pagination-bullet-active {
  background: var(--color-gold);
  border-color: var(--color-gold);
  width: 28px;
  border-radius: 14px;
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.35);
}

/* ---- REVIEW CARD ---- */
.review-card-animated {
  opacity: 0;
  transform: translateY(30px);
  transition: none;
}

.review-card-visible {
  animation: reviewCardIn 0.6s var(--ease-out) forwards;
}

@keyframes reviewCardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.review-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
  opacity: 0.7;
}

/* ---- REVIEW AVATAR (INITIALS) ---- */
.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.review-avatar span {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: #fff;
  letter-spacing: 0.05em;
}

/* Override the default avatar in testimonial cards that use review-avatar */
.testimonial-author .review-avatar {
  margin-right: 0;
}

/* ---- WRITE REVIEW BUTTON ---- */
.write-review-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: transparent;
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.write-review-btn:hover {
  background: var(--color-gold);
  color: var(--bg-primary);
}

.write-review-btn svg {
  transition: transform var(--duration-normal) var(--ease-out);
}

.write-review-btn:hover svg {
  transform: scale(1.15);
}

/* ---- LOAD MORE BUTTON ---- */
/* (Load more + actions removed — slider shows all reviews) */

/* ---- NO REVIEWS STATE ---- */
.no-reviews {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-16) var(--space-8);
  color: var(--text-muted);
}

.no-reviews p {
  font-size: var(--text-lg);
  font-style: italic;
}

/* ---- SKELETON LOADING ---- */
.skeleton-card {
  pointer-events: none;
}

.skeleton-line {
  height: 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.skeleton-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.04),
    transparent
  );
  animation: shimmer 1.5s infinite;
  will-change: transform;
}

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

.skeleton-short {
  width: 40%;
}

.skeleton-full {
  width: 100%;
}

.skeleton-medium {
  width: 70%;
}

.skeleton-tiny {
  width: 30%;
}

.skeleton-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: var(--space-6);
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.skeleton-avatar::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.04),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

.skeleton-info {
  flex: 1;
}

.skeleton-info .skeleton-line {
  margin-bottom: 6px;
}

/* ---- REVIEW MODAL ---- */
.review-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s var(--ease-out),
    visibility 0.35s;
}

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

.review-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.review-modal-content {
  position: relative;
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color-light);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transform: translateY(30px) scale(0.96);
  transition: transform 0.35s var(--ease-out);
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 162, 39, 0.3) transparent;
}

.review-modal-open .review-modal-content {
  transform: translateY(0) scale(1);
}

.review-modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.review-modal-close:hover {
  background: rgba(201, 162, 39, 0.15);
  color: var(--color-gold);
  border-color: rgba(201, 162, 39, 0.3);
}

.review-modal-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.review-modal-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

/* ---- STAR RATING INPUT ---- */
.star-rating-input {
  display: flex;
  gap: 6px;
  margin-bottom: var(--space-6);
}

.star-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.star-btn:hover {
  background: rgba(201, 162, 39, 0.1);
  border-color: rgba(201, 162, 39, 0.3);
  transform: scale(1.1);
}

.star-btn.star-active {
  background: rgba(201, 162, 39, 0.15);
  border-color: rgba(201, 162, 39, 0.4);
  color: var(--color-gold);
}

.star-btn.star-pulse {
  animation: starPulse 0.3s ease;
}

@keyframes starPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

.star-rating-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  font-weight: var(--weight-medium);
}

/* ---- REVIEW FORM MESSAGE ---- */
.review-form-message {
  display: none;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
  animation: slideDown 0.3s var(--ease-out);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.review-form-message.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #4ade80;
}

.review-form-message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
}

/* ---- BUTTON SPINNER ---- */
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- REVIEW FORM TEXTAREA ---- */
.review-form .form-textarea {
  min-height: 100px;
  resize: vertical;
}

/* ---- CHARACTER COUNTER ---- */
.char-counter {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1200px) {
  .reviews-nav-prev {
    left: 8px;
  }

  .reviews-nav-next {
    right: 8px;
  }
}

@media (max-width: 768px) {
  .reviews-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .reviews-stats {
    width: 100%;
    justify-content: center;
  }

  .reviews-nav {
    width: 42px;
    height: 42px;
  }

  .reviews-nav-prev {
    left: 4px;
  }

  .reviews-nav-next {
    right: 4px;
  }

  .review-modal-content {
    width: 95%;
    padding: var(--space-6);
  }

  .star-btn {
    width: 36px;
    height: 36px;
  }

  .reviews-swiper .swiper-slide {
    opacity: 0.5;
    transform: scale(0.95);
  }

  .reviews-swiper .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 480px) {
  .reviews-nav {
    width: 36px;
    height: 36px;
  }

  .reviews-nav svg {
    width: 16px;
    height: 16px;
  }
}
