/* =========================================================
   BLOG DETAIL — blog-detail.css
   Matches existing design system vars from style.css
   All bd- namespaced, RTL-ready, mobile-first
   ========================================================= */
 
/* ── HERO ─────────────────────────────────────────────── */
#bd-hero {
  position: relative;
  padding-top: var(--nav);
  min-height: 58vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
 
.bd-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
 
}
 
.bd-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(8,8,15,.15) 0%,
    rgba(8,8,15,.55) 50%,
    rgba(8,8,15,.97) 100%
  );
}
 
.lm .bd-hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(10,10,26,.1) 0%,
    rgba(10,10,26,.5) 50%,
    rgba(10,10,26,.95) 100%
  );
}
 
.bd-hero-content {
  position: relative;
  z-index: 2;
  padding-top: 48px;
  padding-bottom: 60px;
}
 
/* breadcrumb */
.bd-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  font-size: .75rem;
}
 
.bd-breadcrumb li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.35);
}
 
.bd-breadcrumb li + li::before {
  content: "/";
  color: rgba(255,255,255,.2);
}
 
.bd-breadcrumb a {
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color .2s;
}
 
.bd-breadcrumb a:hover { color: var(--pur); }
 
/* category badge */
.bd-category-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.774);
  border: 1px solid rgba(139,92,246,.35);
  color: #c4b5fd;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: 16px;
  transition: background .2s;
}
 
.bd-category-badge:hover {
  background: rgba(139,92,246,.3);
  color: #ddd6fe;
}
 
/* hero title — override .stitle for white on image */
#bd-hero .bd-hero-title {
  font-size: clamp(1.75rem, 3.8vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.025em;
  color: #f0f0ff;
  background: none;
  -webkit-text-fill-color: #f0f0ff;
  margin: 0 0 16px;
  max-width: 820px;
}
 
.bd-hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.62);
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 28px;
}
 
.bd-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}
 
.bd-meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .8rem;
  color: rgba(255,255,255,.48);
}
 
.bd-meta-item i {
  color: var(--pur);
  font-size: .72rem;
}
 
/* reading progress bar */
#bd-reading-bar {
  position: fixed;
  top: var(--nav);
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--grad);
  z-index: 1060;
  transition: width .08s linear;
}
 
/* ── MAIN LAYOUT ──────────────────────────────────────── */
#bd-main {
  padding: 80px 0 80px;
}

.bd-article-row {
  --bs-gutter-x: 2rem;
}

/* article prose */
#bd-article .gc {
  padding: 40px 44px;
}
 
.bd-prose {
  direction: rtl;
  text-align: justify;
  color: var(--tx);
  font-size: 1.02rem;
  line-height: 2;
  word-spacing: .04em;
}
 
.bd-prose > * + * { margin-top: 0; }
 
.bd-prose h2,
.bd-prose h3,
.bd-prose h4 {
  color: var(--tx);
  font-weight: 700;
  line-height: 1.35;
  margin-top: 2em;
  margin-bottom: .65em;
  letter-spacing: -.015em;
}
 
.bd-prose h2 {
  font-size: 1.4rem;
  padding-bottom: .4em;
  border-bottom: 1px solid var(--bd);
}
 
.bd-prose h3 { font-size: 1.18rem; }
.bd-prose h4 { font-size: 1.05rem; }
 
.bd-prose p {
  margin-bottom: 1.45em;
  margin-top: 0;
}
 
.bd-prose a {
  color: var(--pur);
  text-decoration: underline;
  text-decoration-color: rgba(139,92,246,.3);
  text-underline-offset: 3px;
  transition: color .2s;
}
 
.bd-prose a:hover { color: var(--blu); }
 
.bd-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
  margin: 1.8em auto;
  border: 1px solid var(--bd);
}
 
.bd-prose blockquote {
  margin: 1.8em 0;
  padding: 18px 22px;
  border-right: 3px solid var(--pur);
  border-left: none;
  background: var(--bg2);
  border-radius: 0 12px 12px 0;
  color: var(--tx2);
  font-style: italic;
  font-size: 1.04rem;
  line-height: 1.85;
}
 
.bd-prose blockquote p { margin-bottom: 0; }
 
.bd-prose code {
  background: var(--bg3);
  border: 1px solid var(--bd);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: .86em;
  color: #c4b5fd;
}
 
.bd-prose pre {
  background: var(--bg3);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
  margin: 1.8em 0;
}
 
.bd-prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--tx);
  font-size: .875rem;
  line-height: 1.7;
}
 
.bd-prose ul,
.bd-prose ol {
  padding-right: 1.6em;
  padding-left: 0;
  margin-bottom: 1.5em;
  margin-top: 0;
}
 
.bd-prose li {
  margin-bottom: .5em;
  line-height: 1.85;
}
 
.bd-prose ul li::marker { color: var(--pur); }
.bd-prose ol li::marker { color: var(--pur); font-weight: 700; }
 
.bd-prose hr {
  border: none;
  border-top: 1px solid var(--bd);
  margin: 2.5em 0;
}
 
.bd-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  font-size: .9rem;
  display: block;
  overflow-x: auto;
}
 
.bd-prose thead { background: var(--bg3); }
 
.bd-prose th,
.bd-prose td {
  padding: 10px 14px;
  border: 1px solid var(--bd);
  text-align: right;
}
 
.bd-prose tbody tr:hover { background: var(--bg2); }
 
/* tags row */
.bd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--bd);
}
 
.bd-tag {
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--bd);
  color: var(--tx3);
  font-size: .76rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
 
.bd-tag:hover {
  border-color: rgba(139,92,246,.4);
  color: var(--pur);
}
 
/* author card below article */
.bd-author-strip {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding-top: 32px;
  margin-top: 32px;
  border-top: 1px solid var(--bd, rgba(255,255,255,.08));
}
.bd-author-ava,
.bd-author-ava-img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.bd-author-ava {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad, linear-gradient(135deg, #8b5cf6, #6366f1));
}
.bd-author-info {
  flex: 1;
  min-width: 0;
}
.bd-author-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--tx, #fff);
  margin-bottom: 4px;
}
.bd-author-role {
  font-size: .82rem;
  color: var(--pur, #8b5cf6);
  font-weight: 600;
  margin-bottom: 12px;
}
.bd-author-bio {
  font-size: .9rem;
  line-height: 1.75;
  color: var(--tx2, rgba(255,255,255,.62));
  margin: 0 0 16px;
  max-width: 580px;
}
.bd-author-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.bd-author-social-ico {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: .9rem;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.bd-author-social-ico:hover {
  background: var(--pur, #8b5cf6);
  color: #fff;
  transform: translateY(-2px);
}
@media (max-width: 480px) {
  .bd-author-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}
 
/* ── SIDEBAR ──────────────────────────────────────────── */
#bd-sidebar {
  position: sticky;
  top: calc(var(--nav) + 18px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
 
/* widget title override — adds the purple dash */
#bd-sidebar .slbl {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--pur);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
 
/* search */
#bd-sidebar .input-group {
  display: flex;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--bd2);
  background: var(--bg2);
  transition: border-color .2s;
}
 
#bd-sidebar .input-group:focus-within {
  border-color: var(--pur);
  box-shadow: 0 0 0 3px rgba(139,92,246,.12);
}
 
#bd-sidebar .input-group .oinp {
  border: none;
  background: transparent;
  margin-bottom: 0;
  border-radius: 0;
  font-size: .875rem;
}
 
#bd-sidebar .input-group .oinp:focus {
  box-shadow: none;
  border: none;
}
 
#bd-sidebar .input-group .btn {
  border-radius: 0;
  padding: 0 14px;
  border: none;
}
 
/* category list */
#bd-sidebar .list-unstyled a {
  transition: color .2s;
  color: var(--tx2);
  font-size: .875rem;
}
 
#bd-sidebar .list-unstyled a:hover {
  color: var(--pur);
}
 
/* popular posts thumbnail */
#bd-sidebar .rounded {
  border-radius: 10px !important;
  border: 1px solid var(--bd);
  object-fit: cover;
}
 
/* share buttons — override .boc to be smaller */
#bd-sidebar .btn.boc {
  font-size: .78rem;
  padding: 8px 10px;
  border-radius: 10px;
  flex: 1 1 calc(50% - 4px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
 
/* ── PREV / NEXT NAV ──────────────────────────────────── */
#bd-related {
  padding: 0 0 60px;
}
 
#bd-related .gc {
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
 
#bd-related .gc:hover {
  border-color: rgba(139,92,246,.35);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0,0,0,.22);
}
 
/* ── RELATED POSTS ────────────────────────────────────── */
#bd-related-posts {
  padding: 60px 0;
  border-top: 1px solid var(--bd);
}
 
#bd-related-posts .gc {
  overflow: hidden;
}
 
#bd-related-posts .gc img {
  transition: transform .4s ease;
}
 
#bd-related-posts .gc:hover img {
  transform: scale(1.04);
}
 
#bd-related-posts .gc:hover {
  transform: translateY(-3px);
}
 
/* ── COMMENTS ─────────────────────────────────────────── */
#bd-comments {
  padding: 60px 0 90px;
  border-top: 1px solid var(--bd);
}
 
#bd-comments .gc {
  transition: border-color .2s;
}
 
#bd-comments .gc:hover {
  transform: none;
  border-color: rgba(139,92,246,.2);
  box-shadow: none;
}
 
.bd-comment-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  flex-shrink: 0;
}
 
/* comment form inputs */
#bd-comments .oinp {
  background: var(--bg2);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
 
#bd-comments .oinp:focus {
  background: var(--sf);
}
 
/* success alert */
.bd-alert-ok {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(52,211,153,.07);
  border: 1px solid rgba(52,211,153,.22);
  border-radius: 12px;
  color: #34d399;
  font-size: .875rem;
  font-weight: 500;
}
 
/* ── BACK TO TOP ──────────────────────────────────────── */
#bd-back-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--sf);
  border: 1px solid var(--bd2);
  color: var(--tx2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .9rem;
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s, border-color .2s;
  transform: translateY(10px);
}
 
#bd-back-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
 
#bd-back-top:hover {
  border-color: var(--pur);
  color: var(--pur);
}
 
/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 991.98px) {
  #bd-hero { min-height: 50vh; }
 
  #bd-sidebar {
    position: static;
  }
 
  #bd-article .gc {
    padding: 28px 22px;
  }
}
 
@media (max-width: 767.98px) {
  #bd-hero { min-height: 55vw; }
 
  .bd-hero-content {
    padding-bottom: 44px;
  }
 
  #bd-hero .bd-hero-title {
    font-size: clamp(1.35rem, 5vw, 2rem);
  }
 
  .bd-hero-sub { font-size: .9rem; }
 
  #bd-main { padding: 40px 0 60px; }
 
  #bd-related { padding: 0 0 40px; }
 
  #bd-related-posts,
  #bd-comments { padding: 40px 0 60px; }
 
  #bd-article .gc {
    padding: 22px 16px;
  }
 
  .bd-prose { font-size: .96rem; line-height: 1.95; }
  .bd-prose h2 { font-size: 1.2rem; }
  .bd-prose h3 { font-size: 1.06rem; }
}
 
@media (max-width: 575.98px) {
  #bd-hero { min-height: 65vw; }
 
  .bd-hero-meta { gap: 12px; }
 
  #bd-sidebar .btn.boc {
    flex: 1 1 100%;
  }
}
 
@media (prefers-reduced-motion: reduce) {
  #bd-related-posts .gc img,
  #bd-back-top,
  .bd-tag { transition: none; }
}
#bd-reading-bar{position:fixed;top:var(--nav);left:0;height:2px;width:0%;background:var(--grad);z-index:1060;transition:width .08s linear}

#bd-hero{position:relative;padding-top:var(--nav);min-height:68vh;display:flex;flex-direction:column;justify-content:flex-end;overflow:hidden}
.bd-hero-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;z-index:0;filter:brightness(.32) saturate(1.3)}
.bd-hero-overlay{position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,rgba(8,8,15,0) 0%,rgba(8,8,15,.58) 42%,rgba(8,8,15,.99) 100%)}
.lm .bd-hero-overlay{background:linear-gradient(180deg,rgba(10,10,26,0) 0%,rgba(10,10,26,.55) 42%,rgba(10,10,26,.98) 100%)}
.bd-hero-content{position:relative;z-index:2;padding-top:56px;padding-bottom:64px}
.bd-breadcrumb{display:flex;flex-wrap:wrap;align-items:center;gap:6px;list-style:none;padding:0;margin:0 0 18px;font-size:.74rem}
.bd-breadcrumb li{display:flex;align-items:center;gap:6px;color:rgba(255,255,255,.3)}
.bd-breadcrumb li+li::before{content:"/";color:rgba(255,255,255,.16);margin-right:4px}
.bd-breadcrumb a{color:rgba(255,255,255,.45);text-decoration:none;transition:color .2s}
.bd-breadcrumb a:hover{color:var(--pur)}
.bd-category-badge{display:inline-flex;align-items:center;padding:4px 13px;border-radius:20px;background:rgba(139,92,246,.16);border:1px solid rgba(139,92,246,.3);color:#c4b5fd;font-size:.7rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;text-decoration:none;margin-bottom:16px;transition:background .2s}
.bd-category-badge:hover{background:rgba(139,92,246,.26);color:#ddd6fe}
#bd-hero .bd-hero-title{font-size:clamp(1.8rem,3.8vw,3rem);font-weight:800;line-height:1.18;letter-spacing:-.026em;color:#f0f0ff;background:none;-webkit-text-fill-color:#f0f0ff;margin:0 0 16px;max-width:820px}
.bd-hero-sub{font-size:1rem;color:rgba(255,255,255,.55);line-height:1.7;max-width:620px;margin-bottom:28px}
.bd-hero-meta{display:flex;flex-wrap:wrap;align-items:center;gap:18px}
.bd-meta-item{display:flex;align-items:center;gap:6px;font-size:.79rem;color:rgba(255,255,255,.4)}
.bd-meta-item i{color:var(--pur);font-size:.7rem}

#bd-main{padding:52px 0 72px}

.bd-prose{direction:rtl;text-align:justify;color:var(--tx2);font-size:1.02rem;line-height:2.05;word-spacing:.04em}
.bd-prose>*+*{margin-top:0}
.bd-prose h2,.bd-prose h3,.bd-prose h4{color:var(--tx);font-weight:700;line-height:1.35;margin-top:2em;margin-bottom:.65em;letter-spacing:-.014em}
.bd-prose h2{font-size:1.38rem;padding-bottom:.4em;border-bottom:1px solid rgba(255,255,255,.07)}
.lm .bd-prose h2{border-color:rgba(99,71,246,.1)}
.bd-prose h3{font-size:1.16rem}
.bd-prose h4{font-size:1.04rem}
.bd-prose p{margin-bottom:1.45em;margin-top:0}
.bd-prose a{color:var(--pur);text-decoration:underline;text-decoration-color:rgba(139,92,246,.28);text-underline-offset:3px;transition:color .2s}
.bd-prose a:hover{color:var(--blu)}
.bd-prose img{max-width:100%;height:auto;border-radius:10px;display:block;margin:1.8em auto;border:1px solid rgba(255,255,255,.07)}
.lm .bd-prose img{border-color:rgba(99,71,246,.1)}
.bd-prose blockquote{margin:1.8em 0;padding:14px 18px;border-right:2px solid var(--pur);border-left:none;background:transparent;border-radius:0;color:var(--tx3);font-style:italic;font-size:1rem;line-height:1.85}
.bd-prose blockquote p{margin-bottom:0}
.bd-prose code{background:var(--bg3);border:1px solid rgba(255,255,255,.07);border-radius:5px;padding:2px 7px;font-size:.85em;color:#c4b5fd}
.bd-prose pre{background:var(--bg3);border:1px solid rgba(255,255,255,.07);border-radius:9px;padding:18px;overflow-x:auto;margin:1.8em 0}
.bd-prose pre code{background:none;border:none;padding:0;color:var(--tx);font-size:.875rem;line-height:1.7}
.bd-prose ul,.bd-prose ol{padding-right:1.6em;padding-left:0;margin-bottom:1.5em;margin-top:0}
.bd-prose li{margin-bottom:.5em;line-height:1.85}
.bd-prose ul li::marker{color:var(--pur)}
.bd-prose ol li::marker{color:var(--pur);font-weight:700}
.bd-prose hr{border:none;border-top:1px solid rgba(255,255,255,.07);margin:2.5em 0}
.bd-prose table{width:100%;border-collapse:collapse;margin:1.8em 0;font-size:.9rem;display:block;overflow-x:auto}
.bd-prose thead{background:var(--bg3)}
.bd-prose th,.bd-prose td{padding:10px 14px;border:1px solid rgba(255,255,255,.07);text-align:right}
.bd-prose tbody tr:hover{background:var(--bg2)}

.bd-author-strip{display:flex;align-items:center;gap:13px;padding:24px 0;border-top:1px solid rgba(255,255,255,.07);margin-top:28px}
.lm .bd-author-strip{border-color:rgba(99,71,246,.1)}
.bd-author-ava{width:46px;height:46px;border-radius:13px;background:var(--grad);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:1.1rem;flex-shrink:0}
.bd-author-name{font-weight:700;font-size:.9rem;color:var(--tx);margin-bottom:3px}
.bd-author-meta{font-size:.75rem;color:var(--tx3)}

#bd-sidebar{position:sticky;top:calc(var(--nav) + 20px);display:flex;flex-direction:column;gap:0}

.bd-widget{padding:0 0 26px;border-bottom:1px solid rgba(255,255,255,.07);margin-bottom:26px}
.lm .bd-widget{border-color:rgba(99,71,246,.1)}
.bd-widget:last-child{border:none;margin:0;padding:0}
.bd-widget-title,
.bd-side-title {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tx, #fff);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bd-widget-title::before,
.bd-side-title::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--pur, #8b5cf6);
  flex-shrink: 0;
}

.bd-search-row{display:flex;background:var(--bg2);border-radius:9px;overflow:hidden;border:1px solid rgba(255,255,255,.07);transition:border-color .2s}
.bd-search-row:focus-within{border-color:rgba(139,92,246,.35);box-shadow:0 0 0 3px rgba(139,92,246,.1)}
.bd-search-inp{flex:1;background:transparent;border:none;outline:none;padding:9px 12px;font-size:.85rem;color:var(--tx);font-family:inherit}
.bd-search-inp::placeholder{color:var(--tx3)}
.bd-search-btn{background:var(--grad);border:none;padding:0 14px;color:#fff;font-size:.8rem;cursor:pointer}

.bd-cat-list{list-style:none;padding:0;margin:0}
.bd-cat-list li{border-bottom:1px solid rgba(255,255,255,.06)}
.lm .bd-cat-list li{border-color:rgba(99,71,246,.08)}
.bd-cat-list li:last-child{border:none}
.bd-cat-link{display:flex;justify-content:space-between;align-items:center;padding:8px 0;text-decoration:none;color:var(--tx2);font-size:.855rem;transition:color .15s}
.bd-cat-link:hover{color:var(--pur)}
.bd-cat-count{background:rgba(139,92,246,.1);color:var(--pur);border-radius:100px;padding:1px 8px;font-size:.68rem;font-weight:700}

.bd-pop-list{list-style:none;padding:0;margin:0}
.bd-pop-item{display:flex;gap:10px;align-items:flex-start;padding:9px 0;border-bottom:1px solid rgba(255,255,255,.06)}
.lm .bd-pop-item{border-color:rgba(99,71,246,.08)}
.bd-pop-item:last-child{border:none;padding-bottom:0}
.bd-pop-thumb{width:48px;height:48px;border-radius:8px;overflow:hidden;flex-shrink:0;background:var(--bg3)}
.bd-pop-thumb img{width:100%;height:100%;object-fit:cover}
.bd-pop-title{display:block;font-size:.8rem;font-weight:600;color:var(--tx);line-height:1.4;margin-bottom:4px;text-decoration:none;transition:color .15s}
.bd-pop-title:hover{color:var(--pur)}
.bd-pop-date{font-size:.69rem;color:var(--tx3)}

.bd-share-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.bd-share-btn{display:flex;align-items:center;justify-content:center;gap:5px;padding:8px;border-radius:8px;border:1px solid rgba(255,255,255,.08);background:transparent;color:var(--tx2);font-size:.76rem;cursor:pointer;font-family:inherit;text-decoration:none;transition:border-color .15s,color .15s}
.bd-share-btn:hover{border-color:rgba(139,92,246,.3);color:var(--pur)}

#bd-related{padding:0 0 52px}
.bd-nav-grid{display:grid;grid-template-columns:1fr 1fr;gap:0;border-top:1px solid rgba(255,255,255,.07);border-bottom:1px solid rgba(255,255,255,.07)}
.lm .bd-nav-grid{border-color:rgba(99,71,246,.1)}
.bd-nav-card{display:flex;align-items:center;gap:13px;padding:22px 0;text-decoration:none;transition:opacity .2s}
.bd-nav-card:hover{opacity:.75}
.bd-nav-card.bd-next{flex-direction:row-reverse;text-align:right;border-right:1px solid rgba(255,255,255,.07);padding-right:22px}
.lm .bd-nav-card.bd-next{border-color:rgba(99,71,246,.1)}
.bd-nav-card:not(.bd-next){padding-left:0}
.bd-nav-card.bd-next+.bd-nav-card,.bd-nav-card:first-child{padding-left:22px}
.bd-nav-thumb{width:54px;height:54px;border-radius:9px;overflow:hidden;flex-shrink:0;background:var(--bg3)}
.bd-nav-thumb img{width:100%;height:100%;object-fit:cover}
.bd-nav-dir{font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.09em;color:var(--pur);margin-bottom:5px}
.bd-nav-title{font-size:.86rem;font-weight:600;color:var(--tx);line-height:1.4}

#bd-related-posts{padding:52px 0}
.bd-section-head{font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.12em;color:var(--pur);display:flex;align-items:center;gap:10px;margin-bottom:22px}
.bd-section-head::before{content:'';width:14px;height:1.5px;background:var(--grad)}
.bd-section-head::after{content:'';flex:1;height:1px;background:rgba(255,255,255,.07)}
.lm .bd-section-head::after{background:rgba(99,71,246,.1)}

#bd-comments{padding:52px 0 80px;border-top:1px solid rgba(255,255,255,.07)}
.lm #bd-comments{border-color:rgba(99,71,246,.1)}

.bd-comment{padding:20px 0;border-bottom:1px solid rgba(255,255,255,.07)}
.lm .bd-comment{border-color:rgba(99,71,246,.1)}
.bd-comment:last-of-type{border:none}
.bd-comment-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.bd-comment-ava{width:34px;height:34px;border-radius:9px;background:var(--grad);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:.82rem;flex-shrink:0}
.bd-comment-name{font-size:.86rem;font-weight:700;color:var(--tx)}
.bd-comment-date{display:inline-flex;align-items:center;gap:4px;font-size:.7rem;color:var(--tx3)}
.bd-comment-body{font-size:.86rem;color:var(--tx2);line-height:1.78;direction:rtl}
.bd-empty-comments{text-align:center;padding:44px 0}
.bd-empty-comments i{font-size:2rem;color:var(--tx3);margin-bottom:12px;display:block}
.bd-empty-comments p{color:var(--tx3);font-size:.875rem;margin:0}

.bd-form-wrap{padding-top:32px;border-top:1px solid rgba(255,255,255,.07)}
.lm .bd-form-wrap{border-color:rgba(99,71,246,.1)}
.bd-form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}
.bd-field-label{font-size:.78rem;font-weight:600;color:var(--tx2);margin-bottom:6px;display:block}
.bd-field-inp{width:100%;background:var(--bg2);border:1px solid rgba(255,255,255,.08);border-radius:9px;padding:10px 13px;color:var(--tx);font-size:.875rem;outline:none;font-family:inherit;transition:border-color .2s,box-shadow .2s}
.lm .bd-field-inp{background:var(--bg3);border-color:rgba(99,71,246,.12)}
.bd-field-inp:focus{border-color:rgba(139,92,246,.4);box-shadow:0 0 0 3px rgba(139,92,246,.1)}
.bd-field-inp::placeholder{color:var(--tx3)}
.bd-field-textarea{resize:vertical;min-height:110px;line-height:1.65}
.bd-field-error{font-size:.73rem;color:#f87171;margin-top:4px}
.bd-honeypot{position:absolute!important;inset-inline-start:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.bd-submit-btn{display:inline-flex;align-items:center;gap:7px;background:var(--grad);border:none;color:#fff;padding:11px 24px;border-radius:10px;font-size:.875rem;font-weight:700;cursor:pointer;margin-top:14px;font-family:inherit;transition:transform .2s,box-shadow .2s}
.bd-submit-btn:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(139,92,246,.35)}
.bd-alert-ok{display:flex;align-items:center;gap:11px;padding:14px 16px;background:rgba(52,211,153,.06);border:1px solid rgba(52,211,153,.18);border-radius:10px;color:#34d399;font-size:.855rem;font-weight:500}

#bd-back-top{position:fixed;bottom:26px;right:26px;width:40px;height:40px;border-radius:10px;background:var(--bg2);border:1px solid rgba(255,255,255,.1);color:var(--tx2);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:.85rem;z-index:900;opacity:0;pointer-events:none;transition:opacity .3s,transform .3s,border-color .2s;transform:translateY(8px)}
#bd-back-top.show{opacity:1;pointer-events:auto;transform:translateY(0)}
#bd-back-top:hover{border-color:rgba(139,92,246,.35);color:var(--pur)}

@media(max-width:991.98px){
  #bd-hero{min-height:52vh}
  #bd-sidebar{position:static}
}
@media(max-width:767.98px){
  #bd-hero{min-height:58vw}
  .bd-hero-content{padding-bottom:44px}
  #bd-hero .bd-hero-title{font-size:clamp(1.4rem,5.5vw,2.1rem)}
  .bd-hero-sub{font-size:.9rem}
  #bd-main{padding:36px 0 52px}
  #bd-related{padding:0 0 36px}
  #bd-related-posts,#bd-comments{padding:36px 0 52px}
  .bd-prose{font-size:.96rem;line-height:1.95}
  .bd-prose h2{font-size:1.2rem}
  .bd-prose h3{font-size:1.06rem}
  .bd-nav-grid{grid-template-columns:1fr;border:none}
  .bd-nav-card,.bd-nav-card.bd-next{border:none;padding:16px 0;border-bottom:1px solid rgba(255,255,255,.07)}
  .bd-nav-card.bd-next{flex-direction:row;text-align:left}
  .bd-form-row{grid-template-columns:1fr}
}
@media(max-width:575.98px){
  #bd-hero{min-height:68vw}
  .bd-hero-meta{gap:12px}
}
@media(prefers-reduced-motion:reduce){
  #bd-back-top,.bd-submit-btn{transition:none}
 }


 /* ======================================
   BLOG DETAIL HERO (FIXED ARCHITECTURE)
====================================== */

#bd-hero {
  position: relative;
  padding: 90px 0 60px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* مهم: این باعث میشه حس full-width نرم بشه */
  overflow: hidden;
}

/* Overlay positioning handled by .bd-hero-overlay rule below */

/* Container */
#bd-hero .bd-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
}

/* Breadcrumb */
.bd-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 18px;
}

.bd-breadcrumb a {
  color: #fff;
  text-decoration: none;
}

/* Category */
.bd-category-badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  backdrop-filter: blur(6px);
}

/* Title */
.bd-hero-title {
  font-size: 44px;
  line-height: 1.25;
  font-weight: 700;
  color: #fff;
  max-width: 800px;
  margin-bottom: 14px;
}

/* Subtitle */
.bd-hero-sub {
  font-size: 16px;
  opacity: 0.85;
  color: #fff;
  max-width: 700px;
  margin-bottom: 22px;
}

/* Meta row (professional spacing) */
.bd-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  align-items: center;
}

.bd-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* subtle divider line */
.bd-hero-meta::before {
  content: "";
  width: 50px;
  height: 1px;
  background: rgba(255,255,255,0.2);
  margin-right: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  #bd-hero {
    padding: 60px 0 40px;
  }

  .bd-hero-title {
    font-size: 30px;
  }

  .bd-hero-content {
    padding: 0 16px;
  }
}

/* ===== Blog Hero — Structure ===== */
#bd-hero {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 24px;
  margin-bottom: 24px;
  aspect-ratio: 16 / 7;
  max-height: 460px;
  display: flex;
  align-items: flex-end;
  background: #14141f;
}
.bd-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: none;
  z-index: 0;
}
.bd-hero-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  height: 60%;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(8,8,15,.95) 0%,
    rgba(8,8,15,.8) 30%,
    rgba(8,8,15,.4) 60%,
    transparent 100%
  );
  pointer-events: none;
}
.bd-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 32px 32px 36px;
  direction: rtl;
  text-align: right;
  margin-inline-start: 0;
  margin-inline-end: auto;
}

/* ===== Blog Hero — Breadcrumb, Badge, Title ===== */
.bd-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  direction: rtl;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  font-size: .78rem;
  color: rgba(255, 255, 255, 0.915);
}
.bd-breadcrumb li:not(:last-child)::after {
  content: "•";
  margin-inline-start: 6px;
  color: rgba(255, 255, 255, 0.784);
}
.bd-breadcrumb a {
  color: rgba(245, 243, 243, 0.533);
  text-decoration: none;
  transition: color .2s ease;
}
.bd-breadcrumb a:hover { color: var(--pur, #8b5cf6); }
.bd-breadcrumb li:last-child { color: rgba(255, 255, 255, 0.929); }

.bd-category-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--grad, linear-gradient(135deg, #8b5cf6, #6366f1));
  padding: 5px 14px;
  border-radius: 30px;
  text-decoration: none;
  margin-bottom: 16px;
  transition: opacity .2s ease;
}
.bd-category-badge:hover { opacity: .85; }

.bd-hero-title {
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.38;
  color: #fff;
  margin: 0 0 12px;
  margin-inline-end: auto;
  max-width: 760px;
}
.bd-hero-sub {
  font-size: .95rem;
  color: rgba(255,255,255,.6);
  max-width: 640px;
  line-height: 1.75;
  margin: 0 0 16px;
  margin-inline-end: auto;
}
.bd-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  direction: rtl;
  gap: 18px;
  margin-top:3rem;
  justify-content: flex-start;
}
.bd-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  /* color: rgba(255,255,255,.45); */
}
.bd-hero-divider {
  width: 100%;
  height: 1px;
  background: rgba(243, 243, 243, 0.735);
  margin-top: 16px;
  border: none;
}

/* ===== Blog Hero — Responsive ===== */
@media (max-width: 768px) {
  #bd-hero { aspect-ratio: 4 / 3; max-height: 360px; border-radius: 14px; }
  .bd-hero-content { padding: 22px 18px 24px; }
  .bd-hero-title { font-size: 1.45rem; line-height: 1.38; }
  .bd-hero-sub { font-size: .85rem; }
  .bd-hero-meta { gap: 10px; }
  .bd-breadcrumb { font-size: .72rem; }
}
@media (max-width: 480px) {
  #bd-hero { aspect-ratio: 1 / 1; max-height: 320px; }
  .bd-hero-title { font-size: 1.25rem; }
  .bd-hero-meta { gap: 8px; }
  .bd-meta-item { font-size: .76rem; }
}

/* ===== Sidebar — New Widgets ===== */
.bd-side-widget {
  margin-bottom: 32px;
  direction: rtl;
  text-align: right;
}
/* .bd-side-title unified with .bd-widget-title above */

.bd-side-projects { display: flex; flex-direction: column; gap: 12px; }
.bd-side-project-item {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: opacity .2s ease;
}
.bd-side-project-item:hover { opacity: .8; }
.bd-side-project-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.bd-side-project-title { flex: 1; min-width: 0; direction: rtl; font-size: .85rem; color: rgba(255,255,255,.8); line-height: 1.4; text-align: right; }

.bd-tech-badges { display: flex; flex-wrap: wrap; gap: 8px; direction: rtl; }
.bd-tech-badge {
  font-size: .75rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.75);
  direction: ltr;
  transition: background .2s ease, color .2s ease;
}
.bd-tech-badge:hover { background: var(--grad, linear-gradient(135deg, #8b5cf6, #6366f1)); color: #fff; }

.bd-side-cta {
  background: rgba(255,255,255,.04);
  border-radius: 16px;
  padding: 24px 20px;
  direction: rtl;
  text-align: right;
}
.bd-side-cta-title {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tx, #fff);
  margin-bottom: 10px;
  text-align: center;
}
.bd-side-cta-text { font-size: .82rem; color: rgba(255,255,255,.6); line-height: 1.6; margin: 0 0 18px; }
.bd-side-cta-btn {
  display: inline-block;
  width: 100%;
  padding: 11px 0;
  border-radius: 100px;
  background: var(--grad, linear-gradient(135deg, #8b5cf6, #6366f1));
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: opacity .2s ease;
}
.bd-side-cta-btn:hover { opacity: .88; }

/* ===== Sidebar — RTL fixes for existing widgets ===== */
.bd-search-row { direction: rtl; }
.bd-search-inp { text-align: right; }

.bd-cat-link { direction: rtl; }

.bd-pop-list { direction: rtl; text-align: right; }
.bd-pop-item { flex-direction: row-reverse; }

.bd-share-btn { flex-direction: row-reverse; }

/* ===== Sidebar — Recent Posts widget ===== */
.bd-side-recent-posts { display: flex; flex-direction: column; gap: 14px; }
.bd-side-recent-item {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: opacity .2s ease;
}
.bd-side-recent-item:hover { opacity: .8; }
.bd-side-recent-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.bd-side-recent-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: 1;
  min-width: 0;
  gap: 4px;
  direction: rtl;
  text-align: right;
}
.bd-side-recent-title {
  width: 100%;
  font-size: .85rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  line-height: 1.5;
}
.bd-side-recent-date {
  width: 100%;
  font-size: .72rem;
  color: rgba(255,255,255,.45);
}

@media (min-width: 992px) {
  .bd-article-row {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
    grid-template-areas: "sidebar article";
    align-items: start;
    direction: ltr;
  }

  #bd-article {
    grid-area: article;
    width: auto;
    max-width: none;
    direction: rtl;
  }

  #bd-sidebar {
    grid-area: sidebar;
    width: auto;
    max-width: none;
    direction: rtl;
    border-left: 0;
    border-right: 1px solid rgba(255,255,255,.07);
    padding-right: 32px !important;
    padding-left: calc(var(--bs-gutter-x) * .5) !important;
  }

  .lm #bd-sidebar {
    border-right-color: rgba(99,71,246,.1);
  }

  .bd-hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
  }

  .bd-category-badge,
  #bd-hero .bd-hero-title,
  .bd-hero-sub,
  .bd-hero-meta,
  .bd-hero-divider,
  .bd-breadcrumb {
    margin-right: 0;
    margin-left: auto;
  }

  #bd-hero .bd-hero-title,
  .bd-hero-sub,
  .bd-hero-meta,
  .bd-hero-divider,
  .bd-breadcrumb {
    width: min(760px, 100%);
  }

  .bd-hero-meta,
  .bd-breadcrumb {
    justify-content: flex-start;
  }
}
