/* ==========================================================================
   سادات — استایل وبلاگ (نسخه‌ی «وبلاگ ادیشن»)
   مشترک بین: صفحه‌ی لیست وبلاگ، صفحه‌ی هر مقاله و پیش‌نمایش داخل پنل ادمین.
   تایپوگرافی مقاله (.post-content) کاملاً مستقل نوشته شده و به متغیرهای صفحه‌ی دیگه وابسته نیست.
   ========================================================================== */

/* ---------- متن مقاله ---------- */
.post-content {
  --pc-ink: #1d3a2e;
  --pc-strong: #0d2a1e;
  --pc-soft: #4a6558;
  --pc-gold: #B8841F;
  --pc-gold-soft: rgba(200,149,46,.28);
  font-family: 'Vazirmatn', system-ui, sans-serif;
  font-size: 16.5px; line-height: 2.15; color: var(--pc-ink);
  word-wrap: break-word; overflow-wrap: anywhere; text-align: start;
}
.post-content > *:first-child { margin-top: 0; }
.post-content > *:last-child { margin-bottom: 0; }
.post-content p { margin: 0 0 1.35em; }
.post-content > p:first-of-type { font-size: 18px; line-height: 2.1; font-weight: 500; color: var(--pc-strong); }
.post-content strong, .post-content b { font-weight: 800; color: var(--pc-strong); }
.post-content em, .post-content i { font-style: italic; }
.post-content a { color: var(--pc-gold); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color .2s; }
.post-content a:hover { color: #8a6212; }
.post-content ::selection { background: rgba(200,149,46,.28); }

.post-content h2, .post-content h3, .post-content h4 {
  color: var(--pc-strong); font-weight: 900; line-height: 1.7; scroll-margin-top: 96px;
}
.post-content h2 {
  position: relative; font-size: clamp(21px, 2.6vw, 26px); margin: 2.2em 0 .8em; padding-inline-start: 18px;
}
.post-content h2::before {
  content: ''; position: absolute; inset-inline-start: 0; top: .35em; bottom: .35em; width: 5px; border-radius: 6px;
  background: linear-gradient(180deg, #E9C36E, #C8952E);
}
.post-content h3 { font-size: clamp(18px, 2.1vw, 21px); margin: 1.9em 0 .6em; }
.post-content h4 { font-size: 16.5px; margin: 1.6em 0 .5em; color: var(--pc-gold); }

.post-content ul, .post-content ol { margin: 0 0 1.5em; padding: 0; list-style: none; counter-reset: pcl; }
.post-content li { position: relative; margin-bottom: .6em; padding-inline-start: 30px; }
.post-content ul > li::before {
  content: ''; position: absolute; inset-inline-start: 6px; top: 1.05em; width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, #E9C36E, #C8952E); box-shadow: 0 0 0 4px rgba(200,149,46,.14);
}
.post-content ol > li { counter-increment: pcl; }
.post-content ol > li::before {
  content: counter(pcl, persian); position: absolute; inset-inline-start: 0; top: .35em;
  width: 24px; height: 24px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #1a1206; background: linear-gradient(135deg, #E9C36E, #C8952E);
}
.post-content li > ul, .post-content li > ol { margin: .6em 0 0; }

.post-content blockquote {
  position: relative; margin: 2em 0; padding: 22px 26px 20px; border-radius: 20px;
  background: linear-gradient(145deg, rgba(227,182,92,.20), rgba(255,255,255,.55));
  border: 1px solid rgba(200,149,46,.32); border-inline-start: 5px solid #C8952E;
  color: var(--pc-strong); font-size: 17px; font-weight: 600; line-height: 2.05;
}
.post-content blockquote::before {
  content: '«'; position: absolute; inset-inline-end: 18px; top: -6px; font-size: 54px; line-height: 1; color: rgba(200,149,46,.45); font-family: Georgia, serif;
}
.post-content blockquote p { margin: 0 0 .5em; font-size: inherit; font-weight: inherit; }
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content blockquote cite { display: block; margin-top: 10px; font-size: 12.5px; font-style: normal; font-weight: 500; color: var(--pc-soft); }

.post-content hr {
  border: 0; height: 1px; margin: 2.6em auto; width: 70%;
  background: linear-gradient(90deg, transparent, rgba(200,149,46,.55), transparent); overflow: visible; position: relative;
}
.post-content hr::after {
  content: '◆'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -52%); font-size: 11px; color: #C8952E;
  background: #fbfdfb; padding: 0 12px;
}

/* ---------- عکس لابه‌لای متن ---------- */
.post-content figure.fig { margin: 2.2em 0; padding: 0; }
.post-content figure.fig img, .post-content > img {
  display: block; width: 100%; height: auto; border-radius: 20px; cursor: zoom-in;
  box-shadow: 0 22px 44px -24px rgba(13,42,30,.5), 0 2px 8px -2px rgba(13,42,30,.12);
}
.post-content figure.fig figcaption {
  margin-top: 12px; text-align: center; font-size: 12.5px; line-height: 1.9; color: var(--pc-soft);
}
.post-content figure.fig-wide { margin-inline: clamp(-60px, -5vw, 0px); }   /* کمی بزرگ‌تر از ستون متن */
.post-content figure.fig-medium { max-width: 78%; margin-inline: auto; }
.post-content figure.fig-small { max-width: 52%; margin-inline: auto; }
.post-content figure.fig-small.al-right, .post-content figure.fig-medium.al-right { float: right; margin: .4em 0 1.2em 1.6em; max-width: 44%; }
.post-content figure.fig-small.al-left, .post-content figure.fig-medium.al-left { float: left; margin: .4em 1.6em 1.2em 0; max-width: 44%; }
.post-content::after { content: ''; display: block; clear: both; }
.post-content h2, .post-content h3, .post-content hr, .post-content .gallery, .post-content .post-cta, .post-content figure.fig-wide, .post-content figure.fig-full { clear: both; }
/* عکسی که بدون قاب داخل متن اومده (مقاله‌های قدیمی) */
.post-content p > img, .post-content > img { margin: 1.6em auto; display: block; max-width: 100%; height: auto; border-radius: 18px; }

/* ---------- گالری ---------- */
.post-content .gallery { display: grid; gap: 12px; margin: 2.2em 0; }
.post-content .gallery.cols-1 { grid-template-columns: 1fr; }
.post-content .gallery.cols-1 img { aspect-ratio: 16 / 9; }
.post-content .gallery.cols-2 { grid-template-columns: repeat(2, 1fr); }
.post-content .gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
.post-content .gallery figure { margin: 0; }
.post-content .gallery img {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; cursor: zoom-in;
  box-shadow: 0 16px 34px -22px rgba(13,42,30,.55);
}

/* ---------- کادر نکته ---------- */
.post-content aside.callout {
  margin: 2em 0; padding: 20px 22px; border-radius: 20px; display: flex; gap: 14px; align-items: flex-start;
  background: linear-gradient(145deg, rgba(34,140,90,.10), rgba(255,255,255,.6)); border: 1px solid rgba(34,140,90,.28);
}
.post-content aside.callout::before {
  content: '✦'; flex: none; width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff; background: linear-gradient(135deg, #2f9e6a, #1d6f4a);
}
.post-content aside.callout > div { flex: 1; min-width: 0; }
.post-content aside.callout strong { display: block; margin-bottom: 4px; font-size: 15.5px; }
.post-content aside.callout p { margin: 0; font-size: 15px; line-height: 2; }

/* ---------- دکمه‌ی دعوت به همکاری داخل متن ---------- */
.post-content .post-cta {
  margin: 2.4em 0; padding: 28px 26px; border-radius: 24px; text-align: center; color: #F4EFE2;
  background: radial-gradient(60% 120% at 88% 0%, rgba(227,182,92,.36), transparent 60%), radial-gradient(60% 120% at 8% 100%, rgba(34,140,90,.44), transparent 60%), linear-gradient(145deg, #0c2a1e, #06150f);
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 26px 50px -30px rgba(6,22,16,.8);
}
.post-content .post-cta h3 { color: #F4EFE2; margin: 0 0 6px; font-size: 19px; padding: 0; }
.post-content .post-cta p { color: rgba(244,239,226,.82); margin: 0 0 16px; font-size: 14px; line-height: 2; }
.post-content .post-cta a.btn {
  display: inline-flex; padding: 11px 26px; border-radius: 999px; text-decoration: none; font-weight: 800; font-size: 13.5px;
  color: #1a1206; background: linear-gradient(135deg, #E9C36E, #C8952E); box-shadow: 0 12px 24px -12px rgba(200,149,46,.8);
}
.post-content .post-cta a.btn:hover { color: #1a1206; transform: translateY(-2px); }

.post-content table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: 14.5px; display: block; overflow-x: auto; }
.post-content th, .post-content td { padding: 10px 14px; border: 1px solid rgba(200,149,46,.28); text-align: start; }
.post-content th { background: rgba(200,149,46,.14); font-weight: 800; }
.post-content pre, .post-content code { direction: ltr; font-size: 13.5px; background: rgba(13,42,30,.07); border-radius: 8px; }
.post-content code { padding: 2px 6px; }
.post-content pre { padding: 14px 16px; overflow-x: auto; margin: 1.6em 0; }

/* سازگاری با مقاله‌های قدیمی که با ویرایشگر قبلی نوشته شده بودن */
.post-content .ql-align-center { text-align: center; }
.post-content .ql-align-right { text-align: right; }
.post-content .ql-align-left { text-align: left; }
.post-content .ql-align-justify { text-align: justify; }
.post-content .ql-direction-rtl { direction: rtl; }
.post-content .ql-indent-1 { padding-inline-start: 2.2em; } .post-content .ql-indent-2 { padding-inline-start: 4.4em; }

/* ---------- لایه‌ی بزرگ صفحه‌ی مقاله ---------- */
.post-layout {
  max-width: 1160px; margin: 34px auto 0; padding: 0 clamp(16px, 4vw, 32px);
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 30px; align-items: start;
}
.post-article {
  min-width: 0; padding: clamp(22px, 3.6vw, 44px); border-radius: 28px;
  background: linear-gradient(160deg, #ffffff, rgba(250,253,251,.97)); border: 1px solid rgba(255,255,255,.95);
  box-shadow: 0 30px 64px -34px rgba(6,22,16,.55), inset 0 1px 0 #fff;
  backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%);
}
.post-aside { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 14px; }
.aside-card {
  padding: 20px 20px 18px; border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,255,255,.5)); border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 18px 40px -28px rgba(13,42,30,.4), inset 0 1px 0 #fff;
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.aside-card h4 { margin: 0 0 12px; font-size: 13.5px; font-weight: 900; color: #0d2a1e; display: flex; align-items: center; gap: 8px; }
.aside-card h4::before { content: ''; width: 4px; height: 15px; border-radius: 4px; background: linear-gradient(180deg, #E9C36E, #C8952E); }


.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700; color: #1d3a2e; text-decoration: none;
  background: rgba(255,255,255,.7); border: 1px solid rgba(200,149,46,.32); transition: transform .25s, background .25s;
}
.share-btn:hover { transform: translateY(-2px); background: rgba(227,182,92,.28); }
.share-btn svg { width: 14px; height: 14px; }

.cta-card { color: #F4EFE2 !important; background: radial-gradient(70% 110% at 90% 0%, rgba(227,182,92,.34), transparent 60%), linear-gradient(150deg, #0c2a1e, #06150f) !important; border-color: rgba(255,255,255,.12) !important; }
.cta-card h4 { color: #F4EFE2; }
.cta-card p { margin: 0 0 14px; font-size: 12.5px; line-height: 1.95; color: rgba(244,239,226,.8); }
.cta-card .btn { width: 100%; justify-content: center; }

.post-foot { margin-top: 36px; padding-top: 26px; border-top: 1px solid rgba(200,149,46,.25); display: flex; flex-direction: column; gap: 18px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12.5px; color: #4a6558; }
.post-tags a { padding: 5px 14px; border-radius: 999px; background: rgba(200,149,46,.14); border: 1px solid rgba(200,149,46,.3); color: #6b4d12; font-weight: 700; text-decoration: none; }
.author-box { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: 20px; background: rgba(255,255,255,.55); border: 1px solid rgba(200,149,46,.22); }
.author-box .av { flex: none; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 20px; color: #1a1206; background: linear-gradient(135deg, #E9C36E, #C8952E); box-shadow: 0 10px 22px -10px rgba(200,149,46,.8); }
.author-box b { display: block; font-size: 14.5px; color: #0d2a1e; }
.author-box span { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.9; color: #4a6558; }

.post-nav { max-width: 1160px; margin: 26px auto 0; padding: 0 clamp(16px, 4vw, 32px); display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.post-nav a {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 20px; text-decoration: none; color: inherit;
  background: linear-gradient(145deg, rgba(255,255,255,.8), rgba(255,255,255,.5)); border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 16px 36px -26px rgba(13,42,30,.4); transition: transform .3s, box-shadow .3s;
}
.post-nav a:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -24px rgba(13,42,30,.45); }
.post-nav small { font-size: 11px; color: #B8841F; font-weight: 800; letter-spacing: .5px; }
.post-nav b { font-size: 14px; line-height: 1.8; color: #0d2a1e; }
.post-nav .nx { text-align: start; }
.post-nav .pv { text-align: end; }


/* بزرگ‌نمایی عکس */
.lb { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(6,16,12,.86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: zoom-out; }
.lb.open { display: flex; }
.lb img { max-width: min(1200px, 96vw); max-height: 90vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lb button { position: absolute; top: 18px; inset-inline-start: 18px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.12); color: #fff; font-size: 20px; cursor: pointer; }

@media (max-width: 960px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-aside { position: static; }
}
@media (max-width: 640px) {
  .post-content { font-size: 15.5px; line-height: 2.05; }
  .post-content > p:first-of-type { font-size: 16.5px; }
  .post-content figure.fig-wide { margin-inline: 0; }
  .post-content figure.fig-medium, .post-content figure.fig-small { max-width: 100%; }
  .post-content figure.fig-small.al-right, .post-content figure.fig-medium.al-right,
  .post-content figure.fig-small.al-left, .post-content figure.fig-medium.al-left { float: none; max-width: 100%; margin: 1.6em 0; }
  .post-content .gallery.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .post-content blockquote { padding: 18px 18px 16px; font-size: 15.5px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-cta-band-inner { padding: 24px 20px; }
  .author-box { flex-direction: column; text-align: center; }
}

/* ==========================================================================
   هیرو صفحه‌ی مقاله (عکس کاور یا گرادیانت برند + اطلاعات مقاله روی آن)
   ========================================================================== */
#postLoading { padding: 120px 0; }
.post-notfound { flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 55vh; text-align: center; font-size: 15px; color: #3a584a; }
.ph {
  position: relative; display: flex; align-items: flex-end; min-height: clamp(400px, 64vh, 580px); overflow: hidden; color: #fff; isolation: isolate;
  background: linear-gradient(150deg, var(--c1, #1f8a5b), var(--c2, #0a3324));
}
.ph-bg { position: absolute; inset: 0; z-index: -3; background-size: cover; background-position: center; transform-origin: 60% 40%; }
.ph.has-cover .ph-bg { animation: phZoom 22s ease-out both; }
@keyframes phZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.ph:not(.has-cover) .ph-bg {
  background:
    radial-gradient(circle at 82% 22%, rgba(255,255,255,.2) 0 16%, transparent 17%),
    radial-gradient(circle at 12% 88%, rgba(255,255,255,.1) 0 26%, transparent 27%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.045) 0 2px, transparent 2px 16px);
}
.ph-shade {
  position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(0deg, rgba(5,16,12,.95) 0%, rgba(5,16,12,.72) 34%, rgba(5,16,12,.38) 66%, rgba(5,16,12,.55) 100%),
              linear-gradient(135deg, rgba(34,140,90,.22), rgba(200,149,46,.16));
}
.ph-inner { width: 100%; max-width: 1160px; margin: 0 auto; padding: 88px clamp(16px, 4vw, 32px) 104px; }
.ph .crumbs { justify-content: flex-start; margin: 0 0 18px; color: rgba(255,255,255,.7); }
.ph .crumbs a { color: rgba(255,255,255,.85); }
.ph .crumbs a:hover { color: #E9C36E; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.crumbs i { font-style: normal; opacity: .6; }
.ph .post-cat { display: inline-block; margin-bottom: 14px; padding: 5px 17px; border-radius: 999px; font-size: 11.5px; font-weight: 800; color: #1a1206; background: linear-gradient(135deg, #E9C36E, #C8952E); }
.ph h1 { max-width: 880px; margin: 0 0 14px; color: #fff; font-size: clamp(26px, 4.4vw, 46px); font-weight: 900; line-height: 1.65; text-shadow: 0 2px 22px rgba(0,0,0,.55); }
.ph .post-lead { max-width: 740px; margin: 0 0 22px; font-size: 15.5px; line-height: 2.1; color: rgba(255,255,255,.86); text-shadow: 0 1px 12px rgba(0,0,0,.5); }
.ph-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.ph-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ph-chip:empty { display: none; }
.ph-chip .author-avatar { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 10px; font-weight: 800; color: #1a1206; background: linear-gradient(135deg, #E9C36E, #C8952E); }

/* کارت مقاله روی لبه‌ی پایین هیرو می‌شینه */
.post-layout { position: relative; z-index: 3; margin-top: -68px; }

/* ==========================================================================
   فهرست مطالب هوشمند
   ========================================================================== */
.toc-card {
  padding: 20px 18px 14px; border-radius: 24px;
  background: linear-gradient(160deg, #ffffff, rgba(250,253,251,.97)); border: 1px solid rgba(255,255,255,.95);
  box-shadow: 0 26px 52px -30px rgba(6,22,16,.55), inset 0 1px 0 #fff;
  backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%);
}
.toc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed rgba(200,149,46,.3); }
.toc-head h4 { margin: 0; font-size: 14px; font-weight: 900; color: #0d2a1e; }
.toc-head h4::before { display: none; }
.toc-head small { display: block; margin-top: 3px; font-size: 11.5px; color: #6b8478; }
.toc-ring { position: relative; flex: none; width: 46px; height: 46px; }
.toc-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.toc-ring circle { fill: none; stroke-width: 3.6; }
.toc-ring .bg { stroke: rgba(200,149,46,.2); }
.toc-ring .fg { stroke: #C8952E; stroke-linecap: round; stroke-dasharray: 119.38; stroke-dashoffset: 119.38; transition: stroke-dashoffset .25s linear; }
.toc-ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: #6b4d12; }

.toc-rail {
  --fill: 0%; position: relative; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 360px); min-height: 0; overflow-y: auto; padding: 2px 2px 8px 0; scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
}
.toc-item {
  position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 9px 36px 9px 10px; border-radius: 12px; text-decoration: none; color: #4a6558; font-size: 12.5px; line-height: 1.85;
  transition: background .25s, color .25s;
}
/* ریل عمودی + نقطه‌ی هر بخش (سمت راست) */
.toc-item::before { content: ''; position: absolute; top: 0; bottom: 0; inset-inline-start: auto; right: 15px; width: 2px; background: rgba(200,149,46,.22); }
.toc-item:first-child::before { top: 50%; } .toc-item:last-child::before { bottom: 50%; }
.toc-item::after {
  content: ''; position: absolute; top: 50%; right: 10px; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; box-sizing: border-box;
  background: #fff; border: 2px solid rgba(200,149,46,.5); transition: all .3s cubic-bezier(.16,1,.3,1); z-index: 1;
}
.toc-item.done::before { background: linear-gradient(180deg, #E9C36E, #C8952E); }
.toc-item.done::after { background: #C8952E; border-color: #C8952E; }
.toc-item.active::after { width: 16px; height: 16px; margin-top: -8px; right: 8px; background: linear-gradient(135deg, #E9C36E, #C8952E); border-color: #fff; box-shadow: 0 0 0 4px rgba(200,149,46,.25); }
.toc-item.active { background: rgba(200,149,46,.13); color: #0d2a1e; font-weight: 800; }
.toc-item:hover { background: rgba(200,149,46,.09); color: #0d2a1e; }
.toc-n { flex: none; min-width: 16px; font-size: 11px; font-weight: 800; color: #B8841F; padding-top: 1px; }
.toc-item.l3 { padding-inline-start: 22px; font-size: 12px; color: #6b8478; }
.toc-item.l3 .toc-n:empty { display: none; }
.toc-item.l3::after { width: 8px; height: 8px; margin-top: -4px; right: 12px; }
.toc-item.l3.active::after { width: 12px; height: 12px; margin-top: -6px; right: 10px; }
.toc-t { min-width: 0; }

/* موبایل: دکمه‌ی شناور + کشوی فهرست */
.toc-fab {
  position: fixed; z-index: 4700; bottom: 92px; inset-inline-end: 16px; display: none; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 800; color: #1a1206;
  background: linear-gradient(135deg, #E9C36E, #C8952E); box-shadow: 0 16px 30px -12px rgba(200,149,46,.85); border: 0; opacity: 0; transform: translateY(16px); pointer-events: none; transition: all .35s cubic-bezier(.16,1,.3,1);
}
.toc-fab svg { width: 16px; height: 16px; } .toc-fab b { padding: 1px 8px; border-radius: 999px; font-size: 10.5px; background: rgba(26,18,6,.14); }
.toc-fab.show { opacity: 1; transform: none; pointer-events: auto; }
.toc-drawer { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: flex-end; background: rgba(8,20,15,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.toc-drawer.open { opacity: 1; pointer-events: auto; }
.toc-sheet { width: 100%; max-height: 78vh; display: flex; flex-direction: column; padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 26px 26px 0 0; background: linear-gradient(160deg, rgba(255,255,255,.97), rgba(246,250,247,.94)); transform: translateY(100%); transition: transform .4s cubic-bezier(.16,1,.3,1); }
.toc-drawer.open .toc-sheet { transform: none; }
.toc-sheet-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.toc-sheet-head h4 { margin: 0; font-size: 15px; font-weight: 900; color: #0d2a1e; } .toc-sheet-head small { display: block; margin-top: 2px; font-size: 11.5px; color: #6b8478; }
.toc-x { margin-inline-start: auto; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(200,149,46,.4); background: #fff; font-size: 20px; line-height: 1; cursor: pointer; color: #0d2a1e; }
.toc-sheet .toc-rail { max-height: none; flex: 1; }
html.toc-lock { overflow: hidden; }

/* ==========================================================================
   کاشی مقاله — گرادیانت + عنوان روی کاشی (مشترک: لیست وبلاگ و «مقالات دیگر»)
   ========================================================================== */
.bt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 380px; grid-auto-flow: dense; gap: 20px; }
.bt-grid.bt-compact { grid-auto-rows: 270px; }
.bt {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; isolation: isolate; border-radius: 28px; padding: 20px; color: #fff; text-decoration: none;
  background: linear-gradient(145deg, var(--c1, #1f8a5b), var(--c2, #0a3324));
  box-shadow: 0 22px 44px -26px rgba(6,22,16,.7), inset 0 1px 0 rgba(255,255,255,.22);
  transition: transform .5s cubic-bezier(.16,1,.3,1), box-shadow .5s; animation: btIn .6s cubic-bezier(.16,1,.3,1) both; animation-delay: var(--d, 0ms);
}
@keyframes btIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.bt-wide { grid-column: span 2; }
.bt-bg { position: absolute; inset: 0; z-index: -3; background-size: cover; background-position: center; transition: transform 1s cubic-bezier(.16,1,.3,1); }
.bt-pattern {
  position: absolute; inset: 0; z-index: -2; opacity: .9;
  background: radial-gradient(circle at 86% 14%, rgba(255,255,255,.2) 0 15%, transparent 16%), radial-gradient(circle at 8% 100%, rgba(255,255,255,.1) 0 28%, transparent 29%), repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 15px);
  mix-blend-mode: soft-light; transition: transform .8s cubic-bezier(.16,1,.3,1);
}
.bt-shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(5,16,12,.94) 0%, rgba(5,16,12,.62) 42%, rgba(5,16,12,.12) 78%, rgba(5,16,12,.3) 100%);
  transition: opacity .5s;
}
.bt-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bt-cat, .bt-star { padding: 5px 14px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.bt-cat { color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.bt-star { color: #1a1206; background: linear-gradient(135deg, #E9C36E, #C8952E); }
.bt-body { display: flex; flex-direction: column; gap: 8px; }
.bt-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: rgba(255,255,255,.78); }
.bt-meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .7; }
.bt h3 { margin: 0; font-size: 18px; font-weight: 900; line-height: 1.75; color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.45); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bt-wide h3 { font-size: clamp(21px, 2.4vw, 28px); -webkit-line-clamp: 2; }
.bt p { margin: 0; font-size: 12.5px; line-height: 1.95; color: rgba(255,255,255,.84); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bt-go { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; color: #E9C36E; }
.bt-go svg { width: 15px; height: 15px; transition: transform .35s; }

/* حرکت با ماوس: بالا میاد، عکس زوم می‌شه، گرادیانت روشن‌تر، خلاصه باز می‌شه */
@media (hover: hover) {
  .bt p { max-height: 0; opacity: 0; transition: max-height .5s cubic-bezier(.16,1,.3,1), opacity .4s; }
  .bt-wide p { max-height: 52px; opacity: 1; }
  .bt:hover { transform: translateY(-9px); box-shadow: 0 34px 60px -26px rgba(6,22,16,.8), 0 0 0 1.5px rgba(233,195,110,.75), inset 0 1px 0 rgba(255,255,255,.3); }
  .bt:hover p { max-height: 60px; opacity: 1; }
  .bt:hover .bt-bg { transform: scale(1.1); }
  .bt:hover .bt-pattern { transform: scale(1.12) rotate(2deg); }
  .bt:hover .bt-shade { opacity: .88; }
  .bt:hover .bt-go svg { transform: translateX(-6px); }
}
.bt:focus-visible { outline: 3px solid #E9C36E; outline-offset: 3px; }

.bt-skel i { display: block; border-radius: 28px; background: linear-gradient(100deg, rgba(255,255,255,.45) 30%, rgba(255,255,255,.95) 50%, rgba(255,255,255,.45) 70%); background-size: 220% 100%; animation: blSk 1.3s ease-in-out infinite; }
.bt-skel.hidden { display: none; }
@keyframes blSk { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.empty-state { grid-column: 1 / -1; padding: 50px 20px; text-align: center; font-size: 13.5px; color: #4a6558; border-radius: 24px; border: 1px dashed rgba(200,149,46,.4); background: rgba(255,255,255,.5); }
.bl-more { display: flex; justify-content: center; margin-top: 26px; }
.bl-more button { padding: 12px 30px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; color: #1d3a2e; background: rgba(255,255,255,.78); border: 1px solid rgba(200,149,46,.4); transition: all .25s; }
.bl-more button:hover { background: linear-gradient(135deg, #E9C36E, #C8952E); border-color: transparent; transform: translateY(-2px); }

/* ==========================================================================
   صفحه‌ی همه‌ی وبلاگ‌ها
   ========================================================================== */
.bl-page { padding-top: 14px; padding-bottom: 20px; }
.bl2-head { position: relative; text-align: center; padding: 46px 0 14px; }
.bl2-head::before, .bl2-head::after { content: ''; position: absolute; z-index: -1; width: 340px; height: 340px; border-radius: 50%; filter: blur(70px); pointer-events: none; opacity: .75; }
.bl2-head::before { top: -40px; right: 8%; background: rgba(227,182,92,.45); }
.bl2-head::after { top: 20px; left: 8%; background: rgba(34,140,90,.32); }
.bl-eyebrow { display: inline-block; padding: 4px 14px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 1.8px; color: #A87820; background: rgba(255,255,255,.7); border: 1px solid rgba(200,149,46,.32); }
.bl2-head h1 { margin: 14px 0 10px; font-size: clamp(30px, 5vw, 52px); font-weight: 900; line-height: 1.5; background: linear-gradient(135deg, #0d2a1e 0%, #1f7a4d 55%, #C8952E 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bl2-head > p { margin: 0 auto 26px; max-width: 600px; font-size: 14px; line-height: 2.1; color: #4a6558; }
.bl2-search {
  position: relative; display: flex; align-items: center; gap: 10px; max-width: 720px; margin: 0 auto 18px; padding: 8px 18px; border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(255,255,255,.66)); border: 1px solid rgba(255,255,255,.95);
  box-shadow: 0 20px 44px -28px rgba(13,42,30,.5), inset 0 1px 0 #fff; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transition: box-shadow .3s, border-color .3s;
}
.bl2-search:focus-within { border-color: #C8952E; box-shadow: 0 24px 50px -26px rgba(200,149,46,.6), 0 0 0 4px rgba(200,149,46,.16); }
.bl2-search > svg { flex: none; width: 20px; height: 20px; color: #8a6212; }
.bl2-search input { flex: 1; min-width: 0; padding: 12px 4px; border: 0 !important; outline: none; background: transparent !important; box-shadow: none !important; font: inherit; font-size: 14.5px; color: #0d2a1e; }
.bl-count { flex: none; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #6b4d12; background: rgba(200,149,46,.14); }
.bl-count:empty { display: none; }
.bl2-search .sort-wrap { flex: none; border-inline-start: 1px solid rgba(200,149,46,.28); padding-inline-start: 12px; }
.bl2-search select { appearance: none; -webkit-appearance: none; border: 0 !important; padding-left: 20px !important; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b9185' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat left 2px center / 14px !important; box-shadow: none !important; padding: 8px 4px; font: inherit; font-size: 12.5px; font-weight: 700; color: #3a584a; cursor: pointer; outline: none; }
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; padding: 0 2px; }
.tabs button { flex: none; padding: 9px 19px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; color: #3a584a; white-space: nowrap; cursor: pointer; transition: all .25s; }
.tabs button .cnt { display: inline-block; margin-inline-start: 7px; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; background: rgba(13,42,30,.08); }
.tabs button.active .cnt { background: rgba(26,18,6,.14); }
.tabs button:hover:not(.active) { transform: translateY(-2px); }
.bl2-list { margin-top: 6px; padding: 0 !important; }
.bl2-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 34px; padding: 24px 30px; border-radius: 26px; color: #F4EFE2;
  background: radial-gradient(60% 140% at 88% 0%, rgba(227,182,92,.34), transparent 60%), radial-gradient(60% 140% at 8% 100%, rgba(34,140,90,.42), transparent 60%), linear-gradient(145deg, #0c2a1e, #06150f);
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 26px 52px -32px rgba(6,22,16,.8); }
.bl2-cta h3 { margin: 0 0 4px; font-size: 18px; font-weight: 900; } .bl2-cta p { margin: 0; font-size: 12.5px; line-height: 1.9; color: rgba(244,239,226,.8); max-width: 480px; }

/* ---------- نظرات، مقالات دیگر، ناوبری ---------- */
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.post-nav a small { color: #B8841F; }
.comments-section { max-width: 860px !important; }
.more-posts { max-width: 1160px; margin: 56px auto 0; padding: 44px clamp(16px, 4vw, 32px) 0; border-top: 1px solid rgba(200,149,46,.18); }
.more-posts h2 { margin: 0 0 18px; font-size: 20px; font-weight: 900; color: #0d2a1e; }
.to-top { position: fixed; z-index: 450; bottom: 24px; inset-inline-start: 22px; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #1a1206; font-size: 18px; border: 0;
  background: linear-gradient(135deg, #E9C36E, #C8952E); box-shadow: 0 14px 28px -12px rgba(200,149,46,.8); opacity: 0; transform: translateY(14px); pointer-events: none; transition: all .35s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 1100px) { .bt-grid { grid-auto-rows: 340px; } }
@media (max-width: 980px) {
  .bt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-layout { margin-top: -50px; }
}
@media (max-width: 720px) {
  .ph { min-height: 420px; }
  .ph-inner { padding: 70px 16px 86px; }
  .ph .post-lead { font-size: 14px; }
  .post-layout { margin-top: -40px; }
  .toc-fab { display: inline-flex; }
  .post-aside .toc-card { display: none; }
  .to-top { bottom: 92px; inset-inline-start: 16px; }
  .post-nav { grid-template-columns: 1fr; }
  .bl2-head { padding-top: 30px; }
  .bl2-search { flex-wrap: nowrap; padding: 4px 12px; }
  .bl-count { display: none; }
  .bl2-search .sort-wrap { border: 0; padding: 0; }
  .tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 6px; }
}
@media (max-width: 640px) {
  .bt-grid { grid-template-columns: 1fr; grid-auto-rows: 300px; gap: 16px; }
  .bt-grid.bt-compact { grid-auto-rows: 250px; }
  .bt-wide { grid-column: auto; }
  .bt-wide h3 { font-size: 20px; }
  .bt p { max-height: none; opacity: 1; }
}
@media (hover: none) { .bt p { max-height: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bt, .bt-bg, .ph-bg, .bt-pattern { animation: none !important; transition: none !important; } }
