/* BaharSEO 2026-11-03 | strictly targeted final fixes. */
/* Logo still links to Home; avoid a large gap between brand and the actual menu. */
@media (min-width:981px){
  #masthead.bseo-header .bseo-header-inner{column-gap:clamp(5px,.65vw,10px)}
  #masthead.bseo-header .bseo-brand{margin-inline-end:0!important}
  #masthead.bseo-header .bseo-nav{flex:0 1 auto!important; margin:0!important}
  #masthead.bseo-header .bseo-nav .bseo-menu{gap:clamp(1px,.25vw,5px)}
  #masthead.bseo-header .bseo-cta{margin-inline-start:auto}
}
@media (min-width:981px) and (max-width:1180px){
  #masthead.bseo-header .bseo-nav{flex:1 1 auto!important}
}

/* Astra's column rules can place the third archive card on a separate line.
 * Explicit flex items keep rows compact in right-to-left category listings. */
body.category #content.site-content>.ast-container{
  width:min(1260px, calc(100% - 44px))!important;
  max-width:1260px!important;
  margin-inline:auto!important;
}
body.category #main.site-main>.ast-row{
  display:flex!important;
  flex-wrap:wrap!important;
  align-content:flex-start!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:22px!important;
  direction:rtl;
}
body.category #main.site-main>.ast-row>article.ast-article-post{
  box-sizing:border-box!important;
  display:block!important;
  flex:0 0 calc((100% - 44px) / 3)!important;
  width:calc((100% - 44px) / 3)!important;
  max-width:calc((100% - 44px) / 3)!important;
  min-width:0!important;
  float:none!important;
  clear:none!important;
  grid-column:auto!important;
  grid-row:auto!important;
  margin:0!important;
}
@media (max-width:1020px){
  body.category #main.site-main>.ast-row{gap:18px!important}
  body.category #main.site-main>.ast-row>article.ast-article-post{
    flex-basis:calc((100% - 18px) / 2)!important;
    width:calc((100% - 18px) / 2)!important;
    max-width:calc((100% - 18px) / 2)!important;
  }
}
@media (max-width:650px){
  body.category #content.site-content>.ast-container{width:calc(100% - 26px)!important}
  body.category #main.site-main>.ast-row{gap:15px!important}
  body.category #main.site-main>.ast-row>article.ast-article-post{
    flex-basis:100%!important;width:100%!important;max-width:100%!important;
  }
}
/* Once the in-page topic links have been copied to the delayed floating control,
 * remove ONLY their original header presentation. Underlying links remain intact. */
body.single-post.bseo-scroll-topic-active article.ast-article-single .entry-header .entry-meta{display:none!important}
body.single-post .bseo-scroll-topic[hidden]{display:none!important}
body.single-post .bseo-scroll-topic{
  position:fixed;
  z-index:95;
  right:clamp(15px,2.4vw,31px);
  bottom:clamp(17px,2.4vw,30px);
  box-sizing:border-box;
  max-width:min(420px, calc(100vw - 30px));
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px 11px;
  padding:10px 13px;
  border:1px solid #c5e8ef;
  border-radius:15px;
  background:rgba(255,255,255,.97);
  box-shadow:0 9px 32px rgba(8,58,87,.16);
  backdrop-filter:blur(10px);
  color:#477387;
  font-size:12px;
  font-weight:750;
  line-height:1.7;
  direction:rtl;
}
body.single-post .bseo-scroll-topic-caption{flex:0 1 auto}
body.single-post .bseo-scroll-topic-links{display:inline-flex;align-items:center;flex-wrap:wrap;gap:6px}
body.single-post .bseo-scroll-topic-links a{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:32px;padding:5px 11px;
  border:1px solid #b7e5ed;
  border-radius:10px;
  background:#ecfbfe;
  color:#08768e!important;
  font-size:12px;font-weight:850;
  text-decoration:none!important;
}
body.single-post .bseo-scroll-topic-links a:hover,
body.single-post .bseo-scroll-topic-links a:focus-visible{
  background:#d5f5fb;border-color:#6ecbdc;color:#075e77!important;outline-offset:3px;
}
@media(max-width:560px){
  body.single-post .bseo-scroll-topic{bottom:15px;right:12px;max-width:calc(100vw - 24px);gap:4px 8px;font-size:11px;padding:8px 10px}
  body.single-post .bseo-scroll-topic-links a{font-size:11px;min-height:30px;padding:4px 9px}
}
