/*
 * Javaheri Bina Blog UI — v3.0.2 HOTFIX
 * Important: intentionally scoped. It must not restyle the custom product/home sections.
 */

body.jba-blog-context,
body.jba-blog-home {
  --jba-green: #0b4d35;
  --jba-green-dark: #073b29;
  --jba-green-soft: #eef6f1;
  --jba-gold: #c79a2b;
  --jba-gold-soft: #fbf5e7;
  --jba-text: #202723;
  --jba-muted: #737b77;
  --jba-border: #e7eae7;
  --jba-surface: #ffffff;
  --jba-bg: #f6f7f5;
  --jba-shadow: 0 10px 32px rgba(18, 50, 38, .07);
  direction: rtl;
  font-family: 'Iransans', Tahoma, sans-serif !important;
}

body.jba-blog-context h1,
body.jba-blog-context h2,
body.jba-blog-context h3,
body.jba-blog-context h4,
body.jba-blog-home .post-item h1,
body.jba-blog-home .post-item h2,
body.jba-blog-home .post-item h3,
body.jba-blog-home .post-item h4 {
  letter-spacing: 0;
}

/* Header: polish only; do not alter its structure. */
body.jba-blog-context .header-wrapper,
body.jba-blog-home .header-wrapper,
body.jba-blog-context .header-wrapper.stuck,
body.jba-blog-home .header-wrapper.stuck {
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: 0 1px 0 rgba(11, 77, 53, .08), 0 7px 26px rgba(22, 44, 35, .04) !important;
}

body.jba-blog-context .header-main .nav > li > a,
body.jba-blog-home .header-main .nav > li > a {
  color: #344039 !important;
  font-family: 'Iransans', Tahoma, sans-serif !important;
  font-size: 13px;
  font-weight: 600;
}

body.jba-blog-context .header-main .nav > li > a:hover,
body.jba-blog-home .header-main .nav > li > a:hover,
body.jba-blog-context .header-main .nav > li.active > a,
body.jba-blog-home .header-main .nav > li.active > a {
  color: var(--jba-green) !important;
}

body.jba-blog-context .nav-dropdown,
body.jba-blog-home .nav-dropdown {
  direction: rtl;
  border: 1px solid var(--jba-border) !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 16px 42px rgba(15, 45, 33, .12) !important;
}

body.jba-blog-context .nav-dropdown > li > a,
body.jba-blog-home .nav-dropdown > li > a {
  color: #46504b !important;
  font-family: 'Iransans', Tahoma, sans-serif !important;
  font-size: 12px !important;
  line-height: 1.8 !important;
}

/* Search: safe on blog pages and blog home. */
body.jba-blog-context form.searchform,
body.jba-blog-home form.searchform {
  direction: rtl;
  margin: 0;
}

body.jba-blog-context form.searchform .flex-row,
body.jba-blog-home form.searchform .flex-row {
  overflow: hidden;
  border: 1px solid #dfe4e0;
  border-radius: 12px;
  background: #f7f9f7;
}

body.jba-blog-context form.searchform:focus-within .flex-row,
body.jba-blog-home form.searchform:focus-within .flex-row {
  border-color: rgba(11, 77, 53, .38);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(11, 77, 53, .06);
}

body.jba-blog-context form.searchform input.search-field,
body.jba-blog-home form.searchform input.search-field {
  height: 44px;
  padding: 0 14px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--jba-text);
  font-family: 'Iransans', Tahoma, sans-serif;
  font-size: 12px;
  text-align: right;
}

body.jba-blog-context form.searchform input.search-field::placeholder,
body.jba-blog-home form.searchform input.search-field::placeholder {
  color: #8a928e;
  opacity: 1;
}

body.jba-blog-context form.searchform .ux-search-submit,
body.jba-blog-home form.searchform .ux-search-submit {
  width: 46px;
  min-width: 46px;
  height: 44px;
  min-height: 44px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: var(--jba-green) !important;
  color: #fff !important;
  box-shadow: none !important;
}

body.jba-blog-context .live-search-results,
body.jba-blog-home .live-search-results {
  direction: rtl;
  text-align: right !important;
}

/* Blog archive/category/search only. */
body.jba-blog-context:not(.jba-blog-single) .blog-wrapper {
  padding-top: 30px;
  padding-bottom: 55px;
}

body.jba-blog-context .blog-wrapper > .row,
body.jba-blog-context .archive-page-header > .row {
  max-width: 1220px;
}

body.jba-blog-context .archive-page-header .large-12.col {
  margin-bottom: 22px;
  padding: 22px 24px;
  border: 1px solid var(--jba-border);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff, #f7faf8);
  box-shadow: var(--jba-shadow);
  text-align: right !important;
}

body.jba-blog-context .archive-page-header .page-title,
body.jba-blog-context .archive-page-header .page-title h1 {
  margin: 0;
  color: var(--jba-green-dark);
  font-family: 'Estedad', 'Iransans', Tahoma, sans-serif !important;
  font-size: 24px;
  line-height: 1.7;
  text-transform: none !important;
}

body.jba-blog-context .archive-page-header .taxonomy-description {
  width: auto;
  height: auto !important;
  max-height: none;
  overflow: visible !important;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--jba-muted);
  font-size: 13px;
  line-height: 2;
  text-align: right;
}

/* Real Flatsome archive uses #post-list + blog_posts shortcode. */
body.jba-blog-context #post-list .post-item {
  margin-bottom: 18px;
}

body.jba-blog-context #post-list .post-item > .col-inner,
body.jba-blog-context #post-list .post-item .col-inner {
  min-height: 0 !important;
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid var(--jba-border) !important;
  border-radius: 18px !important;
  background: var(--jba-surface) !important;
  box-shadow: var(--jba-shadow) !important;
  transition: transform .22s ease, box-shadow .22s ease !important;
}

body.jba-blog-context #post-list .post-item .col-inner:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(18, 50, 38, .1) !important;
}

body.jba-blog-context #post-list .post-item .box-image {
  overflow: hidden;
  border-radius: 0 !important;
  background: #eef1ef;
}

body.jba-blog-context #post-list .post-item .box-image img {
  transition: transform .35s ease;
}

body.jba-blog-context #post-list .post-item:hover .box-image img {
  transform: scale(1.015);
}

body.jba-blog-context #post-list .post-item .box-text {
  padding: 20px 21px !important;
  text-align: right !important;
}

body.jba-blog-context #post-list .post-item .post-title,
body.jba-blog-context #post-list .post-item .post-title a,
body.jba-blog-context #post-list .post-item .box-text a:not(.button) {
  color: var(--jba-green-dark) !important;
  font-family: 'Estedad', 'Iransans', Tahoma, sans-serif !important;
  font-size: 17px !important;
  line-height: 1.9 !important;
  text-shadow: none !important;
}

body.jba-blog-context #post-list .post-item .is-divider {
  display: none !important;
}

body.jba-blog-context #post-list .post-item .from_the_blog_excerpt,
body.jba-blog-context #post-list .post-item .box-text p {
  color: #59635e;
  font-family: 'Iransans', Tahoma, sans-serif;
  font-size: 12px;
  line-height: 2;
  text-align: right;
}

body.jba-blog-context #post-list .post-item .button,
body.jba-blog-context #post-list .post-item a.button,
body.jba-blog-context #post-list .post-item .more-link {
  min-height: 38px;
  margin-top: 10px;
  padding: 7px 14px;
  border: 1px solid #d8e4dc;
  border-radius: 10px;
  background: #f5faf7;
  color: var(--jba-green) !important;
  box-shadow: none;
  font-family: 'Iransans', Tahoma, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.7;
  text-transform: none;
}

body.jba-blog-context #post-list .post-item .button:hover,
body.jba-blog-context #post-list .post-item .more-link:hover {
  border-color: var(--jba-green);
  background: var(--jba-green);
  color: #fff !important;
}

body.jba-blog-context #post-list .badge.post-date {
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--jba-green-dark);
  box-shadow: 0 7px 20px rgba(15, 45, 33, .12);
}

body.jba-blog-context #post-list .badge.post-date .badge-inner {
  border: 0 !important;
  background: #fff !important;
  color: var(--jba-green-dark) !important;
  font-family: 'Iransans', Tahoma, sans-serif;
}

/* Sidebar only when it is actually the post sidebar. */
body.jba-blog-context .post-sidebar .widget {
  float: none !important;
  width: 100% !important;
  margin: 0 0 16px !important;
  padding: 17px !important;
  border: 1px solid var(--jba-border) !important;
  border-radius: 15px !important;
  background: #fff !important;
  box-shadow: 0 8px 26px rgba(18, 50, 38, .055) !important;
  font-family: 'Iransans', Tahoma, sans-serif;
  font-size: 12px;
}

body.jba-blog-context .post-sidebar .widget-title {
  display: block;
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid #eef0ee;
  background: transparent !important;
  color: var(--jba-green-dark) !important;
  font-family: 'Estedad', 'Iransans', Tahoma, sans-serif !important;
  font-size: 13px !important;
}

body.jba-blog-context .post-sidebar .widget .is-divider {
  display: none !important;
}

body.jba-blog-context .post-sidebar .widget li {
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px dashed #edf0ed;
  list-style: none !important;
  line-height: 1.85;
}

body.jba-blog-context .post-sidebar .widget li:last-child {
  border-bottom: 0;
}

body.jba-blog-context .post-sidebar .widget li a {
  color: #4e5953 !important;
  font-size: 12px;
}

body.jba-blog-context .post-sidebar .widget li a:hover {
  color: var(--jba-green) !important;
}

/* Single article. */
body.jba-blog-context.jba-blog-single {
  background: var(--jba-bg);
  color: var(--jba-text);
}

body.jba-blog-context.jba-blog-single .blog-wrapper {
  padding-top: 30px;
  padding-bottom: 58px;
}

body.jba-blog-context.jba-blog-single article.post {
  overflow: hidden;
  border: 1px solid var(--jba-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--jba-shadow);
}

body.jba-blog-context.jba-blog-single article.post .entry-header-text {
  padding: 28px 32px 22px;
  text-align: right !important;
}

body.jba-blog-context.jba-blog-single article.post h1.entry-title {
  margin: 0;
  color: var(--jba-green-dark);
  font-family: 'Estedad', 'Iransans', Tahoma, sans-serif !important;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.75;
  text-shadow: none;
}

body.jba-blog-context.jba-blog-single article.post .entry-category,
body.jba-blog-context.jba-blog-single article.post .entry-meta {
  color: #7b847f;
  font-family: 'Iransans', Tahoma, sans-serif !important;
  font-size: 11px !important;
  line-height: 1.8;
  text-transform: none !important;
}

body.jba-blog-context.jba-blog-single article.post .entry-category a {
  color: #9a741e !important;
}

body.jba-blog-context.jba-blog-single article.post .entry-divider {
  width: 48px;
  height: 3px;
  margin: 12px 0;
  background: var(--jba-gold);
}

body.jba-blog-context.jba-blog-single article.post .entry-image {
  overflow: hidden;
  margin: 0 24px;
  border-radius: 16px;
  background: #eef1ef;
}

body.jba-blog-context.jba-blog-single article.post .entry-image img {
  width: 100%;
  height: auto;
  max-height: 650px;
  object-fit: cover;
}

body.jba-blog-context.jba-blog-single .entry-content.single-page {
  padding: 30px 34px 18px !important;
  color: #303934;
  font-family: 'Iransans', Tahoma, sans-serif;
  font-size: 15px;
  line-height: 2.2;
  text-align: right;
}

body.jba-blog-context.jba-blog-single .entry-content.single-page h2,
body.jba-blog-context.jba-blog-single .entry-content.single-page h3,
body.jba-blog-context.jba-blog-single .entry-content.single-page h4 {
  color: var(--jba-green-dark);
  font-family: 'Estedad', 'Iransans', Tahoma, sans-serif !important;
  line-height: 1.85;
}

body.jba-blog-context.jba-blog-single .entry-content.single-page h2 {
  margin-top: 38px;
  padding-right: 14px;
  border-right: 4px solid var(--jba-gold);
  font-size: 21px;
}

body.jba-blog-context.jba-blog-single .entry-content.single-page h3 {
  margin-top: 28px;
  font-size: 18px;
}

body.jba-blog-context.jba-blog-single .entry-content.single-page p,
body.jba-blog-context.jba-blog-single .entry-content.single-page ul,
body.jba-blog-context.jba-blog-single .entry-content.single-page ol,
body.jba-blog-context.jba-blog-single .entry-content.single-page blockquote,
body.jba-blog-context.jba-blog-single .entry-content.single-page table,
body.jba-blog-context.jba-blog-single .entry-content.single-page figure {
  margin-bottom: 20px;
}

body.jba-blog-context.jba-blog-single .entry-content.single-page li {
  margin-bottom: 7px;
  font-family: 'Iransans', Tahoma, sans-serif !important;
}

body.jba-blog-context.jba-blog-single .entry-content.single-page blockquote {
  margin-right: 0;
  margin-left: 0;
  padding: 16px 20px;
  border: 0;
  border-right: 4px solid var(--jba-gold);
  border-radius: 12px 0 0 12px;
  background: var(--jba-gold-soft);
  color: #514a38;
  font-style: normal;
}

body.jba-blog-context.jba-blog-single .entry-content.single-page table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--jba-border);
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
}

body.jba-blog-context.jba-blog-single .entry-content.single-page th {
  background: var(--jba-green-soft);
  color: var(--jba-green-dark);
}

body.jba-blog-context.jba-blog-single .entry-content.single-page th,
body.jba-blog-context.jba-blog-single .entry-content.single-page td {
  padding: 11px 13px;
  border-color: var(--jba-border);
  text-align: right;
}

body.jba-blog-context.jba-blog-single .entry-content.single-page img {
  border-radius: 12px;
}

body.jba-blog-context.jba-blog-single .blog-share,
body.jba-blog-context.jba-blog-single .entry-author,
body.jba-blog-context.jba-blog-single .navigation-post,
body.jba-blog-context.jba-blog-single #comments {
  margin-right: 32px;
  margin-left: 32px;
}

body.jba-blog-context.jba-blog-single .entry-author,
body.jba-blog-context.jba-blog-single #comments {
  padding: 18px;
  border: 1px solid var(--jba-border);
  border-radius: 15px;
  background: #fff;
}

/* Pagination. */
body.jba-blog-context .page-numbers.nav-pagination > li > a,
body.jba-blog-context .page-numbers.nav-pagination > li > span {
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
  font-family: 'Iransans', Tahoma, sans-serif;
  line-height: 38px;
}

body.jba-blog-context .page-numbers.nav-pagination > li > span.current,
body.jba-blog-context .page-numbers.nav-pagination > li > a:hover {
  border-color: var(--jba-green) !important;
  background: var(--jba-green) !important;
  color: #fff !important;
}

/* Home page: ONLY the article cards. Do not touch product-item/products-list/custom product sections. */
body.jba-blog-home .post-item .col-inner {
  overflow: hidden;
  min-height: 0 !important;
  border: 1px solid var(--jba-border) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(18, 50, 38, .055) !important;
}

body.jba-blog-home .post-item .box-image {
  overflow: hidden;
  border-radius: 0 !important;
}

body.jba-blog-home .post-item .box-text {
  padding: 15px 16px 17px !important;
  text-align: right !important;
}

body.jba-blog-home .post-item .box-text a:not(.button) {
  color: var(--jba-green-dark) !important;
  font-family: 'Estedad', 'Iransans', Tahoma, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.85 !important;
  text-shadow: none !important;
}

/* Footer: cosmetic only, no structural overrides. */
body.jba-blog-context .footer-wrapper,
body.jba-blog-home .footer-wrapper {
  font-family: 'Iransans', Tahoma, sans-serif;
}

body.jba-blog-context .footer-wrapper a,
body.jba-blog-home .footer-wrapper a {
  transition: opacity .2s ease, color .2s ease;
}

/* Empty results / 404. */
body.jba-blog-context .no-results,
body.jba-blog-context .jba-error-card,
body.jba-blog-home .jba-error-card {
  max-width: 760px;
  margin: 20px auto 50px;
  padding: 32px 28px;
  border: 1px solid var(--jba-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--jba-shadow);
  text-align: center;
}

body.jba-blog-context .no-results .page-title,
body.jba-blog-context .jba-error-card .page-title,
body.jba-blog-home .jba-error-card .page-title {
  color: var(--jba-green-dark);
  font-family: 'Estedad', 'Iransans', Tahoma, sans-serif !important;
  font-size: 24px;
  line-height: 1.8;
}

body.jba-blog-context .jba-error-code,
body.jba-blog-home .jba-error-code {
  color: var(--jba-gold);
  font-family: 'Estedad', 'Iransans', Tahoma, sans-serif;
  font-size: 46px;
  font-weight: 700;
}

body.jba-blog-context .jba-error-copy,
body.jba-blog-home .jba-error-copy {
  color: var(--jba-muted);
  line-height: 2;
}

/* Reading progress only on articles. */
body.jba-blog-context.jba-blog-single .jba-reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10001;
  height: 3px;
  pointer-events: none;
}

body.jba-blog-context.jba-blog-single .jba-reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--jba-green), var(--jba-gold));
}

@media (max-width: 849px) {
  body.jba-blog-context:not(.jba-blog-single) .blog-wrapper {
    padding-top: 18px;
    padding-bottom: 34px;
  }

  body.jba-blog-context .archive-page-header .large-12.col {
    margin-bottom: 16px;
    padding: 18px;
    border-radius: 15px;
  }

  body.jba-blog-context .archive-page-header .page-title,
  body.jba-blog-context .archive-page-header .page-title h1 {
    font-size: 20px;
  }

  body.jba-blog-context #post-list .post-item .box-text {
    padding: 16px !important;
  }

  body.jba-blog-context #post-list .post-item .post-title,
  body.jba-blog-context #post-list .post-item .post-title a,
  body.jba-blog-context #post-list .post-item .box-text a:not(.button) {
    font-size: 15px !important;
  }

  body.jba-blog-context .post-sidebar {
    margin-top: 18px;
  }

  body.jba-blog-context.jba-blog-single article.post {
    border-radius: 17px;
  }

  body.jba-blog-context.jba-blog-single article.post .entry-header-text {
    padding: 22px 19px 17px;
  }

  body.jba-blog-context.jba-blog-single article.post h1.entry-title {
    font-size: 23px;
  }

  body.jba-blog-context.jba-blog-single article.post .entry-image {
    margin: 0 12px;
    border-radius: 12px;
  }

  body.jba-blog-context.jba-blog-single .entry-content.single-page {
    padding: 23px 19px 12px !important;
    font-size: 14px;
    line-height: 2.15;
  }

  body.jba-blog-context.jba-blog-single .entry-content.single-page h2 {
    margin-top: 30px;
    font-size: 18px;
  }

  body.jba-blog-context.jba-blog-single .blog-share,
  body.jba-blog-context.jba-blog-single .entry-author,
  body.jba-blog-context.jba-blog-single .navigation-post,
  body.jba-blog-context.jba-blog-single #comments {
    margin-right: 16px;
    margin-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.jba-blog-context *,
  body.jba-blog-home * {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
