
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── مهم‌ترین بخش: Layout اصلی ─── */
.apadas-layout {
  display: flex;              /* از flex به جای grid استفاده می‌کنیم */
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;   /* این خط ضروری است برای sticky */
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  direction: rtl;
  font-family: 'Vazirmatn', 'IRANSans', Tahoma, sans-serif;
}

/* ─── Article: ستون اصلی ─── */
.apadas-article {
  flex: 1;                   /* تمام فضای باقیمانده را می‌گیرد */
  min-width: 0;              /* جلوگیری از overflow در flex */
  font-family: 'Vazirmatn', 'IRANSans', Tahoma, sans-serif;
  direction: rtl;
  color: #1e293b;
  line-height: 1.85;
  background: #f8fafc;
}

/* ─── Sidebar: ستون فرعی ─── */
.apadas-sidebar {
  width: 300px;
  flex-shrink: 0;            /* عرض ثابت بماند */
}

/* ─── کلید اصلی چسبندگی ─── */
.sidebar-sticky {
  position: sticky;
  top: 80px;                 /* فاصله از بالای صفحه هنگام scroll */
}

.sidebar-register-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  text-align: center;
}

.sidebar-register-card__badge {
  display: inline-block;
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  border-radius: 999px;
  padding: .3rem .9rem;
  margin-bottom: .85rem;
}

.sidebar-register-card__title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: .5rem;
  line-height: 1.4;
}

.sidebar-register-card__desc {
  font-size: .82rem;
  color: #64748b;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.sidebar-register-card__form {
  margin-bottom: 1rem;
}

.sidebar-register-card__features {
  list-style: none;
  padding: 0;
  text-align: right;
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
  display: grid;
  gap: .45rem;
}

.sidebar-register-card__features li {
  font-size: .8rem;
  color: #475569;
}

/* ════════════════════════════════
   استایل‌های مقاله — بدون تغییر
   ════════════════════════════════ */
.article-h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 2rem;
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
  border-radius: 18px;
}
.h1-sub {
  display: block;
  font-size: .75em;
  font-weight: 400;
  opacity: .85;
  margin-top: .4rem;
}
.section-block {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  border: 1px solid #e2e8f0;
}
.section-h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1.1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid #3b82f6;
}
p { margin-bottom: .9rem; font-size: .96rem; }
p:last-child { margin-bottom: 0; }
h3 { font-size: 1.05rem; font-weight: 700; color: #1e293b; margin: 1.2rem 0 .6rem; }
ul, ol { padding-right: 1.4rem; margin-bottom: .9rem; }
li { margin-bottom: .4rem; font-size: .94rem; }

.story-card {
  display: flex;
  gap: 1rem;
  background: #f0f9ff;
  border-right: 4px solid #0ea5e9;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.1rem;
}
.story-card__icon { font-size: 1.5rem; flex-shrink: 0; }
.story-card__body p { margin-bottom: .5rem; }
.story-card__body p:last-child { margin-bottom: 0; }

.four-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}
.pillar-card { border-radius: 14px; padding: 1.1rem; position: relative; overflow: hidden; }
.pillar-card--blue  { background: #eff6ff; border: 1px solid #bfdbfe; }
.pillar-card--green { background: #f0fdf4; border: 1px solid #bbf7d0; }
.pillar-card--orange{ background: #fff7ed; border: 1px solid #fed7aa; }
.pillar-card--red   { background: #fff1f2; border: 1px solid #fecdd3; }
.pillar-card__number { font-size: 2rem; font-weight: 900; opacity: .12; position: absolute; left: .5rem; top: 0; }
.pillar-card__title { font-size: .95rem; font-weight: 700; margin-bottom: .4rem; }
.pillar-card p { font-size: .82rem; color: #475569; margin: 0; }

.level-journey {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #f8fafc;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}
.level-step { text-align: center; flex: 1; min-width: 140px; }
.level-badge { display: inline-block; font-size: .75rem; font-weight: 700; border-radius: 999px; padding: .2rem .8rem; margin-bottom: .4rem; }
.level-step--beginner .level-badge { background: #bbf7d0; color: #14532d; }
.level-step--mid      .level-badge { background: #fde68a; color: #78350f; }
.level-step--expert   .level-badge { background: #ddd6fe; color: #3b0764; }
.level-step p { font-size: .82rem; color: #475569; margin: 0; }
.level-arrow { font-size: 1.4rem; color: #94a3b8; }

.table-wrapper { overflow-x: auto; margin: 1.1rem 0; border-radius: 12px; border: 1px solid #e2e8f0; }
.styled-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.styled-table thead tr { background: #1e3a5f; color: #fff; }
.styled-table th { padding: .75rem 1rem; text-align: right; font-weight: 600; white-space: nowrap; }
.styled-table td { padding: .65rem 1rem; border-bottom: 1px solid #f1f5f9; color: #334155; vertical-align: top; }
.styled-table tbody tr:last-child td { border-bottom: none; }
.styled-table tbody tr:hover { background: #f8fafc; }
.row-highlight { background: #f0f9ff; }

.insight-box { border-radius: 14px; padding: 1.1rem 1.25rem; margin: 1.1rem 0; }
.insight-box__header { display: flex; align-items: center; gap: .6rem; margin-bottom: .65rem; font-size: .93rem; }
.insight-icon { font-size: 1.1rem; flex-shrink: 0; }
.insight-box p { font-size: .88rem; margin: 0; line-height: 1.75; }
.insight-box--blue   { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a5f; }
.insight-box--red    { background: #fff1f2; border: 1px solid #fecdd3; color: #7f1d1d; }
.insight-box--orange { background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; }
.insight-box--purple { background: #faf5ff; border: 1px solid #e9d5ff; color: #3b0764; }

.steps-flow { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin: 1.1rem 0; justify-content: center; }
.step-item { display: flex; flex-direction: column; align-items: center; gap: .3rem; min-width: 90px; }
.step-num { width: 36px; height: 36px; border-radius: 50%; background: #2563eb; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.step-item p { font-size: .78rem; color: #475569; text-align: center; margin: 0; }
.step-arrow { color: #94a3b8; font-size: 1.2rem; }

.liability-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 1.1rem 0; }
.liability-card { border-radius: 14px; padding: 1.1rem; text-align: center; }
.liability-card--civil    { background: #eff6ff; border: 1px solid #bfdbfe; }
.liability-card--criminal { background: #fff1f2; border: 1px solid #fecdd3; }
.liability-card--tax      { background: #fff7ed; border: 1px solid #fed7aa; }
.liability-card__icon { font-size: 1.75rem; margin-bottom: .5rem; }
.liability-card h3 { font-size: .95rem; margin-bottom: .5rem; }
.liability-card p { font-size: .82rem; color: #475569; margin-bottom: .65rem; }
.liability-card__ref { font-size: .72rem; background: rgba(0,0,0,.06); border-radius: 6px; padding: .2rem .5rem; color: #64748b; display: inline-block; }

.case-study-box { background: #fefce8; border: 1px solid #fde047; border-right: 4px solid #eab308; border-radius: 14px; padding: 1.1rem 1.25rem; margin: 1.1rem 0; }
.case-study-box__header { display: flex; align-items: center; gap: .6rem; font-size: .9rem; font-weight: 700; color: #713f12; margin-bottom: .75rem; }
.cs-icon { font-size: 1.1rem; }
.case-study-box p { font-size: .87rem; color: #451a03; margin-bottom: .5rem; line-height: 1.8; }
.case-study-lesson { background: rgba(234,179,8,.15); border-radius: 8px; padding: .6rem .85rem; font-style: italic; margin-bottom: 0 !important; }

.timeline { position: relative; padding-right: 2.5rem; margin: 1.1rem 0; }
.timeline::before { content: ''; position: absolute; right: 11px; top: 12px; bottom: 12px; width: 2px; background: #e2e8f0; }
.timeline-item { position: relative; margin-bottom: 1.2rem; display: flex; gap: 1rem; }
.timeline-dot { width: 24px; height: 24px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px currentColor; flex-shrink: 0; position: absolute; right: -2rem; top: .2rem; }
.timeline-dot--1 { color: #3b82f6; background: #3b82f6; }
.timeline-dot--2 { color: #f59e0b; background: #f59e0b; }
.timeline-dot--3 { color: #8b5cf6; background: #8b5cf6; }
.timeline-dot--4 { color: #10b981; background: #10b981; }
.timeline-dot--5 { color: #06b6d4; background: #06b6d4; }
.timeline-content h3 { margin-top: 0; }
.timeline-content p { font-size: .88rem; color: #475569; margin: 0; }
.law-ref { font-size: .75rem; background: #dbeafe; color: #1d4ed8; border-radius: 6px; padding: .15rem .45rem; font-weight: 600; margin-right: .4rem; }

.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.1rem 0; }
.compare-card { border-radius: 14px; padding: 1.1rem; }
.compare-card--warning { background: #fffbeb; border: 1px solid #fcd34d; }
.compare-card--danger  { background: #fff1f2; border: 1px solid #fca5a5; }
.compare-card h3 { font-size: .95rem; margin-bottom: .6rem; }
.compare-card ul { margin-bottom: .75rem; }
.compare-card li { font-size: .83rem; color: #475569; }
.compare-card__result { font-size: .8rem; font-weight: 700; background: rgba(0,0,0,.08); border-radius: 8px; padding: .4rem .7rem; color: #1e293b; }

.articles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin: 1.1rem 0; }
.article-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 1rem; }
.article-card__ref { font-size: .72rem; font-weight: 700; color: #2563eb; background: #eff6ff; border-radius: 6px; padding: .2rem .5rem; display: inline-block; margin-bottom: .5rem; }
.article-card h3 { font-size: .9rem; margin: .3rem 0; }
.article-card p { font-size: .82rem; color: #475569; margin: 0; }

.checklist-widget { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 16px; padding: 1.25rem 1.5rem; margin-top: 1.25rem; }
.checklist-widget__header { display: flex; align-items: center; gap: .6rem; font-size: .95rem; font-weight: 700; color: #14532d; margin-bottom: 1rem; }
.checklist-list { list-style: none; padding: 0; display: grid; gap: .5rem; }
.checklist-list li { display: flex; align-items: flex-start; gap: .6rem; font-size: .88rem; color: #1e293b; background: rgba(255,255,255,.7); border-radius: 8px; padding: .5rem .75rem; }
.check-icon { color: #16a34a; font-size: 1rem; flex-shrink: 0; margin-top: .05rem; }

.personas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin: 1.1rem 0; }
.persona-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 16px; padding: 1.25rem; text-align: center; }
.persona-card__avatar { font-size: 2.5rem; margin-bottom: .5rem; }
.persona-card h3 { font-size: 1rem; margin-bottom: .2rem; }
.persona-age { font-size: .78rem; color: #94a3b8; margin-bottom: .75rem; display: block; }
.persona-pain, .persona-gain { font-size: .82rem; border-radius: 8px; padding: .5rem .75rem; margin-bottom: .5rem; text-align: right; }
.persona-pain { background: #fff1f2; color: #7f1d1d; }
.persona-gain { background: #f0fdf4; color: #14532d; }
.persona-pain strong, .persona-gain strong { display: block; margin-bottom: .2rem; }

.differentiators-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.diff-item { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 1rem; text-align: center; }
.diff-icon { font-size: 1.75rem; display: block; margin-bottom: .5rem; }
.diff-item strong { display: block; font-size: .92rem; margin-bottom: .35rem; color: #1e293b; }
.diff-item p { font-size: .8rem; color: #64748b; margin: 0; }

.cta-block { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%); border-radius: 18px; padding: 1.5rem 1.75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.cta-block__text h3 { color: #fff; font-size: 1.05rem; margin-bottom: .4rem; }
.cta-block__text p  { color: rgba(255,255,255,.85); font-size: .88rem; margin: 0; }
.cta-btn { display: inline-block; background: #fff; color: #1d4ed8; font-weight: 700; font-size: .95rem; padding: .85rem 1.75rem; border-radius: 12px; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s, transform .15s; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.cta-btn:hover { background: #eff6ff; transform: translateY(-2px); }
.cta-block--conclusion { margin-top: 1.25rem; }

.faq-list { display: grid; gap: .75rem; margin-top: 1.1rem; }
.faq-item { border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; background: #ffffff; }
.faq-q { font-size: .93rem; font-weight: 700; color: #1e293b; padding: 1rem 1.25rem; margin: 0; cursor: pointer; background: #f8fafc; border-bottom: 1px solid #e2e8f0; position: relative; }
.faq-q::after { content: '▾'; position: absolute; left: 1rem; color: #3b82f6; }
.faq-a { padding: 1rem 1.25rem; }
.faq-a p { font-size: .88rem; color: #475569; margin: 0; line-height: 1.8; }

.conclusion-block { background: linear-gradient(to bottom, #ffffff, #f0f9ff); }
.takeaways-box { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 14px; padding: 1.25rem 1.5rem; margin: 1.1rem 0; }
.takeaways-box h3 { font-size: .95rem; color: #1e3a5f; margin-bottom: .75rem; }
.takeaways-box li { font-size: .88rem; color: #1e40af; margin-bottom: .5rem; }
.final-tip-box { display: flex; gap: .75rem; align-items: flex-start; background: #fefce8; border: 1px solid #fde047; border-radius: 12px; padding: 1rem 1.25rem; margin: 1.1rem 0; }
.final-tip-icon { font-size: 1.3rem; flex-shrink: 0; }
.final-tip-box p { font-size: .9rem; color: #713f12; margin: 0; line-height: 1.75; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .apadas-layout {
    flex-direction: column;
  }
  .apadas-sidebar {
    width: 100%;
    order: -1;
  }
  .sidebar-sticky {
    position: static;   /* موبایل: sticky غیرفعال */
  }
}

@media (max-width: 600px) {
  .apadas-layout { padding: 1rem .75rem; }
  .cta-block { flex-direction: column; text-align: center; }
  .cta-btn { width: 100%; text-align: center; }
  .level-journey { flex-direction: column; }
  .level-arrow { transform: rotate(90deg); }
  .timeline { padding-right: 2rem; }
}
