/* ═══════════════════════════════════════════════════════════
   کیت استایل مقالات استارت وی — article.css
   ─────────────────────────────────────────────────────────────
   هر مقاله فقط این دو فایل را اضافه می‌کند:
   <link rel="stylesheet" href="css/article.css" />
   <script src="js/article.js"></script>

   فهرست کامپوننت‌ها:
   1) تایپوگرافی (article-body)      8) تایم‌لاین (a-timeline)
   2) باکس‌های رنگی (a-box)          9) مراحل (a-steps)
   3) دکمه‌ها (a-btn)               10) جدول (خودکار + a-table)
   4) آکاردئون (a-accordion)        11) مزایا/معایب (a-proscons)
   5) تب‌ها (a-tabs)                12) شمارنده (a-stat)
   6) کارت‌ها (a-cards)             13) CTA (a-cta)
   7) نقل‌قول و هایلایت             14) فهرست مطالب (a-toc)
   ═══════════════════════════════════════════════════════════ */

/* ═══ 1) تایپوگرافی پایه مقاله ═══ */
.article-body {
  font-size: 1.05rem;
  line-height: 2.2;
  color: #334155;
}
html.dark .article-body { color: #cbd5e1; }

.article-body h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.6rem;
  font-weight: 800;
  color: #0a2647;
  position: relative;
  padding-right: 1rem;
  scroll-margin-top: 90px;
}
.article-body h2::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 5px;
  border-radius: 99px;
  background: linear-gradient(180deg, #00c6a9, #f9e65c);
}
html.dark .article-body h2 { color: #fff; }

.article-body h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0a2647;
  scroll-margin-top: 90px;
}
html.dark .article-body h3 { color: #e2e8f0; }

.article-body p { margin-bottom: 1.25rem; }

.article-body a {
  color: #00a68e;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(0, 198, 169, 0.4);
  text-underline-offset: 4px;
  transition: color 0.2s;
}
.article-body a:hover { color: #0a2647; }
html.dark .article-body a:hover { color: #f9e65c; }

.article-body ul, .article-body ol { margin: 1.25rem 0; padding-right: 1.5rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body ul li::marker { color: #00c6a9; }
.article-body ol li::marker { color: #00a68e; font-weight: 700; }

/* ═══ عکس‌های مقاله — استایل یکپارچه ═══
   استفاده ساده:  <img src="..." alt="..." loading="lazy" />
   شاخص:          کلاس a-img--hero اضافه کنید
   سایز کوچک:     کلاس a-img--sm اضافه کنید                    */
.article-body img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.25rem;               /* گوشه گرد */
  margin: 1.5rem auto;
  box-shadow: 0 20px 40px -12px rgba(10,38,71,.15);
  border: 1px solid rgba(10,38,71,.06); /* خط ظریف دور عکس */
  background: #f1f5f9;                  /* جای خالی تا لود شدن */
  transition: transform .35s ease, box-shadow .35s ease;
}
.article-body img:hover {
  transform: scale(1.015);
  box-shadow: 0 25px 50px -12px rgba(0,198,169,.25);
}
html.dark .article-body img { border-color: rgba(255,255,255,.08); background: #1e293b; }

/* عکس شاخص — نسبت ثابت 16:9 (عکس هر ابعادی باشد، برش می‌خورد) */
.a-img--hero {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 1.5rem !important;
}

/* عکس کوچک وسط‌چین (برای نمودار و جزئیات) */
.a-img--sm { max-width: 560px; }

/* حذف افکت hover اگر نخواستید: کلاس a-img--static */
.a-img--static:hover { transform: none; box-shadow: 0 20px 40px -12px rgba(10,38,71,.15); }

/* تصویر با زیرنویس */
.a-figure { margin: 1.5rem 0; text-align: center; }
.a-figure img { margin: 0 auto; }
.a-figure figcaption { margin-top: .6rem; font-size: .8rem; color: #94a3b8; }

/* هایلایت متن */
.a-mark {
  background: linear-gradient(180deg, transparent 55%, rgba(249,230,92,.55) 55%);
  padding: 0 .2rem;
  font-weight: 700;
  color: inherit;
}

/* نقل‌قول */
.article-body blockquote, .a-quote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  background: rgba(0,198,169,.07);
  border-right: 4px solid #00c6a9;
  font-weight: 600;
  color: #0a2647;
}
html.dark .article-body blockquote, html.dark .a-quote { background: rgba(0,198,169,.1); color: #e2e8f0; }

/* خط جداکننده تزئینی */
.a-divider {
  margin: 2.5rem auto;
  height: 4px; width: 120px;
  border: none; border-radius: 99px;
  background: linear-gradient(90deg, #00c6a9, #f9e65c, #00c6a9);
}

/* ═══ 2) باکس‌های رنگی ═══
   استفاده: <div class="a-box a-box--tip"> ... </div>
   انواع: tip / warning / success / danger / info                    */
.a-box {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem 1.25rem 1.25rem;
  border-radius: 1.25rem;
  border: 1px solid;
  position: relative;
  padding-right: 3.4rem;
}
.a-box::before {
  position: absolute;
  right: 1.1rem; top: 1.15rem;
  font-size: 1.25rem;
  line-height: 1;
}
.a-box--tip     { background: linear-gradient(135deg, rgba(249,230,92,.14), rgba(0,198,169,.08)); border-color: rgba(0,198,169,.35); }
.a-box--tip::before { content: "💡"; }
.a-box--warning { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.35); }
.a-box--warning::before { content: "⚠️"; }
.a-box--success { background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.35); }
.a-box--success::before { content: "✅"; }
.a-box--danger  { background: rgba(239,68,68,.07); border-color: rgba(239,68,68,.3); }
.a-box--danger::before { content: "🚫"; }
.a-box--info    { background: rgba(10,38,71,.05); border-color: rgba(10,38,71,.2); }
.a-box--info::before { content: "ℹ️"; }
html.dark .a-box--info { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.15); }
.a-box b, .a-box strong { color: #0a2647; }
html.dark .a-box b, html.dark .a-box strong { color: #f9e65c; }

/* ═══ 3) دکمه‌ها ═══
   استفاده: <a class="a-btn a-btn--primary" href="...">متن</a>
   انواع: primary / dark / yellow / outline / whatsapp               */
.a-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .9rem 1.75rem;
  border-radius: 1rem;
  font-weight: 800;
  font-size: .95rem;
  text-decoration: none !important;
  transition: all .25s ease;
  cursor: pointer;
  border: 2px solid transparent;
}
.a-btn:hover { transform: translateY(-2px); }
.a-btn--primary { background: linear-gradient(270deg, #00c6a9, #00a68e); color: #fff !important; box-shadow: 0 10px 25px -8px rgba(0,198,169,.5); }
.a-btn--dark    { background: #0a2647; color: #fff !important; box-shadow: 0 10px 25px -8px rgba(10,38,71,.4); }
.a-btn--yellow  { background: #f9e65c; color: #0a2647 !important; box-shadow: 0 10px 25px -8px rgba(249,230,92,.5); }
.a-btn--outline { background: transparent; border-color: #00c6a9; color: #00a68e !important; }
.a-btn--outline:hover { background: rgba(0,198,169,.08); }
.a-btn--whatsapp { background: #25d366; color: #fff !important; box-shadow: 0 10px 25px -8px rgba(37,211,102,.5); }
.a-btn--block { width: 100%; }
.a-btn--lg { padding: 1.1rem 2.2rem; font-size: 1.05rem; }

/* گروه دکمه */
.a-btn-group { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }

/* ═══ 4) آکاردئون ═══
   <div class="a-accordion">
     <div class="a-acc-item">
       <button class="a-acc-head">سوال</button>
       <div class="a-acc-body"><p>جواب</p></div>
     </div>
   </div>                                                            */
.a-accordion { margin: 1.5rem 0; display: flex; flex-direction: column; gap: .75rem; }
.a-acc-item {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  transition: border-color .25s;
}
html.dark .a-acc-item { background: #0f172a; border-color: #1e293b; }
.a-acc-item.open { border-color: #00c6a9; }
.a-acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  font-size: .95rem;
  text-align: right;
  color: #0a2647;
  background: none; border: none; cursor: pointer;
  font-family: inherit;
}
html.dark .a-acc-head { color: #e2e8f0; }
.a-acc-head::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 300;
  color: #00c6a9;
  transition: transform .3s;
  flex-shrink: 0;
}
.a-acc-item.open .a-acc-head::after { transform: rotate(45deg); }
.a-acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
  padding: 0 1.25rem;
  font-size: .9rem;
  color: #64748b;
}
html.dark .a-acc-body { color: #94a3b8; }
.a-acc-body p { padding-bottom: 1.1rem; margin: 0; }

/* ═══ 5) تب‌ها ═══
   <div class="a-tabs">
     <div class="a-tab-nav">
       <button class="a-tab-btn active">تب ۱</button>
       <button class="a-tab-btn">تب ۲</button>
     </div>
     <div class="a-tab-panel active"><p>محتوای ۱</p></div>
     <div class="a-tab-panel"><p>محتوای ۲</p></div>
   </div>                                                            */
.a-tabs { margin: 1.5rem 0; }
.a-tab-nav {
  display: flex; flex-wrap: wrap; gap: .5rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: .75rem;
  margin-bottom: 1rem;
}
html.dark .a-tab-nav { border-color: #1e293b; }
.a-tab-btn {
  padding: .6rem 1.25rem;
  border-radius: .75rem;
  font-weight: 700; font-size: .9rem;
  font-family: inherit;
  background: #f1f5f9; color: #64748b;
  border: none; cursor: pointer;
  transition: all .25s;
}
html.dark .a-tab-btn { background: #1e293b; color: #94a3b8; }
.a-tab-btn.active { background: linear-gradient(270deg, #00c6a9, #00a68e); color: #fff; box-shadow: 0 8px 20px -8px rgba(0,198,169,.5); }
.a-tab-panel { display: none; }
.a-tab-panel.active { display: block; animation: a-fadein .35s ease; }
@keyframes a-fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ═══ 6) کارت‌ها (گرید ویژگی‌ها) ═══
   <div class="a-cards">
     <div class="a-card"><div class="a-card-icon">📊</div><h4>عنوان</h4><p>متن</p></div>
   </div>                                                            */
.a-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.a-card {
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: all .3s;
}
html.dark .a-card { background: #0f172a; border-color: #1e293b; }
.a-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px -15px rgba(0,198,169,.25); border-color: rgba(0,198,169,.4); }
.a-card-icon {
  width: 3rem; height: 3rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: .9rem;
  font-size: 1.4rem;
  background: linear-gradient(135deg, rgba(0,198,169,.15), rgba(249,230,92,.15));
  margin-bottom: .9rem;
}
.a-card h4 { font-size: 1.05rem; font-weight: 800; color: #0a2647; margin-bottom: .4rem; }
html.dark .a-card h4 { color: #fff; }
.a-card p { font-size: .85rem; line-height: 1.9; color: #64748b; margin: 0; }
html.dark .a-card p { color: #94a3b8; }

/* ═══ 8) تایم‌لاین ═══
   <div class="a-timeline">
     <div class="a-tl-item"><h4>عنوان</h4><p>متن</p></div>
   </div>                                                            */
.a-timeline { margin: 1.5rem 0; position: relative; padding-right: 2rem; }
.a-timeline::before {
  content: "";
  position: absolute;
  right: .55rem; top: .5rem; bottom: .5rem;
  width: 3px; border-radius: 99px;
  background: linear-gradient(180deg, #00c6a9, #f9e65c);
}
.a-tl-item { position: relative; padding-bottom: 1.75rem; }
.a-tl-item:last-child { padding-bottom: 0; }
.a-tl-item::before {
  content: "";
  position: absolute;
  right: -2rem; top: .45rem;
  width: 1.15rem; height: 1.15rem;
  border-radius: 99px;
  background: #fff;
  border: 4px solid #00c6a9;
  box-shadow: 0 0 0 4px rgba(0,198,169,.15);
}
html.dark .a-tl-item::before { background: #0f172a; }
.a-tl-item h4 { font-size: 1.05rem; font-weight: 800; color: #0a2647; margin-bottom: .3rem; }
html.dark .a-tl-item h4 { color: #fff; }
.a-tl-item p { font-size: .9rem; color: #64748b; margin: 0; }
html.dark .a-tl-item p { color: #94a3b8; }
.a-tl-badge {
  display: inline-block;
  font-size: .7rem; font-weight: 800;
  padding: .15rem .6rem;
  border-radius: 99px;
  background: rgba(0,198,169,.12);
  color: #00a68e;
  margin-bottom: .3rem;
}

/* ═══ 9) مراحل شماره‌دار ═══
   <div class="a-steps">
     <div class="a-step"><h4>عنوان</h4><p>متن</p></div>
   </div>                                                            */
.a-steps { margin: 1.5rem 0; counter-reset: astep; display: flex; flex-direction: column; gap: 1rem; }
.a-step {
  counter-increment: astep;
  position: relative;
  padding: 1.25rem 4.2rem 1.25rem 1.25rem;
  border-radius: 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: all .3s;
}
html.dark .a-step { background: #0f172a; border-color: #1e293b; }
.a-step:hover { border-color: rgba(0,198,169,.5); box-shadow: 0 12px 30px -12px rgba(0,198,169,.25); }
.a-step::before {
  content: counter(astep);
  position: absolute;
  right: 1.1rem; top: 1.15rem;
  width: 2.2rem; height: 2.2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: .8rem;
  font-weight: 900; font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #00c6a9, #00a68e);
  box-shadow: 0 6px 15px -5px rgba(0,198,169,.5);
}
.a-step h4 { font-weight: 800; color: #0a2647; margin-bottom: .3rem; font-size: 1rem; }
html.dark .a-step h4 { color: #fff; }
.a-step p { font-size: .88rem; color: #64748b; margin: 0; }
html.dark .a-step p { color: #94a3b8; }

/* ═══ 10) جدول ═══  (جدول‌های داخل article-body خودکار استایل می‌گیرند) */
.article-body table, .a-table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  border-radius: 1rem;
  overflow: hidden;
  font-size: .95rem;
  box-shadow: 0 4px 20px -8px rgba(10,38,71,.12);
}
.article-body table th, .a-table th {
  background: #0a2647; color: #fff;
  padding: .85rem 1rem;
  text-align: right; font-weight: 700;
}
.article-body table td, .a-table td { padding: .75rem 1rem; border-bottom: 1px solid #e2e8f0; }
.article-body table tr:nth-child(even) td, .a-table tr:nth-child(even) td { background: #f8fafc; }
html.dark .article-body table td, html.dark .a-table td { border-color: #1e293b; }
html.dark .article-body table tr:nth-child(even) td, html.dark .a-table tr:nth-child(even) td { background: #0f172a; }
/* جدول اسکرول‌شونده در موبایل: دور جدول <div class="a-table-wrap"> بگذارید */
.a-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ═══ 11) مزایا و معایب ═══
   <div class="a-proscons">
     <div class="a-pros"><h4>مزایا</h4><ul><li>...</li></ul></div>
     <div class="a-cons"><h4>معایب</h4><ul><li>...</li></ul></div>
   </div>                                                            */
.a-proscons { display: grid; gap: 1rem; margin: 1.5rem 0; }
@media (min-width: 640px) { .a-proscons { grid-template-columns: 1fr 1fr; } }
.a-pros, .a-cons { padding: 1.25rem 1.5rem; border-radius: 1.25rem; border: 1px solid; }
.a-pros { background: rgba(16,185,129,.06); border-color: rgba(16,185,129,.3); }
.a-cons { background: rgba(239,68,68,.05); border-color: rgba(239,68,68,.25); }
.a-pros h4, .a-cons h4 { font-weight: 800; margin-bottom: .6rem; font-size: 1rem; }
.a-pros h4 { color: #059669; }
.a-cons h4 { color: #dc2626; }
.a-pros ul, .a-cons ul { margin: 0; padding-right: 1.25rem; font-size: .9rem; }
.a-pros li::marker { content: "✓ "; color: #059669; }
.a-cons li::marker { content: "✗ "; color: #dc2626; }

/* ═══ 12) شمارنده آماری ═══
   <div class="a-stats">
     <div class="a-stat"><span class="a-stat-num" data-target="500">۰</span><span class="a-stat-label">پروژه</span></div>
   </div>                                                            */
.a-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(0,198,169,.08), rgba(249,230,92,.08));
  border: 1px solid rgba(0,198,169,.2);
}
.a-stat { text-align: center; }
.a-stat-num { display: block; font-size: 1.9rem; font-weight: 900; color: #00a68e; }
.a-stat-label { font-size: .78rem; font-weight: 600; color: #64748b; }
html.dark .a-stat-label { color: #94a3b8; }

/* ═══ 13) بنر CTA داخل مقاله ═══
   <div class="a-cta">
     <h3>عنوان</h3><p>متن</p>
     <a class="a-btn a-btn--yellow" href="tel:...">تماس</a>
   </div>                                                            */
.a-cta {
  margin: 2rem 0;
  padding: 2rem 1.75rem;
  border-radius: 1.5rem;
  text-align: center;
  background: linear-gradient(270deg, #00c6a9, #00a68e);
  box-shadow: 0 20px 45px -15px rgba(0,198,169,.45);
  position: relative;
  overflow: hidden;
}
.a-cta::before {
  content: "";
  position: absolute;
  top: -3rem; right: 2rem;
  width: 9rem; height: 9rem;
  border-radius: 99px;
  background: rgba(255,255,255,.12);
  filter: blur(20px);
}
.a-cta h3 { color: #fff !important; font-size: 1.4rem; font-weight: 900; margin: 0 0 .5rem; position: relative; }
.a-cta h3::before { display: none; }
.a-cta p { color: rgba(255,255,255,.9); font-size: .92rem; margin-bottom: 1.25rem; position: relative; }
.a-cta .a-btn { position: relative; }
/* نسخه سرمه‌ای */
.a-cta--navy { background: linear-gradient(135deg, #0a2647, #143a63); box-shadow: 0 20px 45px -15px rgba(10,38,71,.5); }

/* باکس دانلود */
.a-download {
  margin: 1.5rem 0;
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: 1.25rem;
  border: 2px dashed rgba(0,198,169,.45);
  background: rgba(0,198,169,.05);
}
.a-download-info { display: flex; align-items: center; gap: .9rem; }
.a-download-icon {
  width: 3rem; height: 3rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: .9rem;
  font-size: 1.3rem;
  background: #00c6a9; color: #fff;
}
.a-download h4 { font-weight: 800; color: #0a2647; margin: 0; font-size: .95rem; }
html.dark .a-download h4 { color: #fff; }
.a-download small { color: #94a3b8; font-size: .75rem; }

/* ═══ 14) فهرست مطالب (خودکار توسط article.js پر می‌شود) ═══
   <div class="a-toc" data-toc></div>                                */
.a-toc {
  margin: 1.5rem 0;
  padding: .85rem 1.1rem;
  border-radius: 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  max-width: 100%;
  box-sizing: border-box;
}
html.dark .a-toc { background: #0f172a; border-color: #1e293b; }
/* دکمه باز/بسته کردن فهرست — همیشه یک ردیف */
.a-toc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;          /* هرگز به ردیف دوم نرود */
  gap: .75rem;
  width: 100%;
  background: none; border: none; cursor: pointer;
  padding: .25rem 0;
  font-family: inherit;
}
.a-toc-title {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 800; color: #0a2647;
  font-size: 1rem;
  white-space: nowrap;        /* متن نشکند */
  min-width: 0;
}
html.dark .a-toc-title { color: #fff; }
.a-toc-title::before {
  content: "";
  width: 1.4rem; height: .35rem;
  border-radius: 99px;
  background: #00c6a9;
  flex-shrink: 0;             /* خط تزیینی له نشود ولی جا را نگیرد */
}
.a-toc-icon {
  font-size: 1.5rem; font-weight: 300;
  color: #00c6a9;
  transition: transform .3s;
  line-height: 1;
  flex-shrink: 0;             /* علامت + هرگز به خط بعد نرود */
}
/* موبایل: فشرده‌تر */
@media (max-width: 480px) {
  .a-toc { padding: .7rem .9rem; }
  .a-toc-title { font-size: .9rem; gap: .4rem; }
  .a-toc-title::before { width: 1rem; }
}

/* ═══ نوار پیشرفت مطالعه (خودکار توسط article.js ساخته می‌شود) ═══ */
.a-progress {
  position: fixed;
  top: 0; right: 0;
  height: 4px; width: 0%;
  z-index: 9999;
  background: linear-gradient(90deg, #00c6a9, #f9e65c);
  transition: width .1s linear;
}

/* ═══ دکمه بازگشت به بالا (خودکار توسط article.js ساخته می‌شود) ═══ */
.a-backtop {
  position: fixed;
  bottom: 5.5rem; right: 1.25rem;
  z-index: 50;
  width: 3rem; height: 3rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 99px;
  background: #0a2647; color: #fff;
  border: none; cursor: pointer;
  box-shadow: 0 10px 25px -8px rgba(10,38,71,.5);
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: all .3s;
}
.a-backtop.show { opacity: 1; pointer-events: auto; transform: none; }
.a-backtop:hover { background: #00c6a9; }

/* ═══ انیمیشن ورود اسکرول (روی هر عنصری کلاس a-reveal بگذارید) ═══ */
.a-reveal { opacity: 0; transform: translateY(24px); transition: all .7s ease; }
.a-reveal.show { opacity: 1; transform: none; }

/* ═══════════════════════════════════════════
   کادر کلی هر بخش مقاله — a-section
   ظاهر خنثی، تمیز و شکیل (بدون رنگ‌های تند)
   استفاده: هر بخش (H2 + محتوایش) را داخل این بگذارید:
   <section class="a-section"> <h2>...</h2> <p>...</p> </section>
   ═══════════════════════════════════════════ */
.a-section {
  margin: 1.75rem 0;
  padding: 1.75rem 1.75rem 1.5rem;
  border-radius: 1.5rem;
  background: #fff;
  border: 1px solid #eef2f7;
  box-shadow: 0 6px 24px -14px rgba(10, 38, 71, 0.10);
}
html.dark .a-section {
  background: #0f172a;
  border-color: #1e293b;
  box-shadow: none;
}
/* اولین تیتر داخل کادر به بالای کادر بچسبد */
.a-section > h2:first-child,
.a-section > h3:first-child { margin-top: 0; }
/* آخرین عنصر داخل کادر فاصله اضافه نگیرد */
.a-section > :last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════════
   15) مقالات مرتبط — کادرهای افقی (انتهای مقاله)
   استفاده:
   <div class="a-related">
     <h3 class="a-related-title">مقالات مرتبط</h3>
     <a href="file.html" class="a-rel-card">
       <span class="a-rel-thumb">📊</span>  ← یا <img src="...">
       <span class="a-rel-body">
         <span class="a-rel-cat">دسته‌بندی</span>
         <span class="a-rel-name">عنوان مقاله</span>
         <span class="a-rel-meta">۵ دقیقه مطالعه</span>
       </span>
       <span class="a-rel-arrow"></span>
     </a>
     ... (۴ کارت)
   </div>
   ═══════════════════════════════════════════ */
.a-related { margin: 2.5rem 0 1rem; }
.a-related-title {
  display: flex; align-items: center; gap: .6rem;
  font-size: 1.35rem; font-weight: 900;
  color: #0a2647;
  margin-bottom: 1.25rem;
}
html.dark .a-related-title { color: #fff; }
.a-related-title::before {
  content: "";
  width: .45rem; height: 1.9rem;
  border-radius: 99px;
  background: linear-gradient(180deg, #00c6a9, #f9e65c);
}

.a-rel-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1rem 1.15rem;
  margin-bottom: .9rem;
  border-radius: 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
  transition: all .3s ease;
}
html.dark .a-rel-card { background: #0f172a; border-color: #1e293b; }
/* نوار رنگی سمت راست که با hover ظاهر می‌شود */
.a-rel-card::before {
  content: "";
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #00c6a9, #f9e65c);
  transform: scaleY(0);
  transition: transform .3s ease;
  border-radius: 0 99px 99px 0;
}
.a-rel-card:hover {
  transform: translateX(-6px);
  border-color: rgba(0,198,169,.5);
  box-shadow: 0 15px 35px -15px rgba(0,198,169,.35);
}
.a-rel-card:hover::before { transform: scaleY(1); }

.a-rel-thumb {
  flex-shrink: 0;
  width: 4.2rem; height: 4.2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 1rem;
  font-size: 1.8rem;
  background: linear-gradient(135deg, rgba(0,198,169,.14), rgba(249,230,92,.16));
  overflow: hidden;
  transition: transform .3s;
}
.a-rel-card:hover .a-rel-thumb { transform: scale(1.08) rotate(-3deg); }
.a-rel-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 1rem; margin: 0 !important; box-shadow: none !important; }

.a-rel-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.a-rel-cat {
  font-size: .68rem; font-weight: 800;
  color: #00a68e;
}
.a-rel-name {
  font-size: .98rem; font-weight: 800;
  color: #0a2647;
  line-height: 1.8;
  transition: color .25s;
}
html.dark .a-rel-name { color: #e2e8f0; }
.a-rel-card:hover .a-rel-name { color: #00a68e; }
.a-rel-meta { font-size: .72rem; color: #94a3b8; }

.a-rel-arrow {
  flex-shrink: 0;
  width: 2.4rem; height: 2.4rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 99px;
  background: #f1f5f9;
  color: #94a3b8;
  transition: all .3s;
}
html.dark .a-rel-arrow { background: #1e293b; }
.a-rel-arrow::before { content: "←"; font-size: 1.1rem; font-weight: 700; }
.a-rel-card:hover .a-rel-arrow {
  background: linear-gradient(135deg, #00c6a9, #00a68e);
  color: #fff;
  transform: translateX(-4px);
}

/* ═══════════════════════════════════════════
.auto-rating .stars {
  --star-size: 22px;
  --star-color: #ccc;
  --star-background: gold;

  font-size: var(--star-size);
  font-family: Arial;
}

.auto-rating .stars::before {
  content: "★★★★★";
  letter-spacing: 3px;
  background: linear-gradient(90deg,
    var(--star-background) calc(var(--rating) / 5 * 100%),
    var(--star-color) calc(var(--rating) / 5 * 100%)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auto-rating .text {
  font-size: 14px;
  margin-top: 4px;
}
/* =============================================
ai-answer ابتدای مقاله
============================================= */
.sw-ai-answer,
.sw-ai-intro,
.sw-geo-content{
    line-height:2.1;
    margin:25px 0;
}

.sw-ai-answer strong,
.sw-ai-intro strong,
.sw-geo-content strong{
    font-weight:800;
}
/* =============================================
   STICKY BUY BAR — نسخه نهایی اصلاح‌شده
   ============================================= */

.sw-buybar{
  position:fixed;bottom:0;left:0;right:0;z-index:9999;
  padding:8px 20px;
  background:rgba(10,38,71,.96);
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  border-top:2px solid #00C6A9;
  box-shadow:rgba(10,38,71,.25) 0 -6px 30px;
  transform:translateY(140%);
  transition:transform .4s;
}
.sw-buybar.show{transform:translateY(0)}
.sw-buybar-inner{max-width:1280px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:14px}
.sw-buybar .txt{min-width:0}
.sw-buybar .txt .t{color:#fff;font-weight:800;font-size:15.5px;line-height:1.5}
.sw-buybar .txt .s{color: #f9e65c;font-size:12.5px}
.sw-buybar .bb-btn{
  flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;
  padding:8px 16px;font-family:inherit;font-size:14.5px;font-weight:800;border-radius:12px;
  background:linear-gradient(135deg,rgb(0,198,169),rgb(0,166,142));color:#fff;
  box-shadow:0 8px 20px rgba(0,198,169,.35);transition:.25s;
}
.sw-buybar .bb-btn:hover{transform:translateY(-2px);box-shadow:0 12px 26px rgba(0,198,169,.45)}
@media(max-width:560px){
  .sw-buybar .bb-btn{padding:6px 12px;font-size:13.5px}
}