/* SaharShop blog listing — woodabtin.ir/blog-2 inspired horizontal posts */

body.lang-rtl.module-iblog-main #main,
body.lang-rtl.module-iblog-category #main,
body.lang-rtl.module-iblog-content #main {
  max-width: 1140px;
}

body.lang-rtl .sb-pagehead {
  margin: 0 0 1.35rem;
  padding: 0.15rem 0 1.15rem;
  border-bottom: 1px solid #e8ebf3;
}

body.lang-rtl .sb-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.55rem;
  font-size: 0.84rem;
  color: #64748b;
}

body.lang-rtl .sb-breadcrumb a {
  color: #64748b;
  text-decoration: none;
}

body.lang-rtl .sb-breadcrumb a:hover {
  color: #f51a76;
}

body.lang-rtl .sb-pagehead__title {
  margin: 0;
  font-size: clamp(1.7rem, 2.5vw, 2.25rem);
  font-weight: 900;
  color: #0f172a;
  line-height: 1.25;
}

body.lang-rtl .sb-pagehead__lead {
  margin: 0.55rem 0 0;
  max-width: 36rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #64748b;
}

body.lang-rtl .sb-home-feed {
  margin: 0;
}

body.lang-rtl .sb-home-feed .sb-item:first-child {
  padding-top: 1.35rem;
}

body.lang-rtl .sb-empty {
  margin-top: 1rem;
  border: 0;
  border-radius: 14px;
}

/* Hide leftover legacy category/featured chrome if still rendered elsewhere */
body.lang-rtl.module-iblog-main .blog-categories,
body.lang-rtl.module-iblog-main .sb-cats,
body.lang-rtl.module-iblog-main .blog-featured-header,
body.lang-rtl.module-iblog-main .blog-most-viewed-header,
body.lang-rtl.module-iblog-main .sb-sectionhead {
  display: none !important;
}

body.lang-rtl .sb-sectionhead {
  margin: 0 0 1.15rem;
}

body.lang-rtl .sb-sectionhead__title,
body.lang-rtl .blog-featured-title,
body.lang-rtl .blog-most-viewed-title,
body.lang-rtl .blog-categories-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
}

/* Category chips */
body.lang-rtl .sb-cats__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

body.lang-rtl .sb-cats__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

body.lang-rtl .sb-cats__chip:hover {
  border-color: #f9a8c9;
  background: #fdf2f8;
  color: #be185d;
}

/* Kill legacy card chrome when list is used */
body.lang-rtl .blog-categories .card,
body.lang-rtl .blog-categories .row.no-gutters {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Horizontal post rows */
body.lang-rtl .sb-list.blog-contents-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

body.lang-rtl .sb-item {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #dfe2ed;
  background: transparent;
  box-shadow: none;
}

body.lang-rtl .sb-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

body.lang-rtl .sb-item__media {
  flex: 0 0 280px;
  width: 280px;
  max-width: 42%;
}

body.lang-rtl .sb-item__thumb {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #f1f5f9;
  aspect-ratio: 3 / 2;
}

body.lang-rtl .sb-item__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

body.lang-rtl .sb-item__body {
  flex: 1 1 auto;
  min-width: 0;
  align-self: center;
}

body.lang-rtl .sb-item__cat {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
}

body.lang-rtl .sb-item__cat a {
  color: #64748b;
  text-decoration: none;
}

body.lang-rtl .sb-item__cat a:hover {
  color: #f51a76;
}

body.lang-rtl .sb-item__title {
  margin: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  font-weight: 800;
  line-height: 1.55;
  color: #0f172a;
}

body.lang-rtl .sb-item__title a {
  color: inherit;
  text-decoration: none;
}

body.lang-rtl .sb-item__title a:hover {
  color: #be185d;
}

body.lang-rtl .sb-item__excerpt {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #475569;
}

body.lang-rtl .sb-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.5;
}

body.lang-rtl .sb-item__meta strong {
  font-weight: 700;
  color: #475569;
}

/* Category page: strip heavy card wrapper around count */
body.lang-rtl.module-iblog-category .category-contents > .card.card-block {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0.35rem 0 1rem !important;
  margin-bottom: 0.5rem !important;
}

body.lang-rtl.module-iblog-category .blog-category > .card {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin-bottom: 1.25rem !important;
}

body.lang-rtl.module-iblog-category .blog-category .card-title {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 900;
  color: #0f172a;
}

@media (max-width: 767.98px) {
  body.lang-rtl .sb-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.95rem;
    padding: 1.25rem 0;
  }

  body.lang-rtl .sb-item__media {
    flex: none;
    width: 100%;
    max-width: none;
  }

  body.lang-rtl .sb-item__thumb {
    border-radius: 14px;
  }

  body.lang-rtl .sb-item__title {
    font-size: 1.05rem;
  }

  body.lang-rtl .sb-item__meta {
    margin-top: 0.65rem;
  }
}

@media (min-width: 992px) {
  body.lang-rtl .sb-item {
    gap: 2rem;
    padding: 1.75rem 0 2rem;
  }

  body.lang-rtl .sb-item__media {
    flex-basis: 320px;
    width: 320px;
  }
}
