/* صفحهٔ نرم‌افزار — فهرست ماژول‌ها، گردش کار، گزینه‌های استقرار و جعبهٔ قیمت؛ فقط توکن‌های dentival-tokens.css و چیدمان RTL موبایل‌اول */

/* ── گروه‌های ماژول ──────────────────────────────────────────────── */
.sw-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}

/* از ۸۸۰px دو ستون؛ گروه‌ها ارتفاع متفاوت دارند پس ستون‌ها مستقل می‌مانند */
@media (min-width: 880px) {
  .sw-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.sw-group {
  padding: var(--sp-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
}

.sw-group-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--color-border-subtle);
}

.sw-group-title {
  margin: 0;
  color: var(--color-text-strong);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
}

/* برچسب — تنها جایی که radius-pill مجاز است */
.sw-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  border-radius: var(--radius-pill);
}

.sw-badge-base {
  color: var(--color-brand-ink);
  background: var(--color-brand-subtle);
  border: 1px solid var(--color-brand-border);
}

/* ── سطرهای ماژول ───────────────────────────────────────────────── */
.sw-module-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sw-module {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  min-height: 44px;
  padding: var(--sp-3) var(--sp-2);
  border-radius: var(--radius-md);
  transition: background-color var(--dur-fast) var(--ease-out);
}

.sw-module:hover {
  background: var(--color-surface-sunken);
}

.sw-module-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--color-icon-subtle);
  font-size: var(--fs-sm);
  background: var(--color-surface-sunken);
  border-radius: var(--radius-sm);
}

.sw-module-body {
  /* سهم اصلی عرض؛ min-width صفر تا متن بلند سرریز افقی نسازد */
  flex: 1 1 12rem;
  min-width: 0;
}

.sw-module-name {
  margin: 0;
  color: var(--color-text-strong);
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  line-height: var(--lh-heading);
}

.sw-module-text {
  margin: var(--sp-1) 0 0;
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  line-height: var(--lh-body);
}

.sw-module-price {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  /* در RTL انتهای سطر سمت چپ است */
  margin-inline-start: auto;
  text-align: start;
}

.sw-included {
  color: var(--color-brand);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
}

.sw-price-num {
  color: var(--color-text-strong);
  font-family: var(--font-num);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}

.sw-price-unit {
  color: var(--color-text-muted);
  font-size: var(--fs-2xs);
}

.sw-modules-note {
  margin: var(--sp-6) 0 0;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  text-align: center;
}

/* بلوک ".sw-flow" حذف شد؛ پارشال "treatment-flow" جایگزین شد و کلاس‌هایش دیگر صدا زده نمی‌شوند */

/* ── دو گزینهٔ استقرار ───────────────────────────────────────────── */
.sw-deploy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

@media (min-width: 820px) {
  .sw-deploy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sw-deploy-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

.sw-deploy-card h3 {
  margin: 0;
  color: var(--color-text-strong);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
}

.sw-deploy-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
}

.sw-deploy-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sw-deploy-list li {
  position: relative;
  padding-inline-start: var(--sp-6);
  color: var(--color-text);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
}

/* نشانگر تیک با شکل هندسی — بدون وابستگی به فونت آیکن */
.sw-deploy-list li::before {
  position: absolute;
  inset-inline-start: 0;
  top: 0.45em;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--color-brand);
  border-radius: var(--radius-xs);
  content: '';
}

/* دکمهٔ کارت استقرار به انتهای کارت چسبیده تا کارت‌ها هم‌تراز بمانند */
.sw-deploy-card .btn {
  margin-top: auto;
  align-self: flex-start;
  min-height: 44px;
}

/* ── جعبهٔ قیمت ──────────────────────────────────────────────────── */
.sw-price-box {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: var(--sp-6);
  background: var(--color-surface);
  border: 1px solid var(--color-brand-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.sw-price-lead {
  margin: 0;
  color: var(--color-text);
  font-size: var(--fs-lg);
  line-height: var(--lh-heading);
  text-align: center;
}

.sw-price-lead strong {
  color: var(--color-brand);
  font-family: var(--font-num);
  font-weight: var(--fw-bold);
}

.sw-price-points {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sw-price-points li {
  position: relative;
  padding-inline-start: var(--sp-6);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
}

.sw-price-points li::before {
  position: absolute;
  inset-inline-start: 0;
  top: 0.5em;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--color-brand);
  border-radius: var(--radius-pill);
  content: '';
}

.sw-price-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
}

.sw-price-actions .btn {
  min-height: 44px;
}

/* در موبایل دکمه‌ها تمام‌عرض تا هدف لمسی بزرگ‌تری بسازند (W10.3) */
@media (max-width: 520px) {
  .sw-price-actions .btn {
    width: 100%;
  }
}

/* ── احترام به کاهش حرکت ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .sw-module {
    transition: none;
  }
}

/* ضدِ کارتِ یتیم: آخرین گروهِ تنها تمام‌عرض ولی هم‌اندازهٔ یک ستون و وسط‌چین؛ بازه‌ها کران‌دار تا با پلهٔ چهارستونی تداخل نکند */
@media (min-width: 880px) {
  .sw-groups > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    inline-size: calc((100% - var(--sp-5)) / 2);
  }
}

@media (min-width: 820px) {
  .sw-deploy-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    inline-size: calc((100% - var(--sp-6)) / 2);
  }
}

/* ضدِ کارتِ یتیمِ trust-signals در پلهٔ سه‌ستونیِ ۹۶۰px؛ شبکه در components/trust-signals.css تعریف شده و اینجا فقط قاعدهٔ ضدِ یتیم افزوده می‌شود (بریک‌پوینت‌ها: ۵۴۰px دو ستون، ۹۶۰px سه ستون، gap = --sp-4) */
@media (min-width: 540px) and (max-width: 959px) {
  .trust-signals > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    inline-size: calc((100% - var(--sp-4)) / 2);
  }
}

@media (min-width: 960px) {
  .trust-signals > :last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
    justify-self: center;
    inline-size: calc((100% - 2 * var(--sp-4)) / 3);
  }
}
