/* =========================================
   PREMIUM SINGLE BLOG CSS – نسخه نهایی
   (فاصلهٔ Breadcrumb تا Hero افزایش یافته)
========================================= */
:root {
  --bg: #090B17;
  --card: #11162A;
  --primary: #1FC8FF;
  --secondary: #8A3DFF;
  --text: #FFFFFF;
  --text-dim: #B8C2D5;
  --border: rgba(255,255,255,.08);
  --radius: 22px;
  --shadow: 0 8px 30px rgba(0,0,0,0.4);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', system-ui, sans-serif;
  line-height: 1.6;
  padding-top: 82px;
}

#reading-progress-bar {
  position: fixed; top: 0; left: 0; width: 0%; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 10001; transition: width 0.1s; box-shadow: 0 0 10px var(--primary);
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

/* Breadcrumb – فاصلهٔ پایین بیشتر برای جدایی از Hero */
.breadcrumb-wrapper {
  max-width: 1400px;
  margin: 20px auto 30px;   /* افزایش margin-bottom از 0 به 30px */
  padding: 0 24px;
}
.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-dim);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* Hero Section */
.article-hero {
  position: relative; margin-bottom: 40px; height: 450px;
  display: flex; align-items: flex-end; overflow: hidden; border-radius: var(--radius);
}
.hero-cover {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, #090B17 0%, rgba(9,11,23,0.7) 50%, rgba(9,11,23,0.3) 100%);
  backdrop-filter: blur(2px);
}
.hero-content { position: relative; z-index: 2; padding: 40px 24px; color: white; max-width: 900px; }
.hero-category {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.1); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15); padding: 6px 18px;
  border-radius: 50px; color: white; text-decoration: none;
  font-size: 0.85rem; font-weight: 600; margin-bottom: 16px;
}
.hero-category:hover { background: rgba(255,255,255,0.2); }
.hero-content h1 {
  font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 800; line-height: 1.2;
  margin-bottom: 16px; text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.hero-meta {
  display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.95rem; color: rgba(255,255,255,0.8);
}
.hero-meta .material-icons { font-size: 1.1rem; vertical-align: middle; margin-left: 4px; }

/* ===== Main Layout ===== */
.article-layout {
  display: grid;
  grid-template-columns: 250px 1fr 250px;
  gap: 30px;
  margin-top: -20px;
  position: relative;
}

/* ===== Sidebar ===== */
.article-sidebar { display: flex; flex-direction: column; gap: 20px; }
.left-sidebar { order: -1; }
.sidebar-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; backdrop-filter: blur(12px);
}
.sidebar-card h4 {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 12px;
  color: var(--primary); display: flex; align-items: center; gap: 8px;
}
.sticky { position: sticky; top: 100px; }

/* فهرست مطالب */
.toc-list ul { list-style: none; padding: 0; }
.toc-list li { margin-bottom: 8px; }
.toc-list a {
  color: var(--text-dim); text-decoration: none; font-size: 0.9rem;
  transition: color 0.2s;
}
.toc-list a:hover, .toc-list a.active { color: var(--primary); }
.toc-list .sub-item { padding-right: 16px; }

/* اشتراک‌گذاری */
.share-buttons.vertical { display: flex; flex-direction: column; gap: 10px; }
.share-icon {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer; transition: 0.2s;
}
.share-icon:hover {
  background: var(--primary); color: white; border-color: var(--primary); transform: scale(1.05);
}

/* ===== Main Content ===== */
.article-main { display: flex; flex-direction: column; gap: 30px; }
.article-content {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px; line-height: 1.9; color: var(--text-dim);
}
.article-content h2 {
  font-size: 1.8rem; font-weight: 700; color: var(--text); margin: 1.8em 0 0.8em;
  border-bottom: 2px solid var(--border); padding-bottom: 10px;
}
.article-content h3 {
  font-size: 1.5rem; font-weight: 700; color: var(--primary); margin: 1.5em 0 0.6em;
}
.article-content p { margin-bottom: 1.2em; }
.article-content img {
  max-width: 100%; border-radius: var(--radius); margin: 20px 0; box-shadow: var(--shadow);
}
.article-content blockquote {
  background: rgba(31,200,255,0.05); border-right: 4px solid var(--primary);
  padding: 20px; margin: 24px 0; border-radius: 12px; font-style: italic;
}
.article-content pre {
  background: #0d1117; border-radius: var(--radius); padding: 20px;
  overflow-x: auto; position: relative;
}
.article-content code { font-family: 'Fira Code', monospace; font-size: 0.9em; }

/* Author Box */
.author-box {
  display: flex; gap: 16px; align-items: center; background: var(--card);
  padding: 20px; border-radius: var(--radius); border: 1px solid var(--border);
}
.author-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center; color: white; font-size: 2rem;
}
.author-info h4 { font-size: 1.1rem; margin-bottom: 4px; }
.author-info p { font-size: 0.9rem; color: var(--text-dim); }

/* ===== Comments ===== */
.comments-section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.comments-section h3 {
  font-size: 1.3rem; font-weight: 700; margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px; color: var(--primary);
}
.comment-card { display: flex; gap: 16px; margin-bottom: 20px; }
.comment-avatar {
  width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-header { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 0.9rem; }
.comment-date { color: var(--text-dim); font-size: 0.8rem; }
.comment-form .form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 14px; background: #1e293b; border: 1px solid var(--border);
  border-radius: 14px; color: var(--text); outline: none; transition: 0.2s;
}
.comment-form input:focus, .comment-form textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,200,255,0.2);
}
.comment-form textarea { resize: vertical; }

/* ===== Right Sidebar (مطالب مرتبط) ===== */
.mini-posts { display: flex; flex-direction: column; gap: 12px; }
.mini-post {
  display: flex; gap: 12px; text-decoration: none; color: var(--text-dim);
  padding: 8px; border-radius: 12px; transition: 0.2s;
}
.mini-post:hover { background: rgba(255,255,255,0.03); }
.mini-post img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; }
.mini-post h5 { font-size: 0.9rem; color: var(--text); margin-bottom: 4px; }
.mini-post .date { font-size: 0.75rem; }

/* ===== Responsive (موبایل) ===== */
@media (max-width: 1200px) {
  .article-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .left-sidebar {
    order: -1;
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  .right-sidebar { order: 1; }
  .sticky { position: static !important; }
  .sidebar-card { margin-bottom: 0; }
  .toc-list { max-height: none; overflow: visible; }
}
@media (max-width: 768px) {
  .hero-content { padding: 30px 20px; }
  .article-content { padding: 24px; }
  .article-hero { height: 300px; }
}

/* Back to Top */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px; width: 48px; height: 48px;
  background: var(--primary); border: none; border-radius: 50%; cursor: pointer;
  opacity: 0; visibility: hidden; transition: 0.3s; z-index: 99;
  display: flex; align-items: center; justify-content: center; color: white;
  box-shadow: 0 4px 12px rgba(31,200,255,0.3);
}
.back-to-top.show { opacity: 1; visibility: visible; }

/* blog-single.css — فقط یک خط اضافه کنید */

.sticky {
    position: sticky;
    top: 100px;
    z-index: 10;   /* این خط را اضافه کنید */
}