/* ==========================================================================
   قالب vizbilab — استایل مادر (راست‌چین از ابتدا)
   فونت: وزیرمتن | بدون جی‌کوئری | توکن‌محور با حالت تاریک
   پالت: Midnight Navy #07152B · Deep Navy #0B1B35 · Brand Blue #3B82F6
   ========================================================================== */

:root {
  --font: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;

  /* سطوح و متن (تم روشن) */
  --bg: #F8FAFC;
  --bg-soft: #F1F5F9;
  --card: #FFFFFF;
  --ink: #0F172A;
  --heading: #07152B;
  --muted: #475569;
  --line: #E2E8F0;

  /* برند */
  --accent: #3B82F6;                 /* دکمه‌ها، پس‌زمینه‌های تأکیدی */
  --accent-ink: #2563EB;             /* Hover دکمه‌ها */
  --accent-text: #2563EB;            /* آبی برای متن/لینک روی پس‌زمینه روشن (کنتراست بهتر) */
  --accent-soft: #DBEAFE;
  --accent-2: #60A5FA;               /* آبی ثانویه (جایگزین کهربایی قبلی) */
  --accent-2-soft: rgba(96, 165, 250, 0.16);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -22px rgba(7, 21, 43, 0.35);
  --shadow-sm: 0 8px 20px -12px rgba(7, 21, 43, 0.3);
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --footer-bg: #07152B;
  --footer-ink: #F8FAFC;
  --code-bg: #07152B;
  --code-ink: #F8FAFC;
}

:root[data-theme="dark"] {
  --bg: #07152B;
  --bg-soft: #0F2240;
  --card: #0B1B35;
  --ink: #F8FAFC;
  --heading: #F8FAFC;
  --muted: #94A3B8;
  --line: rgba(248, 250, 252, 0.12);

  --accent: #3B82F6;
  --accent-ink: #2563EB;
  --accent-text: #60A5FA;            /* آبی روشن برای تأکید در حالت تاریک */
  --accent-soft: rgba(59, 130, 246, 0.16);
  --accent-2: #93C5FD;               /* آبی روشن‌تر برای Hover/تأکید ثانویه */
  --accent-2-soft: rgba(147, 197, 253, 0.12);

  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 8px 20px -10px rgba(0, 0, 0, 0.5);

  --footer-bg: #040E1F;
  --code-bg: #0B1B35;
}

/* ---------- پایه ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.9;
  color: var(--ink);
  background-color: var(--bg);
  direction: rtl;
  text-align: right;
  transition: background-color 0.35s ease, color 0.35s ease;
  word-wrap: break-word;
}

img, video, svg { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }

h1, h2, h3, h4, h5, h6 {
  color: var(--heading);
  line-height: 1.5;
  margin: 0 0 0.5em;
  font-weight: 800;
}

p { margin: 0 0 1.2em; }

button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

.container { width: min(1180px, 92%); margin-inline: auto; }

::selection { background: var(--accent); color: #fff; }

:focus-visible { outline: 2px dashed var(--accent); outline-offset: 3px; border-radius: 4px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -60px; right: 1rem; z-index: 999;
  background: var(--accent); color: #fff;
  padding: 0.6rem 1.2rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------- اجزای کوچک ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.8rem 1.6rem; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.25s ease, color 0.25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 14px 28px -14px var(--accent); }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-text); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  cursor: pointer; transition: all 0.25s ease;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent-text); transform: translateY(-2px); }

.chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.78rem; font-weight: 700;
  padding: 0.32rem 0.8rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text);
  transition: all 0.25s ease;
}
.chip:hover { background: var(--accent); color: #fff; }
.chip-tag { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.chip-tag:hover { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.chip-hash { color: var(--accent-2); font-weight: 900; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.7rem; }
.chip-static { cursor: default; }

.section-title {
  display: flex; align-items: center; gap: 1rem;
  font-size: 1.35rem; font-weight: 800;
  margin: 0 0 2rem;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to left, var(--line), transparent); }
.section-title span { position: relative; padding-inline-start: 0.9rem; }
.section-title span::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 50%;
  width: 4px; height: 1.15em; transform: translateY(-50%);
  background: linear-gradient(var(--accent), var(--accent-2));
  border-radius: 4px;
}

/* ---------- هدر ---------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.header-bar { display: flex; align-items: center; gap: 1.5rem; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-ink));
  box-shadow: 0 12px 24px -12px var(--accent);
}
.brand-glyph { color: #fff; font-weight: 900; font-size: 1.35rem; line-height: 1; }
.brand-mark-lg { width: 58px; height: 58px; border-radius: 16px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.site-title { font-size: 1.25rem; font-weight: 900; margin: 0; }
.site-title a:hover { color: var(--accent-text); }
.site-desc { font-size: 0.75rem; color: var(--muted); }
.custom-logo-link img { max-height: 46px; width: auto; }

.primary-nav { margin-inline-start: auto; }
.primary-nav .menu { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.primary-nav .menu a {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.55rem 0.9rem; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  transition: all 0.2s ease;
}
.primary-nav .menu a:hover { color: var(--accent-text); background: var(--accent-soft); }
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a { color: var(--accent-text); background: var(--accent-soft); }

.primary-nav .menu-item-has-children { position: relative; }
.primary-nav .menu-item-has-children > a::after {
  content: ""; width: 7px; height: 7px;
  border-inline-start: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); opacity: 0.6;
}
.primary-nav .sub-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-start: 0;
  min-width: 210px; list-style: none; margin: 0; padding: 0.5rem;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all 0.28s var(--ease); z-index: 50;
}
.primary-nav .menu-item-has-children:hover > .sub-menu,
.primary-nav .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.primary-nav .sub-menu a { display: flex; border-radius: 8px; width: 100%; }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav-toggle { display: none; }
.nav-toggle-lines { display: flex; flex-direction: column; gap: 4.5px; width: 20px; }
.nav-toggle-lines i { height: 2px; width: 100%; background: currentColor; border-radius: 2px; transition: all 0.3s var(--ease); }
.nav-toggle-lines i:nth-child(2) { width: 70%; margin-inline-start: auto; }
body.nav-open .nav-toggle-lines i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.nav-open .nav-toggle-lines i:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle-lines i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- اورلی جستجو ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex; align-items: center; justify-content: center;
  animation: overlayIn 0.35s var(--ease);
}
.search-overlay[hidden] { display: none; }
.search-overlay-inner { position: relative; max-width: 640px; text-align: center; }
.search-close { position: absolute; top: -3rem; inset-inline-end: 0; }
.search-overlay-kicker { color: var(--accent-text); font-weight: 700; letter-spacing: 0.02em; margin-bottom: 0.6rem; }
.search-overlay .search-field {
  width: 100%; font-size: clamp(1.4rem, 4vw, 2.2rem); font-weight: 800;
  background: transparent; border: 0; border-bottom: 3px solid var(--accent);
  border-radius: 0; padding: 0.8rem 3.2rem 0.8rem 0.4rem; text-align: right;
}
.search-overlay .search-submit {
  position: absolute; inset-inline-end: 0; bottom: 0.8rem;
  background: var(--accent); color: #fff; border: 0;
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.25s var(--ease);
}
.search-overlay .search-submit:hover { transform: scale(1.08) rotate(-8deg); }
.search-overlay-hint { color: var(--muted); font-size: 0.9rem; margin-top: 1.2rem; }

@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- فرم جستجوی عادی ---------- */
.search-form { position: relative; display: flex; align-items: center; }
.search-field {
  width: 100%; padding: 0.75rem 1.1rem;
  padding-inline-end: 3.4rem;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; color: var(--ink); outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.search-field:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-field::placeholder { color: var(--muted); }
.search-submit {
  position: absolute; inset-inline-end: 5px;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: #fff; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.25s ease, transform 0.25s var(--ease);
}
.search-submit:hover { background: var(--accent-ink); transform: scale(1.06); }

/* ---------- هیرو ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  background:
    radial-gradient(48rem 26rem at 88% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(36rem 22rem at -5% 110%, var(--accent-2-soft), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; font-weight: 700; color: var(--accent-text);
  background: var(--accent-soft);
  padding: 0.4rem 1rem; border-radius: 999px; margin-bottom: 1.3rem;
}
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); animation: pulse 2.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.8); } }

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900; line-height: 1.35; letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
}
.hero-subtitle { font-size: 1.13rem; color: var(--muted); max-width: 34rem; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 2.2rem; }

.hero-stats { display: flex; gap: 2.2rem; margin: 0; padding: 0; }
.hero-stats dt { font-size: 1.7rem; font-weight: 900; color: var(--heading); line-height: 1; margin-bottom: 0.3rem; }
.hero-stats dd { margin: 0; font-size: 0.85rem; color: var(--muted); }

.hero-visual { position: relative; min-height: 340px; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(46px); opacity: 0.55; }
.hero-orb-1 { width: 210px; height: 210px; background: var(--accent); top: -30px; inset-inline-end: 10px; animation: float 7s ease-in-out infinite; }
.hero-orb-2 { width: 160px; height: 160px; background: var(--accent-2); bottom: 0; inset-inline-start: 20px; animation: float 9s ease-in-out infinite reverse; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }

.hero-card {
  position: absolute; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 0.7rem;
}
.hero-card-1 { width: 66%; top: 12%; inset-inline-end: 2%; transform: rotate(-2deg); animation: float 8s ease-in-out infinite; }
.hero-card-2 { width: 58%; bottom: 6%; inset-inline-start: 2%; transform: rotate(2deg); animation: float 10s ease-in-out infinite reverse; }

.hero-ring {
  position: absolute; width: 120px; height: 120px;
  border: 2px dashed var(--accent); border-radius: 50%;
  bottom: 14%; inset-inline-end: 4%; opacity: 0.5;
  animation: spin 22s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   بردهای هیرو — داشبورد BI + بوم ورک‌فلو
   این بلوک را «بعد از» بخش هیرو در vizbilab.css اضافه کن
   (قوانین قبلی .hero-card-1 / .hero-card-2 / .hero-card-line را می‌شود حذف کرد)
   ========================================================================== */

.hero-visual { min-height: 500px; }

.hero-card { padding: 0; gap: 0; overflow: hidden; direction: ltr; }
.hero-card-1 { width: 78%; top: 0; inset-inline-end: 0; transform: rotate(-1.5deg); }
.hero-card-2 { width: 70%; bottom: 0; inset-inline-start: 0; transform: rotate(1.5deg); }
.hero-ring { bottom: auto; top: 46%; inset-inline-end: 2%; width: 96px; height: 96px; }

/* ---------- نوار بالای برد ---------- */
.board-bar {
  display: flex; align-items: center; gap: 0.35rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-soft) 70%, transparent);
}
.board-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.board-bar i:first-child { background: var(--accent); }
.board-title {
  margin-inline-start: auto; direction: rtl;
  font-size: 0.72rem; font-weight: 700; color: var(--muted);
}
.flow-status {
  direction: rtl; font-size: 0.66rem; font-weight: 700;
  color: var(--accent-text); background: var(--accent-soft);
  padding: 0.12rem 0.55rem; border-radius: 999px; margin-inline-start: 0.4rem;
}
.flow-status::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2); margin-inline-end: 0.3rem; animation: pulse 2.2s infinite;
}

/* ---------- برد ۱: داشبورد BI ---------- */
.board-bi { padding-bottom: 0.9rem; }

.bi-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem; padding: 0.8rem 0.9rem 0; }
.bi-kpi {
  direction: rtl; text-align: right;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 0.5rem 0.65rem;
  display: flex; flex-direction: column; gap: 0.1rem;
}
.bi-kpi small { font-size: 0.62rem; color: var(--muted); line-height: 1.4; }
.bi-kpi b { font-size: 1.05rem; font-weight: 900; color: var(--heading); line-height: 1.3; }
.bi-kpi em { font-style: normal; font-size: 0.62rem; font-weight: 700; }
.bi-kpi .up { color: var(--accent-text); }
.bi-kpi .down { color: var(--muted); }

.bi-charts { display: grid; grid-template-columns: 1.5fr 1fr; gap: 0.55rem; padding: 0.55rem 0.9rem 0; }
.bi-panel {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 0.7rem; height: 104px;
}
.bi-bars { display: flex; align-items: flex-end; gap: 6px; }
.bi-bars span {
  flex: 1; height: var(--h); border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, var(--accent), var(--accent-2));
  transform-origin: bottom; animation: bar-grow 1s var(--ease) both;
}
.bi-bars span:nth-child(odd) { opacity: 0.75; }
.bi-bars span:nth-child(2) { animation-delay: 0.05s; }
.bi-bars span:nth-child(3) { animation-delay: 0.1s; }
.bi-bars span:nth-child(4) { animation-delay: 0.15s; }
.bi-bars span:nth-child(5) { animation-delay: 0.2s; }
.bi-bars span:nth-child(6) { animation-delay: 0.25s; }
.bi-bars span:nth-child(7) { animation-delay: 0.3s; }
.bi-bars span:nth-child(8) { animation-delay: 0.35s; }
@keyframes bar-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.bi-donut-wrap { display: flex; align-items: center; justify-content: center; }
.bi-donut {
  position: relative; width: 78px; height: 78px; border-radius: 50%;
  background: conic-gradient(var(--accent) 0 52%, var(--accent-2) 52% 80%, var(--line) 80% 100%);
}
.bi-donut::after {
  content: ""; position: absolute; inset: 17px; border-radius: 50%;
  background: var(--bg-soft);
}

/* ---------- برد ۲: بوم ورک‌فلو (n8n) ---------- */
.board-flow .flow-canvas {
  display: block; width: 100%; height: auto; padding: 0.5rem 0.6rem 0.4rem;
  background-image: radial-gradient(var(--line) 1px, transparent 1.2px);
  background-size: 16px 16px;
  overflow: visible;
}

.flow-node rect { fill: var(--card); stroke: var(--line); stroke-width: 1.2; }
.flow-node:first-of-type rect { stroke: var(--accent); }          /* نود تریگر */
.flow-node .ico { fill: var(--accent-text); }
.flow-node .ico-line { fill: none; stroke: var(--accent-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.flow-node .ico-text { fill: var(--accent-text); font-family: var(--font); font-size: 17px; font-weight: 800; }

.flow-line {
  fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round;
  stroke-dasharray: 5 5; animation: flow-dash 1.2s linear infinite;
}
@keyframes flow-dash { to { stroke-dashoffset: -20; } }

.flow-port { fill: var(--card); stroke: var(--accent); stroke-width: 1.6; }

.flow-label { fill: var(--muted); font-family: var(--font); font-size: 9.5px; font-weight: 700; text-anchor: middle; direction: rtl; }

/* ---------- موبایل: برد‌ها پنهان می‌مانند (مثل قبل) ---------- */
@media (max-width: 900px) { .hero-visual { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .flow-line, .bi-bars span { animation: none; }
}

/* ---------- تیکر ---------- */
.ticker {
  border-block: 1px solid var(--line);
  background: var(--card);
  overflow: hidden; padding: 0.8rem 0;
}
.ticker-track { display: flex; gap: 3rem; width: max-content; animation: ticker 42s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 0.7rem; font-weight: 600; font-size: 0.92rem; white-space: nowrap; color: var(--muted); }
.ticker-star { color: var(--accent-2); font-style: normal; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ---------- برگزیده ---------- */
.featured { padding: 2.6rem 0 0.6rem; }
.featured-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.4rem; }
.feature-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.feature-card-lg { position: relative; display: flex; flex-direction: column; grid-row: span 3; }
.feature-media a, .thumb-link { display: block; overflow: hidden; position: relative; }
.feature-media img, .post-card-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.6s var(--ease); }
.feature-card:hover img, .post-card:hover img { transform: scale(1.05); }
.feature-body { padding: 1.5rem 1.6rem 1.6rem; }
.feature-title { font-size: 1.5rem; font-weight: 800; margin: 0.2rem 0 0.6rem; line-height: 1.6; }
.feature-title a:hover { color: var(--accent-text); }
.feature-excerpt { color: var(--muted); font-size: 0.98rem; margin-bottom: 1rem; }

.feature-card-sm { display: flex; gap: 1rem; padding: 0.9rem; align-items: center; }
.feature-media-sm, .feature-media-sm a { width: 120px; flex-shrink: 0; }
.feature-media-sm img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.feature-title-sm { font-size: 1.02rem; margin: 0.25rem 0 0.35rem; line-height: 1.7; font-weight: 700; }
.feature-title-sm a:hover { color: var(--accent-text); }
.feature-date { font-size: 0.8rem; color: var(--muted); }

.thumb-fallback {
  display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 16 / 9; color: color-mix(in srgb, var(--accent) 65%, #fff);
  background:
    radial-gradient(14rem 8rem at 80% 20%, var(--accent-soft), transparent),
    repeating-linear-gradient(-45deg, var(--bg-soft) 0 14px, transparent 14px 28px),
    var(--bg-soft);
}
.thumb-fallback-sm { aspect-ratio: 4 / 3; border-radius: var(--radius-sm); width: 120px; height: 90px; }

/* ---------- گرید نوشته‌ها ---------- */
.posts-section { padding: 2.8rem 0 1rem; }
.posts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-bottom: 2.4rem; }
.posts-grid-3 { grid-template-columns: repeat(3, 1fr); }

.post-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.3s ease;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.post-card-media { position: relative; }
.sticky-badge {
  position: absolute; top: 0.9rem; inset-inline-start: 0.9rem; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--accent); color: #fff;
  font-size: 0.72rem; font-weight: 700;
  padding: 0.3rem 0.7rem; border-radius: 999px;
  box-shadow: 0 8px 18px -8px var(--accent);
}
.post-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.3rem 1.4rem 1.1rem; }
.post-card-title { font-size: 1.18rem; font-weight: 800; margin: 0.1rem 0 0.55rem; line-height: 1.75; }
.post-card-title a { background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 0.35s var(--ease); }
.post-card-title a:hover { background-size: 100% 2px; }
.post-card-excerpt { color: var(--muted); font-size: 0.93rem; flex: 1; margin-bottom: 1rem; }
.post-card-excerpt p { margin: 0; }
.post-card-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px dashed var(--line); padding-top: 0.9rem; }
.read-more {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--muted); flex-shrink: 0;
  transition: all 0.3s var(--ease);
}
.read-more:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateX(-4px); }

.post-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; font-size: 0.8rem; color: var(--muted); }
.meta-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.meta-item a:hover { color: var(--accent-text); }
.meta-item svg { opacity: 0.75; }

/* ---------- چیدمان محتوا + سایدبار ---------- */
.content-area {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px;
  gap: 2.6rem; padding: 3rem 0 4rem; align-items: start;
}
.posts-area > .posts-grid { grid-template-columns: repeat(2, 1fr); }
.page .content-area, .page-template .content-area { grid-template-columns: minmax(0, 1fr); }

.archive-header { margin-bottom: 2.2rem; }
.archive-kicker {
  display: inline-block; font-size: 0.82rem; font-weight: 700;
  color: var(--accent-text); background: var(--accent-soft);
  padding: 0.3rem 0.9rem; border-radius: 999px; margin-bottom: 0.8rem;
}
.archive-title { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 900; margin: 0 0 0.4rem; }
.archive-desc { color: var(--muted); max-width: 44rem; }
.archive-search { margin-top: 1.2rem; max-width: 420px; }
.search-count { color: var(--muted); margin-bottom: 1.6rem; }
.search-count strong { color: var(--accent-text); }

.site-sidebar { display: flex; flex-direction: column; gap: 1.4rem; position: sticky; top: calc(var(--header-h) + 1.4rem); }
.widget {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem;
}
.widget-title {
  font-size: 1.02rem; font-weight: 800; margin: 0 0 1rem;
  padding-inline-start: 0.85rem; position: relative;
}
.widget-title::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 50%;
  width: 4px; height: 1.05em; transform: translateY(-50%);
  background: linear-gradient(var(--accent), var(--accent-2)); border-radius: 4px;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 0.45rem 0; border-bottom: 1px dashed var(--line); font-size: 0.93rem; display: flex; justify-content: space-between; gap: 0.6rem; }
.widget ul li:last-child { border-bottom: 0; padding-bottom: 0; }
.widget ul li::before { content: "‹"; color: var(--accent-2); font-weight: 900; line-height: 1.9; }
.widget a:hover { color: var(--accent-text); }
.widget select { width: 100%; padding: 0.6rem 0.8rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg); }

.widget-recent-list li { display: flex; gap: 0.9rem; align-items: center; }
.widget-recent-list li::before { display: none; }
.widget-thumb { width: 74px; flex-shrink: 0; }
.widget-thumb img { width: 74px; height: 58px; object-fit: cover; border-radius: 10px; display: block; }
.widget-thumb .thumb-fallback-sm { width: 74px; height: 58px; }
.widget-recent-title { display: block; font-weight: 700; font-size: 0.9rem; line-height: 1.7; }
.widget-recent-list time { font-size: 0.76rem; color: var(--muted); }

/* ---------- صفحه‌بندی ---------- */
.pagination { display: flex; justify-content: center; margin-top: 1rem; }
.pagination .nav-links { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.page-numbers {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem;
  min-width: 42px; height: 42px; padding: 0 0.9rem;
  border-radius: 999px; border: 1px solid var(--line);
  font-weight: 700; font-size: 0.9rem; color: var(--ink); background: var(--card);
  transition: all 0.25s ease;
}
.page-numbers:hover { border-color: var(--accent); color: var(--accent-text); }
.page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-numbers.dots { border: 0; background: transparent; min-width: auto; }
.page-links { margin: 1.5rem 0; color: var(--muted); }
.page-links a .post-page-numbers, .page-links > .post-page-numbers { margin-inline-start: 0.4rem; }

/* ---------- نوشتهٔ تکی ---------- */
.single-area { min-width: 0; }
.single-header { margin-bottom: 1.6rem; }
.single-title { font-size: clamp(1.9rem, 4.5vw, 2.9rem); font-weight: 900; line-height: 1.5; margin: 0.3rem 0 0.9rem; }
.single-hero { margin: 0 0 2rem; }
.single-hero img { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; }
.single-hero figcaption { text-align: center; font-size: 0.85rem; color: var(--muted); margin-top: 0.7rem; }

.post-content { font-size: 1.06rem; line-height: 2.15; }
.post-content > *:first-child { margin-top: 0; }
.post-content h2 { font-size: 1.55rem; margin: 2rem 0 0.8rem; padding-inline-start: 0.9rem; position: relative; }
.post-content h2::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.32em; bottom: 0.32em; width: 4px; border-radius: 4px; background: linear-gradient(var(--accent), var(--accent-2)); }
.post-content h3 { font-size: 1.28rem; margin: 1.7rem 0 0.7rem; }
.post-content h4 { font-size: 1.12rem; margin: 1.5rem 0 0.6rem; }
.post-content a { color: var(--accent-text); font-weight: 600; border-bottom: 1px dashed color-mix(in srgb, var(--accent-text) 55%, transparent); }
.post-content a:hover { border-bottom-style: solid; }
.post-content ul, .post-content ol { margin: 0 0 1.2em; padding-inline-start: 1.4rem; }
.post-content li { margin-bottom: 0.4em; }
.post-content ul li::marker { color: var(--accent-2); }

.post-content blockquote,
.post-content .wp-block-quote {
  position: relative; margin: 2rem 0; padding: 1.4rem 1.7rem;
  background: var(--card); border: 1px solid var(--line);
  border-inline-start: 4px solid var(--accent);
  border-radius: var(--radius-sm); font-style: normal;
}
.post-content blockquote::before {
  content: "«"; position: absolute; top: -0.4rem; inset-inline-end: 1rem;
  font-size: 3.2rem; color: var(--accent-2); line-height: 1; opacity: 0.8;
}
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content blockquote cite { display: block; margin-top: 0.6rem; font-size: 0.85rem; color: var(--muted); font-style: normal; }

.post-content code { background: var(--bg-soft); padding: 0.15em 0.5em; border-radius: 6px; font-size: 0.88em; direction: ltr; unicode-bidi: embed; }
.post-content pre {
  background: var(--code-bg); color: var(--code-ink); border-radius: var(--radius-sm);
  padding: 1.2rem 1.4rem; overflow-x: auto; direction: ltr; text-align: left;
  font-size: 0.9rem; line-height: 1.8; margin: 1.6rem 0; border: 1px solid var(--line);
}
.post-content pre code { background: none; padding: 0; color: inherit; }

.post-content img, .post-content .wp-block-image img { border-radius: var(--radius-sm); }
.post-content figure { margin: 1.8rem 0; }
.post-content figcaption { font-size: 0.85rem; color: var(--muted); text-align: center; margin-top: 0.6rem; }
.post-content table, .post-content .wp-block-table table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: 0.95rem; }
.post-content th, .post-content td { border: 1px solid var(--line); padding: 0.6rem 0.9rem; }
.post-content th { background: var(--bg-soft); font-weight: 800; }
.post-content hr { border: 0; height: 1px; background: var(--line); margin: 2.2rem 0; }

.alignwide { margin-inline: -3rem; max-width: none; }
.alignfull { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); }
.alignright { float: right; margin: 0.4rem 0 1rem 1.4rem; }
.alignleft { float: left; margin: 0.4rem 1.4rem 1rem 0; }
.aligncenter { margin-inline: auto; display: block; }
.wp-caption, .wp-block-image figcaption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--muted); text-align: center; }
.wp-block-button__link, .wp-element-button {
  background: var(--accent); color: #fff; border-radius: 999px;
  padding: 0.75rem 1.6rem; font-weight: 700;
}
.wp-block-cover { border-radius: var(--radius); overflow: hidden; }
.sticky .sticky-badge { display: inline-flex; }
.bypostauthor > .comment-body { border-inline-start-color: var(--accent-2); }

.single-footer { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.tag-row { margin: 0; }
.share-box { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.share-label { font-size: 0.85rem; color: var(--muted); font-weight: 700; }

.post-nav { margin: 2.2rem 0 0; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.post-navigation a {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.3rem;
  transition: all 0.3s var(--ease);
}
.post-navigation a:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.post-nav-label { display: block; font-size: 0.78rem; color: var(--accent-text); font-weight: 700; margin-bottom: 0.35rem; }
.post-nav-title { font-weight: 700; line-height: 1.7; }
.nav-next { text-align: left; }

/* ---------- باکس نویسنده ---------- */
.author-box {
  display: flex; gap: 1.2rem; align-items: flex-start;
  background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; margin: 2.6rem 0 0;
}
.author-avatar img { border-radius: 50%; border: 3px solid var(--accent-soft); }
.author-kicker { font-size: 0.78rem; color: var(--accent-text); font-weight: 700; }
.author-name { font-size: 1.15rem; margin: 0.15rem 0 0.4rem; font-weight: 800; }
.author-name a:hover { color: var(--accent-text); }
.author-bio { font-size: 0.92rem; color: var(--muted); margin: 0; }

/* ---------- مرتبط ---------- */
.related-posts { margin-top: 3rem; }

/* ---------- دیدگاه‌ها ---------- */
.comments-area { margin-top: 3rem; }
.comments-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 1.6rem; }
.comments-title span { color: var(--accent-text); }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .comment { margin-bottom: 1.1rem; }
.comment-list .children { list-style: none; margin: 1rem 0 0; padding-inline-start: 2.4rem; border-inline-start: 2px dashed var(--line); }
.comment-body {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem 1.3rem;
}
.comment-author { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.6rem; }
.comment-author .avatar { border-radius: 50%; }
.comment-author .fn { font-weight: 800; font-style: normal; }
.comment-author .says { display: none; }
.comment-metadata { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.7rem; }
.comment-content p { margin-bottom: 0.6rem; font-size: 0.95rem; }
.reply { margin-top: 0.6rem; }
.comment-reply-link { font-size: 0.8rem; font-weight: 700; color: var(--accent-text); background: var(--accent-soft); padding: 0.3rem 0.85rem; border-radius: 999px; }
.comment-reply-link:hover { background: var(--accent); color: #fff; }
.comment-awaiting-moderation { font-size: 0.8rem; color: var(--accent-text); font-style: normal; }

.comment-respond { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.comment-reply-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.6rem; }
.comment-notes { font-size: 0.85rem; color: var(--muted); }
.comment-form { display: grid; gap: 1rem; }
.comment-form-author, .comment-form-email, .comment-form-url { margin: 0; }
.comment-form input:not([type="submit"]),
.comment-form textarea {
  width: 100%; padding: 0.8rem 1.1rem;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--ink); outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.comment-form label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 0.35rem; }
.comment-form-cookies-consent { display: flex; gap: 0.5rem; align-items: center; font-size: 0.85rem; color: var(--muted); }
.comment-form-cookies-consent input { width: auto; }
.form-submit { margin: 0; }
.comment-submit { border: 0; }
.no-comments { color: var(--muted); }
.comments-nav { margin: 1rem 0; display: flex; justify-content: space-between; }

/* ---------- موضوعات ---------- */
.topics { padding: 2.8rem 0 1.5rem; }
.topics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.topic-card {
  display: flex; align-items: center; gap: 0.8rem;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem 1.3rem;
  transition: all 0.3s var(--ease);
}
.topic-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.topic-card svg { margin-inline-start: auto; color: var(--muted); transition: transform 0.3s var(--ease), color 0.3s ease; }
.topic-card:hover svg { transform: translateX(-5px); color: var(--accent-text); }
.topic-name { font-weight: 800; font-size: 1.05rem; }
.topic-count { font-size: 0.78rem; color: var(--muted); }

/* ---------- خبرنامه ---------- */
.newsletter {
  margin: 3rem 0 4rem;
  background:
    radial-gradient(40rem 18rem at 90% 0%, rgba(59, 130, 246, 0.38), transparent),
    linear-gradient(120deg, #0B1B35, #07152B);
  border-block: 1px solid rgba(96, 165, 250, 0.22);
  color: #F8FAFC;
  padding: 3.2rem 0;
}
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.newsletter-title { color: #F8FAFC; font-size: 1.7rem; font-weight: 900; margin-bottom: 0.3rem; }
.newsletter-copy p { color: rgba(248, 250, 252, 0.75); margin: 0; }
.newsletter-form { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.newsletter-form input {
  padding: 0.85rem 1.3rem; border-radius: 999px; border: 1px solid rgba(248, 250, 252, 0.28);
  background: rgba(248, 250, 252, 0.08); color: #F8FAFC; min-width: 260px; outline: none;
}
.newsletter-form input::placeholder { color: rgba(248, 250, 252, 0.6); }
.newsletter-form input:focus { background: rgba(248, 250, 252, 0.14); border-color: #60A5FA; }
.newsletter-form .btn-primary { background: #3B82F6; color: #fff; box-shadow: none; }
.newsletter-form .btn-primary:hover { background: #2563EB; color: #fff; transform: translateY(-2px); }

/* ---------- فوتر ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); margin-top: auto; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 0.8fr 1fr 0.7fr;
  gap: 2.4rem; padding: 3.6rem 0 2.4rem;
}
.footer-tagline { color: rgba(248, 250, 252, 0.6); font-size: 0.92rem; margin: 1rem 0 1.2rem; max-width: 22rem; }
.social-links { display: flex; gap: 0.55rem; }
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(248, 250, 252, 0.18); color: rgba(248, 250, 252, 0.75);
  transition: all 0.3s var(--ease);
}
.social-link:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-3px); }
.footer-title { color: var(--footer-ink); font-size: 1rem; font-weight: 800; margin-bottom: 1.1rem; }
.footer-menu, .footer-cats { list-style: none; margin: 0; padding: 0; }
.footer-menu li, .footer-cats li { margin-bottom: 0.55rem; }
.footer-menu a, .footer-cats a { color: rgba(248, 250, 252, 0.65); font-size: 0.92rem; display: inline-flex; align-items: center; gap: 0.4rem; }
.footer-menu a::before, .footer-cats a::before { content: "›"; color: #60A5FA; font-weight: 900; }
.footer-menu a:hover, .footer-cats a:hover { color: #93C5FD; padding-inline-start: 0.25rem; }
.footer-recent { list-style: none; margin: 0; padding: 0; }
.footer-recent li { margin-bottom: 0.8rem; }
.footer-recent a { display: block; font-size: 0.92rem; font-weight: 600; color: rgba(248, 250, 252, 0.85); line-height: 1.7; }
.footer-recent a:hover { color: #93C5FD; }
.footer-recent time { font-size: 0.76rem; color: rgba(248, 250, 252, 0.45); }
.footer-bottom { border-top: 1px solid rgba(248, 250, 252, 0.1); padding: 1.2rem 0; }
.footer-bottom-inner { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; font-size: 0.84rem; color: rgba(248, 250, 252, 0.55); }

/* ---------- ۴۰۴ و خالی ---------- */
.error-404 { text-align: center; padding: 4.5rem 0 5rem; }
.error-code {
  display: block; font-size: clamp(6rem, 18vw, 11rem); font-weight: 900; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
  text-stroke: 2px var(--accent);
  opacity: 0.85; margin-bottom: 1rem;
}
.error-title { font-size: 1.7rem; font-weight: 900; }
.error-desc { color: var(--muted); max-width: 32rem; margin-inline: auto; }
.error-search { max-width: 460px; margin: 1.6rem auto 3rem; }
.error-404 .section-title { justify-content: center; text-align: right; }
.error-404 .posts-grid { text-align: right; margin-bottom: 2.6rem; }
.error-404 .btn { margin-inline: auto; }

.no-results { text-align: center; padding: 3rem 1rem; }
.no-results-icon { color: var(--accent); opacity: 0.6; margin-bottom: 1rem; display: flex; justify-content: center; }
.no-results-title { font-size: 1.5rem; font-weight: 900; }
.no-results p { color: var(--muted); }
.no-results .search-form { max-width: 420px; margin-inline: auto; }

/* ---------- انیمیشن ورود ---------- */
.post-card, .feature-card, .topic-card, .widget { animation: rise 0.6s var(--ease) both; }
.posts-grid > .post-card:nth-child(2), .featured-grid > .feature-card:nth-child(2) { animation-delay: 0.08s; }
.posts-grid > .post-card:nth-child(3), .featured-grid > .feature-card:nth-child(3) { animation-delay: 0.16s; }
.posts-grid > .post-card:nth-child(4), .featured-grid > .feature-card:nth-child(4) { animation-delay: 0.24s; }
.posts-grid > .post-card:nth-child(5) { animation-delay: 0.32s; }
.posts-grid > .post-card:nth-child(6) { animation-delay: 0.4s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 1080px) {
  .content-area { grid-template-columns: minmax(0, 1fr) 290px; gap: 1.8rem; }
  .topics-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .posts-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .alignwide { margin-inline: 0; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .featured-grid { grid-template-columns: 1fr; }
  .feature-card-lg { grid-row: auto; }
  .content-area { grid-template-columns: 1fr; }
  .site-sidebar { position: static; }
  .alignright, .alignleft { float: none; margin: 1rem 0; display: block; }

  .nav-toggle { display: inline-flex; }
  .primary-nav .menu {
    position: fixed; inset-inline: 0; top: var(--header-h); z-index: 300;
    flex-direction: column; gap: 0.2rem; align-items: stretch;
    background: var(--card); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 1rem 4%; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: all 0.32s var(--ease);
  }
  body.nav-open .primary-nav .menu { opacity: 1; visibility: visible; transform: translateY(0); }
  body.nav-open { overflow: hidden; }
  .primary-nav .menu a { padding: 0.8rem 1rem; border-radius: var(--radius-sm); }
  .primary-nav .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-inline-start: 2px dashed var(--line);
    margin: 0 1rem 0.4rem; padding: 0 0.8rem; background: transparent;
    display: none;
  }
  .primary-nav .menu-item-has-children.open > .sub-menu { display: block; }
}

@media (max-width: 640px) {
  .posts-grid, .posts-grid-3, .posts-area > .posts-grid { grid-template-columns: 1fr; }
  .topics-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.4rem; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .brand-text .site-desc { display: none; }
  .single-footer { flex-direction: column; align-items: flex-start; }
  .author-box { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}