/* Homepage «آخرین مقاله‌ها» section (blog module) */
.blog-home { padding: 5rem 1.5rem 5.4rem; max-width: var(--max); margin-inline: auto; }
.bh-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.bh-card { min-width: 0; }
.bh-link { display: flex; flex-direction: column; height: 100%; color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden;
  box-shadow: 6px 6px 0 var(--tint); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.bh-link:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--accent); }
.bh-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.bh-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1.5px solid var(--ink); background: var(--accent-soft); display: grid; place-items: center; }
.bh-media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; display: block; transition: transform 0.6s var(--ease); }
.bh-link:hover .bh-media img { transform: scale(1.04); }
.bh-media.is-empty span { font-size: 2.6rem; color: var(--accent); }
.bh-cat { position: absolute; top: 0.8rem; right: 0.8rem; padding: 0.2rem 0.75rem; border-radius: 999px; background: var(--paper); border: 1.5px solid var(--ink); font-size: 0.78rem; font-weight: 700; box-shadow: 2px 2px 0 var(--accent); }
.bh-body { padding: 1.15rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.bh-body h3 { font-size: 1.12rem; line-height: 1.7; letter-spacing: -0.01em; }
.bh-body p { color: var(--muted); font-size: 0.93rem; line-height: 1.9; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bh-meta { margin-top: auto; padding-top: 0.4rem; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; font-size: 0.82rem; color: var(--muted); }
.bh-meta time { color: var(--accent); font-weight: 600; }
.bh-meta span[aria-hidden] { color: var(--gold); }
.bh-more { display: flex; justify-content: center; margin-top: 2.2rem; }

@media (max-width: 1000px) and (min-width: 801px) {
  .bh-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .blog-home { padding: 3.4rem 0 3.6rem; }
  .blog-home .section-head { padding-inline: 1.25rem; }
  /* swipe row */
  .bh-track { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0.3rem 1.25rem 1.1rem; scroll-padding-inline: 1.25rem; scrollbar-width: none; overscroll-behavior-x: contain; }
  .bh-track::-webkit-scrollbar { display: none; }
  .bh-card { flex: 0 0 82%; max-width: 21rem; scroll-snap-align: start; }
  .bh-link { box-shadow: 5px 5px 0 var(--tint); }
  .bh-more { margin-top: 1.2rem; padding-inline: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { .bh-link, .bh-media img { transition: none; } }
