/* =====================================================================
   BBE Article Theme — استایل مشترک ویجت‌های صفحه تک‌مقاله بن‌بیگی
   رنگ‌ها دقیقاً همان پالت فعلی سایت (وایت/کوپر) هستند تا با بقیه
   ویجت‌های نقشه صفحه (خلاصه سریع، فهرست مطالب، متادیتا، باکس نویسنده،
   محصولات/مقالات مرتبط) یکدست باشد.
   ===================================================================== */

.bbe-art{
  --bbe-wine:#2A0710;
  --bbe-wine-soft:#3A0E1F;
  --bbe-copper:#A9744F;
  --bbe-copper-dark:#8B5F3F;
  --bbe-copper-tint:#EEE1D0;
  --bbe-cream:#F8F4EC;
  --bbe-cream-2:#F3ECE3;
  --bbe-line:#E5D9C8;
  --bbe-text:#3D2B2F;
  --bbe-text-soft:#8A7266;
  --bbe-text-faint:#B5A493;
  --bbe-radius:14px;
}

/* ---------------- تصویر شاخص ---------------- */
.bbe-featured-image{
  position:relative;
  border-radius:var(--bbe-radius);
  overflow:hidden;
  margin:0 0 28px;
  background:var(--bbe-cream);
}
.bbe-featured-image img{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:16/9;
  object-fit:cover;
}
.bbe-featured-image:before,
.bbe-featured-image:after{
  content:"";
  position:absolute;
  width:22px;height:22px;
  border:2px solid rgba(248,244,236,.85);
  z-index:2;
  pointer-events:none;
}
.bbe-featured-image:before{ top:12px; right:12px; border-left:0; border-bottom:0; }
.bbe-featured-image:after{ bottom:12px; left:12px; border-right:0; border-top:0; }
.bbe-fi-badge{
  position:absolute;
  bottom:16px; right:16px;
  background:var(--bbe-wine);
  color:#fff;
  font-size:12.5px;
  font-weight:700;
  padding:7px 18px;
  border-radius:20px;
  z-index:2;
  text-decoration:none;
  transition:background .2s,transform .2s;
}
.bbe-fi-badge:hover{ background:var(--bbe-wine-soft); transform:translateY(-1px); }
.bbe-fi-caption{
  font-size:12.5px;
  color:var(--bbe-text-soft);
  text-align:center;
  margin:10px 0 0;
}

/* ---------------- بدنه مقاله (تایپوگرافی) ---------------- */
.bbe-article-body{
  font-size:16.5px;
  line-height:2;
  color:var(--bbe-text);
  counter-reset:bbe-h2;
}
.bbe-article-body > *:first-child{ margin-top:0; }

.bbe-article-body p{
  margin:0 0 22px;
}
.bbe-article-body > p:first-of-type{
  font-size:18px;
  color:var(--bbe-wine);
}

.bbe-article-body h2{
  position:relative;
  counter-increment:bbe-h2;
  font-size:23px;
  font-weight:700;
  color:var(--bbe-wine);
  margin:52px 0 22px;
  padding-right:52px;
  min-height:40px;
  display:flex;
  align-items:center;
}
.bbe-article-body h2:before{
  content:counter(bbe-h2,decimal-leading-zero);
  position:absolute;
  right:0; top:50%;
  transform:translateY(-50%);
  font-family:'JetBrains Mono',monospace;
  font-size:14px;
  font-weight:600;
  color:var(--bbe-copper);
  background:var(--bbe-copper-tint);
  width:38px;height:38px;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
}

.bbe-article-body h3{
  font-size:18.5px;
  font-weight:700;
  color:var(--bbe-wine-soft);
  margin:34px 0 16px;
  padding-right:14px;
  border-right:3px solid var(--bbe-copper);
}

.bbe-article-body h4{
  font-size:16.5px;
  font-weight:700;
  color:var(--bbe-wine-soft);
  margin:24px 0 12px;
}

.bbe-article-body ul,
.bbe-article-body ol{
  margin:0 0 22px;
  padding-right:22px;
}
.bbe-article-body ul{ list-style:none; padding-right:4px; }
.bbe-article-body ul > li{
  position:relative;
  padding-right:22px;
  margin-bottom:10px;
}
.bbe-article-body ul > li:before{
  content:"";
  position:absolute;
  right:2px; top:10px;
  width:7px;height:7px;
  border-radius:2px;
  background:var(--bbe-copper);
  transform:rotate(45deg);
}
.bbe-article-body ol > li{ margin-bottom:10px; padding-right:6px; }

.bbe-article-body blockquote{
  position:relative;
  background:var(--bbe-cream);
  border-radius:12px;
  border-inline-start:4px solid var(--bbe-copper);
  padding:22px 26px;
  margin:28px 0;
  font-size:16.5px;
  color:var(--bbe-wine-soft);
}
.bbe-article-body blockquote:before{
  content:"\201C";
  position:absolute;
  top:6px; right:16px;
  font-size:44px;
  line-height:1;
  color:var(--bbe-copper-tint);
  font-family:Georgia,serif;
}
.bbe-article-body blockquote p{ margin:0; }
.bbe-article-body blockquote p:not(:last-child){ margin-bottom:10px; }

.bbe-article-body img{
  max-width:100%;
  height:auto;
  border-radius:12px;
  border:1px solid var(--bbe-line);
  display:block;
  margin:0 auto;
}
.bbe-article-body figure{ margin:28px 0; }
.bbe-article-body figcaption{
  font-size:13px;
  color:var(--bbe-text-soft);
  text-align:center;
  margin-top:10px;
}

.bbe-article-body table{
  width:100%;
  border-collapse:collapse;
  margin:26px 0;
  font-size:14.5px;
  border-radius:10px;
  overflow:hidden;
  border:1px solid var(--bbe-line);
}
.bbe-article-body th{
  background:var(--bbe-copper-tint);
  color:var(--bbe-wine);
  font-weight:700;
  text-align:right;
  padding:12px 14px;
}
.bbe-article-body td{
  padding:12px 14px;
  border-top:1px solid var(--bbe-line);
  color:var(--bbe-text);
}

.bbe-article-body a{
  color:var(--bbe-wine-soft);
  font-weight:600;
  text-decoration-line:underline;
  text-decoration-color:var(--bbe-copper);
  text-decoration-thickness:1.5px;
  text-underline-offset:3px;
  transition:color .15s,text-decoration-color .15s;
}
.bbe-article-body a:hover{
  color:var(--bbe-wine);
  text-decoration-color:var(--bbe-wine);
}

.bbe-article-body hr{
  border:0;
  border-top:1px dashed var(--bbe-line);
  margin:36px 0;
}

.bbe-article-body code{
  background:var(--bbe-cream-2);
  color:var(--bbe-wine-soft);
  padding:2px 6px;
  border-radius:4px;
  font-size:14px;
  direction:ltr;
  display:inline-block;
}
.bbe-article-body pre{
  background:var(--bbe-wine);
  color:#F3ECE3;
  padding:18px 20px;
  border-radius:10px;
  overflow-x:auto;
  direction:ltr;
  text-align:left;
}
.bbe-article-body pre code{ background:none; color:inherit; padding:0; }

/* ---------------- حالت خالی داخل ادیتور المنتور ---------------- */
.bbe-editor-placeholder{
  background:var(--bbe-cream);
  border:1px dashed var(--bbe-line);
  border-radius:10px;
  padding:16px 18px;
  color:var(--bbe-text-soft);
  font-size:13px;
  margin:20px 0;
}

/* ---------------- سوالات متداول (FAQ) ---------------- */
.bbe-article-faq{ margin:40px 0; }
.bbe-af-title{
  font-size:21px;
  font-weight:700;
  color:var(--bbe-wine);
  margin:0 0 18px;
}
.bbe-af-list{ display:flex; flex-direction:column; gap:10px; }
.bbe-af-item{
  border:1px solid var(--bbe-line);
  border-radius:12px;
  overflow:hidden;
  background:#fff;
}
.bbe-af-q{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:none;
  border:0;
  cursor:pointer;
  padding:16px 20px;
  font-family:inherit;
  font-size:15px;
  font-weight:700;
  color:var(--bbe-wine);
  text-align:right;
}
.bbe-af-item.is-open .bbe-af-q{ background:var(--bbe-cream); }
.bbe-af-icon{
  flex-shrink:0;
  width:26px;height:26px;
  border-radius:50%;
  background:var(--bbe-copper-tint);
  color:var(--bbe-copper);
  display:flex;align-items:center;justify-content:center;
  font-size:16px;
  line-height:1;
  transition:transform .2s;
}
.bbe-af-item.is-open .bbe-af-icon{ transform:rotate(45deg); background:var(--bbe-wine); color:#fff; }
.bbe-af-a{
  max-height:0;
  overflow:hidden;
  transition:max-height .25s ease;
  padding:0 20px;
}
.bbe-af-item.is-open .bbe-af-a{ padding:0 20px 18px; }
.bbe-af-a p{
  margin:0;
  font-size:14.5px;
  line-height:1.9;
  color:var(--bbe-text-soft);
}
