/* ==========================================================================
   Sima Blog — Theme Stylesheet
   ---------------------------------------------------------------------------
   Persian-first (RTL)، dark canvas، violet-500 (#8B5CF6)، Vazirmatn variable.
   یک source of truth برای همه‌ی صفحات وردپرس. بدون build step.
   الگو گرفته از sima-landing/assets/css/{style,blog}.css اما تمیز شده و
   فقط شامل چیزهایی که در بلاگ استفاده می‌شود + استایل‌های Gutenberg.
   ========================================================================== */

/* ---------- Font ---------- */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-VariableFont_wght.ttf") format("truetype-variations"),
       url("../fonts/Vazirmatn-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --primary:        #8B5CF6;
  --primary-dark:   #7C3AED;
  --primary-soft:   rgba(139, 92, 246, 0.16);
  --primary-glow:   rgba(139, 92, 246, 0.40);

  --accent:         #C4B5FD;
  --accent-pink:    #EC4899;
  --accent-emerald: #10B981;
  --accent-sky:     #38BDF8;
  --accent-amber:   #F59E0B;

  --bg:             #09090B;
  --bg-elev-1:      #0F0F12;
  --bg-elev-2:      #18181B;
  --bg-elev-3:      #1F1F23;
  --border:         #2A2A30;
  --border-strong:  #3F3F46;
  --text:           #FAFAFA;
  --text-mute:      #A1A1AA;
  --text-dim:       #71717A;

  --radius-sm:      10px;
  --radius:         14px;
  --radius-lg:      20px;
  --radius-xl:      28px;

  --shadow-soft:    0 10px 30px -10px rgba(0,0,0,0.5);
  --shadow-glow:    0 20px 60px -20px var(--primary-glow);
  --shadow-card:    0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 24px -12px rgba(0,0,0,0.6);

  --container:      1200px;
  --container-narrow: 760px;
  --gutter:         clamp(16px, 4vw, 32px);

  --font-fa:        "Vazirmatn", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html, body {
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-fa);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-feature-settings: "ss02", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--primary); color: white; }

main { max-width: 100%; overflow-x: clip; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { position: relative; padding: clamp(56px, 8vw, 96px) 0; }

/* ---------- Screen-reader helpers ---------- */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px; width: 1px;
  margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background-color: var(--primary);
  clip: auto !important;
  clip-path: none;
  color: white;
  display: block;
  font-size: 14px;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* ---------- Skip link ---------- */
.skip-to-content {
  position: absolute !important;
  top: 0 !important;
  left: 1rem !important;
  display: inline-block !important;
  transform: translateY(-200%) !important;
  z-index: 9999;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  transition: transform 0.2s ease;
}
.skip-to-content:focus,
.skip-to-content:focus-visible {
  transform: translateY(0) !important;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---------- Ambient background ---------- */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% -10%, rgba(139, 92, 246, 0.20) 0%, transparent 60%),
    radial-gradient(40% 35% at 95% 20%, rgba(236, 72, 153, 0.08) 0%, transparent 70%),
    radial-gradient(35% 30% at 5% 70%, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
}
.ambient::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at top, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at top, black 30%, transparent 70%);
  opacity: 0.4;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(9, 9, 11, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}
.nav.scrolled {
  background: rgba(9, 9, 11, 0.78);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.05rem; color: var(--text);
}
.brand-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  filter: drop-shadow(0 6px 16px rgba(236, 72, 153, 0.28));
  flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-mute);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-links a.is-active,
.nav-links a[aria-current="page"] {
  color: var(--accent);
  background: var(--primary-soft);
}
.nav-cta { display: inline-flex; gap: 10px; }
@media (max-width: 880px) { .nav-links { display: none; } }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
  line-height: 1;
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 10px 24px -12px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover {
  box-shadow: 0 16px 36px -10px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-ghost {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: var(--primary); }

.btn-soft {
  background: var(--primary-soft);
  color: var(--accent);
  border-color: rgba(139, 92, 246, 0.30);
}
.btn-soft:hover { background: rgba(139, 92, 246, 0.24); color: white; }

.btn-sm { padding: 8px 14px; font-size: 0.85rem; border-radius: 10px; }

/* ==========================================================================
   Blog index — hero + list
   ========================================================================== */
.blog-page {
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: clamp(64px, 8vw, 120px);
}

.blog-hero {
  position: relative;
  text-align: center;
  max-width: 820px;
  margin: 0 auto clamp(40px, 6vw, 72px);
}
.blog-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(139, 92, 246, 0.28);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.blog-hero__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}
.blog-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 4.6vw, 2.875rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.blog-hero__lead {
  margin: 0 auto;
  max-width: 60ch;
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
  color: var(--text-mute);
  line-height: 1.8;
}

.blog-filters {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px;
  margin-top: 28px;
}
.blog-pill {
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}
.blog-pill:hover { color: var(--text); border-color: var(--border-strong); }
.blog-pill.is-active,
.blog-pill[aria-current="page"] {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
}

/* --- List grid --- */
.blog-list {
  display: grid;
  gap: clamp(20px, 2.5vw, 32px);
  grid-template-columns: 1fr;
}
@media (min-width: 768px)  { .blog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .blog-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.blog-card {
  display: flex; flex-direction: column;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  color: inherit;
  content-visibility: auto;
  contain-intrinsic-size: 420px;
}
.blog-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 14px 32px -12px rgba(0,0,0,0.45), 0 4px 12px -4px rgba(139,92,246,0.25);
}
.blog-card:hover .blog-card__title { color: var(--accent); }
.blog-card:hover .blog-card__image img { transform: scale(1.05); filter: saturate(1.05); }

.blog-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.blog-card__image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-elev-2);
}
.blog-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.3s ease;
}
.blog-card__category {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: white;
  background: rgba(9, 9, 11, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  z-index: 1;
}
.blog-card__body {
  display: flex; flex-direction: column;
  gap: 12px;
  padding: clamp(18px, 2vw, 24px);
  flex: 1;
}
.blog-card__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__excerpt {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-mute);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__meta {
  margin-top: auto;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.blog-card__meta .sep { opacity: 0.5; }
.blog-card__meta .badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.72rem;
}

/* ==========================================================================
   Single post
   ========================================================================== */
.post-article {
  position: relative;
  padding-top: clamp(24px, 4vw, 48px);
  padding-bottom: clamp(64px, 8vw, 120px);
}

/* Breadcrumb */
.post-breadcrumb {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: clamp(20px, 3vw, 32px);
}
.post-breadcrumb ol, .post-breadcrumb ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
}
.post-breadcrumb li { display: inline-flex; align-items: center; }
.post-breadcrumb a { color: var(--text-mute); transition: color 0.2s; }
.post-breadcrumb a:hover { color: var(--primary); }
.post-breadcrumb .sep { color: var(--text-dim); opacity: 0.6; font-size: 0.75rem; }
.post-breadcrumb .current,
.post-breadcrumb li[aria-current="page"] {
  color: var(--text);
  font-weight: 500;
  max-width: 60ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Post hero */
.post-hero { margin-bottom: clamp(28px, 4vw, 48px); }
.post-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(1.85rem, 4.4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.post-hero .post-lede {
  margin: 0 0 24px;
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  line-height: 1.85;
  color: var(--text-mute);
  max-width: 64ch;
}

.post-featured {
  position: relative;
  margin: clamp(20px, 3vw, 32px) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
}
.post-featured img {
  width: 100%; height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Post meta strip */
.post-meta {
  display: flex; flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.88rem;
  color: var(--text-mute);
  padding: 14px 0;
  border-block: 1px solid var(--border);
  margin-bottom: 24px;
}
.post-meta__item { display: inline-flex; align-items: center; gap: 6px; }
.post-meta__item svg { width: 16px; height: 16px; color: var(--primary); }
.post-meta__category {
  color: var(--accent);
  background: var(--primary-soft);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.78rem;
  transition: background 0.2s;
}
.post-meta__category:hover { background: rgba(139,92,246,0.28); }

/* ==========================================================================
   Post body — long-form reading typography
   (Applied to WP `.entry-content` and Gutenberg default blocks)
   ========================================================================== */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.95;
  color: var(--text);
  max-width: var(--container-narrow);
  margin: 0 auto;
  content-visibility: auto;
  contain-intrinsic-size: 1px 1800px;
}

.entry-content > * + * { margin-top: 1.1em; }

.entry-content h2 {
  margin: 2.2em 0 0.6em;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.35;
  scroll-margin-top: 96px;
}
.entry-content h2::before {
  content: "";
  display: block;
  width: 44px; height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-pink) 100%);
  border-radius: 3px;
  margin-bottom: 14px;
}
.entry-content h3 {
  margin: 1.8em 0 0.5em;
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--text);
  scroll-margin-top: 96px;
}
.entry-content h4 {
  margin: 1.4em 0 0.4em;
  font-size: 1.075rem;
  font-weight: 700;
  color: var(--text);
}
.entry-content p { margin: 0 0 1em; color: var(--text); }

.entry-content a:not(.wp-block-button__link):not(.btn) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(196, 181, 253, 0.4);
  text-underline-offset: 4px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.entry-content a:not(.wp-block-button__link):not(.btn):hover {
  color: white;
  text-decoration-color: var(--primary);
}

.entry-content strong { color: var(--text); font-weight: 700; }
.entry-content em     { color: var(--accent); font-style: normal; }
.entry-content mark   { background: var(--primary-soft); color: var(--accent); padding: 1px 4px; border-radius: 4px; }
.entry-content code   {
  background: var(--bg-elev-2); color: var(--accent);
  padding: 2px 6px; border-radius: 6px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.entry-content pre {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.7;
}
.entry-content pre code { background: none; padding: 0; color: var(--text); }

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.2em;
  padding-inline-start: 1.4em;
  color: var(--text);
}
.entry-content li { margin-bottom: 0.55em; }
.entry-content li::marker { color: var(--primary); }

.entry-content blockquote {
  margin: 1.6em 0;
  padding: 18px clamp(18px, 2.5vw, 28px);
  border-inline-start: 4px solid var(--primary);
  background: var(--bg-elev-1);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.85;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: normal;
}

.entry-content figure {
  margin: 1.8em 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
}
.entry-content figure img,
.entry-content .wp-block-image img { width: 100%; height: auto; display: block; }
.entry-content figcaption {
  padding: 12px 18px;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg-elev-1);
}

.entry-content hr {
  margin: 2.2em 0;
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

/* Tables */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 0.95rem;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.entry-content th,
.entry-content td {
  padding: 12px 14px;
  text-align: start;
  border-bottom: 1px solid var(--border);
}
.entry-content th {
  background: var(--bg-elev-2);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.88rem;
}
.entry-content tr:last-child td { border-bottom: 0; }

/* Details/summary (used for FAQ) */
.entry-content details.sima-faq {
  margin: 0.6em 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev-1);
  transition: border-color 0.2s;
}
.entry-content details.sima-faq[open] { border-color: rgba(139,92,246,0.30); }
.entry-content details.sima-faq > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.entry-content details.sima-faq > summary::-webkit-details-marker { display: none; }
.entry-content details.sima-faq > summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px; height: 10px;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.entry-content details.sima-faq[open] > summary::after { transform: rotate(-135deg); }
.entry-content details.sima-faq > *:not(summary) {
  padding: 0 18px 16px;
  margin: 0;
  color: var(--text-mute);
  line-height: 1.85;
}

/* Gutenberg buttons */
.entry-content .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.6em 0; }
.entry-content .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 10px 24px -12px var(--primary-glow);
}
.entry-content .wp-block-button__link:hover {
  box-shadow: 0 16px 36px -10px var(--primary-glow);
  transform: translateY(-1px);
}
.entry-content .is-style-outline .wp-block-button__link {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
  box-shadow: none;
}
.entry-content .is-style-outline .wp-block-button__link:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: white;
}

/* Gutenberg gallery */
.entry-content .wp-block-gallery {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.entry-content .wp-block-gallery figure {
  margin: 0;
  border-radius: 10px;
}

/* Custom block style: callout */
.entry-content .is-style-sima-callout,
.entry-content .sima-callout {
  margin: 1.6em 0;
  padding: 18px clamp(18px, 2vw, 24px);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.10), rgba(236, 72, 153, 0.06));
  border: 1px solid rgba(139, 92, 246, 0.28);
  color: var(--text);
}
.entry-content .is-style-sima-callout strong,
.entry-content .sima-callout strong { color: var(--accent); }

/* Custom block style: takeaways */
.entry-content .is-style-sima-takeaways,
.entry-content .sima-takeaways {
  margin: 0 0 1.8em;
  padding: 20px clamp(18px, 2.2vw, 26px);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.10), rgba(56, 189, 248, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-inline-start: 4px solid var(--primary);
}

/* ==========================================================================
   Post CTA box (mid-article + end)
   ========================================================================== */
.post-cta {
  margin: clamp(36px, 5vw, 56px) auto;
  max-width: var(--container-narrow);
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(120% 90% at 100% 100%, rgba(236, 72, 153, 0.14), transparent 60%),
    var(--bg-elev-1);
  border: 1px solid rgba(139, 92, 246, 0.28);
  display: grid;
  gap: 18px;
  align-items: center;
}
@media (min-width: 768px) {
  .post-cta { grid-template-columns: 1fr auto; gap: clamp(20px, 3vw, 40px); }
}
.post-cta__title {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.post-cta__desc {
  margin: 0;
  color: var(--text-mute);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 56ch;
}
.post-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ==========================================================================
   Related posts
   ========================================================================== */
.post-related {
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: clamp(36px, 4vw, 56px);
  border-top: 1px solid var(--border);
}
.post-related__title {
  margin: 0 0 24px;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.015em;
}
.post-related__grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .post-related__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ==========================================================================
   Share buttons
   ========================================================================== */
.post-share {
  margin: clamp(36px, 4vw, 48px) auto 0;
  max-width: var(--container-narrow);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev-1);
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 14px;
}
.post-share__label { font-size: 0.9rem; font-weight: 600; color: var(--text-mute); }
.post-share__list {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0; padding: 0; list-style: none;
}
.post-share__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-mute);
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.15s;
}
.post-share__btn svg { width: 18px; height: 18px; }
.post-share__btn:hover {
  color: white;
  background: var(--primary-soft);
  border-color: var(--primary);
  transform: translateY(-1px);
}
.post-share__btn[data-net="telegram"]:hover { background: rgba(56,189,248,0.18); border-color: var(--accent-sky); }
.post-share__btn[data-net="whatsapp"]:hover { background: rgba(16,185,129,0.18); border-color: var(--accent-emerald); }
.post-share__btn[data-net="twitter"]:hover  { background: rgba(255,255,255,0.10); border-color: var(--text-mute); }
.post-share__btn[data-net="linkedin"]:hover { background: rgba(56,189,248,0.18); border-color: var(--accent-sky); }

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px;
  margin-top: clamp(48px, 6vw, 72px);
}
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  color: var(--text-mute);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.pagination .page-numbers:hover:not(.dots):not(.current) {
  color: var(--text);
  border-color: var(--primary);
  background: var(--primary-soft);
}
.pagination .page-numbers.current {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: transparent;
}
.pagination .page-numbers.dots { border: 0; background: transparent; }

/* ==========================================================================
   Search form
   ========================================================================== */
.search-form {
  display: flex; gap: 8px; align-items: stretch;
  max-width: 480px;
  margin: 0 auto;
}
.search-form input[type="search"] {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev-1);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-form input[type="search"]::placeholder { color: var(--text-dim); }
.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.search-form button[type="submit"] { padding: 12px 20px; }

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-area {
  max-width: var(--container-narrow);
  margin: clamp(48px, 6vw, 72px) auto 0;
  padding-top: clamp(36px, 4vw, 48px);
  border-top: 1px solid var(--border);
}
.comments-title {
  margin: 0 0 24px;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin: 0 0 20px; }
.comment-list .children { list-style: none; margin: 16px 0 0; padding-inline-start: 24px; border-inline-start: 2px solid var(--border); }

.comment-body {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev-1);
}
.comment-author {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.comment-author .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.comment-author .fn { font-weight: 700; color: var(--text); }
.comment-metadata { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 12px; }
.comment-metadata a { color: inherit; }
.comment-content { color: var(--text); font-size: 0.95rem; line-height: 1.85; }
.comment-content p:last-child { margin-bottom: 0; }
.comment-reply-link {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--accent);
  background: var(--primary-soft);
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.comment-reply-link:hover { background: rgba(139,92,246,0.24); color: white; }

.comment-form {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev-1);
}
.comment-form-title,
.comment-reply-title {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}
.comment-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-mute);
  margin-bottom: 6px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.comment-form textarea { min-height: 120px; resize: vertical; line-height: 1.8; }
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.comment-form p { margin: 0 0 14px; }
.comment-form p.form-submit { margin-top: 20px; margin-bottom: 0; }
.comment-form-cookies-consent {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.85rem; color: var(--text-mute);
}
.comment-form input[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: box-shadow 0.2s;
  box-shadow: 0 10px 24px -12px var(--primary-glow);
}
.comment-form input[type="submit"]:hover {
  box-shadow: 0 16px 36px -10px var(--primary-glow);
}

.comments-closed,
.no-comments {
  color: var(--text-mute);
  font-size: 0.9rem;
  text-align: center;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* Awaiting moderation badge */
.comment.bypostauthor .comment-body { border-color: rgba(139,92,246,0.30); }
.comment-awaiting-moderation {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  font-size: 0.75rem;
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.30);
  border-radius: 999px;
}

/* ==========================================================================
   404 / no results
   ========================================================================== */
.error-404,
.no-results {
  text-align: center;
  padding: clamp(48px, 8vw, 96px) 20px;
  max-width: 600px;
  margin: 0 auto;
}
.error-404__code {
  display: inline-block;
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(120deg, var(--primary), var(--accent-pink));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  margin-bottom: 20px;
}
.error-404 h1,
.no-results h1 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
}
.error-404 p,
.no-results p {
  color: var(--text-mute);
  font-size: 1rem;
  margin-bottom: 24px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: clamp(48px, 6vw, 80px) 0 clamp(28px, 3vw, 40px);
  background: var(--bg-elev-1);
  margin-top: clamp(64px, 8vw, 120px);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 32px;
}
@media (max-width: 880px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

.foot-brand p {
  color: var(--text-mute);
  font-size: 0.9rem;
  line-height: 1.85;
  max-width: 38ch;
  margin: 12px 0 0;
}
.foot-col h4 {
  margin: 0 0 14px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-bottom: 10px; }
.foot-col a {
  color: var(--text-mute);
  font-size: 0.92rem;
  transition: color 0.2s;
}
.foot-col a:hover { color: var(--primary); }

.foot-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ==========================================================================
   WordPress core / alignment / caption helpers (per Codex standards)
   ========================================================================== */
.alignleft   { float: left;  margin: 0.5em 1em 0.5em 0; }
.alignright  { float: right; margin: 0.5em 0 0.5em 1em; }
.aligncenter { display: block; margin-inline: auto; }
[dir="rtl"] .alignleft  { float: right; margin: 0.5em 0 0.5em 1em; }
[dir="rtl"] .alignright { float: left;  margin: 0.5em 1em 0.5em 0; }

.alignwide  { max-width: 1000px; margin-inline: auto; }
.alignfull  { max-width: 100vw; margin-inline: calc(50% - 50vw); }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--text-dim); text-align: center; margin-top: 6px; }
.sticky, .bypostauthor { }

/* ==========================================================================
   Responsive niceties + reduced motion
   ========================================================================== */
@media (max-width: 767px) {
  .post-hero h1 { font-size: 1.65rem; }
  .entry-content { font-size: 1rem; line-height: 1.85; }
  .post-meta { font-size: 0.82rem; gap: 6px 12px; }
  .post-breadcrumb .current { max-width: 30ch; }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card, .blog-card__image img, .post-share__btn { transition: none; }
  .blog-card:hover { transform: none; }
  .blog-card:hover .blog-card__image img { transform: none; }
  .post-share__btn:hover { transform: none; }
  html { scroll-behavior: auto; }
}
/* ============================================================
   Sima Blog — CTA VARIANTS
   ۴ قالب متنوع + انیمیشن + آیکون اپ + responsive fix
   ============================================================ */

/* --- 1) COMMON CTA — بازطراحی .post-cta موجود -------------- */

.post-cta {
  position: relative;
  margin: clamp(36px, 5vw, 56px) auto;
  max-width: var(--container-narrow);
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(120% 90% at 100% 100%, rgba(236, 72, 153, 0.14), transparent 60%),
    var(--bg-elev-1);
  border: 1px solid rgba(139, 92, 246, 0.28);
  overflow: hidden;
  isolation: isolate;
}

/* --- 2) VARIANT: side-by-side با آیکون اپ -------------------
   استفاده در block pattern sima/inline-cta
   ---------------------------------------------------------- */

.post-cta--icon {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(16px, 2.5vw, 28px);
}
@media (max-width: 640px) {
  .post-cta--icon {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .post-cta--icon .post-cta__icon { margin-inline: auto; }
  .post-cta--icon .post-cta__actions { justify-content: center; }
}

.post-cta__icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow:
    0 10px 30px -8px var(--primary-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
  position: relative;
  animation: sima-icon-pulse 3s ease-in-out infinite;
}
.post-cta__icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}
@keyframes sima-icon-pulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 10px 30px -8px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.18); }
  50%      { transform: scale(1.04); box-shadow: 0 14px 40px -8px rgba(139,92,246,0.55), inset 0 1px 0 rgba(255,255,255,0.22); }
}
@media (prefers-reduced-motion: reduce) {
  .post-cta__icon { animation: none; }
}

.post-cta__title {
  margin: 0 0 6px;
  font-size: clamp(1.125rem, 2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.45;
  color: var(--text);
}
.post-cta__desc {
  margin: 0;
  color: var(--text-mute);
  font-size: 0.95rem;
  line-height: 1.7;
}
.post-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --- 3) VARIANT: banner "پیشنهاد ویژه" با gradient sweep --- */

.post-cta--banner {
  padding: clamp(28px, 3.5vw, 44px) clamp(24px, 3vw, 36px);
  text-align: center;
}
.post-cta--banner::before {
  content: "";
  position: absolute;
  top: 0; inset-inline-start: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 80%
  );
  transform: skewX(-20deg);
  animation: sima-banner-sweep 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
@keyframes sima-banner-sweep {
  0%   { inset-inline-start: -100%; }
  50%  { inset-inline-start:  100%; }
  100% { inset-inline-start:  100%; }
}
@media (prefers-reduced-motion: reduce) {
  .post-cta--banner::before { animation: none; opacity: 0; }
}

.post-cta__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--accent-amber), #F97316);
  color: #1F1300;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px -6px rgba(245, 158, 11, 0.5);
  position: relative;
  z-index: 2;
}
.post-cta__badge::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #1F1300;
  animation: sima-badge-pulse 1.5s ease-in-out infinite;
}
@keyframes sima-badge-pulse {
  0%, 100% { transform: scale(1);   opacity: 1;    }
  50%      { transform: scale(1.4); opacity: 0.6;  }
}

.post-cta--banner .post-cta__title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin-bottom: 12px;
  position: relative; z-index: 2;
}
.post-cta--banner .post-cta__desc {
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: 20px;
  position: relative; z-index: 2;
}
.post-cta--banner .post-cta__actions {
  justify-content: center;
  position: relative; z-index: 2;
}

/* --- 4) VARIANT: compact inline (mid-article) ------------- */

.post-cta--compact {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  margin: 24px auto;
  max-width: var(--container-narrow);
  background: linear-gradient(90deg,
    rgba(139, 92, 246, 0.12) 0%,
    rgba(139, 92, 246, 0.04) 100%);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.post-cta--compact .post-cta__icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  animation: none;
  box-shadow: 0 4px 12px -4px var(--primary-glow);
}
.post-cta--compact .post-cta__icon img { width: 24px; height: 24px; }
.post-cta--compact .post-cta__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  flex: 1;
}
.post-cta--compact .btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .post-cta--compact { flex-wrap: wrap; text-align: center; }
  .post-cta--compact .post-cta__title { flex-basis: 100%; }
  .post-cta--compact .post-cta__icon { margin-inline: auto; }
  .post-cta--compact .btn { flex-basis: 100%; }
}

/* --- 5) VARIANT: full-width با تصویر فیلتر ------------- */

.post-cta--filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  min-height: 240px;
  overflow: hidden;
}
@media (max-width: 720px) {
  .post-cta--filter { grid-template-columns: 1fr; }
}

.post-cta__filter-image {
  position: relative;
  min-height: 220px;
  overflow: hidden;
}
.post-cta__filter-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-cta--filter:hover .post-cta__filter-image img {
  transform: scale(1.06);
}
.post-cta__filter-image::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 50%, var(--bg-elev-1) 100%);
  z-index: 1;
}
@media (max-width: 720px) {
  .post-cta__filter-image::after {
    background: linear-gradient(180deg, transparent 40%, var(--bg-elev-1) 100%);
  }
}

.post-cta__filter-content {
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}

/* --- 6) دکمه‌های action ثانویه (btn-outline, btn-ghost که در فوندیشن هست) --- */
/* استفاده در sima_action shortcode با class مثل "btn btn-ghost" */

/* --- 7) Filter icon animation (in-content, subtle) --- */
.sima-app-icon-inline {
  display: inline-block;
  vertical-align: middle;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  margin-inline: 4px;
  filter: drop-shadow(0 2px 4px rgba(139, 92, 246, 0.4));
}

/* --- 8) Diamond free badge (اختیاری، برای برخی CTA ها) --- */
.post-cta__diamond {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--accent-sky), var(--accent));
  color: #051123;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  margin-inline-start: 8px;
}
.post-cta__diamond::before {
  content: "◆";
  font-size: 0.85rem;
  animation: sima-diamond-shine 2s ease-in-out infinite;
}
@keyframes sima-diamond-shine {
  0%, 100% { transform: rotate(0deg)   scale(1);    }
  50%      { transform: rotate(180deg) scale(1.15); }
}

/* ============================================================
   NAV: search + dropdown + mobile menu (Sima Blog upgrade)
   ============================================================ */

/* --- Base nav overrides --- */
.nav-inner {
  gap: 8px;
}
.nav-links {
  gap: 2px;
  margin-inline-end: auto; /* push brand→nav to logo, cta stays right */
  margin-inline-start: 20px;
}
.nav-links > a {
  padding: 8px 14px;
}

/* --- Categories dropdown --- */
.nav-dropdown {
  position: relative;
}
.nav-dropdown__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: var(--text-mute);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.nav-dropdown__toggle:hover,
.nav-dropdown__toggle[aria-expanded="true"] {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}
.nav-dropdown__toggle svg {
  transition: transform 0.2s;
}
.nav-dropdown__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  min-width: 220px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.6);
  padding: 6px;
  display: none;
  z-index: 100;
  animation: sima-dropdown-in 0.18s ease-out;
}
.nav-dropdown[data-open="true"] .nav-dropdown__menu {
  display: block;
}
@keyframes sima-dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0);    }
}
.nav-dropdown__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.92rem;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown__menu a:hover {
  background: var(--primary-soft);
  color: var(--accent);
}
.nav-dropdown__count {
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 2px 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  font-family: inherit;
}
.nav-dropdown__menu a:hover .nav-dropdown__count {
  background: rgba(139,92,246,0.15);
  color: var(--accent);
}

/* --- Nav CTA cluster --- */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text-mute);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.nav-search-toggle:hover,
.nav-search-toggle[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--primary);
  background: var(--primary-soft);
}

/* --- Mobile hamburger --- */
.nav-mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}
.nav-mobile-toggle span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: inline-flex; }
  .nav-cta .btn { display: none; }  /* CTA moves to mobile menu */
}

/* --- Search overlay --- */
.nav-search-overlay {
  position: absolute;
  top: 100%;
  inset-inline: 0;
  background: var(--bg-elev-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.6);
  z-index: 60;
  animation: sima-search-slide 0.2s ease-out;
}
@keyframes sima-search-slide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0);    }
}
.nav-search-overlay form {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-search-overlay svg:first-child {
  color: var(--text-dim);
  flex-shrink: 0;
}
.nav-search-overlay input[type="search"] {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  min-width: 0;
}
.nav-search-overlay input[type="search"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.nav-search-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-mute);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.nav-search-close:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* --- Mobile menu (full-screen overlay) --- */
.nav-mobile-menu {
  position: fixed;
  inset: 64px 0 0 0;  /* under sticky nav */
  background: var(--bg);
  z-index: 55;
  overflow-y: auto;
  padding: 24px 0 32px;
  animation: sima-mobile-in 0.25s ease-out;
}
@keyframes sima-mobile-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0);     }
}
.nav-mobile-menu > .container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-mobile-menu > .container > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 12px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
}
.nav-mobile-menu__group {
  margin-top: 18px;
}
.nav-mobile-menu__title {
  padding: 8px 4px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 700;
}
.nav-mobile-menu__group a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  color: var(--text);
  border-radius: 10px;
  font-size: 0.98rem;
  transition: background 0.15s;
}
.nav-mobile-menu__group a:hover {
  background: var(--primary-soft);
}
.nav-mobile-menu__count {
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: 2px 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
}
.nav-mobile-menu__cta {
  margin-top: 24px;
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary-soft), transparent);
  border: 1px solid rgba(139,92,246,0.28);
  text-align: center;
}
.nav-mobile-menu__cta .btn {
  width: 100%;
  justify-content: center;
}

/* prevent body scroll when mobile menu open */
body.sima-menu-open {
  overflow: hidden;
}

/* ============================================================
   FRONT-PAGE (magazine layout)
   ============================================================ */

.blog-magazine {
  padding-top: clamp(32px, 5vw, 56px);
  padding-bottom: clamp(64px, 8vw, 120px);
}

/* --- Hero (featured post) --- */
.mag-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: clamp(40px, 6vw, 64px);
  min-height: clamp(340px, 50vw, 520px);
  display: flex;
  align-items: flex-end;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  isolation: isolate;
}
.mag-hero__image {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.mag-hero__image img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.mag-hero__image::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(9,9,11,0.1) 0%,
    rgba(9,9,11,0.4) 50%,
    rgba(9,9,11,0.95) 100%);
}
.mag-hero__content {
  position: relative;
  padding: clamp(24px, 4vw, 48px);
  max-width: 720px;
}
.mag-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.mag-hero__badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: white;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.mag-hero__title {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}
.mag-hero__title a { color: inherit; }
.mag-hero__title a:hover { color: var(--accent); }
.mag-hero__excerpt {
  margin: 0 0 18px;
  color: var(--text-mute);
  font-size: clamp(0.95rem, 1.5vw, 1.075rem);
  line-height: 1.75;
  max-width: 60ch;
}
.mag-hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.mag-hero__meta .sep { opacity: 0.5; }

/* --- Section headings --- */
.mag-section {
  margin-bottom: clamp(40px, 5vw, 64px);
}
.mag-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(20px, 3vw, 28px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.mag-section__title {
  margin: 0;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mag-section__title::before {
  content: "";
  width: 4px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent-pink));
}
.mag-section__link {
  font-size: 0.85rem;
  color: var(--text-mute);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.mag-section__link:hover { color: var(--accent); }
.mag-section__link svg { transition: transform 0.2s; }
.mag-section__link:hover svg { transform: translateX(-3px); }

/* =================================================================
 * MAGAZINE HOMEPAGE — Latest hybrid (60% lead + 40% list stack)
 * Fixes "big card too tall" bug via aspect-ratio + max-height.
 * ================================================================= */

.mag-hybrid {
	display: grid;
	gap: clamp(16px, 2vw, 24px);
	grid-template-columns: 1fr;
	align-items: stretch;
}
@media (min-width: 768px) {
	.mag-hybrid {
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	}
}

/* ---------- LEAD column (60%) ---------- */
.mag-hybrid__lead { min-width: 0; }
.mag-hybrid__lead .blog-card {
	height: 100%;
	display: flex;
	flex-direction: column;
}
.mag-hybrid__lead .blog-card__image {
	aspect-ratio: 16 / 9;
	max-height: 300px;
	min-height: 180px;
	overflow: hidden;
}
.mag-hybrid__lead .blog-card__image img {
	width: 100%; height: 100%;
	object-fit: cover;
	object-position: center;
}
.mag-hybrid__lead .blog-card__body { flex: 1; }
.mag-hybrid__lead .blog-card__title {
	font-size: clamp(1.1rem, 1.6vw, 1.35rem);
	-webkit-line-clamp: 2;
}
.mag-hybrid__lead .blog-card__excerpt { -webkit-line-clamp: 2; }
@media (max-width: 767px) {
	.mag-hybrid__lead .blog-card__image { max-height: 240px; }
}

/* ---------- LIST column (40%) ---------- */
.mag-hybrid__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	justify-content: space-between;
}
.blog-card-list {
	background: var(--bg-elev-1);
	border: 1px solid var(--border);
	border-radius: 12px;
	overflow: hidden;
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	flex: 1;
}
.blog-card-list:hover {
	transform: translateY(-2px);
	border-color: var(--primary);
	box-shadow: 0 8px 20px -10px rgba(0,0,0,0.5), 0 2px 8px -2px rgba(139,92,246,0.25);
}
.blog-card-list:hover .blog-card-list__title { color: var(--accent); }
.blog-card-list:hover .blog-card-list__thumb img { transform: scale(1.05); }
.blog-card-list__link {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 14px;
	padding: 10px;
	color: inherit;
	align-items: center;
	height: 100%;
	text-decoration: none;
}
.blog-card-list__thumb {
	width: 120px;
	height: 68px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--bg-elev-2);
	margin: 0;
	flex-shrink: 0;
}
.blog-card-list__thumb img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
	display: block;
}
.blog-card-list__body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.blog-card-list__cat {
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--accent);
	line-height: 1;
}
.blog-card-list__title {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.5;
	color: var(--text);
	transition: color 0.2s;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.blog-card-list__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 8px;
	margin-top: 2px;
	font-size: 0.75rem;
	color: var(--text-mute);
}
.blog-card-list__meta .sep { opacity: 0.5; }
@media (max-width: 480px) {
	.blog-card-list__link {
		grid-template-columns: 96px 1fr;
		gap: 12px;
		padding: 8px;
	}
	.blog-card-list__thumb { width: 96px; height: 54px; }
	.blog-card-list__title { font-size: 0.9rem; }
}

/* ---------- Category grid card discipline (scoped to home) ---------- */
.blog-magazine .mag-grid-3 .blog-card__image {
	aspect-ratio: 16 / 9;
	max-height: 220px;
	overflow: hidden;
}
.blog-magazine .mag-grid-3 .blog-card__image img {
	width: 100%; height: 100%;
	object-fit: cover;
	object-position: center;
}
.blog-magazine .mag-grid-3 .blog-card__title { -webkit-line-clamp: 2; }
.blog-magazine .mag-grid-3 .blog-card__excerpt { -webkit-line-clamp: 2; }

/* --- Standard 3-column grid for category sections --- */
.mag-grid-3 {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .mag-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .mag-grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* --- Category pill row --- */
.mag-catrow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(32px, 4vw, 48px);
}
.mag-catrow a {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}
.mag-catrow a:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--accent);
  transform: translateY(-2px);
}
.mag-catrow a[data-active] {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: transparent;
}

/* --- Newsletter-like CTA at bottom --- */
.mag-final-cta {
  margin-top: clamp(48px, 6vw, 80px);
  padding: clamp(32px, 5vw, 56px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 20% 20%, rgba(139,92,246,0.22), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(236,72,153,0.16), transparent 50%),
    var(--bg-elev-1);
  border: 1px solid rgba(139,92,246,0.28);
  text-align: center;
}
.mag-final-cta h2 {
  margin: 0 0 12px;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.015em;
}
.mag-final-cta p {
  color: var(--text-mute);
  margin: 0 auto 24px;
  max-width: 56ch;
  line-height: 1.85;
}
.mag-final-cta .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
