/* ==========================================
   SAMAPARDAZ - Blog (فهرست و مقاله‌ها) — RTL/LTR با ویژگی‌های logical
   ========================================== */
.blog-section { padding: 80px 80px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 50px; }
.blog-card { display: flex; flex-direction: column; background: #fff; border: 1px solid rgba(246,139,13,.25); border-radius: 14px; overflow: hidden; color: inherit; text-decoration: none; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.blog-card:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 18px 40px rgba(13,27,62,.14); }
.blog-card-img { aspect-ratio: 16 / 10; overflow: hidden; background: #eef1f6; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.blog-card:hover .blog-card-img img { transform: scale(1.06); }
.blog-card-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 26px; flex: 1; }
.blog-card h3 { font-size: 1.15rem; line-height: 1.7; color: #162560; }
.blog-excerpt { font-size: .92rem; line-height: 1.9; color: rgba(13,27,62,.68); }
.blog-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: rgba(13,27,62,.55); }
.blog-meta span:first-child { color: var(--gold-dark); font-weight: 700; }
.blog-more { margin-top: auto; padding-top: 6px; font-weight: 700; font-size: .92rem; color: var(--gold-dark); }
.blog-more i { display: inline-block; font-style: normal; transition: transform .3s ease; }
.blog-card:hover .blog-more i { transform: translateX(-6px); }
html[dir="ltr"] .blog-card:hover .blog-more i { transform: translateX(6px); }

/* مقاله — چیدمان مثل صفحهٔ «تولید نرم‌افزار»: متن کنار عکس (فارسی: متن راست / عکس چپ) */
.blog-post-heading { font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.6; color: #162560; margin-bottom: 14px; }
.blog-detail .blog-meta { font-size: .85rem; margin-bottom: 0; }
.blog-side { min-width: 0; }
.blog-side .support-split-img { max-height: 600px; }
.blog-post-body { margin-top: 18px; font-size: 1.05rem; line-height: 2.2; color: rgba(13,27,62,.82); text-align: justify; text-justify: inter-word; }
html[lang="en"] .blog-post-body { hyphens: auto; }
.blog-post-body p { margin-bottom: 20px; }
.blog-post-body h2 { font-size: 1.4rem; line-height: 1.7; color: #162560; margin: 34px 0 14px; text-align: start; }
.blog-post-body ul, .blog-post-body ol { margin: 0 0 22px; padding-inline-start: 26px; }
.blog-post-body li { margin-bottom: 10px; }
.blog-post-body li::marker { color: var(--gold); font-weight: 700; }
.blog-back { display: inline-block; margin-top: 30px; font-weight: 700; color: #162560; text-decoration: none; }
.blog-back:hover { color: var(--gold-dark); }
.blog-back i { font-style: normal; }

@media (max-width: 1024px) { .blog-section { padding: 70px 50px; } .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .blog-section { padding: 56px 20px; } .blog-grid { grid-template-columns: 1fr; gap: 22px; margin-top: 32px; }
  .blog-post-body { font-size: 1rem; }
}

/* پخش‌کنندهٔ صوتی زیر عکس مقاله (همیشه چپ‌به‌راست) */
.blog-player { --bp-ico: #2a4590; display: flex; align-items: center; gap: 18px; height: 76px; padding: 0 22px; margin: 0 0 22px; background: #fff; border: 1px solid #d3d3d3; border-radius: 12px; color: var(--bp-ico); direction: ltr; font-family: Arial, Helvetica, sans-serif; user-select: none; }
.blog-player button { background: none; border: 0; padding: 0; cursor: pointer; display: flex; align-items: center; flex-shrink: 0; color: var(--bp-ico); transition: color .2s, transform .2s; }
.blog-player button:hover { color: #3a5cb8; transform: scale(1.1); }
.bp-time { font-size: 1rem; letter-spacing: .02em; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--navy); }
.bp-bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(246,139,13,.22); cursor: pointer; position: relative; overflow: hidden; }
.bp-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--gold); border-radius: 4px; }
.bp-bar:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.blog-player.muted .bp-wave { display: none; }
@media (max-width: 640px) { .blog-player { gap: 12px; height: 68px; padding: 0 16px; } .bp-time { font-size: .9rem; } .blog-player svg { width: 24px; height: 24px; } }

/* موبایل/تبلت: عنوان، مدت مطالعه، عکس، پلیر، سپس متن */
@media (max-width: 1024px) {
  .blog-detail .support-split { display: flex; flex-direction: column; gap: 0; }
  .blog-detail .blog-side, .blog-detail .support-split-text { display: contents; }
  .blog-post-heading { order: 1; }
  .blog-detail .blog-meta { order: 2; }
  .blog-detail .support-split-img { order: 3; margin: 22px 0 16px; width: 100%; max-height: none; aspect-ratio: 4 / 3; }
  .blog-detail .blog-player { order: 4; margin: 0 0 6px; width: 100%; }
  .blog-post-body { order: 5; }
  .blog-back { order: 6; align-self: flex-end; }
  html[dir="ltr"] .blog-back { align-self: flex-start; }
}

/* ظاهر شدن خط‌به‌خط متن مقاله (js/blog-reveal.js) */
.bl-w { display: inline-block; }
.bl-ready .bl-w { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.22,.61,.36,1); }
.bl-ready .bl-w.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .bl-ready .bl-w { opacity: 1; transform: none; transition: none; } }
