/* ============================================================
   الای‌بیز — وبلاگ (لیست، مقاله، نویسنده)
   ============================================================ */

/* --- فیلتر دسته‌ها --- */
.blog-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.blog-search { max-width: 320px; margin-inline-start: auto; }

/* --- مقاله شاخص --- */
.featured-post { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; overflow: hidden; }
.featured-post .media { height: 100%; min-height: 300px; }
.featured-post .media img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-3); justify-content: center; }
.featured-title { font-size: var(--fs-2xl); font-weight: 800; line-height: 1.45; }
.featured-title a:hover { color: var(--primary); }
.featured-excerpt { color: var(--text-muted); line-height: 2; }

/* --- سربرگ مقاله --- */
.post-header { padding-block: var(--sp-6) var(--sp-5); }
.post-title { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 800; line-height: 1.45; margin-block: var(--sp-3); }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  padding-block: var(--sp-3);
  border-block: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.post-meta > span, .post-meta > a { display: inline-flex; align-items: center; gap: var(--sp-2); }
.post-meta svg { width: 16px; height: 16px; }
.post-author-link { font-weight: 700; color: var(--text); }
.post-author-link:hover { color: var(--primary); }
.post-author-link img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.post-cover { border-radius: var(--r-lg); overflow: hidden; margin-block: var(--sp-5); aspect-ratio: 16 / 8; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }

/* گالری داخل مقاله */
.post-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-3); }
.post-gallery img { border-radius: var(--r-md); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.post-tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding-top: var(--sp-5); margin-top: var(--sp-5); border-top: 1px solid var(--border); }

/* کارت نویسنده */
.author-box {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  margin-top: var(--sp-5);
}
.author-box img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box h3 { font-size: var(--fs-lg); font-weight: 800; }
.author-box .role { font-size: var(--fs-xs); color: var(--primary); font-weight: 700; margin-top: 2px; }
.author-box p { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.95; margin-top: var(--sp-2); }

/* پروفایل نویسنده */
.author-hero {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-6);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  flex-wrap: wrap;
}
.author-hero img { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; }
.author-hero-info { flex: 1; min-width: 240px; }
.author-hero-info h1 { font-size: var(--fs-2xl); font-weight: 800; }
.author-stats { display: flex; gap: var(--sp-5); margin-top: var(--sp-4); flex-wrap: wrap; }

/* --- دیدگاه‌ها --- */
.comments-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.comment {
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
.comment-head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-2); flex-wrap: wrap; }
.comment-name { font-weight: 700; font-size: var(--fs-sm); }
.comment-date { font-size: var(--fs-xs); color: var(--text-muted); }
.comment-text { font-size: var(--fs-sm); line-height: 1.95; }
.comment-actions { margin-top: var(--sp-2); }
.comment-reply-btn { font-size: var(--fs-xs); font-weight: 700; color: var(--primary); }
.comment-children { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-3); padding-inline-start: var(--sp-5); border-inline-start: 2px solid var(--border); }

.review-form-title { font-size: var(--fs-base); font-weight: 800; margin-bottom: var(--sp-4); }
.blog-captcha { display: flex; align-items: end; gap: var(--sp-3); flex-wrap: wrap; }
.blog-captcha img { height: 48px; border-radius: var(--r-sm); border: 1px solid var(--border); }
.prose img { max-width: 100%; height: auto; }
.prose table { width: 100%; overflow-x: auto; display: block; }

/* ستون کناری وبلاگ باید با صفحه اسکرول شود؛ sticky اگر از ارتفاع ویوپورت بلندتر باشد قفل می‌ماند. */
.sticky-side {
  position: static;
  max-height: none;
  overflow: visible;
}

/* --- واکنش‌گرایی --- */
@media (max-width: 992px) {
  .two-col { grid-template-columns: 1fr; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-post .media { min-height: 220px; }
}
@media (max-width: 768px) {
  .blog-search { max-width: none; margin-inline-start: 0; width: 100%; }
  .featured-body { padding: var(--sp-5); }
  .post-meta { gap: var(--sp-3); }
  .comment-children { padding-inline-start: var(--sp-3); }
}
