/* ============================================================
   Pargar Academy — blog.css
   آرشیو وبلاگ + تک‌نوشته — مو‌به‌مو مطابق دیزاین Claude Design
   ============================================================ */

/* ===================== آرشیو وبلاگ ===================== */
.bm-blog { padding: 34px 32px 70px; }
.bm-blog-head { margin-bottom: 26px; }
.bm-blog-head .bm-breadcrumb { display: flex; align-items: center; gap: 9px; font-size: .78rem; color: var(--bm-text-mute); margin-bottom: 14px; }
.bm-blog-head .bm-breadcrumb a { color: var(--bm-text-sub); }
.bm-blog-head .bm-breadcrumb .cur { color: var(--bm-primary); font-weight: 700; }
.bm-blog-head h1 { margin: 0 0 8px; font-size: 2.1rem; font-weight: 800; letter-spacing: -.6px; }
.bm-blog-head p { margin: 0; font-size: .96rem; color: var(--bm-text-sub); max-width: 560px; line-height: 1.85; }

/* پست ویژه */
.bm-blog-featured { display: block; background: var(--bm-surface); border: 1px solid var(--bm-border); border-radius: 24px; overflow: hidden; box-shadow: var(--bm-shadow-md); margin-bottom: 30px; color: inherit; transition: transform .18s, box-shadow .18s; }
.bm-blog-featured:hover { transform: translateY(-3px); box-shadow: var(--bm-shadow-lg); }
.bm-blog-featured > div { display: grid; grid-template-columns: 1.1fr 0.9fr; }
.bm-blog-feat-img { min-height: 340px; background: linear-gradient(135deg, #4F46E5, #0EA5E9); position: relative; }
.bm-blog-feat-tag { position: absolute; top: 18px; right: 18px; padding: 6px 14px; border-radius: 999px; background: var(--bm-accent); color: #fff; font-size: .72rem; font-weight: 800; z-index: 2; }
.bm-blog-feat-overlay { position: absolute; inset: 0; background: radial-gradient(380px 220px at 70% 30%, rgba(255,255,255,.15), transparent); }
.bm-blog-feat-body { padding: 34px; display: flex; flex-direction: column; justify-content: center; }
.bm-blog-feat-cat { display: inline-block; align-self: flex-start; padding: 5px 12px; border-radius: 8px; background: var(--bm-secondary-soft); color: var(--bm-secondary); font-size: .72rem; font-weight: 700; margin-bottom: 14px; }
.bm-blog-feat-body h2 { margin: 0 0 14px; font-size: 1.6rem; font-weight: 800; line-height: 1.5; letter-spacing: -.4px; }
.bm-blog-feat-body > p { margin: 0 0 22px; font-size: .9rem; line-height: 2; color: var(--bm-text-sub); }
.bm-blog-feat-meta { display: flex; align-items: center; gap: 12px; }
.bm-blog-feat-av { width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto; overflow: hidden; }
.bm-blog-av-img, .bm-blog-feat-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.bm-blog-feat-author { flex: 1; }
.bm-blog-feat-name { font-size: .82rem; font-weight: 700; }
.bm-blog-feat-date { font-size: .72rem; color: var(--bm-text-mute); }
.bm-blog-feat-more { font-size: .8rem; font-weight: 700; color: var(--bm-primary); }

/* چیپ دسته + سرچ */
.bm-blog-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.bm-blog-cats { display: flex; gap: 9px; flex-wrap: wrap; }
.bm-blog-cat { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--bm-border); background: var(--bm-surface); color: var(--bm-text-sub); font-size: .82rem; font-weight: 600; }
.bm-blog-cat.is-on { background: var(--bm-primary); color: #fff; border-color: var(--bm-primary); font-weight: 700; }
.bm-blog-search { display: flex; align-items: center; gap: 10px; padding: 10px 15px; border: 1px solid var(--bm-border); border-radius: 12px; background: var(--bm-surface); width: 260px; max-width: 50vw; }
.bm-blog-search input { flex: 1; border: none; background: transparent; color: var(--bm-text); font-family: inherit; font-size: .82rem; outline: none; min-width: 0; }

/* جستجوی داخل سایدبار وبلاگ (ابزارک بومی) */
.bm-blog-sb-search { display: flex; gap: 8px; width: 100%; box-sizing: border-box; }
.bm-blog-sb-search input { flex: 1; min-width: 0; height: 42px; border: 1px solid var(--bm-border); border-radius: 11px; background: var(--bm-surface-2); color: var(--bm-text); padding: 0 14px; font-family: inherit; font-size: .85rem; outline: none; transition: border-color .15s; }
.bm-blog-sb-search input:focus { border-color: var(--bm-primary); }
.bm-blog-sb-search input::placeholder { color: var(--bm-text-mute); }
.bm-blog-sb-search button { flex: 0 0 auto; width: 46px; height: 42px; border: none; border-radius: 11px; background: var(--bm-primary); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s; }
.bm-blog-sb-search button:hover { background: var(--bm-primary-hover); }

/* گرید + سایدبار */
.bm-blog-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.bm-blog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.bm-blog-card { background: var(--bm-surface); border: 1px solid var(--bm-border); border-radius: 20px; overflow: hidden; box-shadow: var(--bm-shadow-sm); display: flex; flex-direction: column; color: inherit; transition: transform .18s, box-shadow .18s; }
.bm-blog-card:hover { transform: translateY(-4px); box-shadow: var(--bm-shadow-lg); }
.bm-blog-card-img { height: 172px; position: relative; }
.bm-blog-card-cat { position: absolute; top: 12px; right: 12px; padding: 4px 11px; border-radius: 7px; background: rgba(0,0,0,.4); color: #fff; font-size: .68rem; font-weight: 700; }
.bm-blog-card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.bm-blog-card-meta { display: flex; align-items: center; gap: 8px; font-size: .72rem; color: var(--bm-text-mute); margin-bottom: 10px; }
.bm-blog-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--bm-text-mute); }
.bm-blog-card-body h3 { margin: 0 0 9px; font-size: 1.03rem; font-weight: 700; line-height: 1.6; }
.bm-blog-card-body > p { margin: 0 0 18px; font-size: .82rem; line-height: 1.95; color: var(--bm-text-sub); flex: 1; }
.bm-blog-card-author { display: flex; align-items: center; gap: 9px; padding-top: 14px; border-top: 1px solid var(--bm-border); }
.bm-blog-card-av { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; overflow: hidden; }
.bm-blog-card-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.bm-blog-card-author > span:last-child { font-size: .78rem; color: var(--bm-text-sub); font-weight: 600; }

/* سایدبار */
.bm-blog-sidebar { display: flex; flex-direction: column; gap: 20px; }
.bm-blog-widget { background: var(--bm-surface); border: 1px solid var(--bm-border); border-radius: 18px; padding: 20px; box-shadow: var(--bm-shadow-sm); }
.bm-blog-widget h4 { margin: 0 0 14px; font-size: .92rem; font-weight: 800; }
.bm-blog-catlist { display: flex; flex-direction: column; gap: 3px; }
.bm-blog-catlist a { display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; border-radius: 10px; font-size: .84rem; color: var(--bm-text-sub); }
.bm-blog-catlist a:hover { background: var(--bm-surface-2); }
.bm-blog-catcount { font-size: .72rem; color: var(--bm-text-mute); background: var(--bm-surface-2); padding: 2px 9px; border-radius: 999px; }
.bm-blog-popular { display: flex; flex-direction: column; gap: 15px; }
.bm-blog-pop { display: flex; gap: 12px; align-items: center; color: inherit; }
.bm-blog-pop-img { width: 54px; height: 54px; border-radius: 12px; flex: 0 0 auto; }
.bm-blog-pop-info { flex: 1; min-width: 0; }
.bm-blog-pop-title { font-size: .8rem; font-weight: 600; line-height: 1.6; }
.bm-blog-pop-date { font-size: .68rem; color: var(--bm-text-mute); margin-top: 4px; }
.bm-blog-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.bm-blog-tags a { padding: 6px 13px; border-radius: 999px; background: var(--bm-surface-2); color: var(--bm-text-sub); font-size: .74rem; font-weight: 600; }
.bm-blog-tags a:hover { background: var(--bm-primary-soft); color: var(--bm-primary); }
.bm-blog-newsletter { background: linear-gradient(160deg, var(--bm-primary), var(--bm-primary-dark)); border-radius: 18px; padding: 24px; box-shadow: var(--bm-shadow-md); color: #fff; }
.bm-blog-newsletter h4 { margin: 0 0 8px; font-size: .98rem; font-weight: 800; }
.bm-blog-newsletter p { margin: 0 0 16px; font-size: .78rem; line-height: 1.9; opacity: .9; }
.bm-blog-newsletter input { width: 100%; padding: 11px 14px; border: none; border-radius: 11px; background: rgba(255,255,255,.16); color: #fff; font-family: inherit; font-size: .8rem; outline: none; margin-bottom: 10px; }
.bm-blog-newsletter input::placeholder { color: rgba(255,255,255,.7); }
.bm-blog-newsletter button { width: 100%; padding: 12px; border: none; border-radius: 11px; background: #fff; color: var(--bm-primary); font-family: inherit; font-weight: 800; font-size: .82rem; cursor: pointer; }
.bm-blog-pag { margin-top: 34px; }

/* ===================== تک‌نوشته ===================== */
.bm-sp { max-width: 1180px; padding: 30px 32px 70px; }
.bm-sp-bc { display: flex; align-items: center; gap: 9px; font-size: .78rem; color: var(--bm-text-mute); margin-bottom: 24px; }
.bm-sp-bc a { color: var(--bm-text-sub); }
.bm-sp-bc .cur { color: var(--bm-text-mute); }
.bm-sp-header { max-width: 820px; margin: 0 auto 26px; text-align: center; }
.bm-sp-cat { display: inline-block; padding: 5px 13px; border-radius: 8px; background: var(--bm-secondary-soft); color: var(--bm-secondary); font-size: .74rem; font-weight: 700; margin-bottom: 18px; }
.bm-sp-header h1 { margin: 0 0 22px; font-size: 2.25rem; font-weight: 800; line-height: 1.45; letter-spacing: -.6px; }
.bm-sp-meta { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.bm-sp-author { display: flex; align-items: center; gap: 10px; }
.bm-sp-author-av { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; overflow: hidden; }
.bm-sp-author-av img, .bm-sp-av-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.bm-sp-author > div { text-align: right; }
.bm-sp-author-name { font-size: .84rem; font-weight: 700; }
.bm-sp-author-role { font-size: .72rem; color: var(--bm-text-mute); }
.bm-sp-meta-sep { width: 1px; height: 30px; background: var(--bm-border); }
.bm-sp-meta-items { display: flex; align-items: center; gap: 16px; font-size: .72rem; color: var(--bm-text-mute); flex-wrap: wrap; }
.bm-sp-meta-items span { display: flex; align-items: center; gap: 5px; }
.bm-sp-cover { max-width: 980px; margin: 0 auto 36px; height: 380px; border-radius: 24px; background: linear-gradient(135deg, #4F46E5, #0EA5E9); position: relative; overflow: hidden; box-shadow: var(--bm-shadow-lg); }
.bm-sp-cover-overlay { position: absolute; inset: 0; background: radial-gradient(420px 240px at 70% 25%, rgba(255,255,255,.18), transparent); }

.bm-sp-layout { display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: start; max-width: 980px; margin: 0 auto; }
.bm-sp-toc { position: sticky; top: calc(var(--bm-header-h) + 16px); }
.bm-sp-share-box { background: var(--bm-surface); border: 1px solid var(--bm-border); border-radius: 18px; padding: 20px; box-shadow: var(--bm-shadow-sm); }
.bm-sp-share-title { font-size: .82rem; font-weight: 800; margin-bottom: 14px; }
.bm-sp-share { display: flex; gap: 9px; flex-wrap: wrap; }
.bm-sp-share a { width: 40px; height: 40px; border-radius: 11px; background: var(--bm-surface-2); color: var(--bm-text-sub); display: flex; align-items: center; justify-content: center; }
.bm-sp-share a:hover { background: var(--bm-primary); color: #fff; }

/* محتوای مقاله */
.bm-sp-article { min-width: 0; }
.bm-sp-content { font-size: .96rem; line-height: 2.15; color: var(--bm-text-sub); }
.bm-sp-content > p:first-of-type { font-size: 1.02rem; color: var(--bm-text); font-weight: 500; }
.bm-sp-content p { margin: 0 0 18px; }
.bm-sp-content h2 { margin: 36px 0 16px; font-size: 1.5rem; font-weight: 800; color: var(--bm-text); scroll-margin-top: 90px; }
.bm-sp-content h3 { margin: 28px 0 14px; font-size: 1.2rem; font-weight: 800; color: var(--bm-text); }
.bm-sp-content ul, .bm-sp-content ol { margin: 0 0 22px; padding-right: 22px; display: flex; flex-direction: column; gap: 11px; }
.bm-sp-content li { font-size: .94rem; line-height: 1.9; }
.bm-sp-content a { color: var(--bm-primary); text-decoration: underline; }
.bm-sp-content img { max-width: 100%; height: auto; border-radius: 16px; margin: 10px 0 24px; }
.bm-sp-content blockquote { margin: 0 0 24px; padding: 20px 24px; border-right: 4px solid var(--bm-primary); background: var(--bm-surface-2); border-radius: 0 14px 14px 0; }
.bm-sp-content blockquote p { margin: 0 0 10px; font-size: 1.06rem; line-height: 2; font-weight: 600; color: var(--bm-text); }
.bm-sp-content blockquote cite { font-size: .8rem; color: var(--bm-text-mute); font-style: normal; }
.bm-sp-content pre { background: #0F172A; border-radius: 14px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; direction: ltr; text-align: left; color: #E2E8F0; font-size: .82rem; line-height: 1.9; }
.bm-sp-content code { font-family: 'Courier New', monospace; background: var(--bm-surface-2); padding: 2px 6px; border-radius: 6px; font-size: .85em; }
.bm-sp-content pre code { background: none; padding: 0; }

/* برچسب‌ها */
.bm-sp-tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 22px 0; border-top: 1px solid var(--bm-border); border-bottom: 1px solid var(--bm-border); margin: 30px 0; }
.bm-sp-tags-lbl { font-size: .8rem; font-weight: 700; color: var(--bm-text-sub); }
.bm-sp-tags a { padding: 6px 14px; border-radius: 999px; background: var(--bm-surface-2); color: var(--bm-text-sub); font-size: .74rem; font-weight: 600; }
.bm-sp-tags a:hover { background: var(--bm-primary-soft); color: var(--bm-primary); }

/* باکس نویسنده */
.bm-sp-authorbox { display: flex; gap: 18px; padding: 24px; border-radius: 20px; background: var(--bm-surface); border: 1px solid var(--bm-border); box-shadow: var(--bm-shadow-sm); margin-bottom: 36px; flex-wrap: wrap; }
.bm-sp-authorbox-av { width: 72px; height: 72px; border-radius: 20px; flex: 0 0 auto; overflow: hidden; background: linear-gradient(135deg, #F59E0B, #EF4444); }
.bm-sp-authorbox-av img, .bm-sp-authorbox-img { width: 100%; height: 100%; border-radius: 20px; object-fit: cover; }
.bm-sp-authorbox-info { flex: 1; min-width: 220px; }
.bm-sp-authorbox-lbl { font-size: .72rem; color: var(--bm-text-mute); margin-bottom: 4px; }
.bm-sp-authorbox-info h4 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 800; }
.bm-sp-authorbox-info p { margin: 0 0 12px; font-size: .82rem; line-height: 1.95; color: var(--bm-text-sub); }
.bm-sp-authorbox-social { display: flex; gap: 10px; }
.bm-sp-authorbox-social a { width: 34px; height: 34px; border-radius: 9px; background: var(--bm-surface-2); color: var(--bm-text-sub); display: flex; align-items: center; justify-content: center; font-size: .74rem; font-weight: 700; }
.bm-sp-authorbox-social a:hover { background: var(--bm-primary); color: #fff; }

/* مرتبط */
.bm-sp-related-sec { margin-bottom: 38px; }
.bm-sp-related-sec h3 { margin: 0 0 18px; font-size: 1.3rem; font-weight: 800; }
.bm-sp-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bm-sp-related-card { background: var(--bm-surface); border: 1px solid var(--bm-border); border-radius: 16px; overflow: hidden; box-shadow: var(--bm-shadow-sm); display: block; color: inherit; transition: transform .18s, box-shadow .18s; }
.bm-sp-related-card:hover { transform: translateY(-4px); box-shadow: var(--bm-shadow-md); }
.bm-sp-related-img { height: 110px; }
.bm-sp-related-body { padding: 15px; }
.bm-sp-related-date { font-size: .68rem; color: var(--bm-text-mute); margin-bottom: 7px; }
.bm-sp-related-body h4 { margin: 0; font-size: .86rem; font-weight: 700; line-height: 1.6; }

/* دیدگاه‌ها */
.bm-sp-comments-inner > h3 { margin: 0 0 20px; font-size: 1.3rem; font-weight: 800; }
.bm-sp-comments-inner > h3 span { font-size: .9rem; color: var(--bm-text-mute); font-weight: 600; }
.bm-sp-comment-list { display: flex; flex-direction: column; gap: 18px; margin-bottom: 28px; }
.bm-sp-comment { background: var(--bm-surface); border: 1px solid var(--bm-border); border-radius: 16px; padding: 18px; }
.bm-sp-comment .children { margin: 16px 0 0; padding-right: 20px; border-right: 2px solid var(--bm-border); display: flex; flex-direction: column; gap: 16px; }
.bm-sp-comment-row { display: flex; gap: 13px; }
.bm-sp-comment-av { width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto; overflow: hidden; }
.bm-sp-comment-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.bm-sp-comment-main { flex: 1; min-width: 0; }
.bm-sp-comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.bm-sp-comment-name { font-size: .86rem; font-weight: 700; }
.bm-sp-comment-date { font-size: .72rem; color: var(--bm-text-mute); }
.bm-sp-comment-text { font-size: .84rem; line-height: 1.95; color: var(--bm-text-sub); }
.bm-sp-comment-text p { margin: 0 0 8px; }
.bm-sp-comment-mod { font-size: .76rem; color: var(--bm-accent); margin: 0 0 8px; }
.bm-sp-reply a, .bm-sp-reply { font-size: .76rem; font-weight: 700; color: var(--bm-primary); }
.bm-sp-comment-form, .comment-form { background: var(--bm-surface); border: 1px solid var(--bm-border); border-radius: 20px; padding: 24px; box-shadow: var(--bm-shadow-sm); }
.bm-sp-form-title, .comment-form .comment-reply-title { margin: 0 0 16px; font-size: 1rem; font-weight: 800; }
.bm-sp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.comment-form input[type="text"], .comment-form input[type="email"], .bm-sp-form-row input { width: 100%; padding: 13px 15px; border: 1.5px solid var(--bm-border); border-radius: 12px; background: var(--bm-surface); color: var(--bm-text); font-family: inherit; font-size: .84rem; outline: none; }
.bm-sp-form-textarea, .comment-form textarea { width: 100%; min-height: 100px; padding: 13px 15px; border: 1.5px solid var(--bm-border); border-radius: 12px; background: var(--bm-surface); color: var(--bm-text); font-family: inherit; font-size: .84rem; outline: none; resize: none; line-height: 1.9; margin-bottom: 14px; }
.bm-sp-form-submit, .comment-form .submit { padding: 13px 28px; border: none; border-radius: 12px; background: var(--bm-primary); color: #fff; font-family: inherit; font-weight: 800; font-size: .88rem; cursor: pointer; box-shadow: 0 8px 18px rgba(79,70,229,.28); }
.bm-sp-form-submit:hover, .comment-form .submit:hover { background: var(--bm-primary-hover); }
.bm-sp-pagelinks { margin: 20px 0; display: flex; gap: 8px; }

/* ریسپانسیو */
@media (max-width: 980px) {
    .bm-blog-layout { grid-template-columns: 1fr; }
    .bm-blog-sidebar { display: none; }
}
@media (max-width: 880px) {
    .bm-blog-featured > div { grid-template-columns: 1fr; }
    .bm-blog-feat-img { min-height: 200px; }
    .bm-sp-layout { grid-template-columns: 1fr; }
    .bm-sp-toc { display: none; }
    .bm-sp-cover { height: 240px; }
    .bm-sp-header h1 { font-size: 1.7rem; }
}
@media (max-width: 560px) {
    .bm-blog-grid { grid-template-columns: 1fr; }
    .bm-sp-related { grid-template-columns: 1fr; }
    .bm-sp-form-row { grid-template-columns: 1fr; }
    .bm-blog { padding: 24px 20px 60px; }
    .bm-sp { padding: 24px 20px 60px; }
}

/* ===================== برچسب نوع آرشیو + حالت خالی ===================== */
.bm-archive-label { display: inline-block; padding: 5px 13px; border-radius: 999px; background: var(--bm-primary-soft); color: var(--bm-primary); font-size: 12.5px; font-weight: 700; margin-bottom: 12px; }
.bm-blog-empty { background: var(--bm-surface); border: 1px solid var(--bm-border); border-radius: 18px; padding: 50px 30px; text-align: center; }
.bm-blog-empty p { font-size: 15px; color: var(--bm-text-sub); margin-bottom: 18px; }
