/* فونت فارسی بلاگ */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

.blog-nav,
.magazine-wrap,
.magazine-wide,
.mag-paper,
.mag-site-footer,
.blog-hero-banner {
  font-family: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
}

/* غلبه بر فونت‌های اینلاین ویرایشگر (Arial و ...) */
.mag-content,
.mag-content *,
.mag-title,
.mag-lead,
.mag-meta-row,
.b-card,
.b-card * {
  font-family: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif !important;
}

.mag-content {
  font-size: 17px;
  line-height: 2.15;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-align: justify;
  text-justify: inter-word;
  -webkit-font-smoothing: antialiased;
}

.mag-content p {
  margin: 0 0 1.25em;
  font-weight: 400;
}

.mag-content strong,
.mag-content b {
  font-weight: 700;
}

.mag-content h2 {
  font-size: 1.45em;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.5;
}

.mag-content h3 {
  font-size: 1.2em;
  font-weight: 700;
}

.mag-title {
  font-weight: 900;
  letter-spacing: -0.03em;
}

.mag-lead {
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 2;
}

/* —— قالب مجله‌ای بلاگ zqz.ir —— */
.blog-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border-bottom: 1px solid var(--border);
}
.blog-nav .inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.blog-nav .links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.blog-nav .links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 8px;
  transition: .15s;
}
.blog-nav .links a:hover,
.blog-nav .links a.active {
  color: var(--primary);
  background: rgba(79,70,229,.08);
}
.blog-nav .links a.cta {
  background: var(--primary);
  color: #fff !important;
  font-weight: 600;
}
.blog-nav .links a.cta:hover { filter: brightness(1.08); }

.progress-bar {
  position: fixed;
  top: 0; right: 0; left: 0;
  height: 3px;
  z-index: 200;
  background: transparent;
  pointer-events: none;
}
.progress-bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4f46e5, #818cf8);
  transition: width .05s linear;
}

.magazine-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 16px 48px;
}
.magazine-wide {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.mag-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin: 20px 0 16px;
}
.mag-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.mag-breadcrumb a:hover { color: var(--primary); }

/* کارت اصلی مطلب */
.mag-paper {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,.02), 0 20px 40px rgba(15,23,42,.06);
}
[data-theme="dark"] .mag-paper {
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}

.mag-cover {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #1e1b4b, #4f46e5);
  max-height: 360px;
}
.mag-cover-placeholder {
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, #4f46e5, #818cf8, #a5b4fc);
}

.mag-paper-body {
  padding: 36px 44px 40px;
}
@media (max-width: 640px) {
  .mag-paper-body { padding: 24px 18px 28px; }
  .mag-paper { border-radius: 14px; }
}

.mag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.mag-chip {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(79,70,229,.1);
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.mag-title {
  font-size: clamp(1.55rem, 3.5vw, 2.15rem);
  line-height: 1.45;
  font-weight: 800;
  margin: 0 0 16px;
  color: var(--text);
  letter-spacing: -.02em;
}

.mag-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding-bottom: 22px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
.mag-meta-row .dot { opacity: .4; }

.mag-lead {
  font-size: 1.05rem;
  line-height: 1.95;
  color: var(--text-muted);
  margin: 0 0 28px;
  padding: 16px 18px;
  border-right: 3px solid var(--primary);
  background: rgba(79,70,229,.05);
  border-radius: 0 12px 12px 0;
}

/* محتوای مطلب */
.mag-content {
  font-size: 16.5px;
  line-height: 2.05;
  color: var(--text);
}
.mag-content > *:first-child { margin-top: 0 !important; }
.mag-content h2 {
  font-size: 1.4em;
  font-weight: 800;
  margin: 2.2em 0 .65em;
  line-height: 1.4;
  color: var(--text);
  position: relative;
  padding-right: 14px;
}
.mag-content h2::before {
  content: '';
  position: absolute;
  right: 0; top: .35em;
  width: 4px; height: 1.1em;
  background: var(--primary);
  border-radius: 4px;
}
.mag-content h3 {
  font-size: 1.18em;
  font-weight: 700;
  margin: 1.7em 0 .5em;
  color: var(--primary);
}
.mag-content p { margin: 0 0 1.2em; }
.mag-content ul, .mag-content ol {
  margin: 0 0 1.3em;
  padding-right: 1.5em;
}
.mag-content li { margin-bottom: .5em; }
.mag-content ul li::marker { color: var(--primary); }
.mag-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mag-content img {
  max-width: 100%;
  border-radius: 14px;
  margin: 1.4em auto;
  display: block;
  box-shadow: 0 12px 32px rgba(0,0,0,.1);
}
.mag-content blockquote {
  margin: 1.6em 0;
  padding: 16px 20px;
  border-right: 4px solid var(--primary);
  background: var(--bg);
  border-radius: 0 14px 14px 0;
  font-size: .98em;
  color: var(--text-muted);
}
.mag-content code {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .88em;
}
.mag-content pre {
  direction: ltr;
  text-align: left;
  background: #0f172a;
  color: #e2e8f0;
  padding: 18px;
  border-radius: 14px;
  overflow-x: auto;
}
.mag-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.3em 0;
  font-size: 14px;
}
.mag-content th, .mag-content td {
  border: 1px solid var(--border);
  padding: 11px 14px;
}
.mag-content th { background: var(--bg); }

/* نوار پایین مطلب */
.mag-footer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.share-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.share-group .lbl { font-size: 12px; color: var(--text-muted); margin-left: 4px; }
.s-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  transition: .15s;
  cursor: pointer;
}
.s-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(79,70,229,.08); }

.mag-cta {
  margin-top: 24px;
  padding: 28px 24px;
  border-radius: 16px;
  text-align: center;
  background: linear-gradient(135deg, #312e81, #4f46e5);
  color: #fff;
}
.mag-cta p { margin: 0 0 14px; opacity: .95; font-size: 15px; }
.mag-cta .btn {
  background: #fff;
  color: #4f46e5 !important;
  border: none;
  font-weight: 700;
}
.mag-cta .btn-outline {
  background: transparent;
  color: #fff !important;
  border: 1.5px solid rgba(255,255,255,.5);
  margin-right: 8px;
}

/* لیست بلاگ */
.blog-hero-banner {
  text-align: center;
  padding: 40px 16px 28px;
  background: linear-gradient(180deg, rgba(79,70,229,.1) 0%, transparent 100%);
  border-radius: 0 0 24px 24px;
  margin-bottom: 28px;
}
.blog-hero-banner h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 10px;
  font-weight: 800;
}
.blog-hero-banner p { color: var(--text-muted); margin: 0; font-size: 15px; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.b-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: .22s;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 16px rgba(0,0,0,.03);
}
.b-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(79,70,229,.12);
  border-color: rgba(79,70,229,.3);
}
.b-card .thumb {
  height: 180px;
  background: linear-gradient(135deg, #312e81, #6366f1);
  position: relative;
}
.b-card .thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.b-card .body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.b-card .meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.b-card h2 { font-size: 17px; margin: 0 0 10px; line-height: 1.55; font-weight: 700; }
.b-card .excerpt {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.75;
  flex: 1;
}
.b-card .more {
  margin-top: 14px;
  font-size: 13px;
  color: var(--primary);
  font-weight: 700;
}

/* فوتر مجله‌ای */
.mag-site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 40px 16px 24px;
}
.mag-site-footer .foot-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}
@media (max-width: 800px) {
  .mag-site-footer .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .mag-site-footer .foot-grid { grid-template-columns: 1fr; }
}
.mag-site-footer h4 {
  font-size: 14px;
  margin: 0 0 12px;
  color: var(--text);
}
.mag-site-footer p, .mag-site-footer a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.9;
  display: block;
}
.mag-site-footer a:hover { color: var(--primary); }
.mag-site-footer .copy {
  max-width: 1120px;
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.related-section { margin-top: 36px; }
.related-section h3 {
  font-size: 18px;
  margin: 0 0 16px;
  font-weight: 800;
}


/* تعامل بلاگ */
.engage-box {
  margin-top: 28px;
  padding: 22px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.engage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  margin-bottom: 8px;
}
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: .15s;
}
.like-btn:hover, .like-btn.liked {
  border-color: #f43f5e;
  color: #e11d48;
  background: rgba(244,63,94,.08);
}
.stars {
  display: inline-flex;
  gap: 4px;
  direction: ltr;
}
.stars button {
  background: none;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  color: #cbd5e1;
  padding: 0 2px;
  line-height: 1;
  transition: .1s;
}
.stars button.on, .stars button:hover { color: #f59e0b; }
.rating-label { font-size: 13px; color: var(--text-muted); margin-right: 8px; }

.comments-section { margin-top: 32px; }
.comments-section h3 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 16px;
}
.comment-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  background: var(--card);
}
.comment-item .who {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}
.comment-item .when {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.comment-item .txt {
  font-size: 14px;
  line-height: 1.85;
  white-space: pre-wrap;
}
.comment-form .form-group { margin-bottom: 12px; }
.comment-form input, .comment-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  background: var(--input-bg);
  color: var(--text);
}
.comment-form textarea { min-height: 110px; resize: vertical; }
