/* ═══════════════════════════════════════════════════════════════════════════
   قالب آریا – typography.css
   Fonts from the Customizer (--font-body, --font-heading; @font-face rules are
   printed in the page head by inc/typography.php) and calmer spacing for reading
   on phones: tighter line height, smaller paragraph gaps, no justified text on
   narrow screens (it opens wide gaps between Persian words).
   ═══════════════════════════════════════════════════════════════════════════ */

/* Values come from <style id="arya-typo"> in the head; the fallbacks below
   only apply if that block is missing (it must not be overridden here). */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    font-family: var(--font-body, Vazirmatn, Tahoma, sans-serif);
    font-size: var(--fs-base, 16px);
    line-height: var(--lh-body, 1.8);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-kerning: normal;
}
/* form controls do not inherit the font by default */
button, input, select, textarea, optgroup { font-family: inherit; }

/* headings everywhere use the heading font */
h1, h2, h3, h4, h5, h6,
.post-title, .single-post-title, .cat-header h2, .widget-title, .banner-title,
.arya-ft__name, .arya-ft__col-title, .arya-ft__mini-title, .arya-ft__cta-text strong,
.arya-fs__list > li > a, .arya-video__chan-text a, .archive-header h1, .search-results-header h1 {
    font-family: var(--font-heading);
    font-weight: var(--hw);
    line-height: var(--lh-heading);
    letter-spacing: 0;
    text-wrap: balance;
}
/* Nastaliq needs room above and below its letters */
body.arya-heading-tall :is(h1, h2, h3, .post-title, .single-post-title, .cat-header h2) { line-height: 2.2; padding-block: .1em; }
/* single-weight display fonts: never fake a bold */
h1, h2, h3, h4, h5, h6, .post-title, .single-post-title { font-synthesis: none; }

/* ── reading text ────────────────────────────────────────────────────────── */
.post-body {
    font-size: 1em;
    line-height: var(--lh-body);
    text-align: start;
    overflow-wrap: break-word;
    word-spacing: normal;
}
.post-body p { margin: 0 0 var(--para-space); text-wrap: pretty; }
.post-body p:last-child { margin-bottom: 0; }
/* empty paragraphs left by editors never add space */
.post-body p:empty, .post-body p:has(> br:only-child) { display: none; }
.post-body ul, .post-body ol { margin: 0 0 var(--para-space); line-height: var(--lh-body); padding-inline-start: 1.4em; padding-inline-end: 0; }
.post-body li + li { margin-top: .25em; }
.post-body h2, .post-body h3, .post-body h4 { margin: 1.4em 0 .6em; }
.post-body h2 { font-size: 1.35em; }
.post-body h3 { font-size: 1.18em; }
.post-body img { margin: 1em 0; }
.post-body blockquote { margin: 1.1em 0; font-style: normal; line-height: 1.85; }
.post-body blockquote p:last-child { margin-bottom: 0; }

/* excerpts and summaries: start-aligned, one comfortable rhythm */
.post-excerpt, .single-post-excerpt, .single-post-excerpt p, .arya-ft__about, .playlist-title {
    text-align: start;
    word-spacing: normal;
}
.post-excerpt { line-height: 1.8; margin-bottom: 16px; text-wrap: pretty; }
.single-post-excerpt p { margin: 0; }

/* justified text only where lines are long enough (setting «تراز دوطرفه») */
@media (min-width: 768px) {
    body.arya-text-justify .post-body p { text-align: justify; text-justify: inter-word; }
}

/* ── phones ──────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    body { --lh-body-m: min(var(--lh-body), 1.8); }
    .post-body { font-size: .97em; line-height: var(--lh-body-m); }
    .post-body p { margin-bottom: min(var(--para-space), .85em); }
    .single-post-title { font-size: clamp(1.2rem, 5.4vw, 1.55rem); line-height: 1.55; margin-bottom: 12px; }
    body.arya-heading-tall .single-post-title { line-height: 2.1; }
    .single-content-area { padding: 16px 14px; }
    .single-layout { padding-inline: 10px; }
    .single-post-separator { margin-bottom: 12px; }
    .single-meta-modern { gap: 8px; margin-bottom: 14px; }
    .single-post-hero-thumb { margin-bottom: 16px; }
    .single-post-excerpt { line-height: 1.8; }

    .post-content { padding: 18px 16px; }
    .post-title { font-size: 1.02rem; line-height: 1.6; margin-bottom: 6px; }
    .post-meta { margin-bottom: 8px; }
    .post-excerpt { font-size: .86rem; line-height: 1.75; margin-bottom: 14px; }
    .card-separator { margin: 6px 0 10px; }
    .btn-read-more { padding: 8px 24px; }
}
