/* =========================================================
   SW Testimonial Slider
   ========================================================= */

.swts-slider {
  --swts-gap: 20px;
  --swts-per-view: 1;
  width: 100%;
  direction: rtl;
  font-family: Vazirmatn, Tahoma, IRANSans, system-ui, sans-serif;
  box-sizing: border-box;
}
.swts-slider *,
.swts-slider *::before,
.swts-slider *::after { box-sizing: border-box; }

.swts-viewport { overflow: hidden; }

/* ==================== حالت اسلایدر (flex) ==================== */
.swts-track {
  display: flex;
  flex-wrap: nowrap;
  direction: rtl;
  transition: transform var(--swts-speed, 450ms) cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}

.swts-slide {
  flex: 0 0 calc(100% / var(--swts-per-view));
  max-width: calc(100% / var(--swts-per-view));
  min-width: 0;
  padding-inline: calc(var(--swts-gap) / 2);
  box-sizing: border-box;
}

/* ==================== حالت گرید (دسکتاپ) ==================== */
.swts-slider.swts-grid-mode .swts-viewport { overflow: visible; }

.swts-slider.swts-grid-mode .swts-track {
  display: grid;
  grid-template-columns: repeat(var(--swts-per-view), minmax(0, 1fr));
  gap: var(--swts-gap);
  transform: none !important;
  transition: none;
  direction: rtl;
}

.swts-slider.swts-grid-mode .swts-slide {
  flex: unset;
  max-width: none;
  min-width: 0;
  padding-inline: 0;
  width: auto;
}

.swts-slider.swts-grid-mode .swts-nav { display: none; }

/* ==================== CARD ==================== */
.swts-card {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
  transition: transform .25s ease, box-shadow .25s ease;
  background: #fff;
  border-radius: 18px;
  border: 1px solid #ececec;
  padding: 20px;
  box-shadow: 0 6px 24px rgba(0,0,0,.06);
}

/* ==================== HEADER (LTR) ==================== */
.swts-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  direction: ltr;
  text-align: left;
}

.swts-stars {
  display: flex;
  gap: 2px;
  line-height: 1;
  font-size: 22px;
  color: #f5b400;
  padding-top: 4px;
  direction: ltr;
}
.swts-star { display: inline-block; opacity: .25; }
.swts-star.is-filled { opacity: 1; }

.swts-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  direction: ltr;
}
.swts-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
  text-align: left;
}
.swts-brand-title { font-size: 12px; color: #374151; }
.swts-brand-name  { font-size: 15px; font-weight: 700; color: #111827; }
.swts-brand-url   { font-size: 11px; color: #6b7280; }
.swts-brand-logo  { width: 34px; height: 34px; flex-shrink: 0; }
.swts-brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

.swts-divider {
  margin: 14px 0 16px;
  border: 0;
  border-top: 1px dashed #d1d5db;
}

/* ==================== BODY ==================== */
.swts-body {
  background: #f5f5f5;
  border-radius: 14px;
  padding: 18px;
  min-height: 130px;
}
.swts-body p {
  margin: 0;
  font-size: 13.5px;
  line-height: 2;
  color: #374151;
  text-align: justify;
  direction: rtl;
}

/* ==================== FOOTER (چیدمان ۲×۲) ==================== */
.swts-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 8px 12px;
  margin-top: 18px;
  align-items: center;
  direction: rtl;
}

/* .swts-row را از جریان خارج کن تا فرزندانش مستقیم در گرید اصلی بنشینند */
.swts-row { display: contents; }

/* --- ستون راست (اول) --- */
.swts-tag {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  direction: ltr;
  text-align: left;
  align-self: start;
  padding: 4px 10px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 11.5px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.swts-verified {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  direction: ltr;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  background: #fdf4d4;
  border: 1px solid #f5d97a;
  border-radius: 999px;
  font-size: 12.5px;
  color: #6b5200;
  font-weight: 500;
}
.swts-verified svg { width: 18px; height: 18px; flex-shrink: 0; }

/* --- ستون چپ (دوم) --- */
.swts-user-name {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  direction: rtl;
  text-align: right;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.swts-user-meta {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  direction: rtl;
  text-align: right;
  font-size: 12px;
  color: #6b7280;
}

/* ==================== NAV ==================== */
.swts-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}

.swts-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  transition: background .2s, color .2s, transform .2s, border-color .2s;
}
.swts-arrow:hover {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
  transform: scale(1.05);
}
.swts-arrow:disabled { opacity: .35; cursor: not-allowed; transform: none; }

.swts-dots { display: flex; gap: 8px; align-items: center; }
.swts-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #d1d5db;
  cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.swts-dot:hover { background: #9ca3af; transform: scale(1.2); }
.swts-dot.is-active {
  background: #3b82f6;
  box-shadow: 0 0 8px rgba(59,130,246,.55);
  transform: scale(1.15);
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  .swts-track,
  .swts-card,
  .swts-arrow,
  .swts-dot { transition: none; }
}