/* =====================================================
   REVIEWS — نظرات مشتریان
===================================================== */

:root {
  --br-2: 8px;
  --br-3: 12px;
  --br-4: 16px;
  --br-5: 24px;
  --br-round: 9999px;
  --fs-2: 0.694rem;
  --fs-2-5: 0.722rem;
  --fs-3: 0.833rem;
  --fs-4: 1rem;
  --fs-5: 1.2rem;
  --c-grey-light-8: #f9f9fc;
  --c-grey-light-7: #f3f3f7;
  --c-grey-light-6: #ebebef;
  --c-grey-light-5: #e8e8ec;
  --c-grey-light-4: #d1d1d8;
  --c-grey-light-3: #c9c9cf;
  --c-grey-light-2: #b1b1b8;
  --c-grey:         #919199;
  --c-grey-dark-2:  #636369;
  --c-grey-dark-5:  #2d2d33;
  --c-text-1:       #1f1a1e;
  --c-red-3:        #b32a65;
  --c-yellow:       #f4b942;
  --white:          #ffffff;
}

/* ═══════════════════════════════════════════════════════
   WRAPPER
═══════════════════════════════════════════════════════ */
.reviews-section {
  padding: 50px 0 60px;
  background: var(--c-grey-light-7);
  position: relative;
  overflow: hidden;
}

.reviews-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(179,42,101,.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(179,42,101,.04) 0%, transparent 40%);
  pointer-events: none;
}

.reviews-section .page-container {
  max-width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.reviews-section .page-width {
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
  max-width: 1220px;
}

/* ═══════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════ */
.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.reviews-header small {
  display: block;
  color: var(--c-red-3);
  font-size: var(--fs-3);
  font-weight: 700;
  letter-spacing: .5px;
  margin-bottom: 5px;
}

.reviews-title {
  margin: 0;
  font-size: var(--fs-5);
  font-weight: 800;
  color: var(--c-text-1);
  line-height: 1.4;
}

.reviews-arrows {
  display: flex;
  gap: 8px;
}

.reviews-arrows button {
  width: 42px;
  height: 42px;
  border-radius: var(--br-3);
  border: 1px solid var(--c-grey-light-5);
  background: var(--white);
  color: var(--c-text-1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.25s ease;
  font-family: inherit;
}

.reviews-arrows button:hover {
  background: var(--c-red-3);
  color: var(--white);
  border-color: var(--c-red-3);
  transform: translateY(-2px);
}

.reviews-arrows button svg {
  transform: scaleX(-1); /* آیکون‌ها برای RTL */
}

.reviews-arrows .rv-next svg {
  transform: scaleX(1);
}

/* ═══════════════════════════════════════════════════════
   SWIPER
═══════════════════════════════════════════════════════ */
.reviews-swiper {
  overflow: hidden;
  padding: 6px 4px 50px;
}

/* ═══════════════════════════════════════════════════════
   REVIEW CARD
═══════════════════════════════════════════════════════ */
.review-card {
  background: var(--white);
  border: 1px solid var(--c-grey-light-5);
  border-radius: var(--br-4);
  padding: 24px 22px 22px;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: 0.28s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.review-card:hover {
  transform: translateY(-4px);
  border-color: var(--c-red-3);
  box-shadow: 0 16px 32px -16px rgba(179, 42, 101, .25);
}

/* خط رنگی بالای کارت */
.review-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  height: 3px;
  width: 40px;
  background: var(--c-red-3);
  border-radius: 0 0 3px 0;
  transition: width .3s ease;
}

.review-card:hover::before {
  width: 80px;
}

/* ───── سر کارت (آواتار + نام) ───── */
.review-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--c-grey-light-6);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--c-grey-light-5);
}

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

.avatar-initial {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--c-red-3);
  background: var(--c-grey-light-6);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.review-user {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.review-name {
  font-size: var(--fs-4);
  font-weight: 800;
  color: var(--c-text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-role {
  font-size: var(--fs-2-5);
  color: var(--c-grey);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ───── ستاره‌ها ───── */
.review-stars {
  display: flex;
  gap: 2px;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 2px;
}

.stars-filled {
  color: var(--c-yellow);
}

.stars-empty {
  color: var(--c-grey-light-4);
  opacity: .55;
}

/* ───── متن ───── */
.review-text {
  margin: 0;
  font-size: var(--fs-3);
  line-height: 1.9;
  color: var(--c-grey-dark-2);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ───── علامت گیومه ───── */
.review-quote {
  position: absolute;
  bottom: -18px;
  left: 14px;
  font-size: 7rem;
  line-height: 1;
  color: var(--c-grey-light-6);
  font-family: Georgia, serif;
  pointer-events: none;
  opacity: .8;
  transition: color .3s ease;
}

.review-card:hover .review-quote {
  color: var(--c-red-3);
  opacity: .12;
}

/* ═══════════════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════════════ */
.reviews-pagination {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.reviews-pagination .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--c-grey-light-4);
  opacity: 1;
  transition: 0.25s ease;
  margin: 0 !important;
}

.reviews-pagination .swiper-pagination-bullet-active {
  background: var(--c-red-3);
  width: 24px;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .reviews-section {
    padding: 36px 0 44px;
  }

  .reviews-header {
    margin-bottom: 22px;
  }

  .reviews-title {
    font-size: 1.05rem;
  }

  .reviews-arrows button {
    width: 38px;
    height: 38px;
  }

  .review-card {
    padding: 20px 18px 20px;
  }

  .review-avatar {
    width: 46px;
    height: 46px;
  }

  .review-text {
    font-size: .85rem;
    -webkit-line-clamp: 6;
  }
}

@media (max-width: 480px) {
  .reviews-section {
    padding: 28px 0 36px;
  }

  .reviews-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .reviews-arrows {
    align-self: flex-end;
  }

  .reviews-arrows button {
    width: 36px;
    height: 36px;
  }

  .review-card {
    padding: 18px 16px;
    gap: 12px;
  }

  .review-name {
    font-size: .9rem;
  }

  .review-role {
    font-size: .66rem;
  }

  .review-stars {
    font-size: .9rem;
  }

  .review-text {
    font-size: .8rem;
    line-height: 1.85;
  }

  .review-quote {
    font-size: 5.5rem;
    bottom: -14px;
  }
}

/* ═══════════════════════════════════════════════════════
   DARK MODE
═══════════════════════════════════════════════════════ */
[data-theme="dark"] .reviews-section {
  background: #16131a;
}

[data-theme="dark"] .review-card {
  background: #1e1b22;
  border-color: #2a242f;
}

[data-theme="dark"] .review-card:hover {
  border-color: var(--c-red-3);
}

[data-theme="dark"] .review-avatar {
  background: #2a242f;
  border-color: #3a3440;
}

[data-theme="dark"] .avatar-initial {
  background: #2a242f;
  color: #e879a8;
}

[data-theme="dark"] .review-name {
  color: #f8f4f7;
}

[data-theme="dark"] .review-role {
  color: #a89ea8;
}

[data-theme="dark"] .review-text {
  color: #c9c9cf;
}

[data-theme="dark"] .stars-empty {
  color: #3a3440;
}

[data-theme="dark"] .review-quote {
  color: #2a242f;
}

[data-theme="dark"] .reviews-arrows button {
  background: #1e1b22;
  border-color: #2a242f;
  color: #f8f4f7;
}

[data-theme="dark"] .reviews-arrows button:hover {
  background: var(--c-red-3);
  color: #fff;
}