/**
 * فرانت صفحه اصلی بلاگی — اسکلت سکشن‌ها.
 */

.home-blog {
  display: block;
  width: 100%;
  /* جلوگیری از اسکرول افقی وقتی ردیف تمام‌عرض با 100vw بیرون می‌زند */
  overflow-x: clip;
}

.home-blog-section {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  background-repeat: no-repeat;
}

.home-blog-section__inner {
  width: 100%;
  max-width: var(--jdm-site-width, 1120px);
  margin-inline: auto;
  padding-inline: 1rem;
  box-sizing: border-box;
}

.home-blog-section--stretch .home-blog-section__inner,
.home-blog-section--stretch {
  max-width: none;
}

.home-blog-section--stretch .home-blog-section__inner {
  max-width: var(--jdm-site-width, 1120px);
  margin-inline: auto;
}

.home-blog-section__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.4;
}

.home-blog-section__title a {
  color: inherit;
  text-decoration: none;
}

.home-blog-section__title--centered {
  justify-content: center;
  text-align: center;
}

.home-blog-section__title--big {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.home-blog-section__body {
  display: grid;
  gap: 1.25rem;
}

.home-blog-section--sidebar-right .home-blog-section__body,
.home-blog-section--sidebar-left .home-blog-section__body {
  grid-template-columns: minmax(0, 1fr) var(--jdm-sidebar-width, 340px);
  align-items: start;
}

.home-blog-section--sidebar-left .home-blog-section__body {
  grid-template-columns: var(--jdm-sidebar-width, 340px) minmax(0, 1fr);
}

.home-blog-section--sidebar-left .home-blog-section__sidebar {
  order: -1;
}

.home-blog-section--sticky-sidebar .home-blog-section__sidebar {
  position: sticky;
  top: 1rem;
}

/* سایدبار خالی عرض نگیرد — main تمام عرض محتوای سایت */
.home-blog-section__sidebar:empty {
  display: none !important;
}

.home-blog-section--sidebar-right .home-blog-section__body:has(> .home-blog-section__sidebar:empty),
.home-blog-section--sidebar-left .home-blog-section__body:has(> .home-blog-section__sidebar:empty) {
  grid-template-columns: minmax(0, 1fr);
}

.home-blog-section--dark {
  color: #f8fafc;
}

/* —— بلوک‌ها (چیدمان مجله‌ای) —— */
.hb-block {
  --hb-accent: var(--color-primary, #059669);
  /* پالت دکمه پاستیلی — از اکسنت بلوک */
  --hb-pastel-bg: color-mix(in oklab, var(--hb-accent, #059669) 16%, #fff);
  --hb-pastel-bg-hover: color-mix(in oklab, var(--hb-accent, #059669) 26%, #fff);
  --hb-pastel-fg: color-mix(in oklab, var(--hb-accent, #059669) 72%, #064e3b);
  --hb-pastel-border: color-mix(in oklab, var(--hb-accent, #059669) 24%, #fff);
  margin-bottom: 1.75rem;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 14px;
  overflow: hidden;
}

/* تایم‌لاین: دایره کناری از لبه کارت بیرون می‌زند */
.hb-block.timeline-box {
  overflow: visible;
}

.hb-block.timeline-box .hb-block__inner {
  overflow: visible;
}

.hb-block.is-content-only {
  background: transparent;
  border: 0;
  border-radius: 0;
}

.hb-block.is-dark {
  background: #0f172a;
  color: #f8fafc;
  border-color: #1e293b;
}

/* ردیف‌های چندستونه (مثل المنتور) داخل بخش */
.home-blog-section__main {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 1.25rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  align-items: stretch;
}

.home-blog-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  align-items: stretch;
}

/* سکشن داخلی با بک‌گراند اختصاصی (رنگ پایه + تصویر تمام‌عرض بدون کشیدگی عمودی) */
.home-blog-row--has-bg {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% auto;
}

/*
 * تمام‌عرض ردیف: بک‌گراند تا لبه ویوپورت؛ ستون‌ها هم‌عرض ردیف‌های عادی (__main).
 * از --jdm-site-width استفاده نمی‌کنیم (روی این سایت 80% است و پدینگ را غلط می‌کند).
 * padding = فاصله ویوپورت تا عرض والد: calc(50vw - 50%).
 */
.home-blog-row--full-width {
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
  border-radius: 0;
  box-sizing: border-box;
  padding-inline: calc(50vw - 50%);
}

/* پدینگ افقی has-bg روی تمام‌عرض اعمال نشود تا عرض ستون‌ها جمع نشود */
.home-blog-row--full-width.home-blog-row--has-bg {
  padding-block: 1rem;
  padding-inline: calc(50vw - 50%);
}

.home-blog-col {
  min-width: 0;
  box-sizing: border-box;
  /* مثل .home-blog-section__main قبلی: نیم‌باکس‌ها کنار هم بنشینند */
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: stretch;
}

.home-blog-row--cols-1 .home-blog-col { flex: 1 1 100%; width: 100%; max-width: 100%; }
.home-blog-row--cols-2 .home-blog-col { flex: 1 1 calc(50% - 0.625rem); width: calc(50% - 0.625rem); max-width: calc(50% - 0.625rem); }
.home-blog-row--cols-3 .home-blog-col { flex: 1 1 calc(33.333% - 0.834rem); width: calc(33.333% - 0.834rem); max-width: calc(33.333% - 0.834rem); }
.home-blog-row--cols-4 .home-blog-col { flex: 1 1 calc(25% - 0.938rem); width: calc(25% - 0.938rem); max-width: calc(25% - 0.938rem); }
.home-blog-row--cols-5 .home-blog-col { flex: 1 1 calc(20% - 1rem); width: calc(20% - 1rem); max-width: calc(20% - 1rem); }
.home-blog-row--cols-6 .home-blog-col { flex: 1 1 calc(16.666% - 1.042rem); width: calc(16.666% - 1.042rem); max-width: calc(16.666% - 1.042rem); }

.home-blog-col > .hb-block {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 0;
}

/*
 * نیم‌باکس (#4 / ad_50 / code_50) داخل ستون تک‌ستونه — دوباره ۵۰٪ کنار هم
 * (مهاجرت داده همه بلوک‌ها را در یک ستون گذاشته؛ رفتار قبلی باید حفظ شود)
 */
.home-blog-row--cols-1 .home-blog-col > .hb-block.half-box {
  flex: 1 1 calc(50% - 0.625rem);
  width: calc(50% - 0.625rem);
  max-width: calc(50% - 0.625rem);
  min-width: 0;
}

/* در سکشن چندستونه، نیم‌باکس عرض همان ستون را می‌گیرد */
.home-blog-row:not(.home-blog-row--cols-1) .home-blog-col > .hb-block.half-box {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
}

/* سازگاری با بلوک‌های مستقیم قدیمی (بدون ردیف) */
.home-blog-section__main > .hb-block {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 0;
}

.home-blog-section__main > .hb-block.half-box {
  flex: 1 1 calc(50% - 0.625rem);
  width: calc(50% - 0.625rem);
  max-width: calc(50% - 0.625rem);
  min-width: 0;
  display: block;
}

@media (max-width: 960px) {
  .home-blog-row--cols-3 .home-blog-col,
  .home-blog-row--cols-4 .home-blog-col,
  .home-blog-row--cols-5 .home-blog-col,
  .home-blog-row--cols-6 .home-blog-col {
    flex: 1 1 calc(50% - 0.625rem);
    width: calc(50% - 0.625rem);
    max-width: calc(50% - 0.625rem);
  }
}

@media (max-width: 640px) {
  .home-blog-row--cols-2 .home-blog-col,
  .home-blog-row--cols-3 .home-blog-col,
  .home-blog-row--cols-4 .home-blog-col,
  .home-blog-row--cols-5 .home-blog-col,
  .home-blog-row--cols-6 .home-blog-col {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }
}

.hb-block__inner {
  padding: 1rem 1.1rem 1.15rem;
  box-sizing: border-box;
  width: 100%;
}

.hb-block.is-content-only .hb-block__inner {
  padding: 0;
}

.hb-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--hb-accent);
}

.hb-block__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hb-block__title a {
  color: inherit;
  text-decoration: none;
}

.hb-block__more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--hb-pastel-border);
  background: var(--hb-pastel-bg);
  color: var(--hb-pastel-fg);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hb-block__more-link:hover {
  background: var(--hb-pastel-bg-hover);
  color: var(--hb-pastel-fg);
}

.hb-block__list {
  display: grid;
  gap: 1rem;
}

.hb-block__list--default,
.hb-block__list--timeline,
.hb-block__list--content {
  grid-template-columns: 1fr;
}

.hb-block__list--large_first.has-first-big-post,
.big-post-left-box .hb-block__list--large_first {
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem 1.25rem;
}

.big-post-left-box .hb-block__list--large_first .hb-item.is-first {
  grid-row: 1 / span 4;
}

.big-post-top-box .hb-block__list--large_first {
  grid-template-columns: 1fr 1fr;
}

.big-post-top-box .hb-block__list--large_first .hb-item.is-first {
  grid-column: 1 / -1;
}

.hb-block__list--two_cols {
  grid-template-columns: 1fr 1fr;
}

.hb-block__list--grid {
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-auto-rows: minmax(140px, auto);
}

.hb-block__list--grid .hb-item.is-first {
  grid-row: span 2;
}

.hb-block__list--mini {
  grid-template-columns: repeat(var(--hb-block-cols, 3), minmax(0, 1fr));
}

.hb-block__list--big_thumb {
  grid-template-columns: 1.3fr 1fr;
}

.hb-block__list--scroll,
.hb-block__list--scroll2,
.hb-block__list--slider,
.hb-block__list.is-scrollable {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.35rem;
}

.hb-block__list--scroll2 .hb-item,
.hb-block__list--slider .hb-item {
  flex: 0 0 min(78%, 280px);
  scroll-snap-align: start;
}

.hb-block__list--slider .hb-item {
  flex-basis: min(100%, 720px);
}

.hb-item {
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
}

/**
 * کارت مشترک بلوک‌های مجله‌ای #1–#18 و اسکرول #1/#2
 * (پس‌زمینه سفید + حاشیه + سایه ملایم)
 */
.hb-block.wide-post-box .hb-item,
.hb-block.big-posts-box .hb-item,
.hb-block.small-wide-post-box .hb-item,
.hb-block.big-post-left-box .hb-item,
.hb-block.big-post-top-box .hb-item,
.hb-block.half-box .hb-item,
.hb-block.full-width-img-news-box .hb-item,
.hb-block.mini-posts-box .hb-item,
.hb-block.miscellaneous-box .hb-item,
.hb-block.two-columns-small-thumb .hb-item,
.hb-block.tabs-box .hb-item,
.hb-block.news-gallery .hb-item,
.hb-block.scrolling-box .hb-item,
.hb-block.content-box .hb-item,
.hb-overlay-post {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  border-radius: 12px;
}

/* پدینگ برای چیدمان تصویر+متن (#10/#14 جداگانه) */
.hb-block.wide-post-box:not(.timeline-box) .hb-item,
.hb-block.small-wide-post-box .hb-item,
.hb-block.big-post-left-box .hb-item,
.hb-block.big-post-top-box .hb-item,
.hb-block.half-box .hb-item,
.hb-block.miscellaneous-box .hb-item,
.hb-block.two-columns-small-thumb .hb-item,
.hb-block.tabs-box .hb-item,
.hb-block.content-box .hb-item {
  padding: 0.75rem 0.85rem;
}

.hb-block.wide-post-box:not(.timeline-box) .hb-item .hb-item__body,
.hb-block.small-wide-post-box .hb-item .hb-item__body,
.hb-block.big-post-left-box .hb-item .hb-item__body,
.hb-block.big-post-top-box .hb-item .hb-item__body,
.hb-block.half-box .hb-item .hb-item__body,
.hb-block.mini-posts-box .hb-item .hb-item__body,
.hb-block.tabs-box .hb-item .hb-item__body,
.hb-block.content-box .hb-item .hb-item__body {
  padding: 0.1rem 0 0;
}

/* اورلی / گالری / اسکرول۲: بدون پدینگ داخلی — تصویر پر باکس */
.hb-block.full-overlay-title .hb-item,
.hb-block.news-gallery .hb-item,
.hb-block.scroll-2-box .hb-item,
.hb-overlay-post {
  padding: 0;
}

.hb-block.full-width-img-news-box:not(.full-overlay-title) .hb-item {
  padding: 0.75rem 0.85rem;
}

.hb-block.full-width-img-news-box:not(.full-overlay-title) .hb-item .hb-item__body {
  padding: 0.1rem 0 0;
}

.hb-block.full-width-img-news-box .hb-item__media,
.hb-block.wide-post-box .hb-item__media,
.hb-block.big-posts-box .hb-item__media,
.hb-block.mini-posts-box .hb-item__media,
.hb-block.scrolling-box:not(.scroll-2-box) .hb-item__media {
  border-radius: 8px;
  overflow: hidden;
}

.hb-item__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f1f5f9;
}

.hb-item__media--placeholder {
  background: color-mix(in oklab, #e2e8f0 78%, var(--hb-accent, #059669));
}

.hb-item__media--placeholder .blog-media-ph__icon,
.hb-item__thumb-link--placeholder .blog-media-ph__icon,
.hb-scroll2-slide__media--placeholder .blog-media-ph__icon,
.hb-overlay-post__media--placeholder .blog-media-ph__icon,
.hb-item__hero--placeholder .blog-media-ph__icon {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: color-mix(in oklab, var(--hb-accent, #059669) 45%, #64748b);
  opacity: 0.72;
  pointer-events: none;
}

.hb-scroll2-slide__media--placeholder .blog-media-ph__icon,
.hb-overlay-post__media--placeholder .blog-media-ph__icon,
.hb-item__hero--placeholder .blog-media-ph__icon,
.hb-item__thumb-link--placeholder .blog-media-ph__icon {
  color: color-mix(in oklab, #fff 70%, transparent);
  opacity: 0.8;
}

.hb-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hb-bg-pos, center);
  display: block;
}

.hb-item__media-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--hb-accent) 85%, #000) center / 18px no-repeat;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.hb-item__body {
  padding: 0.7rem 0.15rem 0.2rem;
}

.hb-item__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

.hb-item__title a {
  color: inherit;
  text-decoration: none;
}

.hb-item__meta {
  display: inline-block;
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  color: #64748b;
}

/* بج دسته — چیپ پاستیلی */
.hb-item__cat {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.35rem;
  margin-inline-end: 0.4rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--hb-pastel-border, color-mix(in oklab, var(--hb-accent, #059669) 24%, #fff));
  background: var(--hb-pastel-bg, color-mix(in oklab, var(--hb-accent, #059669) 16%, #fff));
  color: var(--hb-pastel-fg, color-mix(in oklab, var(--hb-accent, #059669) 72%, #064e3b));
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.hb-item__excerpt {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #475569;
}

.hb-item__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.55rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--hb-pastel-border);
  background: var(--hb-pastel-bg);
  color: var(--hb-pastel-fg);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hb-item__more:hover {
  background: var(--hb-pastel-bg-hover);
  color: var(--hb-pastel-fg);
}

/* default / classic: تصویر کنار متن */
.hb-block__list--default .hb-item,
.wide-post-box .hb-item {
  display: grid;
  grid-template-columns: minmax(120px, 36%) 1fr;
  gap: 0.85rem;
  align-items: start;
}

.small-wide-post-box .hb-item {
  grid-template-columns: 100px 1fr;
}

/* بلوک #10 — جزئیات کامل پایین‌تر در big-posts-box grid */

/* large first rest as compact rows — نه برای گالری #6 (news-gallery) */
.has-first-big-post:not(.news-gallery) .hb-item:not(.is-first) {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.65rem;
}

.has-first-big-post:not(.news-gallery) .hb-item:not(.is-first) .hb-item__media {
  aspect-ratio: 1;
}

.has-first-big-post:not(.news-gallery) .hb-item.is-first {
  display: block;
}

.has-first-big-post:not(.news-gallery) .hb-item.is-first .hb-item__title {
  font-size: 1.25rem;
}

/* overlay */
.full-overlay-title .hb-item {
  position: relative;
}

.full-overlay-title .hb-item__media {
  aspect-ratio: 16 / 9;
}

.full-overlay-title .hb-item__body {
  position: absolute;
  inset: auto 0 0;
  padding: 1.1rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
}

.full-overlay-title.center-overlay-title .hb-item__body {
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background: rgba(0, 0, 0, 0.4);
}

.full-overlay-title:not(.center-overlay-title) .hb-item__meta {
  color: #e2e8f0;
}

/* روی اورلی تاریک: چیپ پاستیلی شیشه‌ای */
.full-overlay-title:not(.center-overlay-title) .hb-item__cat {
  background: color-mix(in oklab, #fff 78%, var(--hb-accent, #059669));
  border-color: color-mix(in oklab, #fff 55%, var(--hb-accent, #059669));
  color: var(--hb-pastel-fg, #047857);
}

/* mini (#9) — ستون‌ها از --hb-block-cols (پیش‌فرض ۳) */
.hb-block.mini-posts-box .hb-block__list--mini {
  display: grid;
  grid-template-columns: repeat(var(--hb-block-cols, 3), minmax(0, 1fr));
  gap: 1.35rem 1.5rem;
  align-items: stretch;
}

.hb-block.mini-posts-box .hb-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 168px;
  overflow: hidden;
  padding: 0.75rem 0.85rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  border-radius: 12px;
  box-sizing: border-box;
}

.hb-block.mini-posts-box .hb-item__meta {
  flex: 0 0 auto;
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.hb-block.mini-posts-box .hb-item__meta time {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.hb-block.mini-posts-box .hb-item__title {
  flex: 0 0 auto;
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.4;
  /* دو خط ثابت — ارتفاع کارت‌ها یکی می‌ماند */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: calc(1.4em * 2);
}

.hb-block.mini-posts-box .hb-item__title a {
  color: inherit;
  text-decoration: none;
}

.hb-block.mini-posts-box .hb-item__title a:hover {
  color: var(--hb-accent);
}

.hb-block.mini-posts-box .hb-item__row {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-height: 0;
}

.hb-block.mini-posts-box .hb-item__media {
  flex: 0 0 110px;
  width: 110px;
  height: 70px;
  aspect-ratio: 11 / 7;
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
}

.hb-block.mini-posts-box .hb-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hb-block.mini-posts-box .hb-item__body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.hb-block.mini-posts-box .hb-item__excerpt {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #64748b;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

/*
 * بلوک #14 timeline — مثل مطالب مرتبط سینگل:
 * ستون‌ها از --hb-block-cols؛ هر ستون خط+دایره تاریخ+کارت افقی.
 */
.hb-block.timeline-box .hb-timeline-cols {
  display: grid;
  grid-template-columns: repeat(var(--hb-block-cols, 3), minmax(0, 1fr));
  gap: 1.15rem 1.25rem;
  align-items: start;
  min-width: 0;
}

.hb-block.timeline-box .hb-timeline-cols--1 {
  grid-template-columns: minmax(0, 1fr);
}

.hb-block.timeline-box .hb-timeline-cols--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hb-block.timeline-box .hb-timeline-col {
  min-width: 0;
}

.hb-block.timeline-box .hb-timeline-col .blog-cat-grid--layout-timeline {
  margin: 0;
  /* بدون دایره ماه: فاصله و پدینگ فشرده‌تر */
  --tl-pad: 2.35rem;
  gap: 0.85rem;
  padding-block-start: 0;
}

/*
 * ارتفاع یکسان همه آیتم‌ها تا سطرها بین ۳ ستون هم‌تراز بمانند
 * (عنوان کوتاه/بلند دیگر ستون‌ها را جابه‌جا نمی‌کند).
 */
.hb-block.timeline-box .blog-cat-grid--layout-timeline .blog-cat-grid__item {
  min-height: 6.5rem;
}

.hb-block.timeline-box .blog-cat-grid--layout-timeline .blog-cat-card--listish {
  height: 6.5rem;
  min-height: 6.5rem;
  max-height: 6.5rem;
  align-items: center;
  box-sizing: border-box;
}

.hb-block.timeline-box .blog-cat-grid--layout-timeline .blog-cat-card__media {
  flex: 0 0 30%;
  width: 30%;
  max-width: 96px;
  aspect-ratio: 16 / 9;
  height: auto;
  align-self: center;
}

.hb-block.timeline-box .blog-cat-grid--layout-timeline .blog-cat-card__body {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  padding: 0;
}

/* دایره بزرگ ماه در بلوک خانه نمایش داده نمی‌شود */
.hb-block.timeline-box .blog-cat-timeline__month {
  display: none !important;
}

/* رنگ دایره/خط از اکسنت بلوک */
.hb-block.timeline-box .blog-cat-grid--layout-timeline {
  --color-jdm-primary: var(--hb-accent, #059669);
}

.hb-block.timeline-box .blog-cat-timeline__dot {
  background: var(--hb-accent, #059669);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--hb-accent, #059669) 18%, #fff);
}

.hb-block.timeline-box .blog-cat-card--listish .blog-cat-card__title {
  font-size: 0.95rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  /* همیشه جای ۲ خط تا ارتفاع کارت ثابت بماند */
  height: calc(1.45em * 2);
  max-height: calc(1.45em * 2);
  margin: 0;
}

/* grid gallery */
.news-gallery .hb-item {
  position: relative;
}

.news-gallery .hb-item__media {
  aspect-ratio: 1;
  min-height: 140px;
}

.news-gallery .hb-item.is-first .hb-item__media {
  aspect-ratio: auto;
  height: 100%;
  min-height: 300px;
}

.news-gallery .hb-item__body {
  position: absolute;
  inset: auto 0 0;
  padding: 0.85rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
}

/* breaking */
.hb-breaking {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
}

.hb-breaking__label {
  flex: 0 0 auto;
  padding: 0.7rem 1rem;
  background: var(--hb-pastel-bg, color-mix(in oklab, var(--hb-accent, #059669) 16%, #fff));
  color: var(--hb-pastel-fg, #047857);
  border-inline-end: 1px solid var(--hb-pastel-border, color-mix(in oklab, var(--hb-accent, #059669) 24%, #fff));
  font-weight: 800;
  font-size: 0.9rem;
}

.hb-breaking__track {
  flex: 1 1 auto;
  position: relative;
  min-height: 44px;
  overflow: hidden;
  background: #fff;
}

.hb-breaking__item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  color: inherit;
  text-decoration: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  font-weight: 600;
}

.hb-breaking__item.is-active {
  opacity: 1;
  transform: none;
}

/* tabs — الگوی flex-tabs (بلوک #8) */
.hb-block.tabs-box .hb-block__inner {
  padding-top: 0.85rem;
}

.hb-tabs {
  width: 100%;
}

.hb-tabs__nav {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  border-bottom: 0;
}

.hb-tabs__nav.is-flex-tabs {
  width: 100%;
}

.hb-tabs__nav > li {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.hb-tabs__btn {
  appearance: none;
  border: 1px solid transparent;
  background: color-mix(in oklab, var(--hb-accent, #059669) 8%, #f8fafc);
  width: 100%;
  padding: 0.55rem 0.85rem;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  color: #64748b;
  border-radius: 999px;
  margin-bottom: 0;
  text-align: center;
  line-height: 1.35;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hb-tabs__btn:hover {
  color: var(--hb-pastel-fg, var(--hb-accent));
  background: var(--hb-pastel-bg);
  border-color: var(--hb-pastel-border);
}

.hb-tabs__btn.is-active {
  color: var(--hb-pastel-fg, var(--hb-accent));
  background: var(--hb-pastel-bg);
  border-color: var(--hb-pastel-border);
}

.hb-tabs__pane[hidden] {
  display: none !important;
}

.hb-block.tabs-box.big-post-left-box .hb-block__list--large_first {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.1rem 1.35rem;
  align-items: start;
}

.hb-block.tabs-box.big-post-left-box .hb-item.is-first {
  grid-row: 1 / span 6;
}

.hb-ad img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.hb-block__custom {
  line-height: 1.85;
}

.hb-videos {
  display: grid;
  gap: 1rem;
}

.hb-videos__item iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 10px;
}

/* —— بلوک‌های مجله‌ای (چیدمان مجله) —— */
.hb-block.wide-post-box .hb-block__list--default,
.hb-block.timeline-box .hb-block__list--timeline,
.hb-block.mini-posts-box .hb-block__list--mini,
.hb-block.content-box .hb-block__list--content,
.hb-block.full-width-img-news-box .hb-block__list--full_thumb,
.hb-block.full-width-img-news-box .hb-block__list--overlay {
  gap: 0.85rem;
}

.hb-block.wide-post-box .hb-block__list--default .hb-item {
  display: grid;
  grid-template-columns: minmax(140px, 38%) 1fr;
  gap: 1rem;
  margin-bottom: 0;
  border-bottom: 0;
  padding-bottom: 0.75rem;
}

/* بلوک #10: کارت هم‌اندازه — ستون از --hb-block-cols (پیش‌فرض ۴) */
.hb-block.big-posts-box .hb-block__list--big {
  display: grid;
  grid-template-columns: repeat(var(--hb-block-cols, 4), minmax(0, 1fr));
  gap: 1.15rem;
  align-items: stretch;
}

.hb-block.big-posts-box .hb-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  border-radius: 12px;
  box-sizing: border-box;
}

.hb-block.big-posts-box .hb-item__media {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 0;
}

.hb-block.big-posts-box .hb-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hb-block.big-posts-box .hb-item__media .hb-item__cat {
  position: absolute;
  inset-inline-start: 0.55rem;
  bottom: 0.55rem;
  z-index: 2;
  margin: 0;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, #fff 55%, var(--hb-accent, #059669));
  background: color-mix(in oklab, #fff 78%, var(--hb-accent, #059669));
  color: var(--hb-pastel-fg, #047857);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.hb-block.big-posts-box .hb-item__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.75rem 0.85rem 0.9rem;
}

.hb-block.big-posts-box .hb-item__meta {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.hb-block.big-posts-box .hb-item__title {
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  min-height: calc(1.4em * 3);
}

.hb-block.big-posts-box .hb-item__title a {
  color: inherit;
  text-decoration: none;
}

.hb-block.big-posts-box .hb-item__title a:hover {
  color: var(--hb-accent);
}

.hb-block.big-posts-box .hb-item__excerpt {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: #64748b;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  flex: 1 1 auto;
}

/* بلوک #17 classic-small: ستون از --hb-block-cols؛ هر کارت تصویر کوچک + متن */
.hb-block.small-wide-post-box .hb-block__list--default {
  display: grid;
  grid-template-columns: repeat(var(--hb-block-cols, 3), minmax(0, 1fr));
  gap: 1rem 1.15rem;
  align-items: stretch;
}

.hb-block.small-wide-post-box .hb-block__list--default .hb-item,
.hb-block.small-wide-post-box .hb-item {
  grid-template-columns: 88px 1fr !important;
  gap: 0.75rem;
  height: 100%;
  min-width: 0;
  margin-bottom: 0;
  padding: 0.7rem 0.75rem;
  align-items: center;
  box-sizing: border-box;
}

.hb-block.small-wide-post-box .hb-item__media {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
}

.hb-block.small-wide-post-box .hb-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hb-block.small-wide-post-box .hb-item__title {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.hb-block.small-wide-post-box .hb-item__excerpt {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #64748b;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.hb-block.big-post-left-box .hb-block__list--large_first,
.hb-block.big-post-left-box .hb-block__list--big_thumb {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.1rem 1.35rem;
  align-items: start;
}

.hb-block.big-post-left-box .hb-item.is-first {
  grid-row: 1 / span 6;
}

.hb-block.big-post-top-box .hb-block__list--large_first {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.hb-block.big-post-top-box:not(.two-columns-small-thumb) .hb-item.is-first {
  grid-column: 1 / -1;
}

/*
 * بلوک #18 (two-columns-small-thumb):
 * ستون از --hb-block-cols؛ همه آیتم‌ها تامب کوچک یکسان — بدون هیرو تمام‌عرض.
 */
.hb-block.two-columns-small-thumb .hb-block__list--two_cols {
  display: grid;
  grid-template-columns: repeat(var(--hb-block-cols, 3), minmax(0, 1fr));
  gap: 1rem 1.25rem;
  align-items: start;
}

/* کارت باکس‌دار — تفکیک واضح‌تر بین آیتم‌های #18 */
.hb-block.two-columns-small-thumb .hb-item,
.hb-block.two-columns-small-thumb .hb-item.is-first {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  grid-column: auto;
  height: auto;
  min-width: 0;
  margin: 0;
  padding: 0.7rem 0.8rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  border-radius: 12px;
  overflow: hidden;
  box-sizing: border-box;
}
/* حتی با «فقط محتوا» باکس کارت بماند */
.hb-block.two-columns-small-thumb.is-content-only .hb-item,
.hb-block.two-columns-small-thumb.is-content-only .hb-item.is-first {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
}

.hb-block.two-columns-small-thumb .hb-item__media {
  flex: 0 0 110px;
  width: 110px;
  max-width: 110px;
  aspect-ratio: 110 / 70;
  border-radius: 4px;
  overflow: hidden;
  background: #e2e8f0;
}

.hb-block.two-columns-small-thumb .hb-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hb-block.two-columns-small-thumb .hb-item__body {
  min-width: 0;
  padding: 0;
}

.hb-block.two-columns-small-thumb .hb-item__title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.hb-block.two-columns-small-thumb .hb-item__title a {
  color: inherit;
  text-decoration: none;
}

.hb-block.two-columns-small-thumb .hb-item__title a:hover {
  color: var(--hb-accent, #059669);
}

.hb-block.two-columns-small-thumb .hb-item__meta {
  margin: 0;
  font-size: 0.78rem;
  color: #666;
}

.hb-block.two-columns-small-thumb .hb-item__cat,
.hb-block.two-columns-small-thumb .hb-item__excerpt {
  display: none;
}

/* مطالب فرعی بلوک‌های large_first — گالری #6 مستثنی است */
.hb-block.has-first-big-post:not(.news-gallery) .hb-item:not(.is-first) {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.75rem;
  align-items: center;
  /* باکس جدا برای مطالب غیر اول — تفکیک واضح‌تر */
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
}

.hb-block.has-first-big-post:not(.news-gallery) .hb-item:not(.is-first) .hb-item__media {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
}

.hb-block.has-first-big-post:not(.news-gallery) .hb-item:not(.is-first) .hb-item__title {
  font-size: 0.95rem;
  margin: 0.15rem 0 0;
}

.hb-block.has-first-big-post:not(.news-gallery) .hb-item.is-first .hb-item__title {
  font-size: 1.35rem;
}

.hb-block.has-first-big-post:not(.news-gallery) .hb-item.is-first .hb-item__media,
.hb-block.big-thumb-left-box .hb-item.is-first .hb-item__hero {
  border-radius: 8px;
  overflow: hidden;
}

.hb-item__hero {
  position: relative;
  min-height: 320px;
  height: 470px;
  background-size: cover;
  background-position: center top;
  border-radius: 8px;
  overflow: hidden;
}

/* big_thumb: مطالب ۲+ با تامب کوچک کنار عنوان (بدون خلاصه) */
.hb-block.big-thumb-left-box .hb-item:not(.is-first) {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.75rem;
  align-items: center;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
}

.hb-block.big-thumb-left-box .hb-item:not(.is-first) .hb-item__media {
  aspect-ratio: 1;
  max-width: 110px;
}

.hb-block.big-thumb-left-box .hb-item:not(.is-first) .hb-item__media img {
  max-width: 110px;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.hb-block.big-thumb-left-box .hb-item:not(.is-first) .hb-item__excerpt,
.hb-block.big-thumb-left-box .hb-item:not(.is-first) .hb-item__more {
  display: none;
}

.hb-item__hero-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hb-item__hero-body {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 1.25rem 1.1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: #fff;
}

.hb-item__hero-body .hb-item__title a,
.hb-item__hero-body .hb-item__meta {
  color: #fff;
}

.hb-block__list--grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-auto-rows: minmax(160px, 1fr);
  gap: 4px;
  align-items: stretch;
}

.hb-block.big-first-gallery .hb-item.is-first {
  grid-row: span 2;
}

/* گالری #6: موزاییک تصویری بدون کارت سفید / پدینگ لیست */
.hb-block.news-gallery.big-first-gallery .hb-item,
.hb-block.news-gallery.big-first-gallery .hb-item:not(.is-first) {
  display: block;
  position: relative;
  min-height: 0;
  height: 100%;
  padding: 0;
  background: #0f172a;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.hb-block.news-gallery.big-first-gallery .hb-item.is-first {
  border-start-start-radius: 10px;
  border-end-start-radius: 10px;
}

.hb-block.news-gallery.big-first-gallery .hb-item:nth-child(2) {
  border-start-end-radius: 10px;
}

.hb-block.news-gallery.big-first-gallery .hb-item:last-child {
  border-end-end-radius: 10px;
}

.hb-item__thumb-link {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  background-size: cover;
  background-position: center;
  text-decoration: none;
}

.hb-block.big-first-gallery .hb-item.is-first .hb-item__thumb-link {
  min-height: 0;
}

.hb-item__thumb-title {
  position: absolute;
  inset: auto 0 0;
  margin: 0;
  padding: 0.85rem 0.75rem 0.7rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  z-index: 2;
}

.hb-item__thumb-title a {
  color: inherit;
  text-decoration: none;
}

.hb-item__hero-body .hb-item__title a,
.hb-overlay-post__body .hb-item__title a {
  color: #fff;
  text-decoration: none;
  position: relative;
  z-index: 3;
}

.hb-block.news-grid .hb-block__list--grid {
  grid-template-columns: repeat(4, 1fr);
}

.hb-block.news-grid .hb-item.is-first {
  grid-row: auto;
}

/* پیش‌فرض لیست مینی — جزئیات کامل در بخش mini-posts-box */
.hb-block__list--mini {
  display: grid;
  grid-template-columns: repeat(var(--hb-block-cols, 3), minmax(0, 1fr));
  gap: 1.35rem 1.5rem;
}

.hb-block__list--scroll,
.hb-block__list--scroll2 {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.9rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  cursor: grab;
  scrollbar-width: none;
  padding-bottom: 0.45rem;
}

.hb-block__list--scroll::-webkit-scrollbar,
.hb-block__list--scroll2::-webkit-scrollbar {
  display: none;
}

.hb-block__list--scroll.is-dragging,
.hb-block__list--scroll2.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.hb-block__list--scroll.is-dragging a,
.hb-block__list--scroll2.is-dragging a {
  pointer-events: none;
}

/*
 * اسکرول #1: کارت جدا با حاشیه/سایه تا آیتم‌ها واضح تفکیک شوند.
 */
.hb-block.scrolling-box:not(.scroll-2-box) .hb-block__list--scroll .hb-item,
.hb-block__list--scroll .hb-item {
  flex: 0 0 260px;
  width: 260px;
  max-width: 78vw;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 0.65rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.hb-block.scrolling-box:not(.scroll-2-box) .hb-block__list--scroll .hb-item:hover,
.hb-block__list--scroll .hb-item:hover {
  border-color: color-mix(in oklab, var(--hb-accent, #059669) 35%, rgba(15, 23, 42, 0.12));
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
}

.hb-block.scrolling-box:not(.scroll-2-box) .hb-item__media {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
}

.hb-block.scrolling-box:not(.scroll-2-box) .hb-item .hb-item__body {
  padding: 0.55rem 0.1rem 0.15rem;
}

.hb-block.scrolling-box:not(.scroll-2-box) .hb-item__meta {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  color: #666;
}

.hb-block.scrolling-box:not(.scroll-2-box) .hb-item__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.hb-block.scrolling-box:not(.scroll-2-box) .hb-item__title a {
  color: inherit;
  text-decoration: none;
}

.hb-block.scrolling-box:not(.scroll-2-box) .hb-item__title a:hover {
  color: var(--hb-accent, #059669);
}

@media (max-width: 560px) {
  .hb-block.scrolling-box:not(.scroll-2-box) .hb-block__list--scroll .hb-item,
  .hb-block__list--scroll .hb-item {
    flex-basis: min(72vw, 240px);
    width: min(72vw, 240px);
  }
}

/* اسکرول #2 — عنوان روی تصویر */
.hb-block__list--scroll2 .hb-scroll2-slide {
  position: relative;
  flex: 0 0 min(72%, 280px);
  scroll-snap-align: start;
  min-height: 200px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #1e293b;
}

.hb-scroll2-slide__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hb-scroll2-slide__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  padding: 10px;
}

.hb-scroll2-slide__overlay::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 65%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75));
  opacity: 0.5;
  transition: opacity 0.2s;
  pointer-events: none;
}

.hb-scroll2-slide:hover .hb-scroll2-slide__overlay::after {
  opacity: 0.9;
}

.hb-scroll2-slide__content {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
}

.hb-scroll2-slide .hb-item__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hb-scroll2-slide .hb-item__title a {
  color: #fff;
  text-decoration: none;
  pointer-events: auto;
}

/* بلوک #12: اورلی عنوان — ستون از --hb-block-cols (پیش‌فرض ۲) */
.hb-block.full-overlay-title:not(.center-overlay-title) .hb-block__list--overlay {
  display: grid;
  grid-template-columns: repeat(var(--hb-block-cols, 2), minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

/* بلوک #16: ستون از --hb-block-cols (پیش‌فرض ۳) */
.hb-block.center-overlay-title .hb-block__list--overlay {
  display: grid;
  grid-template-columns: repeat(var(--hb-block-cols, 3), minmax(0, 1fr));
  gap: 1.35rem 1.25rem;
  align-items: stretch;
}

.hb-overlay-post {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  border-radius: 12px;
}

.hb-overlay-post__media {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  border-radius: 0;
  overflow: hidden;
}

.hb-overlay-post__link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* #12: باکس سفید عنوان روی گوشه شروع تصویر (RTL = راست،) */
.hb-block.full-overlay-title:not(.center-overlay-title) .hb-overlay-post__body {
  position: absolute;
  inset: auto auto 0.85rem 0.85rem;
  inset-inline-start: 0.85rem;
  inset-inline-end: auto;
  bottom: 0.85rem;
  z-index: 2;
  max-width: min(92%, 420px);
  padding: 0.75rem 0.9rem;
  background: #fff;
  color: #0f172a;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}

.hb-block.full-overlay-title:not(.center-overlay-title) .hb-overlay-post__body .hb-item__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.hb-block.full-overlay-title:not(.center-overlay-title) .hb-overlay-post__body .hb-item__title a {
  color: #0f172a;
  text-decoration: none;
}

.hb-block.full-overlay-title:not(.center-overlay-title) .hb-overlay-post__body .hb-item__meta {
  margin: 0 0 0.35rem;
  color: #64748b;
  font-size: 0.78rem;
}

/*
 * #16 center-overlay-title:
 * کارت باکس‌دار (بک‌گراند سفید) + باکس عنوان روی پایین تصویر.
 */
.hb-block.center-overlay-title .hb-overlay-post.is-center {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  border-radius: 12px;
  padding: 0 0 0.85rem;
  box-sizing: border-box;
}

/* حتی با «فقط محتوا» باکس کارت بماند */
.hb-block.center-overlay-title.is-content-only .hb-overlay-post.is-center,
.hb-block.center-overlay-title.is-content-only .hb-overlay-post {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  border-radius: 12px;
  padding: 0 0 0.85rem;
}

.hb-block.center-overlay-title .hb-overlay-post.is-center .hb-overlay-post__media {
  aspect-ratio: 16 / 10;
  border-radius: 0;
  overflow: hidden;
}

.hb-block.center-overlay-title .hb-overlay-post.is-center .hb-overlay-post__body,
.hb-overlay-post.is-center .hb-overlay-post__body {
  position: relative;
  z-index: 2;
  inset: auto;
  max-width: none;
  display: block;
  width: auto;
  margin: -2.4rem 0.75rem 0;
  padding: 0.85rem 1rem 0.75rem;
  text-align: center;
  background: #fff;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.hb-overlay-post.is-center .hb-overlay-post__body .hb-item__meta {
  margin: 0 0 0.4rem;
  color: #666;
  font-size: 0.78rem;
}

.hb-overlay-post.is-center .hb-overlay-post__body .hb-item__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.4;
  color: #0f172a;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.hb-overlay-post.is-center .hb-overlay-post__body .hb-item__title a,
.hb-overlay-post.is-center .hb-overlay-post__body .hb-item__meta {
  color: inherit;
  text-decoration: none;
}

.hb-overlay-post.is-center .hb-overlay-post__body .hb-item__title a:hover {
  color: var(--hb-accent, #059669);
}

.hb-block.center-overlay-title .hb-overlay-post .hb-item__excerpt,
.hb-overlay-post .hb-item__excerpt {
  flex: 1 1 auto;
  margin: 0.65rem 0.85rem 0;
  padding: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #666;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

/*
 * بلوک #15 (miscellaneous / first_big): هیرو تمام‌عرض + کارت‌های زیر آن
 * — ستون از --hb-block-cols (پیش‌فرض ۳).
 */
.hb-block.miscellaneous-box .hb-block__list--large_above {
  display: grid;
  grid-template-columns: repeat(var(--hb-block-cols, 3), minmax(0, 1fr));
  gap: 1rem 1.15rem;
  align-items: start;
}

.hb-block.miscellaneous-box .hb-block__list--large_above .hb-item.is-first {
  grid-column: 1 / -1;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  overflow: hidden;
  border-radius: 12px;
}

.hb-block.miscellaneous-box .hb-item.is-first .hb-item__hero {
  min-height: 280px;
  height: clamp(280px, 42vw, 520px);
  border-radius: 12px;
}

.hb-block.miscellaneous-box .hb-item.is-first .hb-item__hero-body .hb-item__title {
  margin: 0.35rem 0 0.25rem;
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
}

.hb-block.miscellaneous-box .hb-item.is-first .hb-item__cat {
  display: inline-flex;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, #fff 55%, var(--hb-accent, #059669));
  background: color-mix(in oklab, #fff 78%, var(--hb-accent, #059669));
  color: var(--hb-pastel-fg, #047857);
  font-size: 0.75rem;
  font-weight: 700;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* مطالب فرعی: کارت عمودی (نه ۹۰px افقی has-first-big) */
.hb-block.miscellaneous-box.has-first-big-post .hb-item:not(.is-first),
.hb-block.miscellaneous-box .hb-block__list--large_above .hb-item:not(.is-first) {
  display: flex;
  flex-direction: column;
  gap: 0;
  grid-template-columns: none;
  align-items: stretch;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  border-radius: 12px;
}

.hb-block.miscellaneous-box.has-first-big-post .hb-item:not(.is-first) .hb-item__media,
.hb-block.miscellaneous-box .hb-block__list--large_above .hb-item:not(.is-first) .hb-item__media {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 10;
  border-radius: 0;
  overflow: hidden;
}

.hb-block.miscellaneous-box .hb-item:not(.is-first) .hb-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hb-block.miscellaneous-box .hb-item:not(.is-first) .hb-item__body {
  flex: 1 1 auto;
  padding: 0.65rem 0.75rem 0.85rem;
  min-width: 0;
}

.hb-block.miscellaneous-box .hb-item:not(.is-first) .hb-item__title {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.hb-block.miscellaneous-box .hb-item:not(.is-first) .hb-item__cat {
  display: none;
}

/* (استایل کامل #18 بالاتر در two-columns-small-thumb تعریف شده) */

/* —— اسلایدر مجله‌ای (چیدمان مجله) —— */
.hb-slider-area {
  --hb-slider-cols: 1fr;
  --hb-slider-cols-m: 1fr;
  --hb-slider-h: 380px;
  --hb-slider-h-fw: 470px;
  --hb-slider-h-m: 280px;
  --hb-slider-gap: 4px;
  margin-bottom: 1.75rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.hb-slider-area .hb-slider__inner {
  padding: 0;
}

.hb-slider-area .hb-block__head {
  margin: 0 0 0.75rem;
  padding: 0 0 0.45rem;
}

.hb-slider__viewport {
  position: relative;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}

.hb-slider__viewport.is-swiping {
  cursor: grabbing;
}

.hb-slider__nav {
  position: absolute;
  z-index: 5;
  top: 10px;
  inset-inline-end: 10px;
  display: flex;
  gap: 4px;
}

.hb-slider__arrow {
  width: 36px;
  height: 36px;
  border: 1px solid color-mix(in oklab, #fff 50%, var(--hb-accent, #059669));
  border-radius: 999px;
  background: color-mix(in oklab, #fff 78%, var(--hb-accent, #059669));
  color: var(--hb-pastel-fg, #047857);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hb-slider__arrow:hover {
  background: color-mix(in oklab, #fff 62%, var(--hb-accent, #059669));
  color: var(--hb-pastel-fg, #047857);
  border-color: color-mix(in oklab, var(--hb-accent, #059669) 35%, #fff);
}

.hb-slider__slide {
  display: none;
  grid-template-columns: var(--hb-slider-cols);
  grid-auto-rows: 1fr;
  gap: var(--hb-slider-gap);
  height: var(--hb-slider-h);
}

.hb-slider-area.hb-slider--grid .hb-slider__slide.is-active,
.hb-slider-area.hb-slider--wide .hb-slider__slide.is-active,
.hb-slider-area.hb-slider--grid .hb-slider__slide:not([hidden]),
.hb-slider-area.hb-slider--wide .hb-slider__slide:not([hidden]) {
  display: grid;
}

.hb-slider-area.hb-slider--wide .hb-slider__slide {
  grid-template-columns: 1fr;
  height: var(--hb-slider-h-fw, 480px);
}

.hb-slider-area.hb-slider--wide .hb-grid-item__title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

/* multi: اسلایدر ۲/۵/۶/۷ — چند پست هم‌زمان */
.hb-slider-area.hb-slider--multi .hb-slider__track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  cursor: grab;
  scrollbar-width: none;
}

.hb-slider-area.hb-slider--multi .hb-slider__track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.hb-slider-area.hb-slider--multi .hb-slider__track.is-dragging a {
  pointer-events: none;
}

.hb-slider-area.hb-slider--multi .hb-slider__track::-webkit-scrollbar {
  display: none;
}

.hb-slider-area.hb-slider--multi .hb-slider__slide {
  display: block !important;
  flex: 0 0 calc((100% - (var(--hb-visible, 3) - 1) * 8px) / var(--hb-visible, 3));
  height: var(--hb-slider-h, 320px);
  scroll-snap-align: start;
  min-width: 0;
}

.hb-slider-area.hb-slider--multi .hb-grid-item {
  height: 100%;
}

/* اسلایدر ۲ — سه اسلاید عریض */
.hb-slider-n-2.hb-slider--multi .hb-slider__slide {
  flex-basis: calc((100% - 16px) / 3);
  height: 390px;
}

/* اسلایدر ۵ — سه اسلاید boxed */
.hb-slider-n-5.hb-slider--multi .hb-slider__slide {
  flex-basis: calc((100% - 16px) / 3);
  height: 318px;
}

/* اسلایدر ۶ — پنج اسلاید کوتاه */
.hb-slider-n-6.hb-slider--multi .hb-slider__slide {
  flex-basis: calc((100% - 32px) / 5);
  height: 155px;
}
.hb-slider-n-6 .hb-grid-item__title {
  font-size: 0.88rem;
}
.hb-slider-n-6 .hb-grid-item__meta,
.hb-slider-n-6 .hb-grid-item__desc {
  display: none;
}

/* اسلایدر ۷ — سه اسلاید بلند */
.hb-slider-n-7.hb-slider--multi .hb-slider__slide {
  flex-basis: calc((100% - 8px) / 3);
  height: 440px;
}

.hb-slider-n-1.hb-slider--wide .hb-slider__slide {
  height: 400px;
}
.hb-slider-n-3.hb-slider--wide .hb-slider__slide,
.hb-slider-n-4.hb-slider--wide .hb-slider__slide,
.hb-slider-n-50.hb-slider--wide .hb-slider__slide {
  height: 400px;
}
.hb-slider-n-8.hb-slider--wide .hb-slider__slide {
  height: 380px;
}

.home-blog-section--sidebar-full .hb-slider-n-1 .hb-slider__slide,
.home-blog-section--sidebar-full .hb-slider-n-3 .hb-slider__slide,
.home-blog-section--sidebar-full .hb-slider-n-4 .hb-slider__slide,
.home-blog-section--sidebar-full .hb-slider-n-8 .hb-slider__slide,
.home-blog-section--sidebar-full .hb-slider-n-50 .hb-slider__slide,
.home-blog-section--stretch .hb-slider-n-1 .hb-slider__slide,
.home-blog-section--stretch .hb-slider-n-3 .hb-slider__slide,
.home-blog-section--stretch .hb-slider-n-4 .hb-slider__slide,
.home-blog-section--stretch .hb-slider-n-8 .hb-slider__slide,
.home-blog-section--stretch .hb-slider-n-50 .hb-slider__slide {
  height: 500px;
}

/* عنوان وسط‌چین اسلایدر ۳/۴ */
.hb-slider-area.centered-title-slider .hb-grid-item__overlay {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 10%, rgba(0, 0, 0, 0.72) 100%);
}
.hb-slider-area.centered-title-slider .hb-grid-item__content {
  max-width: 650px;
  margin-inline: auto;
}
.hb-slider-area.centered-title-slider .hb-grid-item__title {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

/* نوار ناوبری اسلایدر ۴ / ۱۸ — بدون اسکرول افقی؛ همه تب‌ها در یک ردیف */
.hb-slider__navstrip {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  overflow: hidden;
  margin-top: 0;
  background: rgba(0, 0, 0, 0.3);
  min-height: 96px;
  max-width: 100%;
}
.hb-slider__navitem {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  appearance: none;
  border: 0;
  border-bottom: 5px solid transparent;
  background: transparent;
  color: #fff;
  text-align: start;
  padding: 0.85rem 0.55rem;
  cursor: pointer;
  box-sizing: border-box;
}
.hb-slider__navitem.is-active {
  border-bottom-color: color-mix(in oklab, var(--hb-accent, #059669) 55%, #fff);
  background: color-mix(in oklab, var(--hb-accent, #059669) 22%, transparent);
}
.hb-slider__navitem-meta {
  display: block;
  font-size: 0.72rem;
  opacity: 0.75;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hb-slider__navitem-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}
/*
 * اسلایدر #18 (slider_50): نوار عمودی روی خود تصویر می‌نشیند
 * (نه ستون جدا با padding)، مثل .vertical-slider-nav مرجع.
 */
.hb-slider-area.slider-vertical-navigation .hb-slider__viewport {
  padding-inline-end: 0;
  overflow: hidden;
  border-radius: 15px;
}
.hb-slider-area.slider-vertical-navigation .hb-grid-item,
.hb-slider-area.slider-vertical-navigation .hb-slider__slide {
  border-radius: 15px;
}
.hb-slider-area.slider-vertical-navigation .hb-grid-item__overlay {
  align-items: flex-start;
  justify-content: center;
  padding: 90px 40px 40px;
}
.hb-slider-area.slider-vertical-navigation .hb-grid-item__content {
  max-width: min(60%, 650px);
  margin-inline-end: auto;
  margin-inline-start: 0;
}
.hb-slider-area.slider-vertical-navigation .hb-slider__nav {
  inset-inline-end: 15px;
  top: 12px;
}

.hb-slider__navstrip--vertical {
  position: absolute;
  inset-inline-end: 0;
  top: 0;
  bottom: 0;
  width: 30%;
  max-width: 350px;
  height: auto;
  min-height: 0;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0;
  padding: 0 15px;
  background: transparent;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 3;
}
.hb-slider__navstrip--vertical::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.hb-slider__navstrip--vertical .hb-slider__navitem {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-bottom: 0;
  margin: 0 0 20px;
  padding: 20px 0;
  opacity: 0.5;
  background: transparent;
  color: #fff;
  text-align: start;
  font-weight: 300;
  transition: opacity 0.3s ease;
}
.hb-slider__navstrip--vertical .hb-slider__navitem.is-active {
  opacity: 1;
  background: transparent;
  border-bottom-color: transparent;
}
.hb-slider__navstrip--vertical .hb-slider__navitem-meta {
  display: none;
}
.hb-slider__navstrip--vertical .hb-slider__navitem-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  max-height: 2.8em;
  font-size: 19px;
  font-weight: 300;
  line-height: 1.4;
  color: #fff;
}

/* ماسک رنگی اسلایدر */
.hb-slider-area.slide-mask .hb-grid-item__overlay {
  background: transparent;
}
.hb-slider-area.slide-mask .hb-grid-item__overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.7;
  z-index: -1;
}
.hb-slider-area.slide-mask .tie-slide-1 .hb-grid-item__overlay::after,
.hb-slider-area.slide-mask .hb-grid-item.tie-slide-1 .hb-grid-item__overlay::after {
  background-image: linear-gradient(135deg, #67b26f, #4ca2cd);
}
.hb-slider-area.slide-mask .hb-grid-item.tie-slide-2 .hb-grid-item__overlay::after {
  background-image: linear-gradient(-135deg, #d38312, #002f4b);
}
.hb-slider-area.slide-mask .hb-grid-item.tie-slide-3 .hb-grid-item__overlay::after {
  background-image: linear-gradient(135deg, #292484, #dc4225);
}
.hb-slider-area.slide-mask .hb-grid-item.tie-slide-4 .hb-grid-item__overlay::after {
  background-image: linear-gradient(-135deg, #e0be00, #dc4225);
}
.hb-slider-area.slide-mask .hb-grid-item.tie-slide-5 .hb-grid-item__overlay::after {
  background-image: linear-gradient(135deg, #5f2c82, #49a09d);
}
.hb-slider-area.slide-mask .hb-grid-item.tie-slide-6 .hb-grid-item__overlay::after {
  background-image: linear-gradient(135deg, #7474bf, #348ac7);
}

.hb-slider-area.is-slider-overlay-disabled .hb-grid-item__overlay {
  background: rgba(0, 0, 0, 0.05);
}

/* هاور: نمایش خلاصه روی اسلاید اصلی */
@media (min-width: 768px) {
  .hb-slider-area .hb-grid-item:hover .hb-grid-item__desc {
    max-height: 100px;
    opacity: 1;
    margin-top: 0.35rem;
  }
  .hb-slider-n-10 .hb-grid-item:nth-child(1) .hb-grid-item__desc,
  .hb-slider-n-13 .hb-grid-item:nth-child(1) .hb-grid-item__desc,
  .hb-slider-n-14 .hb-grid-item:nth-child(1) .hb-grid-item__desc,
  .hb-slider-n-16 .hb-grid-item:nth-child(1) .hb-grid-item__desc,
  .hb-slider-n-17 .hb-grid-item:nth-child(1) .hb-grid-item__desc {
    max-height: 100px;
    opacity: 1;
    margin-top: 0.35rem;
  }
}


.hb-grid-item {
  position: relative;
  overflow: hidden;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  min-height: 0;
  height: 100%;
}

.hb-grid-item__link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hb-grid-item__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding: 1rem 1.1rem 0.9rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 20%, rgba(0, 0, 0, 0.82) 100%);
  color: #fff;
  pointer-events: none;
}

/* اسلاید ناقص: همان گرید اسلایدر می‌ماند؛ فقط سلول‌های خالی پر نمی‌شوند */
.hb-slider__slide.is-partial .hb-grid-item:only-child {
  grid-area: 1 / 1 / -1 / -1;
}

.hb-slider-area.no-gradient .hb-grid-item__overlay {
  background: transparent;
}

.hb-slider-area.has-colored-mask .hb-grid-item__overlay {
  background: linear-gradient(transparent 30%, color-mix(in oklab, var(--hb-accent, #059669) 75%, #000));
}

.hb-grid-item__content {
  width: 100%;
  pointer-events: auto;
}

.hb-grid-item__cat {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  background: var(--hb-accent, #059669);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.hb-grid-item__meta {
  font-size: 0.78rem;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.hb-grid-item__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 800;
}

.hb-grid-item__title a {
  color: #fff;
  text-decoration: none;
}

.hb-grid-item__desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease-out, max-height 0.4s ease-out, margin 0.4s;
}

/* Slider layouts — معادل CSS متغیرهای اسلایدر */
.hb-slider-n-9 { --hb-slider-cols: repeat(2, 1fr); --hb-slider-h-fw: 400px; }
.hb-slider-n-10 { --hb-slider-cols: repeat(3, 1fr); --hb-slider-cols-m: repeat(2, 1fr); --hb-slider-h-m: 500px; }
.hb-slider-n-11 { --hb-slider-cols: repeat(2, 1fr); --hb-slider-h-fw: 500px; --hb-slider-h-m: 500px; }
.hb-slider-n-12 { --hb-slider-cols: repeat(6, 1fr); --hb-slider-cols-m: repeat(2, 1fr); --hb-slider-h-fw: 500px; --hb-slider-h-m: 700px; }
.hb-slider-n-13 { --hb-slider-cols: repeat(4, 1fr); --hb-slider-cols-m: repeat(2, 1fr); --hb-slider-h-m: 700px; }
.hb-slider-n-14 { --hb-slider-cols: repeat(4, 1fr); --hb-slider-cols-m: repeat(2, 1fr); --hb-slider-h-m: 700px; }
.hb-slider-n-15 { --hb-slider-cols: repeat(3, 1fr); --hb-slider-cols-m: repeat(2, 1fr); --hb-slider-h-m: 700px; }
.hb-slider-n-16 { --hb-slider-cols: repeat(4, 1fr); --hb-slider-cols-m: repeat(2, 1fr); --hb-slider-h-m: 500px; }
.hb-slider-n-17 { --hb-slider-cols: repeat(4, 1fr); --hb-slider-cols-m: repeat(2, 1fr); --hb-slider-h-m: 500px; }

.hb-slider-n-10 .hb-grid-item:nth-child(1),
.hb-slider-n-17 .hb-grid-item:nth-child(1) {
  grid-area: 1 / 1 / 3 / 3;
}

.hb-slider-n-10 .hb-grid-item:nth-child(1) .hb-grid-item__title,
.hb-slider-n-13 .hb-grid-item:nth-child(1) .hb-grid-item__title,
.hb-slider-n-14 .hb-grid-item:nth-child(1) .hb-grid-item__title,
.hb-slider-n-16 .hb-grid-item:nth-child(1) .hb-grid-item__title,
.hb-slider-n-17 .hb-grid-item:nth-child(1) .hb-grid-item__title {
  font-size: 1.45rem;
}

.hb-slider-n-13 .hb-grid-item:nth-child(1) {
  grid-area: 1 / 2 / 3 / 4;
}

.hb-slider-n-14 .hb-grid-item:nth-child(1) {
  grid-area: 1 / 1 / 3 / 3;
}

.hb-slider-n-11 .hb-grid-item:nth-child(odd):last-child {
  grid-area: 2 / 1 / 3 / 3;
}

/* اسلایدر ۱۲ — موبایل: پست اول ۲×۲؛ دسکتاپ: چیدمان ۵تایی */
.hb-slider-n-12 .hb-grid-item:nth-child(1) {
  grid-area: 1 / 1 / 3 / 3;
}
@media (min-width: 768px) {
  .hb-slider-n-12 .hb-grid-item:nth-child(1) {
    grid-area: 1 / 1 / 2 / 4;
  }
  .hb-slider-n-12 .hb-grid-item:nth-child(2) {
    grid-area: 1 / 4 / 2 / 7;
  }
  .hb-slider-n-12 .hb-grid-item:nth-child(3) {
    grid-area: 2 / 1 / 3 / 3;
  }
  .hb-slider-n-12 .hb-grid-item:nth-child(4) {
    grid-area: 2 / 3 / 3 / 5;
  }
  .hb-slider-n-12 .hb-grid-item:nth-child(5) {
    grid-area: 2 / 5 / 3 / 7;
  }
}

.hb-slider-n-16 .hb-grid-item:nth-child(1) {
  grid-area: 1 / 1 / 3 / 3;
}
.hb-slider-n-16 .hb-grid-item:nth-child(2) {
  grid-area: 1 / 3 / 2 / 5;
}
.hb-slider-n-16 .hb-grid-item:nth-child(3) {
  grid-area: 2 / 3 / 3 / 4;
}
.hb-slider-n-16 .hb-grid-item:nth-child(4) {
  grid-area: 2 / 4 / 3 / 5;
}

.hb-slider-n-17 .hb-grid-item:nth-child(1) {
  grid-area: 1 / 1 / 2 / 3;
}

@media (max-width: 767px) {
  .hb-slider__slide {
    grid-template-columns: var(--hb-slider-cols-m, var(--hb-slider-cols));
    height: var(--hb-slider-h-m);
  }

  .hb-slider-n-10 .hb-grid-item:nth-child(1),
  .hb-slider-n-12 .hb-grid-item,
  .hb-slider-n-13 .hb-grid-item:nth-child(1),
  .hb-slider-n-14 .hb-grid-item:nth-child(1),
  .hb-slider-n-16 .hb-grid-item,
  .hb-slider-n-17 .hb-grid-item:nth-child(1),
  .hb-slider-n-11 .hb-grid-item:nth-child(odd):last-child {
    grid-area: auto;
  }

  .hb-slider-n-14 .hb-grid-item:nth-child(1) {
    grid-area: 1 / 1 / 3 / 3;
  }

  .hb-grid-item__title {
    font-size: 0.95rem !important;
  }

  .hb-grid-item__meta,
  .hb-grid-item__desc {
    display: none;
  }
}

@media (max-width: 670px) {
  .hb-item__hero {
    height: 325px;
    min-height: 280px;
  }
}

@media (max-width: 960px) {
  .home-blog-section--sidebar-right .home-blog-section__body,
  .home-blog-section--sidebar-left .home-blog-section__body {
    grid-template-columns: 1fr;
  }

  .home-blog-section--sidebar-left .home-blog-section__sidebar {
    order: 0;
  }

  .home-blog-section--sticky-sidebar .home-blog-section__sidebar {
    position: static;
  }

  .home-blog-section__main > .hb-block.half-box {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }

  .hb-block.half-box,
  .hb-block.big-post-left-box .hb-block__list--large_first,
  .hb-block.big-post-left-box .hb-block__list--big_thumb,
  .hb-block.big-post-top-box .hb-block__list--large_first,
  .hb-block.big-post-top-box .hb-block__list--two_cols,
  .hb-block__list--grid,
  .hb-block.news-grid .hb-block__list--grid,
  .hb-block__list--mini,
  .hb-block.mini-posts-box .hb-block__list--mini,
  .hb-block.wide-post-box .hb-block__list--default .hb-item,
  .hb-block.has-first-big-post .hb-item:not(.is-first) {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .hb-block.big-posts-box .hb-block__list--big {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hb-block.big-post-left-box .hb-item.is-first,
  .hb-block.big-first-gallery .hb-item.is-first {
    grid-row: auto;
    grid-column: auto;
  }

  /* موبایل: سلول‌های گالری با thumb مطلق ارتفاع نگیرند */
  .hb-block.news-gallery.big-first-gallery .hb-item {
    min-height: 210px;
    border-radius: 10px;
  }

  .hb-slider-area.hb-slider--multi .hb-slider__slide {
    flex-basis: 85% !important;
    height: 280px !important;
  }

  .hb-slider-n-6.hb-slider--multi .hb-slider__slide {
    height: 180px !important;
  }

  .hb-slider__navstrip:not(.hb-slider__navstrip--vertical) {
    display: none;
  }

  .hb-slider-area.slider-vertical-navigation .hb-slider__viewport {
    padding-inline-end: 0;
  }

  .hb-slider__navstrip--vertical {
    display: none;
  }
}

@media (max-width: 960px) {
  .hb-block.timeline-box .hb-timeline-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hb-block.miscellaneous-box .hb-block__list--large_above {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hb-block.center-overlay-title .hb-block__list--overlay {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hb-block.small-wide-post-box .hb-block__list--default {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hb-block.two-columns-small-thumb .hb-block__list--two_cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .hb-block.miscellaneous-box .hb-block__list--large_above {
    grid-template-columns: 1fr;
  }

  .hb-block.miscellaneous-box .hb-item.is-first .hb-item__hero {
    height: 260px;
    min-height: 220px;
  }

  .hb-block.big-posts-box .hb-block__list--big {
    grid-template-columns: 1fr;
  }

  .hb-block.full-overlay-title .hb-block__list--overlay {
    grid-template-columns: 1fr;
  }

  .hb-block.timeline-box .hb-timeline-cols {
    grid-template-columns: 1fr;
  }

  .hb-block.small-wide-post-box .hb-block__list--default {
    grid-template-columns: 1fr;
  }

  .hb-block.two-columns-small-thumb .hb-block__list--two_cols {
    grid-template-columns: 1fr;
  }
}
