/* ================= فونت ================= */
@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansX-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansX-DemiBold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansX-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansX-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-display: swap;
}

/* ================= پایه ================= */
:root {
    --b-accent: #378c3f;
    --b-accent-2: #5fd068;
    --b-accent-soft: rgba(55, 140, 63, .1);
    --b-text: #1f2328;
    --b-muted: #6b7280;
    --b-bg: #f6f8f7;
    --b-card: #ffffff;
    --b-border: rgba(20, 30, 25, .08);
    --b-radius: 18px;
    --b-shadow: 0 6px 24px rgba(20, 50, 30, .07);
    --b-shadow-hover: 0 18px 40px rgba(20, 60, 30, .14);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

.blog-body {
    margin: 0;
    font-family: 'IRANSansX', Tahoma, sans-serif;
    color: var(--b-text);
    background: var(--b-bg);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

.blog-body a {
    color: inherit;
    text-decoration: none;
}

.blog-body img {
    max-width: 100%;
    height: auto;
    display: block;
}

.blog-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================= نوار بالا ================= */
.blog-topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-top: env(safe-area-inset-top, 0px);
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--b-border);
}

.blog-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 64px;
}

.blog-brand {
    font-weight: 800;
    font-size: 1.1rem;
    background: linear-gradient(120deg, var(--b-accent), var(--b-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

.blog-topnav {
    display: flex;
    gap: 6px;
}

.blog-topnav a {
    position: relative;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: .92rem;
    font-weight: 600;
    color: var(--b-muted);
    transition: color .2s ease, background .2s ease;
}

.blog-topnav a:hover,
.blog-topnav a.is-active {
    color: var(--b-accent);
    background: var(--b-accent-soft);
}

.blog-topbar__account {
    padding: 8px 18px;
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(135deg, var(--b-accent-2), var(--b-accent));
    box-shadow: 0 6px 16px rgba(55, 140, 63, .3);
    transition: transform .2s ease, box-shadow .2s ease;
}

.blog-topbar__account:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(55, 140, 63, .38);
}

/* موبایل: منوی وسط مخفی، چون نوار پایین هست */
@media (max-width: 991.98px) {
    .blog-topnav {
        display: none;
    }
}

/* ================= هدر صفحه ================= */
.blog-hero {
    position: relative;
    padding: 48px 0 32px;
    overflow: hidden;
    background: radial-gradient(circle at 85% 10%, rgba(95, 208, 104, .18), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(44, 168, 255, .10), transparent 40%),
    linear-gradient(180deg, #ffffff, var(--b-bg));
}

.blog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: .82rem;
    color: var(--b-muted);
    margin-bottom: 12px;
}

.blog-breadcrumb a:hover {
    color: var(--b-accent);
}

.blog-hero__title {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.4;
}

.blog-hero__desc {
    margin: 0 0 24px;
    max-width: 640px;
    color: var(--b-muted);
}

/* جستجو */
.blog-search {
    display: flex;
    max-width: 520px;
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid var(--b-border);
    border-radius: 999px;
    box-shadow: var(--b-shadow);
    overflow: hidden;
    transition: box-shadow .25s ease, border-color .25s ease;
}

.blog-search:focus-within {
    border-color: rgba(55, 140, 63, .4);
    box-shadow: 0 0 0 4px var(--b-accent-soft), var(--b-shadow);
}

.blog-search input {
    flex: 1;
    min-width: 0;
    padding: 13px 20px;
    border: 0;
    outline: 0;
    font: inherit;
    background: transparent;
}

.blog-search button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--b-accent-2), var(--b-accent));
}

.blog-search button svg {
    width: 20px;
    height: 20px;
}

/* قرص‌های دسته‌بندی */
.blog-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.blog-pills::-webkit-scrollbar {
    display: none;
}

.blog-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
    background: #fff;
    border: 1px solid var(--b-border);
    transition: all .25s ease;
}

.blog-pill small {
    min-width: 22px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: .72rem;
    text-align: center;
    color: var(--b-muted);
    background: var(--b-bg);
}

.blog-pill:hover {
    color: var(--b-accent);
    border-color: rgba(55, 140, 63, .35);
    transform: translateY(-2px);
}

.blog-pill.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--b-accent-2), var(--b-accent));
    box-shadow: 0 6px 16px rgba(55, 140, 63, .3);
}

.blog-pill.is-active small {
    color: var(--b-accent);
    background: #fff;
}

/* ================= لیست ================= */
.blog-list {
    padding-top: 12px;
    padding-bottom: 60px;
}

.blog-list__result {
    color: var(--b-muted);
    font-size: .92rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

@media (max-width: 991.98px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* ================= کارت ================= */
.blog-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--b-card);
    border: 1px solid var(--b-border);
    border-radius: var(--b-radius);
    box-shadow: var(--b-shadow);
    overflow: hidden;
    transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s ease;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--b-shadow-hover);
}

.blog-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f5ea, #dff0ff);
}

.blog-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}

.blog-card:hover .blog-card__media img {
    transform: scale(1.07);
}

.blog-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 3rem;
    font-weight: 800;
    color: rgba(55, 140, 63, .35);
}

.blog-card__cat {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    color: var(--b-accent) !important;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    transition: background .2s ease, color .2s ease;
}

.blog-card__cat:hover {
    color: #fff !important;
    background: var(--b-accent);
}

.blog-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 20px 20px;
}

.blog-card__title {
    margin: 0 0 8px;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.7;
}

.blog-card__title a {
    background-image: linear-gradient(var(--b-accent), var(--b-accent));
    background-size: 0 2px;
    background-position: 100% 100%;
    background-repeat: no-repeat;
    transition: background-size .35s ease, color .25s ease;
}

.blog-card:hover .blog-card__title a {
    color: var(--b-accent);
    background-size: 100% 2px;
}

.blog-card__excerpt {
    margin: 0 0 14px;
    font-size: .9rem;
    color: var(--b-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__meta {
    display: flex;
    gap: 8px;
    margin-top: auto;
    font-size: .78rem;
    color: var(--b-muted);
}

/* ================= صفحه‌بندی ================= */
.blog-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 44px;
}

.blog-pagination a,
.blog-pagination span {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 600;
    font-size: .9rem;
    background: #fff;
    border: 1px solid var(--b-border);
    transition: all .2s ease;
}

.blog-pagination a:hover {
    color: var(--b-accent);
    border-color: rgba(55, 140, 63, .4);
    transform: translateY(-2px);
}

.blog-pagination .is-current {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--b-accent-2), var(--b-accent));
    box-shadow: 0 6px 14px rgba(55, 140, 63, .3);
}

.blog-pagination .is-disabled {
    opacity: .45;
}

/* ================= حالت خالی ================= */
.blog-empty {
    padding: 70px 20px;
    text-align: center;
    background: #fff;
    border: 1px dashed rgba(55, 140, 63, .3);
    border-radius: var(--b-radius);
}

.blog-empty__icon {
    font-size: 3rem;
}

.blog-empty h2 {
    margin: 10px 0 4px;
    font-size: 1.3rem;
}

.blog-empty p {
    margin: 0 0 20px;
    color: var(--b-muted);
}

.blog-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 999px;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(135deg, var(--b-accent-2), var(--b-accent));
    box-shadow: 0 6px 16px rgba(55, 140, 63, .3);
    transition: transform .2s ease;
}

.blog-btn:hover {
    transform: translateY(-2px);
}

/* ================= فوتر ================= */
.blog-footer {
    padding: 28px 0;
    text-align: center;
    font-size: .85rem;
    color: var(--b-muted);
    border-top: 1px solid var(--b-border);
    background: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .blog-body *, .blog-body *::before, .blog-body *::after {
        transition: none !important;
    }
}

/* =====================================================================
   صفحه‌ی تک‌مقاله
===================================================================== */

/* نوار پیشرفت */
.read-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    height: 3px;
    pointer-events: none;
}

.read-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--b-accent), var(--b-accent-2), #ffe27a);
    transform: scaleX(0);
    transform-origin: right;
    box-shadow: 0 0 10px rgba(95, 208, 104, .6);
}

.post-preview-banner {
    padding: 10px 20px;
    text-align: center;
    font-size: .9rem;
    font-weight: 600;
    color: #8a5a00;
    background: #fff4d6;
    border-bottom: 1px solid #f3dc9b;
}

.post-preview-banner a {
    margin-right: 10px;
    color: var(--b-accent);
    text-decoration: underline;
}

/* هدر */
.post-header {
    padding: 40px 0 28px;
    background: radial-gradient(circle at 85% 0%, rgba(95, 208, 104, .16), transparent 45%),
    linear-gradient(180deg, #ffffff, var(--b-bg));
}

.post-header__cat {
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    color: var(--b-accent) !important;
    background: var(--b-accent-soft);
    transition: all .2s ease;
}

.post-header__cat:hover {
    color: #fff !important;
    background: var(--b-accent);
}

.post-header__title {
    max-width: 860px;
    margin: 0 0 18px;
    font-size: clamp(1.6rem, 3.6vw, 2.5rem);
    font-weight: 800;
    line-height: 1.55;
}

.post-header__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: var(--b-muted);
}

.post-header__author {
    font-weight: 700;
    color: var(--b-text);
}

.post-avatar,
.post-author__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--b-accent-2), var(--b-accent));
}

.post-avatar {
    width: 32px;
    height: 32px;
    font-size: .85rem;
}

/* چیدمان دو ستونه */
.post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 40px;
    align-items: start;
    padding-top: 8px;
    padding-bottom: 50px;
}

@media (max-width: 991.98px) {
    .post-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .post-aside {
        display: none;
    }
}

.post-main {
    min-width: 0;
    padding: 32px clamp(18px, 4vw, 44px);
    background: #fff;
    border: 1px solid var(--b-border);
    border-radius: var(--b-radius);
    box-shadow: var(--b-shadow);
}

.post-cover {
    margin: 0 0 26px;
    border-radius: 14px;
    overflow: hidden;
}

.post-cover img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.post-lead {
    margin: 0 0 26px;
    padding: 16px 20px;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 2;
    color: #374151;
    background: var(--b-accent-soft);
    border-right: 4px solid var(--b-accent);
    border-radius: 0 12px 12px 0;
}

/* ================= متن مقاله ================= */
.prose {
    font-size: 1.04rem;
    line-height: 2.1;
    color: #2b3036;
    overflow-wrap: break-word;
}

.prose > * + * {
    margin-top: 1.1em;
}

.prose h2,
.prose h3,
.prose h4 {
    scroll-margin-top: 90px;
    line-height: 1.6;
    color: var(--b-text);
}

.prose h2 {
    position: relative;
    margin-top: 2em;
    padding-right: 16px;
    font-size: 1.5rem;
    font-weight: 800;
}

.prose h2::before {
    content: '';
    position: absolute;
    right: 0;
    top: .35em;
    bottom: .35em;
    width: 5px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--b-accent-2), var(--b-accent));
}

.prose h3 {
    margin-top: 1.6em;
    font-size: 1.22rem;
    font-weight: 700;
}

.prose h4 {
    margin-top: 1.4em;
    font-size: 1.08rem;
    font-weight: 700;
}

.prose p {
    margin: 0;
}

.prose a {
    color: var(--b-accent);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(55, 140, 63, .35);
    text-underline-offset: 4px;
    transition: text-decoration-color .2s ease;
}

.prose a:hover {
    text-decoration-color: var(--b-accent);
}

.prose ul,
.prose ol {
    padding-right: 1.4em;
}

.prose li + li {
    margin-top: .4em;
}

.prose li::marker {
    color: var(--b-accent);
    font-weight: 700;
}

.prose img {
    margin: 1.6em auto;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.prose blockquote {
    margin: 1.6em 0;
    padding: 16px 22px;
    font-style: normal;
    color: #374151;
    background: #f7faf8;
    border-right: 4px solid var(--b-accent-2);
    border-radius: 0 12px 12px 0;
}

.prose code {
    padding: 2px 7px;
    border-radius: 6px;
    font-size: .88em;
    direction: ltr;
    unicode-bidi: embed;
    color: #b42318;
    background: #f4f4f5;
}

.prose pre {
    padding: 18px;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
    border-radius: 12px;
    color: #e5e7eb;
    background: #1e2227;
}

.prose pre code {
    padding: 0;
    color: inherit;
    background: none;
}

.prose-table {
    margin: 1.6em 0;
    overflow-x: auto;
    border: 1px solid var(--b-border);
    border-radius: 12px;
}

.prose table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: .95rem;
}

.prose th,
.prose td {
    padding: 12px 14px;
    text-align: right;
    border-bottom: 1px solid var(--b-border);
}

.prose th {
    font-weight: 700;
    background: #f3f8f4;
}

.prose tr:last-child td {
    border-bottom: 0;
}

/* ================= فهرست مطالب ================= */

.toc-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc;
}

.toc-list__item a {
    position: relative;
    display: block;
    padding: 7px 34px 7px 10px;
    border-radius: 10px;
    font-size: .88rem;
    line-height: 1.75;
    color: var(--b-muted);
    transition: color .25s ease, background .25s ease;
}

/* شماره‌ی بخش‌های H2 */
.toc-list__item--h2 {
    counter-increment: toc;
}

.toc-list__item--h2 > a::before {
    content: counter(toc, persian);
    position: absolute;
    right: 4px;
    top: 50%;
    width: 22px;
    height: 22px;
    margin-top: -11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: .72rem;
    font-weight: 700;
    color: var(--b-accent);
    background: #fff;
    border: 1.5px solid rgba(55, 140, 63, .3);
    transition: all .3s cubic-bezier(.34, 1.56, .64, 1);
}

/* نقطه‌ی کوچیک برای H3 */
.toc-list__item--h3 a {
    padding-right: 48px;
    font-size: .82rem;
}

.toc-list__item--h3 > a::before {
    content: '';
    position: absolute;
    right: 32px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: rgba(55, 140, 63, .3);
    transition: all .3s ease;
}

.toc-list__item a:hover {
    color: var(--b-accent);
    background: var(--b-accent-soft);
}

.toc-list__item a.is-active {
    font-weight: 700;
    color: var(--b-accent);
    background: linear-gradient(270deg, rgba(95, 208, 104, .16), rgba(95, 208, 104, 0));
}

.toc-list__item--h2 > a.is-active::before {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--b-accent-2), var(--b-accent));
    box-shadow: 0 0 0 4px rgba(95, 208, 104, .2), 0 0 12px rgba(95, 208, 104, .6);
    transform: scale(1.1);
}

.toc-list__item--h3 > a.is-active::before {
    background: var(--b-accent);
    box-shadow: 0 0 8px var(--b-accent-2);
    transform: scale(1.4);
}

/* ستون کناری */
.post-aside {
    position: sticky;
    top: 84px;
}

.toc-card {
    position: relative;
    padding: 18px 12px 12px;
    background: #fff;
    border: 1px solid var(--b-border);
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(20, 60, 30, .08);
    overflow: hidden;
}

/* نوار رنگی بالای کارت */
.toc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffe27a, var(--b-accent-2), var(--b-accent));
}

.toc-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 6px 12px;
}

.toc-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, var(--b-accent-2), var(--b-accent));
    box-shadow: 0 6px 14px rgba(55, 140, 63, .3);
}

.toc-card__icon svg {
    width: 18px;
    height: 18px;
}

.toc-card__title {
    flex: 1;
    font-weight: 800;
    font-size: .98rem;
}

.toc-card__count {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .72rem;
    color: var(--b-muted);
    background: var(--b-bg);
}

.toc-card__progress {
    height: 5px;
    margin: 0 6px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--b-bg);
}

.toc-card__progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--b-accent), var(--b-accent-2));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .15s linear;
}

.toc-card__percent {
    margin: 6px 6px 10px;
    font-size: .72rem;
    color: var(--b-muted);
}

/* لیست قابل اسکرول، بدون اسکرول‌بار، با لبه‌های محو */
.toc-card .toc-list {
    position: relative;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    padding: 10px 0;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}

.toc-card .toc-list::-webkit-scrollbar {
    display: none;
}

/* خط ریل عمودی */
.toc-card .toc-list::before {
    content: '';
    position: absolute;
    top: 14px;
    bottom: 14px;
    right: 15px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(55, 140, 63, .05), rgba(55, 140, 63, .2), rgba(55, 140, 63, .05));
}

.toc-card .toc-list__item {
    position: relative;
}

/* ================= بنر CTA داخل مقاله ================= */
.cta-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 32px;
    padding: 22px 24px;
    overflow: hidden;
    color: #fff;
    border-radius: 20px;
    background: linear-gradient(135deg, #2f7a36, #378c3f 45%, #4cb957);
    box-shadow: 0 14px 30px rgba(55, 140, 63, .28);
}

.cta-banner::before,
.cta-banner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    pointer-events: none;
}

.cta-banner::before {
    width: 180px;
    height: 180px;
    top: -90px;
    left: -40px;
}

.cta-banner::after {
    width: 90px;
    height: 90px;
    bottom: -40px;
    left: 140px;
}

.cta-banner__icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, .15);
    backdrop-filter: blur(4px);
}

.cta-banner__text {
    flex: 1;
    min-width: 0;
}

.cta-banner__text strong {
    display: block;
    font-size: 1.08rem;
}

.cta-banner__text p {
    margin: 2px 0 0;
    font-size: .88rem;
    opacity: .9;
}

.cta-banner__btn {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    padding: 11px 24px;
    border-radius: 999px;
    font-weight: 800;
    color: var(--b-accent) !important;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}

.cta-banner__btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}

@media (max-width: 600px) {
    .cta-banner {
        flex-direction: column;
        text-align: center;
    }

    .cta-banner__btn {
        width: 100%;
        text-align: center;
    }
}

/* ================= عکس نویسنده (رفع بیضی شدن) ================= */
.post-author {
    align-items: center;
}

img.post-avatar,
img.post-author__avatar {
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--b-accent-2), 0 4px 12px rgba(55, 140, 63, .25);
}

img.post-avatar {
    width: 32px;
    height: 32px;
}

img.post-author__avatar {
    width: 72px;
    height: 72px;
    border-width: 3px;
    transition: transform .3s ease;
}

.post-author:hover img.post-author__avatar {
    transform: scale(1.06) rotate(-3deg);
}

.toc-mobile {
    display: none;
    margin-bottom: 26px;
    background: #f7faf8;
    border: 1px solid var(--b-border);
    border-radius: 14px;
}

@media (max-width: 991.98px) {
    .toc-mobile {
        display: block;
    }
}

.toc-mobile summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.toc-mobile summary::-webkit-details-marker {
    display: none;
}

.toc-mobile summary small {
    font-weight: 400;
    color: var(--b-muted);
}

.toc-mobile .toc-list {
    padding: 0 8px 12px;
}

/* ================= FAQ ================= */
.post-faq {
    margin-top: 44px;
}

.post-faq h2 {
    margin-bottom: 16px;
    font-size: 1.4rem;
    font-weight: 800;
}

.post-faq__item {
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid var(--b-border);
    border-radius: 14px;
    transition: box-shadow .25s ease, border-color .25s ease;
}

.post-faq__item[open] {
    border-color: rgba(55, 140, 63, .35);
    box-shadow: 0 8px 20px rgba(55, 140, 63, .08);
}

.post-faq__item summary {
    position: relative;
    padding: 16px 20px 16px 50px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.post-faq__item summary::-webkit-details-marker {
    display: none;
}

.post-faq__item summary::after {
    content: '+';
    position: absolute;
    left: 18px;
    top: 50%;
    width: 24px;
    height: 24px;
    margin-top: -12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.1rem;
    color: var(--b-accent);
    background: var(--b-accent-soft);
    transition: transform .3s ease;
}

.post-faq__item[open] summary::after {
    transform: rotate(45deg);
}

.post-faq__answer {
    padding: 0 20px 18px;
    line-height: 2;
    color: #4b5563;
}

/* ================= تگ و اشتراک ================= */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 36px;
}

.post-tag {
    padding: 5px 14px;
    border-radius: 999px;
    font-size: .82rem;
    color: var(--b-muted);
    background: var(--b-bg);
    border: 1px solid var(--b-border);
    transition: all .2s ease;
}

.post-tag:hover {
    color: var(--b-accent);
    border-color: rgba(55, 140, 63, .35);
}

.post-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--b-border);
}

.post-share__label {
    font-weight: 700;
    font-size: .9rem;
}

.post-share__btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    color: var(--b-muted);
    background: var(--b-bg);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), color .2s ease, background .2s ease;
}

.post-share__btn svg {
    width: 19px;
    height: 19px;
}

.post-share__btn:hover {
    transform: translateY(-3px);
    color: #fff;
}

.post-share__btn--tg:hover {
    background: #229ed9;
}

.post-share__btn--wa:hover {
    background: #25d366;
}

.post-share__btn--in:hover {
    background: #0a66c2;
}

.post-share__btn--x:hover {
    background: #111;
}

.post-share__btn--copy:hover {
    background: var(--b-accent);
}

.post-share__toast {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: .75rem;
    white-space: nowrap;
    color: #fff;
    background: var(--b-text);
    opacity: 0;
    transform: translate(-50%, 6px);
    pointer-events: none;
    transition: all .25s ease;
}

.post-share__btn.is-copied .post-share__toast {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ================= نویسنده ================= */
.post-author {
    display: flex;
    gap: 16px;
    margin-top: 28px;
    padding: 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f3faf4, #f5f9ff);
}

.post-author__avatar {
    width: 56px;
    height: 56px;
    font-size: 1.3rem;
}

.post-author strong {
    font-size: 1rem;
}

.post-author p {
    margin: 4px 0 6px;
    font-size: .88rem;
    color: var(--b-muted);
}

.post-author a {
    font-size: .86rem;
    font-weight: 700;
    color: var(--b-accent);
}

/* ================= مرتبط ================= */
.post-related {
    padding: 10px 0 70px;
}

.post-related__title {
    margin: 0 0 22px;
    font-size: 1.4rem;
    font-weight: 800;
}

img.post-author__avatar {
    border-width: 3px;
    transition: transform .3s ease;
}

.post-author:hover img.post-author__avatar {
    transform: scale(1.06) rotate(-3deg);
}

/* =====================================================================
   نظرات
===================================================================== */
.comments {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--b-border);
}

.comments__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.comments__head h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
}

.comments__count {
    min-width: 30px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 700;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, var(--b-accent-2), var(--b-accent));
}

.comments__alert {
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: 14px;
    font-weight: 600;
    color: #1e6b26;
    background: #eaf7ec;
    border: 1px solid rgba(55, 140, 63, .25);
    animation: commentIn .5s ease both;
}

.comments__empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px;
    border-radius: 16px;
    color: var(--b-muted);
    background: var(--b-bg);
    border: 1px dashed rgba(55, 140, 63, .3);
}

.comments__empty span {
    font-size: 1.6rem;
}

.comments__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== باکس نظر ===== */
.comment {
    position: relative;
    display: flex;
    gap: 14px;
    padding: 18px 18px 14px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--b-border);
    box-shadow: 0 4px 16px rgba(20, 50, 30, .05);
    transition: box-shadow .3s ease, transform .3s ease, border-color .3s ease;
    animation: commentIn .5s ease both;
}

.comment:hover {
    border-color: rgba(55, 140, 63, .25);
    box-shadow: 0 10px 28px rgba(20, 60, 30, .09);
    transform: translateY(-2px);
}

@keyframes commentIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment__avatar {
    flex-shrink: 0;
}

.comment__avatar img,
.comment__avatar span {
    width: 46px;
    height: 46px;
    border-radius: 50%;
}

.comment__avatar img {
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px rgba(55, 140, 63, .25);
}

.comment__avatar span {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, hsl(var(--hue), 65%, 62%), hsl(calc(var(--hue) + 40), 60%, 45%));
    box-shadow: 0 4px 12px hsla(var(--hue), 60%, 45%, .3);
}

.comment__content {
    flex: 1;
    min-width: 0;
}

.comment__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.comment__name {
    font-size: .95rem;
}

.comment__badge {
    padding: 1px 9px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
}

.comment__badge--admin {
    color: #fff;
    background: linear-gradient(135deg, var(--b-accent-2), var(--b-accent));
}

.comment__badge--pending {
    color: #8a5a00;
    background: #fff4d6;
}

.comment__date {
    margin-right: auto;
    font-size: .76rem;
    color: var(--b-muted);
}

.comment__reply-to {
    margin-bottom: 4px;
    font-size: .78rem;
    color: var(--b-muted);
}

.comment__body {
    font-size: .95rem;
    line-height: 2;
    color: #374151;
    overflow-wrap: anywhere;
}

.comment__reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 4px 12px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--b-accent);
    background: var(--b-accent-soft);
    transition: all .2s ease;
}

.comment__reply-btn svg {
    width: 14px;
    height: 14px;
}

.comment__reply-btn:hover {
    color: #fff;
    background: var(--b-accent);
}

/* پاسخ نویسنده */
.comment--admin {
    background: linear-gradient(135deg, #f3faf4, #ffffff 60%);
    border-color: rgba(55, 140, 63, .3);
}

.comment--admin::before {
    content: '';
    position: absolute;
    top: 14px;
    bottom: 14px;
    right: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
    background: linear-gradient(180deg, var(--b-accent-2), var(--b-accent));
}

/* در انتظار تأیید */
.comment--pending {
    border-style: dashed;
    border-color: #f3dc9b;
    background: #fffdf6;
}

/* رشته‌ی پاسخ‌ها */
.comment-replies {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
    padding-right: 34px;
}

.comment-replies::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 24px;
    right: 22px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(55, 140, 63, .3), rgba(55, 140, 63, .05));
}

.comment-replies .comment::after {
    content: '';
    position: absolute;
    top: 36px;
    right: -12px;
    width: 12px;
    height: 2px;
    background: rgba(55, 140, 63, .3);
}

@media (max-width: 600px) {
    .comment {
        padding: 14px;
        gap: 10px;
    }

    .comment__avatar img,
    .comment__avatar span {
        width: 38px;
        height: 38px;
        font-size: .95rem;
    }

    .comment-replies {
        padding-right: 20px;
    }

    .comment-replies::before {
        right: 10px;
    }

    .comment-replies .comment::after {
        right: -10px;
        width: 10px;
    }
}

/* ===== فرم ===== */
.comment-form {
    margin-top: 28px;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, #f7fbf8, #f6f9ff);
    border: 1px solid var(--b-border);
}

.comment-form__hp {
    position: absolute;
    right: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.comment-form__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.comment-form__replying {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px 5px 12px;
    border-radius: 999px;
    font-size: .8rem;
    color: var(--b-accent);
    background: var(--b-accent-soft);
    animation: commentIn .3s ease both;
}

.comment-form__replying[hidden] {
    display: none;
}

.comment-form__replying button {
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: .7rem;
    color: var(--b-accent);
    background: #fff;
}

.comment-form__as {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: .88rem;
    color: var(--b-muted);
}

.comment-form__as img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-form__as b {
    color: var(--b-text);
}

.comment-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 600px) {
    .comment-form__row {
        grid-template-columns: 1fr;
    }
}

.comment-field {
    margin-bottom: 14px;
}

.comment-field label {
    display: block;
    margin-bottom: 6px;
    font-size: .85rem;
    font-weight: 700;
}

.comment-field label small {
    font-weight: 400;
    color: var(--b-muted);
}

.comment-field input,
.comment-field textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    font: inherit;
    font-size: .95rem;
    background: #fff;
    border: 1px solid var(--b-border);
    outline: 0;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.comment-field textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.9;
}

.comment-field input:focus,
.comment-field textarea:focus {
    border-color: rgba(55, 140, 63, .45);
    box-shadow: 0 0 0 4px var(--b-accent-soft);
}

.comment-field__foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
}

.comment-field__counter {
    margin-right: auto;
    font-size: .75rem;
    color: var(--b-muted);
}

.comment-field__error {
    display: block;
    font-size: .8rem;
    color: #dc3545;
}

.comment-form__submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--b-accent-2), var(--b-accent));
    box-shadow: 0 8px 20px rgba(55, 140, 63, .3);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}

.comment-form__submit svg {
    width: 18px;
    height: 18px;
    transition: transform .3s ease;
}

.comment-form__submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(55, 140, 63, .38);
}

.comment-form__submit:hover svg {
    transform: translate(-3px, -3px) rotate(-8deg);
}

/* =====================================================================
   کامپوننت‌های داخل مقاله (prose)
===================================================================== */

/* ---------- باکس CTA ---------- */
.prose .prose-cta {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 2em 0;
    padding: 22px 24px;
    overflow: hidden;
    color: #fff;
    border-radius: 20px;
    background: linear-gradient(135deg, #2f7a36, #378c3f 45%, #4cb957);
    box-shadow: 0 14px 32px rgba(55, 140, 63, .28);
}

.prose .prose-cta::before {
    content: '';
    position: absolute;
    top: -70px;
    left: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    pointer-events: none;
}

.prose .prose-cta--gold {
    color: #3b2a00;
    background: linear-gradient(135deg, #ffe27a, #ffd24a 50%, #f5b82e);
    box-shadow: 0 14px 32px rgba(245, 184, 46, .3);
}

.prose .prose-cta__icon {
    flex-shrink: 0;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, .18);
}

.prose .prose-cta__text {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
}

.prose .prose-cta__text strong {
    display: block;
    font-size: 1.1rem;
    line-height: 1.7;
}

.prose .prose-cta__text span {
    display: block;
    font-size: .9rem;
    line-height: 1.9;
    opacity: .92;
}

.prose .prose-cta__btn {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    margin: 0 !important;
    padding: 12px 26px;
    border-radius: 999px;
    font-weight: 800;
    font-size: .95rem;
    white-space: nowrap;
    text-decoration: none !important;
    color: #2f7a36 !important;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .14);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}

.prose .prose-cta--gold .prose-cta__btn {
    color: #fff !important;
    background: #2f2a1a;
}

.prose .prose-cta__btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .2);
}

@media (max-width: 600px) {
    .prose .prose-cta {
        flex-direction: column;
        text-align: center;
    }

    .prose .prose-cta__btn {
        width: 100%;
        text-align: center;
    }
}

/* ---------- کارت‌های ویژگی ---------- */
.prose .prose-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 1.6em 0;
}

@media (max-width: 767.98px) {
    .prose .prose-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .prose .prose-features {
        grid-template-columns: 1fr;
    }
}

.prose .prose-feature {
    margin: 0 !important;
    padding: 18px 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(20, 30, 25, .08);
    box-shadow: 0 4px 14px rgba(20, 50, 30, .05);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.prose .prose-feature:hover {
    transform: translateY(-4px);
    border-color: rgba(55, 140, 63, .3);
    box-shadow: 0 12px 26px rgba(20, 60, 30, .1);
}

.prose .prose-feature b {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 10px;
    font-size: 1.3rem;
    border-radius: 12px;
    background: rgba(55, 140, 63, .1);
}

.prose .prose-feature strong {
    display: block;
    margin-bottom: 4px;
    font-size: .95rem;
}

.prose .prose-feature span {
    display: block;
    font-size: .84rem;
    line-height: 1.85;
    color: #6b7280;
}

/* ---------- باکس نکته ---------- */
.prose .prose-note {
    display: flex;
    gap: 12px;
    margin: 1.6em 0;
    padding: 16px 18px;
    border-radius: 14px;
    background: #eef7ff;
    border: 1px solid rgba(44, 168, 255, .25);
}

.prose .prose-note::before {
    content: '💡';
    font-size: 1.3rem;
    line-height: 1.6;
}

.prose .prose-note p {
    margin: 0;
    font-size: .95rem;
}

.post-main {
    min-width: 0;
}

.prose a,
.prose a * {
    white-space: normal !important;
    overflow-wrap: anywhere;
    max-width: 100%;
}

.prose [class*="dabir"] {
    max-width: 100%;
    box-sizing: border-box;
}

.prose p a,
.prose li a,
.prose td a {
    display: inline !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: linear-gradient(transparent 62%, rgba(55, 140, 63, .18) 62%) !important;
    color: var(--b-accent) !important;
    font-weight: 600;
    text-decoration: none !important;
}

.prose p a:hover,
.prose li a:hover,
.prose td a:hover {
    background: rgba(55, 140, 63, .18) !important;
}
