/* =========================================================
   فونت یکان‌بخ — self-host، فقط ۴ وزن لازم (سبک و کم‌ریکوئست)
   woff2 اول (سبک‌ترین)، woff فالبک. font-display: swap
   برای جلوگیری از پرش متن.
   ========================================================= */
@font-face {
	font-family: 'Yekan Bakh';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/yekanbakh-regular.woff2') format('woff2');
}
@font-face {
	font-family: 'Yekan Bakh';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/yekanbakh-medium.woff2') format('woff2');
}
@font-face {
	font-family: 'Yekan Bakh';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/yekanbakh-bold.woff2') format('woff2');
}
@font-face {
	font-family: 'Yekan Bakh';
	font-style: normal;
	font-weight: 800;
	font-display: swap;
	src: url('../fonts/yekanbakh-heavy.woff2') format('woff2');
}

/* این فایل فقط @font-face را دارد.
   اعمالِ فونت روی سایت در base.css انجام می‌شود، چون در حالت
   «فونت سیستمی/دلخواه» این فایل اصلاً لود نمی‌شود. */

/* =========================================================================
   base.css — پایه‌ی سراسری چایلد تم ریحانه‌استور
   ---------------------------------------------------------------------------
   • توکن‌های طراحی (رنگ‌ها) از روی ui/style.css
   • ریست سبک، container، یوتیلیتی‌ها و دکمه‌های عمومی
   • همه‌چیز زیر اسکوپ .rey-ui (کلاس body) تا با تم مادر وودمارت تداخل نکند
   • فونت: از var(--rey-font) (یکان‌بخ محلی) استفاده می‌شود، نه Vazirmatn
   ========================================================================= */

/* ---------- توکن‌های طراحی ----------
   این مقادیر پیش‌فرض‌اند. سفارشی‌ساز (نمایش → سفارشی‌سازی → رنگ‌های پوسته)
   همه‌ی توکن‌های زیر را در <head> بازنویسی می‌کند، پس برای تغییر رنگ سایت
   نیازی به دست‌زدن به این فایل نیست.
   ------------------------------------------------------------------ */
:root {
  /* رنگ اصلی و مشتق‌هایش */
  --green: #005f36;
  --green-dark: #004326;
  --green-light: #0b8f57;
  --green-bright: #4bbf87;   /* روشن‌ترین حالت (گرادیان آواتار) */
  --green-mint: #bfe6d2;     /* متن روشن روی پس‌زمینه‌ی تیره‌ی اصلی */

  /* طیف تینت‌های رنگ اصلی — از روشن به تیره */
  --green-050: #f6faf8;      /* پس‌زمینه‌ی هاور خیلی ملایم */
  --green-100: #eaf3ee;      /* پس‌زمینه‌ی چیپ/آیکون */
  --green-200: #dff0e7;      /* حالت فعال ملایم */
  --green-300: #bcd9c9;      /* بوردر و خط‌چین */

  /* رنگ‌های ثابت رابط */
  --navy: #12303f;
  --yellow: #ffd43b;
  --red: #e11d48;
  --bg: #fbfbfc;
  --surface: #fff;
  --border: #eef0f2;
  --border-2: #f2f4f6;
  --gray-1: #f4f5f7;
  --text: #1a2431;
  --text-2: #4b5563;
  --text-3: #6b7280;
  --muted: #9aa0a8;
}

/* ---------- فونت و اندازه‌ی پایه ----------
   --rey-font و --rey-fs از سفارشی‌ساز در <head> ست می‌شوند؛
   مقادیر زیر فقط فالبک‌اند.
   ------------------------------------------------------------------ */
:root {
  --rey-font: 'Yekan Bakh', Tahoma, sans-serif;
  --rey-fs: 14px;
  --rey-r: 1;               /* ضریب گردیِ گوشه‌ها */
}

body,
button,
input,
select,
textarea,
.woodmart-title,
h1, h2, h3, h4, h5, h6 {
  font-family: var(--rey-font) !important;
}

/* اندازه‌ی پایه فقط روی متنِ بدنه اثر دارد؛ تیترها و اجزای رابط
   اندازه‌ی طراحی‌شده‌ی خودشان را نگه می‌دارند. */
.rey-ui body,
.rey-ui .post-body,
.rey-ui .pd-article,
.rey-ui .article-body,
.rey-ui .rey-catseo__body { font-size: var(--rey-fs); }

/* ---------- ریست (اسکوپ‌شده) ---------- */
.rey-ui * { box-sizing: border-box; }

.rey-ui,
.rey-ui.rey-body {
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  overflow-x: hidden;
  overflow-x: clip;
}

.rey-ui img { display: block; max-width: 100%; }
.rey-ui a { text-decoration: none; color: inherit; cursor: pointer; }
.rey-ui button { font-family: inherit; cursor: pointer; }

/* متنِ فقط برای موتور جستجو و اسکرین‌ریدر (بصری مخفی، ولی حذف‌نشده) */
.rey-ui .rey-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Container ---------- */
.rey-ui .container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* جلوگیری از بلواوت گرید/فلکس در موبایل (min-width:auto پیش‌فرض) */
.rey-ui .acc-layout > *, .rey-ui .cart-layout > *, .rey-ui .cat-layout > *,
.rey-ui .article-layout > *, .rey-ui .pd-grid > *, .rey-ui .rev-grid > *,
.rey-ui .contact-grid > *, .rey-ui .branch > *, .rey-ui .brand-story > *,
.rey-ui .cmp-head-cards > *, .rey-ui .stat-cards > *, .rey-ui .cart-item > *,
.rey-ui .order-card > *, .rey-ui .track-card > *, .rey-ui .acc-panel,
.rey-ui .acc-side, .rey-ui .suggest-band, .rey-ui .points-hero > *,
.rey-ui .about-hero > *, .rey-ui .form-card, .rey-ui .office-card { min-width: 0; }

/* پنهان‌کردن اسکرول‌بار افقی کاروسل‌ها */
.rey-ui .hide-sb { scrollbar-width: none; -ms-overflow-style: none; }
.rey-ui .hide-sb::-webkit-scrollbar { display: none; }

/* ---------- بردکرامب عمومی ---------- */
.rey-ui .breadcrumb { display: flex; align-items: center; gap: 8px; padding-top: 22px;
  font: 400 11px var(--rey-font); color: var(--muted); flex-wrap: wrap; }
.rey-ui .breadcrumb a { color: var(--muted); transition: color .2s; }
.rey-ui .breadcrumb a:hover { color: var(--green); }
.rey-ui .breadcrumb .sep { opacity: .5; }
.rey-ui .breadcrumb .current { color: var(--text-2); font-weight: 500; }

/* ---------- آیکون‌های عمومی ---------- */
.rey-ui .f-ico { color: var(--green); }
.rey-ui .f-ico svg { width: 20px; height: 20px; }
.rey-ui .amazing-link { display: inline-flex; align-items: center; gap: 6px; }
.rey-ui .amazing-link svg { width: 14px; height: 14px; }

/* ---------- دکمه‌های عمومی ---------- */
.rey-ui .btn-primary {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--green); color: #fff; border: none;
  font: 700 13px var(--rey-font);
  padding: 12px 26px; border-radius: 99px; cursor: pointer;
  transition: background .2s;
}
.rey-ui .btn-primary:hover { background: var(--green-dark); }
.rey-ui .btn-primary svg { width: 16px; height: 16px; }
.rey-ui .btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: transparent; color: var(--navy);
  border: 1.5px solid #d7dce0; font: 700 13px var(--rey-font);
  padding: 12px 26px; border-radius: 99px; transition: border-color .2s, color .2s;
}
.rey-ui .btn-ghost:hover { border-color: var(--green); color: var(--green); }
.rey-ui .btn-ghost svg { width: 16px; height: 16px; }

/* ===========================================================
   کارت محصول (.pcard) — سراسری: صفحه اول، فروشگاه، محصول، سبد
   پورت مستقیم از ui/style.css
   =========================================================== */
.rey-ui /* ---------- Product card ---------- */
.pcard { display: flex; flex-direction: column; width: 100%;
  background: #fff; border-radius: calc(16px * var(--rey-r)); padding: 8px; }
.rey-ui .pcard .img-wrap { position: relative; width: 100%;
  aspect-ratio: 1500 / 1820;
  border-radius: calc(12px * var(--rey-r)); overflow: hidden; background: #f0f1f3; }
.rey-ui .pcard .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.rey-ui .pcard .off { position: absolute; top: 8px; right: 8px;
  background: var(--green); color: #fff;
  font: 700 12px var(--rey-font);
  padding: 3px 9px; border-radius: calc(20px * var(--rey-r)); }
/* حالت ناموجود */
.rey-ui .pcard.oos .img-wrap img { filter: grayscale(1); opacity: .55; }
.rey-ui .pcard .oos-badge { position: absolute; top: 8px; right: 8px;
  background: var(--red); color: #fff;
  font: 700 12px var(--rey-font);
  padding: 3px 10px; border-radius: calc(20px * var(--rey-r)); }
.rey-ui .pcard .oos-text { font: 700 13px var(--rey-font); color: var(--red); }
.rey-ui .pcard .add { position: absolute; bottom: 8px; left: 8px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid #e5e7eb; background: #fff; color: var(--green);
  font: 700 21px var(--rey-font); line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; }
.rey-ui .pcard .add:hover { background: var(--green); color: #fff; }
.rey-ui .pcard .title { font: 500 13px/1.6 var(--rey-font); color: var(--text);
  margin-top: 12px; padding: 0 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 42px; }
.rey-ui .pcard .rating { display: flex; align-items: center; gap: 5px; margin-top: 6px; padding: 0 2px; }
.rey-ui .pcard .rating .star { color: #f5a623; font-size: 13px; }
.rey-ui .pcard .rating .val { font: 600 12px var(--rey-font); color: var(--text-2); }
.rey-ui .pcard .rating .cnt { font: 400 11px var(--rey-font); color: var(--muted); }
.rey-ui .pcard .price-row { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; padding: 0 2px; }
.rey-ui .pcard .price { font: 700 15px var(--rey-font); color: var(--text); }
.rey-ui .pcard .unit { font: 400 12px var(--rey-font); color: var(--text-3); }
.rey-ui .pcard .old { font: 400 12px var(--rey-font); color: #c0c4ca; text-decoration: line-through; margin-right: auto; }
.rey-ui .pcard .stock { margin-top: 10px; padding: 0 2px; }
.rey-ui .pcard .stock .bar { height: 5px; border-radius: 99px; background: var(--border); overflow: hidden; }
.rey-ui .pcard .stock .bar i { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.rey-ui .pcard .stock .lbl { font: 500 10px var(--rey-font); color: var(--red); margin-top: 5px; }
.rey-ui .pcard .rating .star svg { width: 13px; height: 13px; display: block; }
.rey-ui /* (11) قیمت پلکانی: نهایی بالا، اصلی خط‌خورده پایین */
.pcard .price-row { flex-wrap: wrap; row-gap: 2px; }
.rey-ui .pcard .price-row .old { flex-basis: 100%; order: 3; margin-right: 0; font-size: 11.5px; }
.rey-ui /* دکمه افزودن به سبد در کارت محصول */
.pcard .add-btn { margin-top: 10px; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 1.5px solid var(--green); background: #fff; color: var(--green);
  font: 700 12px var(--rey-font); border-radius: calc(11px * var(--rey-r)); padding: 9px 8px;
  cursor: pointer; transition: all .2s; }
.rey-ui .pcard .add-btn svg { width: 15px; height: 15px; }
.rey-ui .pcard .add-btn:hover, .rey-ui .pcard .add-btn.added { background: var(--green); color: #fff; }
.rey-ui /* (1+3) کارت کاروسل: قیمت چپ و بالاتر، دکمه‌ها هم‌سطح */
.pcard { height: 100%; }
.rey-ui .pcard .price-row { justify-content: flex-end; margin-top: 6px; }
.rey-ui .pcard .price-row .old { text-align: left; }
.rey-ui .pcard .price-row, .rey-ui .pcard .stock { margin-bottom: 6px; }
.rey-ui .pcard .stock { margin-top: 0; }
.rey-ui .pcard .title { min-height: 42px; }

/* ===========================================================
   کاروسل محصولات (.prow) — گام‌به‌گام، هر کلیک دقیقاً یک کارت
   ریلِ پایه اینجا (سراسری) تعریف می‌شود چون .prow در صفحه‌ی اصلی،
   سبد خرید و «محصول یافت نشد» استفاده می‌شود.
   =========================================================== */
.rey-ui .prow {
  display: flex; gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: 2px;
}
.rey-ui .prow::-webkit-scrollbar { display: none; }
.rey-ui .prow > * { flex: 0 0 210px; scroll-snap-align: start; scroll-snap-stop: always; }
/* آخرین کارت با لبه‌ی پایان هم‌تراز شود تا انتهای ریل قابل‌دسترس بماند */
.rey-ui .prow > *:last-child { scroll-snap-align: end; }

/* کشیدن با ماوس (drag-to-scroll) — با JS کلاس می‌گیرد.
   هنگام کشیدن، snap و انتخابِ متن باید خاموش باشند وگرنه ریل برمی‌گردد. */
.rey-ui .rey-drag { cursor: grab; }
.rey-ui .rey-drag.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
  user-select: none; -webkit-user-select: none;
}
.rey-ui .rey-drag.is-dragging a,
.rey-ui .rey-drag.is-dragging img { pointer-events: none; }
/* روی لمسی نشانگرِ «دست» معنا ندارد */
@media (hover: none) {
  .rey-ui .rey-drag { cursor: auto; }
}

/* رَپرِ کاروسل + فلش‌ها (با JS ساخته می‌شود) */
.rey-ui .prow-shell { position: relative; }
.rey-ui .amazing .prow-shell { z-index: 1; }

.rey-ui .prow-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--border); border-radius: 50%;
  background: #fff; color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(15, 27, 45, .16);
  opacity: 0; visibility: hidden; z-index: 4;
  transition: opacity .22s ease, visibility .22s ease, background .2s, color .2s, border-color .2s;
}
.rey-ui .prow-nav svg { width: 18px; height: 18px; }
.rey-ui .prow-shell.is-scrollable:hover .prow-nav,
.rey-ui .prow-nav:focus-visible { opacity: 1; visibility: visible; }
.rey-ui .prow-nav:hover { background: var(--green); color: #fff; border-color: var(--green); }
.rey-ui .prow-nav[disabled] { opacity: 0 !important; visibility: hidden !important; pointer-events: none; }
.rey-ui .prow-nav--prev { inset-inline-start: auto; inset-inline-end: -14px; }
.rey-ui .prow-nav--next { inset-inline-end: auto; inset-inline-start: -14px; }

/* روی صفحه‌های باریک‌تر، فلش‌ها را داخل ریل بیاور تا از container بیرون نزنند */
@media (max-width: 1320px) {
  .rey-ui .prow-nav--prev { inset-inline-end: 2px; }
  .rey-ui .prow-nav--next { inset-inline-start: 2px; }
}
/* موبایل/لمسی: فقط سوایپ (فلش‌ها حذف) */
@media (max-width: 860px), (hover: none) {
  .rey-ui .prow-nav { display: none !important; }
}

/* ===========================================================
   پیام شناور (Toast) — سراسری، بالای همه‌چیز
   =========================================================== */
.rey-toasts { position: fixed; top: 16px; right: 16px; left: auto; transform: none;
  z-index: 2000; display: flex; flex-direction: column; gap: 8px;
  align-items: flex-end; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.rey-toast { display: flex; align-items: center; gap: 10px;
  background: var(--green); color: #fff;
  font: 600 13px var(--rey-font); line-height: 1.9;
  padding: 12px 18px; border-radius: calc(14px * var(--rey-r));
  box-shadow: 0 12px 30px rgba(0, 95, 54, .28);
  opacity: 0; transform: translateX(24px); transition: opacity .28s, transform .28s; }
.rey-toast.in { opacity: 1; transform: none; }
.rey-toast--error { background: var(--red); box-shadow: 0 12px 30px rgba(225, 29, 72, .28); }
.rey-toast__ico { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  display: flex; align-items: center; justify-content: center; }
.rey-toast__ico svg { width: 13px; height: 13px; }
.rey-toast__txt { min-width: 0; }
@media (max-width: 860px) { .rey-toasts { top: 12px; right: 12px; left: 12px;
  width: auto; max-width: none; align-items: stretch; } }

/* ===========================================================
   دکمه‌های سبز — رنگ متن در هر حالتی سفید می‌ماند.

   دلیل !important: قالب مادر (وودمارت) روی a:hover و button:hover
   رنگ متن ست می‌کند و روی دکمه‌های سبزِ ما می‌افتد؛ نتیجه‌اش متنِ
   سبز یا تیره روی پس‌زمینه‌ی سبز است که اصلاً خوانا نیست.
   =========================================================== */
.rey-ui .btn-primary,
.rey-ui .btn-primary:hover,
.rey-ui .btn-primary:focus,
.rey-ui .btn-primary:active,
.rey-ui .btn-primary:visited,
.rey-ui .cats-btn,
.rey-ui .cats-btn:hover,
.rey-ui .cats-btn:focus,
.rey-ui .search-box button,
.rey-ui .search-box button:hover,
.rey-ui .search-box button:focus,
.rey-ui .coupon .copy,
.rey-ui .coupon .copy:hover,
.rey-ui .mag-card2.cta a,
.rey-ui .mag-card2.cta a:hover,
.rey-ui .mag-pager .page-numbers.current,
.rey-ui .mag-pager .page-numbers.current:hover,
.rey-ui .mag-cats a.active,
.rey-ui .mag-cats a.active:hover,
.rey-ui .comment-respond .submit,
.rey-ui .comment-respond .submit:hover,
.rey-ui .acc-panel button[type="submit"],
.rey-ui .acc-panel button[type="submit"]:hover,
.rey-ui .acc-panel input[type="submit"],
.rey-ui .acc-panel input[type="submit"]:hover,
.rey-ui .acc-panel .woocommerce-Button,
.rey-ui .acc-panel .woocommerce-Button:hover,
.rey-ui .acc-nav a.active,
.rey-ui .bb-variable .single_add_to_cart_button,
.rey-ui .bb-variable .single_add_to_cart_button:hover,
.rey-ui .rey-buybar__cta,
.rey-ui .rey-buybar__cta:hover,
.rey-ui .prow-nav:hover,
.rey-ui .copy-mini:hover,
.rey-ui .copy-mini.copied,
.woocommerce a.button,
.woocommerce a.button:hover,
.woocommerce a.button:focus,
.woocommerce button.button,
.woocommerce button.button:hover,
.woocommerce button.button:focus,
.woocommerce .button,
.woocommerce .button:hover,
.woocommerce #respond input#submit,
.woocommerce #respond input#submit:hover,
.woocommerce #place_order,
.woocommerce #place_order:hover,
.wc-proceed-to-checkout a.checkout-button,
.wc-proceed-to-checkout a.checkout-button:hover,
.rey-cart-empty__btn,
.rey-cart-empty__btn:hover { color: #fff !important; }

/* آیکون‌های داخل همین دکمه‌ها هم سفید بمانند */
.rey-ui .btn-primary:hover svg,
.rey-ui .cats-btn:hover svg,
.rey-ui .rey-buybar__cta:hover svg,
.rey-ui .prow-nav:hover svg,
.rey-ui .copy-mini:hover svg { stroke: currentColor; color: #fff; }

/* استثنا: دکمه‌ی روشن (پس‌زمینه سفید، متن سبز) نباید سفید شود */
.rey-ui .btn-light,
.rey-ui .btn-light:hover { color: var(--green) !important; }

/* وودمارت (گزینه‌ی hide-larger-price) قیمت‌ها را visibility:hidden می‌کند و با JS خودش برمی‌گرداند؛
   قالب ما آن JS را ندارد، پس قیمت همیشه دیده شود. */
.hide-larger-price .price,
.rey-ui .pcard .price,
.rey-ui .price { visibility: visible !important; }

/* ===========================================================
   مجله‌ی ریحانه‌استور — آرشیو (home.php / archive.php)
   و صفحه‌ی تک‌نوشته (single.php)
   همه‌چیز زیر اسکوپ .rey-ui، با همان توکن‌های base.css
   =========================================================== */

/* ---------- عناصر مشترک ---------- */
.rey-ui .mag-wrap { padding-bottom: 64px; }
.rey-ui .mag-wrap .sec-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.rey-ui .mag-wrap .sec-head .eyebrow { font: 600 11px var(--rey-font); color: var(--muted); letter-spacing: .1em; margin-bottom: 5px; }
.rey-ui .mag-wrap .sec-head h2 { font: 700 22px var(--rey-font); color: var(--navy); margin: 0; }

/* ---------- هدر مجله ---------- */
.rey-ui .mag-head { position: relative; overflow: hidden; border-radius: calc(24px * var(--rey-r)); margin-top: 18px;
  background: linear-gradient(115deg, var(--green-dark), var(--green) 58%, var(--green-light));
  padding: 38px 40px; color: #fff; }
.rey-ui .mag-head::before { content: ""; position: absolute; top: -70px; left: -50px;
  width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.07); }
.rey-ui .mag-head::after { content: ""; position: absolute; bottom: -90px; left: 120px;
  width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.05); }
.rey-ui .mag-head .kicker { display: inline-flex; align-items: center; gap: 8px;
  font: 700 11px var(--rey-font); letter-spacing: .12em; color: var(--green-mint);
  background: rgba(255,255,255,.14); border-radius: 99px; padding: 6px 14px; position: relative; z-index: 1; }
.rey-ui .mag-head h1 { font: 800 30px/1.6 var(--rey-font); margin: 16px 0 0; position: relative; z-index: 1; }
.rey-ui .mag-head p { font: 400 14px/2.1 var(--rey-font); color: var(--green-200); margin: 10px 0 0;
  max-width: 620px; position: relative; z-index: 1; }

/* ---------- چیپ دسته‌ها ---------- */
.rey-ui .mag-cats { display: flex; gap: 9px; margin-top: 22px; overflow-x: auto;
  padding-bottom: 4px; scrollbar-width: none; }
.rey-ui .mag-cats::-webkit-scrollbar { display: none; }
.rey-ui .mag-cats a { flex: 0 0 auto; font: 600 12.5px var(--rey-font); color: var(--text-3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 99px; padding: 9px 18px; transition: all .2s; white-space: nowrap; }
.rey-ui .mag-cats a:hover { border-color: var(--green-300); color: var(--green); }
.rey-ui .mag-cats a.active { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- چیدمان دوستونه ---------- */
.rey-ui .mag-layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; margin-top: 30px; }
.rey-ui .mag-layout > * { min-width: 0; }

/* ---------- نوشته‌ی شاخص ---------- */
.rey-ui .mag-feat { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(22px * var(--rey-r));
  overflow: hidden; margin-bottom: 26px; transition: border-color .25s, box-shadow .25s; }
.rey-ui .mag-feat:hover { border-color: var(--green-300); box-shadow: 0 16px 36px rgba(0,95,54,.08); }
.rey-ui .mag-feat > * { min-width: 0; }
.rey-ui .mag-feat .ph { display: block; position: relative; aspect-ratio: 16 / 10; background: var(--gray-1); overflow: hidden; }
.rey-ui .mag-feat .ph img { width: 100%; height: 100%; object-fit: cover; }
.rey-ui .mag-feat .txt { padding: 28px 30px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.rey-ui .mag-feat .txt .mag-meta { margin-top: 16px; }
.rey-ui .mag-feat .txt h3 { font: 800 20px/1.8 var(--rey-font); color: var(--navy); margin: 12px 0 0; }
.rey-ui .mag-feat .txt p { font: 400 13px/2.1 var(--rey-font); color: var(--text-3); margin: 10px 0 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* پلیس‌هولدر وقتی تصویر شاخص ندارد */
.rey-ui .ph-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #c9d3cd; background: repeating-linear-gradient(45deg, #f2f4f6, #f2f4f6 8px, #f7f8fa 8px, #f7f8fa 16px); }
.rey-ui .mini-post .ph-empty { position: static; width: 100%; height: 100%; }

/* ---------- گرید نوشته‌ها ---------- */
.rey-ui .mag-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.rey-ui .mag-list--3 { grid-template-columns: repeat(3, 1fr); }
.rey-ui .mag-list > * { min-width: 0; }
.rey-ui .mag-post { display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: calc(18px * var(--rey-r)); overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s; }
.rey-ui .mag-post:hover { transform: translateY(-3px); border-color: var(--green-300); box-shadow: 0 14px 30px rgba(18,48,63,.09); }
.rey-ui .mag-post .ph { display: block; position: relative; aspect-ratio: 16 / 10; background: var(--gray-1); overflow: hidden; }
.rey-ui .mag-post .ph img { width: 100%; height: 100%; object-fit: cover; }
.rey-ui .mag-post .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.rey-ui .mag-post h3 { font: 700 15px/1.85 var(--rey-font); color: var(--navy); margin: 10px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rey-ui .mag-post p { font: 400 12.5px/2 var(--rey-font); color: var(--text-3); margin: 9px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rey-ui .mag-post .mag-meta { margin-top: auto; padding-top: 14px; }

/* برچسب دسته روی تصویر */
.rey-ui .mag-chip { display: inline-flex; align-items: center; gap: 6px;
  font: 700 11px var(--rey-font); color: var(--green);
  background: var(--green-100); border-radius: 99px; padding: 5px 13px; }
.rey-ui .mag-chip.on-img { position: absolute; top: 12px; inset-inline-end: 12px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(4px); }

/* متادیتا (تاریخ / زمان مطالعه) */
.rey-ui .mag-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font: 400 11.5px var(--rey-font); color: var(--muted); }
.rey-ui .mag-meta span { display: inline-flex; align-items: center; gap: 5px; }
.rey-ui .mag-meta svg { width: 14px; height: 14px; flex: 0 0 14px; }

/* ---------- حالت خالی ---------- */
.rey-ui .mag-empty { background: var(--surface); border: 1px dashed var(--border);
  border-radius: calc(20px * var(--rey-r)); padding: 54px 24px; text-align: center; }
.rey-ui .mag-empty b { display: block; font: 800 17px var(--rey-font); color: var(--navy); }
.rey-ui .mag-empty p { font: 400 13px/2.1 var(--rey-font); color: var(--text-3); margin: 8px 0 18px; }

/* ---------- صفحه‌بندی ---------- */
.rey-ui .mag-pager { display: flex; justify-content: center; gap: 7px; margin-top: 34px; flex-wrap: wrap; }
.rey-ui .mag-pager .page-numbers { min-width: 40px; height: 40px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 13px var(--rey-font); color: var(--text-3);
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(12px * var(--rey-r)); transition: all .2s; }
.rey-ui .mag-pager .page-numbers:hover { border-color: var(--green-300); color: var(--green); }
.rey-ui .mag-pager .page-numbers.current { background: var(--green); border-color: var(--green); color: #fff; }
.rey-ui .mag-pager .page-numbers.dots { border-color: transparent; background: none; }

/* ---------- سایدبار ---------- */
.rey-ui .mag-side { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 18px; }
.rey-ui .mag-card2 { background: var(--surface); border: 1px solid var(--border); border-radius: calc(18px * var(--rey-r)); padding: 20px; }
.rey-ui .mag-card2 > .head { display: flex; align-items: center; gap: 9px;
  font: 700 14px var(--rey-font); color: var(--navy); margin-bottom: 14px; }
.rey-ui .mag-card2 > .head svg { width: 17px; height: 17px; color: var(--green); }
.rey-ui .mini-post { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-2); }
.rey-ui .mini-post:last-child { border-bottom: none; padding-bottom: 0; }
.rey-ui .mini-post:first-child { padding-top: 0; }
.rey-ui .mini-post > span:last-child { min-width: 0; flex: 1; }
.rey-ui .mini-post .ph { position: relative; display: block; flex: 0 0 62px; width: 62px; height: 62px; border-radius: calc(12px * var(--rey-r));
  overflow: hidden; background: var(--gray-1); }
.rey-ui .mini-post .ph img { width: 100%; height: 100%; object-fit: cover; }
.rey-ui .mini-post b { font: 600 12.5px/1.8 var(--rey-font); color: var(--navy); display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rey-ui .mini-post span { font: 400 11px var(--rey-font); color: var(--muted); display: block; margin-top: 5px; }
.rey-ui .mini-post .rank { flex: 0 0 24px; width: 24px; height: 24px; border-radius: calc(8px * var(--rey-r));
  background: var(--green-100); color: var(--green); font: 800 12px var(--rey-font);
  display: flex; align-items: center; justify-content: center; margin-top: 2px; }

.rey-ui .cat-list { display: flex; flex-direction: column; }
.rey-ui .cat-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font: 500 13px var(--rey-font); color: var(--text-3);
  padding: 10px 12px; border-radius: calc(10px * var(--rey-r)); transition: all .2s; }
.rey-ui .cat-list a:hover { background: var(--green-050); color: var(--green); }
.rey-ui .cat-list a i { font-style: normal; font: 600 11px var(--rey-font); color: var(--muted);
  background: var(--gray-1); border-radius: 99px; padding: 2px 9px; }

.rey-ui .mag-card2.cta { background: var(--navy); border: none; }
.rey-ui .mag-card2.cta .head { color: #fff; }
.rey-ui .mag-card2.cta p { font: 400 12px/2.1 var(--rey-font); color: #9fb3bd; margin: 0 0 14px; }
.rey-ui .mag-card2.cta a { display: block; text-align: center; background: var(--green); color: #fff;
  font: 700 13px var(--rey-font); padding: 11px; border-radius: calc(10px * var(--rey-r)); }

/* ===========================================================
   تک‌نوشته (single.php)
   =========================================================== */

/* نوار پیشرفت مطالعه */
.rey-ui .read-bar { position: fixed; top: 0; inset-inline-start: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--green), var(--green-light)); z-index: 999; transition: width .1s linear; }

.rey-ui .post-hero { padding-top: 22px; }
.rey-ui .post-hero h1 { font: 800 30px/1.75 var(--rey-font); color: var(--navy); margin: 16px 0 0; max-width: 760px; }
.rey-ui .post-hero .lead { font: 400 14.5px/2.2 var(--rey-font); color: var(--text-3); margin: 14px 0 0; max-width: 720px; }
.rey-ui .post-hero .mag-meta { margin-top: 18px; }
.rey-ui .post-cover { margin-top: 24px; border-radius: calc(22px * var(--rey-r)); overflow: hidden;
  aspect-ratio: 16 / 7; background: var(--gray-1); }
.rey-ui .post-cover img { width: 100%; height: 100%; object-fit: cover; }

/* بدنه‌ی نوشته */
.rey-ui .post-body { margin-top: 30px; font: 400 15px/2.35 var(--rey-font); color: var(--text-2); }
.rey-ui .post-body > *:first-child { margin-top: 0; }
.rey-ui .post-body p { margin: 0 0 20px; }
.rey-ui .post-body a { color: var(--green); border-bottom: 1px dashed var(--green-300); }
.rey-ui .post-body h2 { font: 800 21px var(--rey-font); color: var(--navy);
  margin: 44px 0 18px; display: flex; align-items: center; gap: 12px; scroll-margin-top: 90px; }
.rey-ui .post-body h2::before { content: ""; width: 10px; height: 10px; border-radius: 3px;
  background: var(--green); transform: rotate(45deg); flex: 0 0 auto; }
.rey-ui .post-body h3 { font: 700 17px var(--rey-font); color: var(--navy); margin: 32px 0 14px; scroll-margin-top: 90px; }
.rey-ui .post-body h4 { font: 700 15px var(--rey-font); color: var(--navy); margin: 26px 0 12px; }
.rey-ui .post-body ul, .rey-ui .post-body ol { margin: 0 0 20px; padding-inline-start: 22px; }
.rey-ui .post-body li { margin-bottom: 9px; }
.rey-ui .post-body ul { list-style: none; padding-inline-start: 4px; }
.rey-ui .post-body ul > li { position: relative; padding-inline-start: 20px; }
.rey-ui .post-body ul > li::before { content: ""; position: absolute; top: 13px; inset-inline-start: 4px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.rey-ui .post-body img { border-radius: calc(16px * var(--rey-r)); margin: 8px 0; height: auto; }
.rey-ui .post-body figure { margin: 26px 0; }
.rey-ui .post-body figcaption { font: 400 12px var(--rey-font); color: var(--muted); text-align: center; margin-top: 9px; }
.rey-ui .post-body blockquote { border: 1px solid var(--border); border-inline-start: 4px solid var(--green);
  background: var(--surface); border-radius: calc(14px * var(--rey-r)); margin: 26px 0; padding: 18px 22px;
  font: 400 14px/2.2 var(--rey-font); color: var(--text-2); }
.rey-ui .post-body blockquote p:last-child { margin-bottom: 0; }
.rey-ui .post-body code { font: 500 13px ui-monospace, Menlo, monospace; background: var(--gray-1);
  border-radius: calc(6px * var(--rey-r)); padding: 2px 7px; direction: ltr; display: inline-block; }
.rey-ui .post-body pre { background: var(--navy); color: #d7e4ea; border-radius: calc(14px * var(--rey-r));
  padding: 18px; overflow-x: auto; direction: ltr; text-align: left; margin: 0 0 20px; }
.rey-ui .post-body pre code { background: none; color: inherit; padding: 0; }
.rey-ui .post-body table { width: 100%; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--border); border-radius: calc(14px * var(--rey-r)); overflow: hidden; margin: 0 0 22px; font-size: 13.5px; }
.rey-ui .post-body th { background: var(--gray-1); color: var(--navy); font-weight: 700; padding: 12px 14px; text-align: start; }
.rey-ui .post-body td { padding: 12px 14px; border-top: 1px solid var(--border); }
.rey-ui .post-body hr { border: none; border-top: 1px dashed var(--border); margin: 32px 0; }
.rey-ui .post-table-scroll { overflow-x: auto; }

/* برچسب‌ها */
.rey-ui .post-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 34px; }
.rey-ui .post-tags .lbl { font: 700 12.5px var(--rey-font); color: var(--navy); }
.rey-ui .post-tags a { font: 500 12px var(--rey-font); color: var(--text-3);
  background: var(--surface); border: 1px solid var(--border); border-radius: 99px;
  padding: 7px 15px; transition: all .2s; }
.rey-ui .post-tags a:hover { border-color: var(--green-300); color: var(--green); }

/* اشتراک‌گذاری */
.rey-ui .post-share { display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--border); }
.rey-ui .post-share .lbl { font: 700 12.5px var(--rey-font); color: var(--navy); margin-inline-end: 4px; }
.rey-ui .post-share a, .rey-ui .post-share button { width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--border); border-radius: calc(12px * var(--rey-r)); background: var(--surface); color: var(--text-3);
  display: inline-flex; align-items: center; justify-content: center; transition: all .2s; }
.rey-ui .post-share a:hover, .rey-ui .post-share button:hover { border-color: var(--green); color: var(--green); background: var(--green-050); }
.rey-ui .post-share svg { width: 17px; height: 17px; }
.rey-ui .post-share .copied { border-color: var(--green); background: var(--green-100); color: var(--green); }

/* نویسنده */
.rey-ui .post-author { display: flex; align-items: center; gap: 16px; margin-top: 30px;
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(18px * var(--rey-r)); padding: 20px; }
.rey-ui .post-author img { width: 56px; height: 56px; border-radius: 50%; flex: 0 0 56px; }
.rey-ui .post-author b { font: 700 14px var(--rey-font); color: var(--navy); display: block; }
.rey-ui .post-author span { font: 400 12px/1.9 var(--rey-font); color: var(--text-3); display: block; margin-top: 4px; }

/* نوشته‌ی قبلی/بعدی */
.rey-ui .post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.rey-ui .post-nav > * { min-width: 0; }
.rey-ui .post-nav a { background: var(--surface); border: 1px solid var(--border); border-radius: calc(16px * var(--rey-r));
  padding: 16px 18px; transition: border-color .2s; display: block; }
.rey-ui .post-nav a:hover { border-color: var(--green-300); }
.rey-ui .post-nav .dir { display: flex; align-items: center; gap: 6px;
  font: 600 11.5px var(--rey-font); color: var(--green); margin-bottom: 8px; }
.rey-ui .post-nav .dir svg { width: 14px; height: 14px; }
.rey-ui .post-nav b { font: 600 13px/1.8 var(--rey-font); color: var(--navy); display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rey-ui .post-nav a.next { text-align: end; }
.rey-ui .post-nav a.next .dir { justify-content: flex-end; }

/* فهرست مطالب */
.rey-ui .toc { max-height: 60vh; overflow-y: auto; }
.rey-ui .toc a { display: block; font: 500 12.5px/1.8 var(--rey-font); color: var(--text-3);
  padding: 8px 12px; border-radius: calc(9px * var(--rey-r)); border-inline-start: 2px solid transparent; transition: all .2s; }
.rey-ui .toc a.lvl-3 { padding-inline-start: 26px; font-size: 12px; }
.rey-ui .toc a:hover { color: var(--green); background: var(--green-050); }
.rey-ui .toc a.active { color: var(--green); background: var(--green-100); border-inline-start-color: var(--green); font-weight: 700; }

/* نوشته‌های مرتبط */
.rey-ui .post-related { margin-top: 48px; }

/* ---------- دیدگاه‌ها ---------- */
.rey-ui .rey-comments { margin-top: 48px; }
.rey-ui .rey-comments .head2 { font: 800 18px var(--rey-font); color: var(--navy); margin: 0 0 18px;
  display: flex; align-items: center; gap: 10px; }
.rey-ui .rey-comments .head2 svg { width: 19px; height: 19px; color: var(--green); }
.rey-ui .comment-list { list-style: none; margin: 0; padding: 0; }
.rey-ui .comment-list ul.children { list-style: none; margin: 12px 0 0; padding-inline-start: 28px; }
.rey-ui .comment-list .comment-body { background: var(--surface); border: 1px solid var(--border);
  border-radius: calc(16px * var(--rey-r)); padding: 18px 20px; margin-bottom: 12px; }
.rey-ui .comment-list .comment-meta2 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rey-ui .comment-list .comment-meta2 img { width: 38px; height: 38px; border-radius: 50%; }
.rey-ui .comment-list .comment-meta2 b { font: 700 13px var(--rey-font); color: var(--navy); display: block; }
.rey-ui .comment-list .comment-meta2 span { font: 400 11px var(--rey-font); color: var(--muted); }
.rey-ui .comment-list .comment-text { font: 400 13.5px/2.15 var(--rey-font); color: var(--text-2); }
.rey-ui .comment-list .comment-text p { margin: 0 0 10px; }
.rey-ui .comment-list .comment-text p:last-child { margin-bottom: 0; }
.rey-ui .comment-list .reply { margin-top: 10px; }
.rey-ui .comment-list .reply a { font: 600 12px var(--rey-font); color: var(--green); }
.rey-ui .comment-respond { background: var(--surface); border: 1px solid var(--border);
  border-radius: calc(18px * var(--rey-r)); padding: 22px 24px; margin-top: 20px; }
.rey-ui .comment-respond .comment-reply-title { font: 800 16px var(--rey-font); color: var(--navy); margin: 0 0 6px; }
.rey-ui .comment-respond .comment-notes,
.rey-ui .comment-respond .logged-in-as { font: 400 12px/1.9 var(--rey-font); color: var(--muted); margin: 0 0 16px; }
.rey-ui .comment-respond label { display: block; font: 600 12.5px var(--rey-font); color: var(--navy); margin-bottom: 7px; }
.rey-ui .comment-respond input[type=text],
.rey-ui .comment-respond input[type=email],
.rey-ui .comment-respond input[type=url],
.rey-ui .comment-respond textarea { width: 100%; font: 400 13px var(--rey-font); color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: calc(12px * var(--rey-r)); padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s; }
.rey-ui .comment-respond textarea { min-height: 130px; resize: vertical; line-height: 2; }
.rey-ui .comment-respond input:focus, .rey-ui .comment-respond textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,95,54,.12); }
.rey-ui .comment-respond .comment-form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.rey-ui .comment-respond .comment-form-fields > p { margin: 0; }
.rey-ui .comment-respond .comment-form-cookies-consent { display: flex; align-items: center; gap: 8px;
  font: 400 12px var(--rey-font); color: var(--text-3); margin: 12px 0 0; }
.rey-ui .comment-respond .comment-form-cookies-consent label { display: inline; margin: 0; font-weight: 400; color: inherit; }
.rey-ui .comment-respond .form-submit { margin: 16px 0 0; }
.rey-ui .comment-respond .submit { background: var(--green); color: #fff; border: none;
  font: 700 13px var(--rey-font); padding: 12px 30px; border-radius: 99px; cursor: pointer; transition: background .2s; }
.rey-ui .comment-respond .submit:hover { background: var(--green-dark); }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 1024px) {
  .rey-ui .mag-layout { grid-template-columns: 1fr 260px; gap: 24px; }
  .rey-ui .mag-feat { grid-template-columns: 1fr; }
  .rey-ui .mag-feat .ph { aspect-ratio: 16 / 8; }
}
@media (max-width: 860px) {
  .rey-ui .mag-head { padding: 26px 20px; border-radius: calc(18px * var(--rey-r)); margin-top: 12px; }
  .rey-ui .mag-head h1 { font-size: 21px; }
  .rey-ui .mag-head p { font-size: 13px; }
  .rey-ui .mag-layout { grid-template-columns: 1fr; gap: 26px; margin-top: 22px; }
  .rey-ui .mag-side { position: static; }
  .rey-ui .mag-list { grid-template-columns: 1fr 1fr; gap: 12px; }
  .rey-ui .mag-post h3 { font-size: 13px; }
  .rey-ui .mag-post p { display: none; }
  .rey-ui .mag-post .body { padding: 12px 13px 14px; }
  .rey-ui .mag-feat .txt { padding: 18px 18px 22px; }
  .rey-ui .mag-feat .txt h3 { font-size: 16px; }
  .rey-ui .post-hero h1 { font-size: 20px; }
  .rey-ui .post-hero .lead { font-size: 13px; }
  .rey-ui .post-cover { aspect-ratio: 16 / 9; border-radius: calc(16px * var(--rey-r)); }
  .rey-ui .post-body { font-size: 14px; line-height: 2.25; margin-top: 22px; }
  .rey-ui .post-body h2 { font-size: 17px; margin: 32px 0 14px; }
  .rey-ui .post-body h3 { font-size: 15px; }
  .rey-ui .post-nav { grid-template-columns: 1fr; }
  .rey-ui .comment-respond { padding: 16px; }
  .rey-ui .comment-respond .comment-form-fields { grid-template-columns: 1fr; }
  .rey-ui .comment-list ul.children { padding-inline-start: 14px; }
}
@media (max-width: 520px) {
  .rey-ui .mag-list { grid-template-columns: 1fr; }
  .rey-ui .mag-post p { display: -webkit-box; }
}

/* ===========================================================
   صفحه‌ی نتایج جستجو
   =========================================================== */
.rey-ui .rey-search .mag-head { margin-bottom: 8px; }
.rey-ui .rey-search-sec { margin-top: 32px; }
.rey-ui .rey-search-sec .sec-head { margin-bottom: 16px; }
.rey-ui .rey-search-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rey-ui .rey-search-grid > * { min-width: 0; }
.rey-ui .rey-search-grid .pcard { border: 1px solid var(--border); height: 100%; }
.rey-ui .rey-search-grid .pcard:hover { border-color: var(--green-300); }
.rey-ui .rey-search-pops { display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px; margin: 0 0 20px; font: 400 12px var(--rey-font); color: var(--muted); }
.rey-ui .rey-search-pops a { font-weight: 500; color: var(--text-3);
  background: var(--gray-1); border-radius: 99px; padding: 5px 14px; transition: all .2s; }
.rey-ui .rey-search-pops a:hover { background: var(--green-100); color: var(--green); }

@media (max-width: 1024px) { .rey-ui .rey-search-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .rey-ui .rey-search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }


/* ===========================================================
   پوسته‌ی مجله: هدر، ناوبری، جستجو، فوتر، برگه
   =========================================================== */
.rey-ui { margin: 0; background: var(--bg); color: var(--text); font-family: var(--rey-font); direction: rtl; }
.rey-ui a { color: inherit; text-decoration: none; }
.rey-ui img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.screen-reader-text:focus { position: fixed !important; top: 8px; inset-inline-start: 8px; width: auto; height: auto; clip: auto; background: #fff; padding: 10px 16px; z-index: 99999; border-radius: 8px; }

.rey-ui .mg-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.rey-ui .mg-bar { display: flex; align-items: center; gap: 22px; padding-top: 14px; padding-bottom: 14px; }
.rey-ui .mg-logo { flex: 0 0 auto; display: block; }
.rey-ui .mg-logo img { display: block; height: 46px; width: auto; }
.rey-ui .mg-search { flex: 1; display: flex; align-items: center; background: var(--gray-1); border-radius: 999px; padding: 5px; min-width: 0; }
.rey-ui .mg-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 18px; font: 400 14px var(--rey-font); color: var(--text); outline: none; box-shadow: none; }
.rey-ui .mg-search input::placeholder { color: var(--muted); }
.rey-ui .mg-search button { border: 0; cursor: pointer; background: var(--green); color: #fff; border-radius: 999px; padding: 10px 24px; font: 600 13px var(--rey-font); }
.rey-ui .mg-search button:hover { background: var(--green-dark); }
.rey-ui .mg-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.rey-ui .mg-act { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 12px; border-radius: 12px; color: var(--text-3); font: 500 11px var(--rey-font); transition: background .2s, color .2s; }
.rey-ui .mg-act:hover { background: var(--green-050); color: var(--green); }
.rey-ui .mg-act--shop { flex-direction: row; gap: 7px; background: var(--green); color: #fff !important; padding: 10px 18px; border-radius: 999px; font: 600 13px var(--rey-font); }
.rey-ui .mg-act--shop:hover { background: var(--green-dark); }

.rey-ui .mg-nav { border-top: 1px solid var(--border-2); background: #fff; }
.rey-ui .mg-nav .container { overflow-x: auto; scrollbar-width: none; }
.rey-ui .mg-nav .container::-webkit-scrollbar { display: none; }
.rey-ui .mg-menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; white-space: nowrap; }
.rey-ui .mg-menu li { margin: 0; }
.rey-ui .mg-menu a { display: block; padding: 12px 14px; font: 500 13px var(--rey-font); color: var(--text-2); border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.rey-ui .mg-menu a:hover { color: var(--green); }
.rey-ui .mg-menu .current-menu-item > a, .rey-ui .mg-menu .current-cat > a, .rey-ui .mg-menu .current-menu-ancestor > a { color: var(--green); border-bottom-color: var(--green); font-weight: 700; }

.rey-ui .mg-search--big input { font-size: 15px; }
.rey-ui .mg-page .post-hero { margin-top: 24px; }
.rey-ui .mg-page .post-body { margin-top: 20px; }

.rey-ui .mg-footer { background: #fff; border-top: 1px solid var(--border); margin-top: 24px; }
.rey-ui .mg-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr auto; gap: 36px; padding-top: 36px; padding-bottom: 28px; align-items: start; }
.rey-ui .mg-footer__about img { display: block; height: 52px; width: auto; margin-bottom: 12px; }
.rey-ui .mg-footer__about p { font: 400 12.5px/2.1 var(--rey-font); color: var(--muted); margin: 0; max-width: 380px; }
.rey-ui .mg-footer h4 { font: 700 14px var(--rey-font); color: var(--navy); margin: 0 0 14px; }
.rey-ui .mg-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rey-ui .mg-footer ul a { font: 400 13px var(--rey-font); color: var(--text-3); }
.rey-ui .mg-footer ul a:hover { color: var(--green); }
.rey-ui .mg-footer__badges { display: flex; gap: 12px; align-items: center; }
.rey-ui .mg-footer__badges img { display: block; height: 78px; width: auto; max-width: 140px; object-fit: contain; }
.rey-ui .mg-footer__copy { border-top: 1px solid var(--border-2); padding-top: 16px; padding-bottom: 22px; font: 400 12px var(--rey-font); color: var(--muted); }
.rey-ui .mg-footer__copy a:hover { color: var(--green); }

@media (max-width: 900px) {
  .rey-ui .mg-bar { flex-wrap: wrap; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .rey-ui .mg-logo img { height: 38px; }
  .rey-ui .mg-actions { margin-inline-start: auto; }
  .rey-ui .mg-act span { display: none; }
  .rey-ui .mg-act { padding: 8px; }
  .rey-ui .mg-act--shop span { display: inline; }
  .rey-ui .mg-search { order: 3; flex: 1 0 100%; }
  .rey-ui .mg-footer__grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .rey-ui .mg-footer__about { grid-column: 1 / -1; }
  .rey-ui .mg-footer__badges { grid-column: 1 / -1; }
}

/* ===========================================================
   صفحه‌ی اصلی مجله: بنر، فهرست افقی، بلوک‌های موضوعی
   =========================================================== */
.rey-ui .mg-h1 { font: 800 26px/1.7 var(--rey-font); color: var(--navy); margin: 18px 0 16px; }

.rey-ui .mg-hero { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, 200px); }
.rey-ui .mg-tile { position: relative; display: block; overflow: hidden; border-radius: calc(18px * var(--rey-r)); background: var(--gray-1); isolation: isolate; }
.rey-ui .mg-tile--big { grid-column: span 2; grid-row: span 2; }
.rey-ui .mg-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s ease; }
.rey-ui .mg-tile:hover img { transform: scale(1.04); }
.rey-ui .mg-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(8,24,18,.82) 0%, rgba(8,24,18,.28) 48%, rgba(8,24,18,0) 75%); }
.rey-ui .mg-tile .mag-chip, .rey-ui .mg-tile .mag-chip.on-img { position: absolute; top: 14px; inset-inline-start: 14px; inset-inline-end: auto; right: auto; left: auto; width: max-content; max-width: calc(100% - 28px); }
.rey-ui .mg-tile .mag-chip { inset-inline-start: 14px; }
.rey-ui .mg-tile__t { position: absolute; inset-inline: 16px; bottom: 14px; color: #fff; font: 700 14px/1.9 var(--rey-font);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rey-ui .mg-tile--big .mg-tile__t { font-size: 20px; line-height: 1.8; -webkit-line-clamp: 3; }
.rey-ui .mg-tile .ph-empty { position: absolute; }

.rey-ui .mag-main > .sec-head, .rey-ui .mg-block .sec-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; gap: 16px; }
.rey-ui .mg-block .sec-head .eyebrow, .rey-ui .mag-main > .sec-head .eyebrow { font: 600 11px var(--rey-font); color: var(--muted); letter-spacing: .1em; margin-bottom: 5px; }
.rey-ui .mg-block .sec-head h2, .rey-ui .mag-main > .sec-head h2 { font: 700 21px var(--rey-font); color: var(--navy); margin: 0; }
.rey-ui .mg-block .see-all { font: 600 13px var(--rey-font); color: var(--green); }
.rey-ui .mg-block { margin-top: 44px; }

.rey-ui .mg-rows { display: flex; flex-direction: column; }
.rey-ui .mg-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--border-2); align-items: start; }
.rey-ui .mg-row:first-child { padding-top: 0; }
.rey-ui .mg-row .ph { display: block; position: relative; aspect-ratio: 16 / 11; border-radius: calc(14px * var(--rey-r)); overflow: hidden; background: var(--gray-1); }
.rey-ui .mg-row .ph img { width: 100%; height: 100%; object-fit: cover; }
.rey-ui .mg-row h3 { font: 700 16px/1.9 var(--rey-font); color: var(--navy); margin: 0; }
.rey-ui .mg-row h3 a:hover { color: var(--green); }
.rey-ui .mg-row p { font: 400 12.5px/2 var(--rey-font); color: var(--text-3); margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rey-ui .mg-row .mag-meta { margin-top: 10px; }

@media (max-width: 900px) {
  .rey-ui .mg-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 260px repeat(2, 170px); }
  .rey-ui .mg-tile--big { grid-column: span 2; grid-row: span 1; }
  .rey-ui .mg-tile--big .mg-tile__t { font-size: 17px; }
  .rey-ui .mg-row { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
  .rey-ui .mg-row p { display: none; }
  .rey-ui .mg-row h3 { font-size: 14px; }
  .rey-ui .mg-h1 { font-size: 21px; }
}

/* ===========================================================
   هدر تک‌نوشته — مرتب و جمع‌وجور: ردیف برچسب+متا، عنوان، تصویر
   (هم‌عرض ستون مقاله؛ لید حذف شد چون اولین پاراگراف را تکرار می‌کرد)
   =========================================================== */
.rey-ui .post-hero { padding-top: 18px; max-width: calc(100% - 336px); }
.rey-ui .post-hero .ph-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.rey-ui .post-hero h1 { font: 800 26px/1.75 var(--rey-font); color: var(--navy); margin: 14px 0 0; max-width: none; }
.rey-ui .post-hero .mag-meta { margin: 0; font: 400 12px var(--rey-font); color: var(--muted); gap: 12px; }
.rey-ui .mag-meta .dot::before { content: "•"; margin-inline-end: 12px; opacity: .45; }
.rey-ui .mag-meta span:first-child.dot::before { content: none; }
.rey-ui .post-cover { margin-top: 20px; aspect-ratio: 16 / 8; border-radius: calc(18px * var(--rey-r)); }
@media (max-width: 1024px) { .rey-ui .post-hero { max-width: none; } }
@media (max-width: 860px) {
  .rey-ui .post-hero h1 { font-size: 20px; line-height: 1.8; }
  .rey-ui .post-cover { aspect-ratio: 16 / 9; }
}

/* ===========================================================
   هدر مقاله — نسخه‌ی حرفه‌ای: برچسب، عنوان، (چکیده‌ی دستی)، خط نویسنده
   =========================================================== */
.rey-ui .post-hero { padding-top: 22px; }
.rey-ui .post-hero .mag-chip { margin-bottom: 4px; }
.rey-ui .post-hero h1 { font: 800 30px/1.7 var(--rey-font); color: var(--navy); margin: 10px 0 0; letter-spacing: -.2px; }
.rey-ui .post-hero .deck { font: 400 15px/2.1 var(--rey-font); color: var(--text-3); margin: 10px 0 0; max-width: 760px; }
.rey-ui .post-hero .ph-by { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 20px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.rey-ui .ph-by .who { display: flex; align-items: center; gap: 12px; }
.rey-ui .ph-by .who img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--green-100); flex: 0 0 44px; }
.rey-ui .ph-by .who span { display: flex; flex-direction: column; line-height: 1.5; }
.rey-ui .ph-by .who small { font: 400 11px var(--rey-font); color: var(--muted); }
.rey-ui .ph-by .who b { font: 700 14px var(--rey-font); color: var(--navy); }
.rey-ui .ph-by .who:hover b { color: var(--green); }
.rey-ui .ph-by .facts { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font: 400 12.5px var(--rey-font); color: var(--text-3); }
.rey-ui .ph-by .facts span { display: inline-flex; align-items: center; gap: 6px; }
.rey-ui .ph-by .facts svg { width: 15px; height: 15px; color: var(--green); opacity: .85; }
.rey-ui .ph-by .facts .upd { color: var(--muted); }
.rey-ui .post-cover { margin-top: 22px; aspect-ratio: 16 / 8.5; border-radius: calc(20px * var(--rey-r)); box-shadow: 0 10px 30px rgba(18,48,63,.08); }
@media (max-width: 860px) {
  .rey-ui .post-hero h1 { font-size: 21px; line-height: 1.85; }
  .rey-ui .post-hero .deck { font-size: 13px; }
  .rey-ui .post-hero .ph-by { gap: 10px; }
  .rey-ui .ph-by .facts { gap: 12px; font-size: 11.5px; }
  .rey-ui .ph-by .who img { width: 38px; height: 38px; flex-basis: 38px; }
  .rey-ui .post-cover { aspect-ratio: 16 / 9; }
}
