/* ==========================================================
   کدینگو – صفحه‌های بلاگ (فهرست و مقاله)
   بعد از style.css بارگذاری می‌شود
   ========================================================== */

/* ---------- منو: آیتم صفحهٔ فعلی ---------- */
.nav a[aria-current="page"] { color: #fff; }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- دکمهٔ روشن روی زمینهٔ تیره ---------- */
.btn-ghost-light { border-color: rgba(255, 255, 255, .45); color: #fff; background: transparent; }
.btn-ghost-light:hover { background: #fff; border-color: #fff; color: var(--navy); }

/* ---------- مسیر صفحه ---------- */
.crumbs { margin-bottom: 22px; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: .86rem; line-height: 1.8; }
.crumbs li { display: inline-flex; align-items: center; color: #93a3c2; }
.crumbs li + li::before { content: "‹"; margin-inline: 10px; color: #5e7196; font-weight: 700; }
.crumbs a { color: #c3cfe4; transition: color .2s; }
.crumbs a:hover { color: var(--green-bright); text-decoration: none; }
.crumbs [aria-current] { color: var(--green-bright); font-weight: 600; }

/* ==========================================================
   فهرست مقاله‌ها
   ========================================================== */
.blog-page { padding-top: clamp(28px, 4vw, 44px); }
.blog-page .section-head { max-width: 44rem; }
.blog-page .section-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 800; line-height: 1.6; color: #fff; }
#blog h1 .hl {
  color: var(--green-bright); padding-inline: 4px;
  background: linear-gradient(transparent 66%, rgba(7, 173, 126, .22) 66%, rgba(7, 173, 126, .22) 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.blog-page .empty { color: #b9c6df; }
.blog-cta-band { background: var(--paper); padding-block: clamp(48px, 6vw, 80px); }

/* ==========================================================
   صفحهٔ مقاله – سرتیتر
   ========================================================== */
.read-progress {
  position: fixed; z-index: 49; top: var(--header-h); inset-inline: 0; height: 3px;
  pointer-events: none; background: transparent;
}
.read-progress i {
  display: block; height: 100%; transform: scaleX(var(--p, 0)); transform-origin: right center;
  background: linear-gradient(90deg, #3c78e6, var(--green-bright));
  box-shadow: 0 0 10px rgba(7, 173, 126, .6);
}

.art-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  padding-block: clamp(28px, 4vw, 48px) clamp(44px, 6vw, 72px);
}
.art-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(45% 60% at 100% 0%, rgba(7, 173, 126, .22), transparent 70%),
    radial-gradient(45% 60% at 0% 100%, rgba(60, 120, 230, .22), transparent 70%),
    linear-gradient(180deg, var(--navy) 0%, #061a3b 100%);
}
.art-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 70% at 70% 30%, #000 0%, transparent 75%);
          mask-image: radial-gradient(70% 70% at 70% 30%, #000 0%, transparent 75%);
}

.art-hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: clamp(28px, 5vw, 64px); align-items: center; }

.art-cat {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 4px 14px; border-radius: 999px; line-height: 1.8;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  font-size: .84rem; font-weight: 600; color: #d5def0;
}
.art-cat::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--green-bright); box-shadow: 0 0 0 3px rgba(7, 173, 126, .3);
}
.art-hero h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; line-height: 1.6;
  color: #fff; max-width: 22em; letter-spacing: -.01em;
}
.art-lead { margin-top: 16px; font-size: 1.08rem; line-height: 2; color: #c3cfe4; max-width: 38em; }

.art-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.art-meta li {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 12px;
  border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  font-size: .86rem; color: #d5def0; line-height: 1.8;
}
.art-meta svg { color: var(--green-bright); flex: none; }
.art-meta img { width: 22px; height: 22px; border-radius: 50%; background: #fff; }

/* تصویر شاخص */
.art-cover { position: relative; margin: 0; justify-self: end; width: min(360px, 100%); }
.art-cover::before {                     /* هالهٔ سبز پشت تصویر */
  content: ""; position: absolute; inset: 10% -10%; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(7, 173, 126, .35), transparent 65%); filter: blur(10px);
}
.art-cover img {
  width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; border-radius: 26px;
  border: 1.5px solid rgba(255, 255, 255, .14);
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .7), 0 0 0 8px rgba(255, 255, 255, .04);
}

/* ==========================================================
   صفحهٔ مقاله – متن و ستون کناری
   ========================================================== */
.art-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(32px, 5vw, 64px); align-items: start;
  padding-block: clamp(36px, 5vw, 64px) clamp(56px, 7vw, 96px);
}
.art-main { min-width: 0; max-width: 46rem; }

/* ---------- فهرست مطالب ---------- */
.toc ol { counter-reset: toc; display: grid; gap: 2px; }
.toc li { counter-increment: toc; }
.toc a {
  position: relative; display: flex; align-items: baseline; gap: 10px; padding: 7px 12px;
  border-radius: 10px; color: #3a4a66; font-size: .92rem; line-height: 1.8;
  transition: background-color .2s, color .2s;
}
.toc a::before {
  content: counter(toc, persian); flex: none; min-width: 1.2em;
  font-weight: 800; color: #9aa9c2; transition: color .2s;
}
.toc a:hover { background: var(--paper); color: var(--navy); text-decoration: none; }
.toc a.is-on { background: var(--mint); color: var(--green-dark); font-weight: 700; }
.toc a.is-on::before { color: var(--green); }

.toc-d {
  padding: 18px 12px 12px; background: #fff; border: 1px solid #e3e9f2; border-radius: 20px;
  box-shadow: 0 1px 2px rgba(7, 31, 69, .04), 0 20px 40px -30px rgba(7, 31, 69, .35);
}
.toc-d > strong {
  display: flex; align-items: center; gap: 10px; padding-inline: 12px; margin-bottom: 10px;
  font-size: 1rem; font-weight: 800; color: var(--navy);
}
.toc-d > strong::before { content: ""; width: 5px; height: 18px; border-radius: 3px; background: linear-gradient(180deg, var(--green-bright), #3c78e6); }

.toc-m { display: none; margin-bottom: 28px; background: #fff; border: 1px solid #e3e9f2; border-radius: 18px; overflow: hidden; box-shadow: 0 14px 30px -26px rgba(7, 31, 69, .4); }
.toc-m summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; font-weight: 800; color: var(--navy);
}
.toc-m summary::-webkit-details-marker { display: none; }
.toc-m summary > span { display: inline-flex; align-items: center; gap: 10px; }
.toc-m summary > span svg { color: var(--green); }
.toc-m summary .ico { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--paper); transition: transform .3s; }
.toc-m[open] summary .ico { transform: rotate(180deg); }
.toc-m ol { padding: 0 8px 12px; border-top: 1px solid #edf1f6; padding-top: 8px; }

/* ---------- ستون کناری ---------- */
.art-side { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }

.side-cta {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  padding: 26px 22px 22px; border-radius: 22px; color: #fff;
  background:
    radial-gradient(70% 60% at 100% 0%, rgba(7, 173, 126, .38), transparent 70%),
    radial-gradient(60% 60% at 0% 100%, rgba(60, 120, 230, .32), transparent 70%),
    linear-gradient(160deg, var(--navy-2), var(--navy));
  box-shadow: 0 30px 60px -30px rgba(7, 31, 69, .7);
}
.side-cta img {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .14), 0 0 0 9px rgba(7, 173, 126, .18);
}
.side-cta h3 { font-size: 1.05rem; font-weight: 800; line-height: 1.7; }
.side-cta p { margin: 6px 0 16px; font-size: .88rem; line-height: 1.9; color: #c3cfe4; }

/* ==========================================================
   متن مقاله
   ========================================================== */
.prose { font-size: 1.06rem; line-height: 2.15; color: #26354f; }
.prose > * + * { margin-top: 1.1em; }
.prose strong { color: var(--navy); font-weight: 700; }
.prose a { font-weight: 600; text-decoration: underline; text-decoration-color: rgba(6, 125, 91, .35); text-underline-offset: 5px; text-decoration-thickness: 2px; }
.prose a:hover { text-decoration-color: var(--green); }
.prose a.btn { text-decoration: none; }

.prose h2 {
  position: relative; margin-top: 2.2em; padding-inline-start: 18px;
  font-size: clamp(1.3rem, 2.4vw, 1.55rem); font-weight: 800; line-height: 1.7; color: var(--navy);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.prose h2::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .35em; bottom: .35em; width: 5px; border-radius: 3px;
  background: linear-gradient(180deg, var(--green-bright), #3c78e6);
}
.prose h3 { margin-top: 1.8em; font-size: 1.15rem; font-weight: 700; color: var(--navy); }

/* فهرست تیک‌دار */
.prose ul { display: grid; gap: 10px; }
.prose ul li { position: relative; padding-inline-start: 34px; }
.prose ul li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .5em; width: 22px; height: 22px; border-radius: 50%;
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23067d5b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* مراحل شماره‌دار */
.steps-list { counter-reset: step; display: grid; gap: 14px; }
.steps-list li {
  counter-increment: step; position: relative;
  padding: 16px 18px; padding-inline-start: 70px;
  background: #fff; border: 1px solid #e3e9f2; border-radius: 18px;
  box-shadow: 0 14px 30px -26px rgba(7, 31, 69, .4);
  transition: border-color .25s, transform .25s;
}
.steps-list li:hover { border-color: #bfe3d3; transform: translateX(-3px); }
.steps-list li::before {
  content: counter(step, persian); position: absolute; inset-inline-start: 16px; top: 16px;
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; font-size: 1.05rem; color: var(--green-bright);
  background: linear-gradient(145deg, var(--navy-2), var(--navy));
  box-shadow: 0 10px 20px -10px rgba(7, 31, 69, .7);
}
.steps-list li:not(:last-child)::after {
  content: ""; position: absolute; inset-inline-start: 34px; top: 58px; bottom: -16px; width: 2px;
  background: repeating-linear-gradient(180deg, #cfdbe9 0 4px, transparent 4px 8px);
}
.steps-list strong { display: block; font-size: 1.02rem; line-height: 1.8; }
.steps-list p { margin-top: 2px; font-size: .96rem; line-height: 1.95; color: #3a4a66; }

/* کادر نکته */
.note {
  position: relative; padding: 16px 20px; padding-inline-start: 58px;
  background: var(--mint); border: 1px solid #c8eadb; border-radius: 16px;
}
.note::before {
  content: "!"; position: absolute; inset-inline-start: 16px; top: 16px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: #fff; font-weight: 800; font-size: .95rem; line-height: 1;
}
.note strong { display: block; color: var(--green-dark); }
.note p { margin-top: 4px; font-size: .97rem; line-height: 2; color: #2c3b57; }
.note-warn { background: #fff8e6; border-color: #f6e3b0; }
.note-warn::before { background: var(--amber); color: var(--navy); }
.note-warn strong { color: #8a5d00; }

/* جدول مقایسه */
.table-wrap {
  overflow-x: auto; border: 1px solid #e3e9f2; border-radius: 18px; background: #fff;
  box-shadow: 0 14px 30px -26px rgba(7, 31, 69, .4); -webkit-overflow-scrolling: touch;
}
.prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .94rem; line-height: 1.8; }
.prose thead th { background: var(--navy); color: #fff; font-weight: 700; padding: 14px 16px; text-align: start; }
.prose thead th:last-child { background: var(--green); }
.prose tbody th { color: var(--navy); font-weight: 700; text-align: start; }
.prose tbody th, .prose tbody td { padding: 12px 16px; border-top: 1px solid #edf1f6; }
.prose tbody tr:nth-child(even) { background: #f8fbfd; }
.prose td.yes { color: var(--green-dark); font-weight: 700; }
.prose td.yes::before { content: "✓ "; }

/* کد */
.prose pre {
  direction: ltr; text-align: left; overflow-x: auto; padding: 16px 18px; border-radius: 14px;
  background: var(--navy); color: #6ff5c8; font-size: .9rem; line-height: 1.8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* دعوت کوتاه وسط مقاله */
.art-inline-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 20px 22px; border-radius: 20px; color: #fff;
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(7, 173, 126, .35), transparent 70%),
    linear-gradient(135deg, var(--navy-2), var(--navy));
  box-shadow: 0 24px 50px -30px rgba(7, 31, 69, .8);
}
.art-inline-cta strong { display: block; color: #fff; font-size: 1.04rem; line-height: 1.8; }
.art-inline-cta p { margin-top: 2px; font-size: .92rem; line-height: 1.9; color: #c3cfe4; }
.art-inline-cta .btn { flex: none; }

/* معرفی خدمات (انتهای راهنما) */
.promo {
  padding: clamp(20px, 3vw, 28px); border-radius: 22px;
  background: linear-gradient(180deg, var(--mint) 0%, #fff 100%);
  border: 1px solid #c8eadb;
}
.promo ul { grid-template-columns: 1fr 1fr; column-gap: 20px; }
.promo-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.promo-actions .btn-primary { box-shadow: 0 14px 28px -14px rgba(6, 125, 91, .7); }

/* سؤالات متداول مقاله (کارت‌ها از style.css) */
.art-faq { margin-top: 48px; scroll-margin-top: calc(var(--header-h) + 20px); }
.art-faq > h2 {
  position: relative; margin-bottom: 18px; padding-inline-start: 18px;
  font-size: clamp(1.3rem, 2.4vw, 1.55rem); font-weight: 800; line-height: 1.7; color: var(--navy);
}
.art-faq > h2::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .35em; bottom: .35em; width: 5px; border-radius: 3px;
  background: linear-gradient(180deg, var(--green-bright), #3c78e6);
}

/* اشتراک‌گذاری */
.art-share {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 40px; padding: 16px 18px; border-radius: 18px;
  background: var(--paper); border: 1px solid #e6ecf4;
}
.art-share > span { font-weight: 700; color: var(--navy); font-size: .95rem; }
.art-share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--line); color: var(--navy); font-weight: 600; font-size: .9rem;
  transition: background-color .2s, color .2s, border-color .2s;
}
.share-btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.share-btn.is-done { background: var(--green); border-color: var(--green); color: #fff; }

/* دعوت پایانی (مقاله و صفحهٔ بلاگ) */
.art-end {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-top: 40px; padding: clamp(26px, 4vw, 40px); border-radius: 26px; color: #fff;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(7, 173, 126, .4), transparent 70%),
    radial-gradient(60% 80% at 0% 100%, rgba(60, 120, 230, .34), transparent 70%),
    linear-gradient(160deg, var(--navy-2), var(--navy));
  box-shadow: 0 40px 80px -40px rgba(7, 31, 69, .8);
}
.blog-cta-band .art-end { margin-top: 0; }
.art-end::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .1) 1px, transparent 1.4px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000);
          mask-image: linear-gradient(90deg, transparent, #000);
}
.art-end h2 { font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-weight: 800; line-height: 1.6; color: #fff; }
.art-end p { margin-top: 8px; color: #c3cfe4; max-width: 34em; }
.art-end-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.art-end-actions .btn-accent { box-shadow: 0 14px 30px -14px rgba(7, 173, 126, .8); }
.art-end-bot {
  flex: none; width: 120px; height: 120px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, .08), 0 0 0 18px rgba(7, 173, 126, .12), 0 30px 50px -16px rgba(0, 0, 0, .6);
  animation: rb-float 4.2s ease-in-out infinite;
}

/* مقاله‌های مرتبط: دو کارت، وسط صفحه */
.related .wrap { width: min(860px, 100% - 40px); }
.posts-2 { grid-template-columns: repeat(2, 1fr); }

/* ==========================================================
   واکنش‌گرا
   ========================================================== */
@media (max-width: 1024px) {
  .art-layout { grid-template-columns: 1fr; }
  .art-main { max-width: 46rem; margin-inline: auto; width: 100%; }
  .art-side { display: none; }
  .toc-m { display: block; }
}

@media (max-width: 760px) {
  .art-hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .art-hero h1 { font-size: 1.55rem; line-height: 1.7; }
  .art-lead { font-size: 1rem; margin-top: 12px; }
  .art-meta { gap: 8px; margin-top: 18px; }
  .art-meta li { font-size: .8rem; padding: 4px 12px 4px 10px; }

  /* تصویر شاخص موبایل: افقی، فقط بخش بالایی تصویر */
  .art-cover { justify-self: stretch; width: 100%; }
  .art-cover img { aspect-ratio: 16 / 10; object-position: center 12%; border-radius: 22px; }

  .prose { font-size: 1rem; line-height: 2.05; }
  .prose pre { font-size: .8rem; padding: 14px; border-radius: 12px; }
  .prose h2 { margin-top: 1.9em; }
  .steps-list li { padding: 14px 14px; padding-inline-start: 62px; }
  .steps-list li::before { inset-inline-start: 12px; width: 36px; height: 36px; }
  .steps-list li:not(:last-child)::after { inset-inline-start: 29px; }

  .art-inline-cta { flex-direction: column; align-items: stretch; text-align: center; }
  .promo ul { grid-template-columns: 1fr; }
  .promo-actions .btn, .art-end-actions .btn { flex: 1 1 100%; }

  .art-share { flex-direction: column; align-items: stretch; text-align: center; }
  .art-share-btns { justify-content: center; }
  .share-btn { flex: 1; justify-content: center; }

  .art-end { flex-direction: column-reverse; text-align: center; }
  .art-end p { margin-inline: auto; }
  .art-end-bot { width: 84px; height: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  .steps-list li, .toc a, .share-btn { transition: none; }
  .steps-list li:hover { transform: none; }
}
