/* سکان‌بازار — Single article (خبر + یادداشت/تحلیل), Phase 5, v1.0.6
   Source: Single Article design artifact (ar-* rules). Template root: "ie sb-single". */

/* ---------- Breadcrumb (Rank Math shortcode) ---------- */
.sb-crumbs .rank-math-breadcrumb p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; font-size: 14px; line-height: 22px; color: var(--muted); }
.sb-crumbs .rank-math-breadcrumb a { color: var(--accent); text-decoration: none; }
.sb-crumbs .rank-math-breadcrumb a:hover { text-decoration: underline; }
.sb-crumbs .rank-math-breadcrumb .separator { margin-inline: var(--space-2); color: var(--muted); }
.sb-crumbs .rank-math-breadcrumb .last { color: var(--muted); max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Header block ---------- */
.sb-single .elementor-widget { margin: 0; min-width: 0; }
.sb-single .elementor-widget-shortcode:has(> .elementor-shortcode:empty),
.sb-single .elementor-widget-heading:has(> .elementor-heading-title:empty),
.sb-single .elementor-widget:empty { display: none; }
.sb-rutitr .elementor-heading-title { margin: 0; font-size: 16px; line-height: 26px; font-weight: 500; color: var(--muted); }
.sb-h1 .elementor-heading-title { margin: 0; text-wrap: balance; }
.sb-lead .elementor-heading-title { margin: 0; }
@media (max-width: 767px) {
	.sb-rutitr .elementor-heading-title { font-size: 14px; line-height: 22px; }
	.sb-h1 .elementor-heading-title { line-height: 40px; }
	.sb-lead .elementor-heading-title { font-size: 16px; line-height: 28px; }
}
.ie .ie-type.ar-type-lg { height: 28px; padding-inline: 8px; font-size: 14px; line-height: 22px; }
.ie .ie-type.ar-type-op { background: var(--highlight); border-color: var(--highlight); color: var(--on-highlight); }

.sb-bar { border-block: 1px solid var(--border); }
.sb-single .ar-by { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ar-by__txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ie .ie-avatar.ar-av40 { width: 40px; height: 40px; object-fit: cover; }
.ie .ie-avatar.ar-av72 { width: 72px; height: 72px; object-fit: cover; }
.ie .ie-avatar.ar-av96 { width: 96px; height: 96px; object-fit: cover; }
.ie a.ar-author { font-size: 16px; line-height: 24px; font-weight: 700; color: var(--accent); text-decoration: none; }
.ie a.ar-author:hover { color: var(--accent-hover); text-decoration: underline; }
.ie .ie-meta.ar-meta { font-size: 14px; line-height: 22px; }
.ar-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ar-share { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ie .ar-sb { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 32px; height: 32px; padding-inline: 8px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--text); font: inherit; font-size: 13px; line-height: 20px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; }
.ie .ar-sb:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ie .ar-sb:disabled { color: var(--disabled-ink); border-color: var(--border); background: var(--bg); cursor: default; }
.ie .ar-sb--icon { padding-inline: 0; width: 32px; }
.ar-sb .ie-icon { width: 16px; height: 16px; }
.ar-lbl { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.sb-vr { width: 1px; height: 24px; background: var(--border); flex: none; }
.sb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 767px) {
	.sb-bar { align-items: flex-start !important; }
	.ie .ie-meta.ar-meta { flex-direction: column; align-items: flex-start; }
	.ie .ie-meta.ar-meta > * + *::before { content: none; }
	.sb-tools .sb-share-lbl, .sb-tools .sb-share, .sb-tools .sb-vr, .sb-tools .sb-print { display: none; }
}

/* ---------- Two-column body: 8/12 + 4/12 of the 1200 container ---------- */
.sb-single .sb-main { flex: 0 0 calc(66.6667% - 8px); max-width: calc(66.6667% - 8px); min-width: 0; }
.sb-single .sb-side { flex: 0 0 calc(33.3333% - 16px); max-width: calc(33.3333% - 16px); min-width: 0; }
.sb-sticky { flex: 1 1 auto; }
.sb-sticky > .elementor-widget, .sb-sticky .ad-300x600 { position: sticky; top: 72px; }
.admin-bar .sb-sticky > .elementor-widget, .admin-bar .sb-sticky .ad-300x600 { top: calc(72px + var(--wp-admin--admin-bar--height, 32px)); }
@media (max-width: 1024px) {
	.sb-single .sb-main, .sb-single .sb-side { flex-basis: 100%; max-width: 100%; }
	.sb-sticky { display: none; }
}

/* Featured image + caption */
.sb-feat img { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-md); background: var(--border); }
.ie .ar-cap { margin: 0; font-size: 14px; line-height: 22px; font-weight: 400; color: var(--muted); }
.ar-credit { font-weight: 500; color: var(--text); }
@media (max-width: 767px) {
	.sb-single .sb-feat { margin-inline: -16px; inline-size: calc(100% + 32px) !important; max-width: none !important; }
	.sb-feat img { border-radius: 0; }
}

/* ---------- Article typography (18/32, measure 720) ---------- */
.sb-article-body { max-width: 720px; --sb-p: 18px; --sb-lh: 32px; }
html[data-sb-textsize="0"] .sb-article-body { --sb-p: 16px; --sb-lh: 28px; }
html[data-sb-textsize="2"] .sb-article-body { --sb-p: 20px; --sb-lh: 36px; }
html[data-sb-textsize="3"] .sb-article-body { --sb-p: 22px; --sb-lh: 40px; }
.sb-article-body > *, .sb-article-body .elementor-widget-container > * { margin-block: 0 24px; }
.ie .sb-article-body p { margin: 0 0 24px; font-size: var(--sb-p); line-height: var(--sb-lh); font-weight: 400; color: var(--text); }
.ie .sb-article-body p a, .ie .sb-article-body li a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.ie .sb-article-body h2 { margin: 40px 0 24px; font-size: 28px; line-height: 40px; font-weight: 700; color: var(--primary); text-wrap: balance; }
.ie .sb-article-body h3 { margin: 32px 0 16px; font-size: 22px; line-height: 34px; font-weight: 700; color: var(--primary); }
.ie .sb-article-body ul, .ie .sb-article-body ol { margin: 0 0 24px; padding-inline-start: 24px; display: flex; flex-direction: column; gap: 8px; }
.sb-article-body ol { list-style-type: persian; }
.ie .sb-article-body li { font-size: var(--sb-p); line-height: var(--sb-lh); color: var(--text); padding-inline-start: 4px; }
.sb-article-body li::marker { color: var(--accent); font-weight: 700; }
.ie .sb-article-body blockquote, .ie .sb-article-body .wp-block-quote { margin: 0 0 24px !important; padding-block: 4px !important; padding-inline: 24px 0 !important; border-width: 0 !important; border-inline-start: 4px solid var(--accent) !important; display: flex; flex-direction: column; gap: 8px; background: none; font-style: normal; }
.ie .sb-article-body blockquote p { margin: 0; font-size: 22px; line-height: 36px; font-weight: 500; color: var(--primary); }
.ie .sb-article-body blockquote cite, .ie .sb-article-body blockquote footer { font-size: 14px; line-height: 22px; font-weight: 500; color: var(--muted); font-style: normal; }
.ie .sb-article-body figure { margin: 0 0 24px; display: flex; flex-direction: column; gap: 8px; }
.sb-article-body figure img, .sb-article-body img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.ie .sb-article-body figcaption { font-size: 14px; line-height: 22px; color: var(--muted); text-align: start; margin: 0; }
.ar-tscroll { max-height: 308px; overflow: auto; border: 1px solid var(--border); margin: 0 0 24px; }
.ar-tscroll table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0; border: 0; }
.ar-tscroll th { position: sticky; top: 0; z-index: 1; height: 44px; padding: 0 16px; background: var(--surface); border: 0; border-bottom: 1px solid var(--border); font-size: 14px; line-height: 22px; font-weight: 500; color: var(--muted); text-align: start; white-space: nowrap; }
.ar-tscroll td { height: 48px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--border); font-size: 16px; line-height: 24px; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ar-tscroll tbody tr:last-child td { border-bottom: 0; }
.ar-tscroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 767px) {
	.ie .sb-article-body h2 { font-size: 24px; line-height: 36px; }
	.ie .sb-article-body h3 { font-size: 20px; line-height: 32px; }
	.ie .sb-article-body blockquote p { font-size: 20px; line-height: 34px; }
	.ar-tscroll table { min-width: 520px; }
}

/* In-body ads (from the_content filter) */
.sb-article-body .sb-ad--inbody { margin: 8px auto 32px; }
.sb-article-body .sb-ad-end { display: flex; justify-content: center; margin-top: 8px; }
.sb-article-body .sb-ad-end > div { margin: 0; }
@media (min-width: 768px) { .sb-article-body .sb-ad-end .ad-320x100 { display: none; } }

/* ---------- Below body ---------- */
.ar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ar-row .ar-lbl { font-size: 14px; line-height: 22px; }
.ie .ar-src { margin: 0; font-size: 14px; line-height: 22px; color: var(--muted); }
.ie .ar-src a { color: var(--accent); font-weight: 500; }
.ar-corr { display: flex; gap: 12px; align-items: flex-start; padding: 16px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.ar-corr .ie-icon { width: 20px; height: 20px; margin-top: 2px; color: var(--muted); flex: none; }
.ar-corr__b { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ie .ar-corr__t { margin: 0; font-size: 14px; line-height: 22px; font-weight: 700; color: var(--primary); }
.ie .ar-corr p { margin: 0; font-size: 15px; line-height: 26px; color: var(--text); }
.ie .ar-corr a { font-size: 14px; line-height: 22px; font-weight: 500; color: var(--accent); }

.ar-acard { display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: 24px; row-gap: 12px; align-items: start; padding: 24px; border: 1px solid var(--border); border-radius: 8px; }
.ar-acard__top { display: contents; }
.ar-acard__top > img { grid-column: 1; grid-row: 1 / span 4; }
.ar-acard__who, .ar-acard > p, .ar-acard > ul, .ar-acard > .ar-amore { grid-column: 2; }
.ar-acard__who { display: flex; flex-direction: column; }
.ar-kick { font-size: 12px; line-height: 18px; font-weight: 500; color: var(--muted); }
.ie a.ar-acard__name { font-size: 20px; line-height: 28px; font-weight: 700; color: var(--primary); text-decoration: none; }
.ie a.ar-acard__name:hover { color: var(--accent); text-decoration: underline; }
.ar-acard__role { font-size: 14px; line-height: 22px; color: var(--muted); }
.ie .ar-acard__bio { margin: 0; font-size: 16px; line-height: 28px; color: var(--text); }
.ar-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ar-amore { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.ie .ar-amore h3 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 700; color: var(--primary); }
.ar-amore ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.ar-amore li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 8px; border-bottom: 1px solid var(--border); }
.ar-amore li:last-child { border-bottom: 0; }
.ie .ar-amore li a { font-size: 16px; line-height: 28px; font-weight: 700; color: var(--primary); text-decoration: none; }
.ie .ar-amore li a:hover { color: var(--accent); }
.ar-amore time { flex: none; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--muted); }
@media (max-width: 767px) {
	.ar-corr { padding: 16px; }
	.ar-acard { display: flex; flex-direction: column; gap: 16px; padding: 16px; }
	.ar-acard__top { display: flex; align-items: center; gap: 16px; }
	.ar-amore { align-self: stretch; }
	.ar-amore li { flex-direction: column; gap: 0; }
}

/* ---------- Sidebar ---------- */
.ar-doss { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.ar-doss__media img { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-md); }
.ar-doss__tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 18px; font-weight: 700; color: var(--accent); }
.ar-doss__tag .ie-icon { width: 14px; height: 14px; }
.ie .ar-doss h3 { margin: 0; font-size: 18px; line-height: 28px; font-weight: 700; }
.ie .ar-doss h3 a { color: var(--primary); text-decoration: none; }
.ie .ar-doss h3 a:hover { color: var(--accent); }
.ar-doss ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.ar-doss li { padding-block: 8px; border-top: 1px solid var(--border); }
.ie .ar-doss li a { font-size: 15px; line-height: 24px; font-weight: 500; color: var(--text); text-decoration: none; }
.ie .ar-doss li a:hover { color: var(--accent); }
.ar-doss__here { font-size: 12px; line-height: 18px; font-weight: 500; color: var(--muted); }
.sb-nlbox .elementor-heading-title { margin: 0; }
.sb-nlbox .elementor-field-group { margin-bottom: 0; }

/* ---------- Opinion (B): surface band, author-forward header ---------- */
.sb-band { background: var(--surface); border-bottom: 1px solid var(--border); }
.sb-band .sb-bar { border-bottom: 0; }
.ar-author-lead { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.ar-author-lead__who { display: flex; flex-direction: column; align-items: center; }
.ie a.ar-lead-name { font-size: 20px; line-height: 28px; font-weight: 700; color: var(--primary); text-decoration: none; }
.ie a.ar-lead-name:hover { color: var(--accent); text-decoration: underline; }
.ar-lead-role { font-size: 14px; line-height: 22px; color: var(--muted); }
.ie .ar-lead-more { margin: 8px 0 0; }
.sb-author-col { border-inline-end: 1px solid var(--border); }
.ar-disc { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; font-size: 14px; line-height: 22px; font-weight: 500; color: var(--text); }
.ar-disc .ie-icon { width: 18px; height: 18px; margin-top: 2px; color: var(--muted); flex: none; }
@media (max-width: 767px) {
	.sb-author-col { border-inline-end: 0; }
	.ar-author-lead { flex-direction: row; align-items: center; gap: 16px; text-align: start; }
	.ar-author-lead__who { align-items: flex-start; }
	.ie .ar-lead-more { margin: 0; min-height: 32px; }
}

/* ---------- Comments (Post Comments widget → Astra comments.php) ---------- */
.sb-comments .comments-area { margin: 0; padding: 0; border: 0; background: none; }
.sb-comments .comments-title, .sb-comments .comment-reply-title { margin: 0 0 16px; font-size: 20px; line-height: 28px; font-weight: 700; color: var(--primary); }
.sb-comments .comment-notes, .sb-comments .logged-in-as { font-size: 14px; line-height: 22px; color: var(--muted); }
.sb-comments .comment-form label { display: block; margin-bottom: 4px; font-size: 14px; line-height: 22px; font-weight: 500; color: var(--text); }
.sb-comments .comment-form input[type="text"], .sb-comments .comment-form input[type="email"], .sb-comments .comment-form input[type="url"], .sb-comments .comment-form textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-input); border-radius: 4px; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; line-height: 24px; }
.sb-comments .comment-form input:focus-visible, .sb-comments .comment-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.sb-comments .comment-form input[type="email"], .sb-comments .comment-form input[type="url"] { direction: ltr; text-align: left; }
.ie .sb-comments #submit, .ie .sb-comments .form-submit .submit { min-height: 48px; padding: 12px 20px !important; border: 0 !important; border-radius: 4px !important; background: var(--accent) !important; color: var(--on-accent, #fff) !important; font: inherit; font-size: 16px; font-weight: 700; box-shadow: none !important; cursor: pointer; }
.ie .sb-comments #submit:hover, .ie .sb-comments #submit:focus-visible { background: var(--accent-hover) !important; }
.sb-comments .ast-row { margin-inline: 0; }
.sb-comments .ast-grid-common-col { padding-inline: 0; }
.sb-comments .comment-author .avatar { border-radius: var(--radius-full); }
.sb-comments .comment-content, .sb-comments .ast-comment-content { font-size: 16px; line-height: 28px; color: var(--text); }

/* ---------- Reading progress (JS) ---------- */
.sb-progress { position: fixed; inset-inline: 0; top: calc(var(--wp-admin--admin-bar--height, 0px) + 56px); z-index: 998; height: 3px; background: var(--border); opacity: 0; transition: opacity .2s; pointer-events: none; }
.sb-progress.is-visible { opacity: 1; }
.sb-progress span { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--accent); }
body:not(.admin-bar) .sb-progress { top: 56px; }
@media (prefers-reduced-motion: reduce) { .sb-progress { transition: none; } }

/* ---------- Mobile bottom bar ---------- */
.sb-mbar-w { position: static; }
.ar-bbar { display: none; }
@media (max-width: 767px) {
	.ar-bbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 997; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); box-sizing: border-box; min-height: 64px; padding-bottom: max(8px, env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--border); box-shadow: 0 -4px 12px #0f172a14; }
	.ie .ar-bbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 56px; border: 0; background: transparent; color: var(--primary); font: inherit; font-size: 12px; line-height: 18px; font-weight: 500; cursor: pointer; text-decoration: none; }
	.ie .ar-bbtn:hover, .ie .ar-bbtn[aria-pressed="true"] { color: var(--accent); }
	.ar-bbtn + .ar-bbtn { border-inline-start: 1px solid var(--border); }
	.ar-bbtn .ie-icon { width: 22px; height: 22px; }
	body.sb-article { padding-bottom: 64px; }
	body.sb-article #ast-scroll-top { bottom: 80px; }
}

/* ---------- Print ---------- */
@media print {
	.elementor-location-header, .elementor-location-footer, .sb-single .sb-side, .sb-tools, .ar-bbar, .sb-progress,
	.sb-related, .sb-comments, .ad-970x250, .ad-728x90, .ad-336x280, .ad-300x250, .ad-300x600, .ad-320x100, .sb-ad-end, #wpadminbar, #ast-scroll-top { display: none !important; }
	.sb-single .sb-main { flex-basis: 100% !important; max-width: 100% !important; }
	.sb-article-body { max-width: none; --sb-p: 12pt; --sb-lh: 20pt; }
	.ie .sb-article-body p a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
	.ar-tscroll { max-height: none; overflow: visible; }
}

/* ---------- Template layout helpers (v1.0.2) ---------- */
/* Astra wraps the Elementor single in #primary (margin 60px) inside a 1240px .ast-container */
body.sb-article #primary { margin-block: 0 !important; }
body.sb-article #content > .ast-container { max-width: none !important; padding-inline: 0 !important; }
.sb-single .sb-titles { max-width: 960px; }
.sb-single .sb-lead { max-width: 880px; }
.sb-single--op .sb-lead { max-width: 820px; }
.sb-single .sb-below { max-width: 720px; }
.sb-author-col { flex: 0 0 calc(25% - 18px); max-width: calc(25% - 18px); padding-inline-end: 24px; }
.sb-head-col { flex: 1 1 0; min-width: 0; }
.sb-nlbox .elementor-field-group { padding: 0 !important; }
.sb-nlbox .elementor-form-fields-wrapper { margin: 0 !important; row-gap: 12px; }
.sb-nlbox .elementor-field-textual { min-height: 44px; direction: ltr; text-align: left; }
.sb-nlbox .elementor-button { inline-size: 100%; min-height: 44px; }
@media (max-width: 767px) {
	.sb-author-col { flex-basis: 100%; max-width: 100%; padding-inline-end: 0; }
}

/* v1.0.6 — the mobile design keeps the 300×250 in the article sidebar (moved below the comments);
   site.css hides .ad-300x250 on phones everywhere else. */
@media (max-width: 767px) {
	.sb-single .sb-side .ad-300x250 { display: grid; }
}
