/* =====================================================================
   قالب فرزند اقتصاد مدرن (newdiv-child) - نسخه 9
   ریلزها: افزونه‌ی NewDiv Reels (هیچ استایل ریلزی در این فایل نیست)
   ===================================================================== */
:root{
  --me-primary:#405098;
  --me-primary-dark:#203888;
  --me-accent:#e8173b;
  --me-hero-bg:#000000;
  --me-text:#1c1c1f;
  --me-muted:#7a7a85;
  --me-border:rgba(0,0,0,.08);
  --me-surface:#fff;
  --me-chip:#f1f2f6;
  --me-img-bg:#eceef3;
  --me-radius:10px;
}
html.dark-skin, body.dark-skin{
  --me-text:#e9e9ee;
  --me-muted:#9a9aa6;
  --me-border:rgba(255,255,255,.09);
  --me-surface:#1f2024;
  --me-chip:#2a2c31;
  --me-img-bg:#16171b;
}

/* ---------- تصویر: دقیقاً داخل کادر (cover)، بدون حاشیه‌ی خالی ----------
   پیشنهاد: تصویر شاخص ۱۶:۹ (مثلاً ۱۲۸۰×۷۲۰) تا در همه‌ی کادرها کمترین برش را داشته باشد */
.me-fit{ position:relative; display:block; overflow:hidden; background:var(--me-img-bg); border-radius:8px; }
.me-fit img{ display:block; width:100% !important; height:100% !important; object-fit:cover !important; max-width:none; }
.me-fit.is-empty{ background:var(--me-img-bg); }

/* حالت «تصویر کامل» (نمایش ← طراحی تک‌خبر و دسته‌ها ← نمایش تصاویر): کل تصویر دیده می‌شود، فضای خالی با نسخه‌ی محو خود تصویر پر می‌شود */
.me-img-contain .me-fit{ isolation:isolate; }
.me-img-contain .me-fit::before{
  content:""; position:absolute; inset:-20px; z-index:-1;
  background:var(--me-bg, none) center/cover no-repeat; filter:blur(18px) brightness(.75) saturate(1.1);
}
.me-img-contain .me-fit img, .me-img-contain .post-thumb img.wp-post-image{ object-fit:contain !important; }

/* تصاویر بلوک‌های خود جنه هم کادر را کامل پر کنند */
.post-thumb img.wp-post-image{ object-fit:cover !important; }

/* ---------- عنوان بخش‌ها ---------- */
.me-latest-head{ display:flex; align-items:center; gap:10px; margin-bottom:16px; }
.me-head-icon{
  width:34px; height:34px; flex-shrink:0; display:inline-flex; align-items:center; justify-content:center;
  border:1.8px solid var(--me-text); border-radius:50%; color:var(--me-text);
}
.me-head-icon svg{ width:20px; height:20px; display:block; }
.me-head-bar{ width:4px; height:20px; background:var(--me-primary); border-radius:2px; flex-shrink:0; }
.me-latest-head h2{ font-size:18px; margin:0; flex:1; font-weight:800; color:var(--me-text); }
.me-more{ color:var(--me-primary); text-decoration:none; font-size:13px; white-space:nowrap; }
.me-badge{
  display:inline-block; align-self:flex-start; background:var(--me-primary); color:#fff;
  font-size:11.5px; font-weight:700; padding:3px 10px; border-radius:999px;
}

/* ===================== هیرو: ۱ بزرگ + ۴ کنار ===================== */
/* نوار مشکی تمام‌عرض (مثل زومیت): کادر سفید بلوک جنه حذف می‌شود و
   پس‌زمینه‌ی مشکی تا دو لبه‌ی صفحه ادامه پیدا می‌کند، بدون ایجاد اسکرول افقی */
.site-content:has(.me-hero), #content:has(.me-hero){ margin-top:0 !important; padding-top:0 !important; }
.section-item:has(.me-hero), .main-content:has(.me-hero){ padding-top:0 !important; }
.mag-box:has(.me-hero){
  background:var(--me-hero-bg) !important; border:0 !important; border-radius:0 !important;
  padding:26px 0 !important; margin-bottom:0 !important;
  box-shadow:0 0 0 100vmax var(--me-hero-bg) !important; clip-path:inset(0 -100vmax);
}
.mag-box:has(.me-hero) .container-wrapper,
.mag-box:has(.me-hero) .mag-box-container{
  background:transparent !important; border:0 !important; box-shadow:none !important;
  padding:0 !important; margin:0 !important; border-radius:0 !important;
}
.mag-box:has(.me-hero) .mag-box-title{ display:none !important; }
.mag-box:has(.me-hero) .me-hero{ padding:0; border-radius:0; }

.me-hero{
  display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:20px;
  background:var(--me-hero-bg); padding:18px; border-radius:var(--me-radius);
}
.me-hero-main{
  position:relative; display:block; aspect-ratio:16/9; border-radius:var(--me-radius);
  overflow:hidden; text-decoration:none; color:#fff;
}
.me-hero-main-img{ position:absolute; inset:0; border-radius:0; }
.me-hero-main::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(transparent 45%, rgba(0,0,0,.88));
}
.me-hero-main-text{
  position:absolute; right:0; left:0; bottom:0; z-index:2; padding:22px;
  display:flex; flex-direction:column; gap:8px;
}
.me-hero-main-title{ font-size:22px; line-height:1.7; font-weight:800; color:#fff; }
.me-hero-main:hover .me-hero-main-title{ text-decoration:underline; text-underline-offset:6px; }
.me-hero-play{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); z-index:2;
  width:66px; height:66px; border-radius:50%; background:rgba(64,80,152,.9); color:#fff;
  display:flex; align-items:center; justify-content:center; box-shadow:0 6px 24px rgba(0,0,0,.4);
  transition:transform .2s;
}
.me-hero-main:hover .me-hero-play{ transform:translate(-50%,-50%) scale(1.08); }
.me-hero-time{ font-size:11.5px; color:#b9b9c3; }

.me-hero-list{ display:flex; flex-direction:column; }
.me-hero-item{
  flex:1; display:flex; gap:12px; align-items:center; padding:10px 0;
  border-top:1px solid rgba(255,255,255,.09); text-decoration:none; color:#eee;
}
.me-hero-item:first-child{ border-top:none; padding-top:0; }
.me-hero-item:last-child{ padding-bottom:0; }
.me-hero-item-img{ width:112px; height:63px; flex-shrink:0; }
.me-hero-item-text{ display:flex; flex-direction:column; gap:4px; min-width:0; }
.me-hero-item-cat{ color:#8ea2ff; font-size:11.5px; font-weight:700; }
.me-hero-item-title{
  font-size:13.5px; line-height:1.75; font-weight:700; color:#f2f2f5;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.me-hero-item:hover .me-hero-item-title{ color:#fff; text-decoration:underline; }


/* دسکتاپ: هیرو عریض‌تر و به‌اندازه‌ی کل «نگاه اول» (ارتفاع پنجره منهای هدر)؛ ارتفاع دقیق را me-helper.js محاسبه می‌کند */
@media (min-width:992px){
  .mag-box:has(.me-hero), .mag-box:has(.me-hero) .container-wrapper, .mag-box:has(.me-hero) .mag-box-container{ overflow:visible !important; }
  .mag-box:has(.me-hero) .me-hero{
    /* عریض‌تر از ستون محتوا، دقیقاً وسط‌چین، مستقل از جهت (راست‌به‌چپ/چپ‌به‌راست): حاشیه‌ی دو طرف برابر */
    --me-hero-w:min(1560px, calc(100vw - 56px));
    width:var(--me-hero-w); margin-inline:calc((100% - var(--me-hero-w)) / 2); box-sizing:border-box;
    grid-template-columns:minmax(0,2.4fr) minmax(0,1fr); gap:26px; align-items:stretch;
    min-height:var(--me-hero-h, 470px);
  }
  .mag-box:has(.me-hero) .me-hero-main{ aspect-ratio:auto; height:100%; min-height:100%; }
  .me-hero-main-title{ font-size:28px; }
  .me-hero-main-text{ padding:30px; }
  .me-hero-item-img{ width:156px; height:88px; }
  .me-hero-item-title{ font-size:15.5px; }
}

/* ===================== ردیف تبلیغات ===================== */
.me-ad-wrap{ margin:28px 0; display:flex; flex-direction:column; gap:6px; }
.me-ad-row{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:0; }
.me-ad-row.is-single{ grid-template-columns:1fr; }
.me-ad{ display:block; border-radius:var(--me-radius); overflow:hidden; background:var(--me-img-bg); }
.me-ad img{ display:block; width:100%; height:auto; }

/* ===================== آخرین مطالب ===================== */
.me-latest, .me-cat-section, .me-reading{ margin:30px 0; }
.me-latest-tabs{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.me-latest-tab{
  border:1px solid var(--me-border); background:var(--me-surface); color:var(--me-text);
  border-radius:999px; padding:6px 16px; font-size:13px; cursor:pointer; font-family:inherit;
}
.me-latest-tab.is-active{ background:var(--me-primary); border-color:var(--me-primary); color:#fff; }
.me-latest-panel{ display:none; flex-direction:column; }
.me-latest-panel.is-active{ display:flex; }
.me-latest-item{
  display:flex; gap:14px; padding:14px 0; text-decoration:none; color:var(--me-text);
  border-top:1px solid var(--me-border);
}
.me-latest-item:first-child{ border-top:none; }
.me-latest-item-thumb{ width:150px; height:84px; flex-shrink:0; }
.me-latest-item-body{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.me-latest-item-title{ font-weight:700; font-size:15px; line-height:1.7; }
.me-latest-item-excerpt{ font-size:13px; color:var(--me-muted); line-height:1.8; }
.me-latest-item-meta{ display:flex; gap:14px; font-size:12px; color:var(--me-muted); }
.me-latest-item:hover .me-latest-item-title{ color:var(--me-primary); }

/* چیدمان مطابق طرح: لیست سمت چپ، ستون کناری (تبلیغ + پیشنهاد سردبیر) سمت راست.
   در صفحه‌ی راست‌به‌چپ، ستون اول سمت راست می‌نشیند؛ پس ستون کناری ستون اول است. */
.me-latest-full{ display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1.7fr); gap:30px; align-items:start; }
.me-latest-side{ order:1; display:flex; flex-direction:column; gap:22px; min-width:0; }
.me-latest-main{ order:2; min-width:0; }

.me-latest-ads-wrap{ display:flex; flex-direction:column; gap:6px; }
.me-latest-ads-label{ font-size:11px; color:var(--me-muted); text-align:right; }
.me-latest-ads{ display:grid; grid-template-columns:1fr 1fr; gap:14px; align-items:start; }
.me-latest-ad{ display:block; border-radius:8px; overflow:hidden; background:var(--me-img-bg); }
.me-latest-ad img{ width:100%; height:auto; display:block; }

/* پیشنهاد سردبیر: تمام فضای باقی‌مانده‌ی ستون را پر می‌کند تا زیرش جای خالی نماند */
.me-editor-pick{ display:flex; flex-direction:column; min-height:0; }
.me-editor-pick .me-latest-head{ margin-bottom:12px; }
/* پیشنهاد سردبیر: همیشه یک مستطیل افقی ۱۶:۹ (دیگر به ارتفاع ستون کشیده نمی‌شود تا عکس بریده نشود) */
.me-editor-pick-card{
  position:relative; display:block; aspect-ratio:16/9;
  border-radius:var(--me-radius); overflow:hidden; text-decoration:none;
}
.me-editor-pick-card::after{ content:""; position:absolute; inset:0; background:linear-gradient(transparent 40%, rgba(0,0,0,.85)); }
.me-editor-pick-img{ position:absolute; inset:0; border-radius:0; }
.me-editor-pick-title{
  position:absolute; bottom:14px; right:14px; left:14px; z-index:2;
  color:#fff; font-weight:800; font-size:16px; line-height:1.7;
}

/* ===================== بخش‌های دسته‌ای (نفوذی، پرداخت، ...) ===================== */
.me-cat-row{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.me-cat-card{ color:var(--me-text); display:flex; flex-direction:column; gap:12px; min-width:0; }
.me-cat-card-imglink{ display:block; border-radius:var(--me-radius); overflow:hidden; }
.me-cat-card-img{ width:100%; aspect-ratio:16/9; }
.me-cat-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.me-chip{
  display:inline-block; padding:2px 13px; border:1px solid var(--me-border); border-radius:999px; background:var(--me-surface);
  color:var(--me-text); font-size:11.5px; line-height:1.9; text-decoration:none; white-space:nowrap; transition:all .15s;
}
.me-chip:hover{ border-color:var(--me-primary); color:var(--me-primary); }
.me-cat-card-title{ display:block; font-weight:800; font-size:14.5px; line-height:1.95; color:var(--me-text); text-decoration:none; }
.me-cat-card-title:hover{ color:var(--me-primary); }

/* ===================== فهرست‌های مطالعاتی ===================== */
.me-scroll{ position:relative; }
.me-scroll.is-static .me-scroll-btn{ display:none; }   /* وقتی همه‌ی کارت‌ها جا شدند، دکمه‌ی اسکرول لازم نیست */
.me-scroll-track{ display:flex; gap:14px; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; }
.me-scroll-track::-webkit-scrollbar{ display:none; }
.me-scroll-btn{
  position:absolute; top:50%; transform:translateY(-50%); z-index:3;
  width:36px; height:36px; border-radius:50%; border:0; cursor:pointer;
  background:var(--me-surface); color:var(--me-text); font-size:20px; line-height:1;
  box-shadow:0 2px 10px rgba(0,0,0,.18);
}
.me-scroll-prev{ right:-8px; }
.me-scroll-next{ left:-8px; }
.me-reading-card{
  flex:1 0 230px; scroll-snap-align:start; position:relative; border-radius:var(--me-radius);
  overflow:hidden; aspect-ratio:4/3; text-decoration:none; color:#fff; display:block; background:#111;
}
.me-reading-img{ position:absolute; inset:0; border-radius:0; }
.me-reading-card::after{ content:""; position:absolute; inset:0; background:linear-gradient(transparent 35%, rgba(0,0,0,.85)); }
.me-reading-badge{
  position:absolute; top:10px; left:10px; z-index:2; background:rgba(0,0,0,.6);
  padding:4px 10px; border-radius:999px; font-size:11px;
}
.me-reading-title{ position:absolute; bottom:12px; right:12px; left:12px; z-index:2; font-weight:800; font-size:16px; }

/* ===================== ویدیوی آپارات داخل متن نوشته ===================== */
.entry-content .h_iframe-aparat_embed_frame{
  position:relative !important; display:block !important; width:100% !important; max-width:100% !important;
  aspect-ratio:16/9 !important; height:auto !important; padding:0 !important; margin:16px 0 !important;
  overflow:hidden !important; border-radius:10px !important; background:#000 !important;
}
.entry-content .h_iframe-aparat_embed_frame span{
  position:absolute !important; inset:0 !important; width:100% !important; height:100% !important;
  padding:0 !important; margin:0 !important; display:block !important;
}
.entry-content .h_iframe-aparat_embed_frame iframe{
  position:absolute !important; inset:0 !important; width:100% !important; height:100% !important; border:0 !important;
}
.entry-content > div[id]:has(> script[src*="aparat.com"]){ width:100% !important; display:block !important; }

/* ===================== عدم کوتاه‌سازی متن نوشته در موبایل ===================== */
.single .entry-content, .single-post .entry-content, .post-content{
  max-height:none !important; -webkit-mask-image:none !important; mask-image:none !important;
}
html.me-content-expanded .toggle-post-content,
html.me-content-expanded #toggle-post-button{ display:none !important; }
.entry-content iframe, .entry-content video{ pointer-events:auto !important; position:relative; z-index:2; }

/* ===================== لیست پخش ویدیو: پلیر بزرگ + فهرست (بخش آخر صفحه اول) ===================== */
.me-vp-wrap{ margin:40px 0; }
.me-vp{ display:grid; grid-template-columns:minmax(0,1.9fr) minmax(0,1fr); gap:24px; align-items:stretch; }
.me-vp-stage{ position:relative; aspect-ratio:16/9; border-radius:var(--me-radius); overflow:hidden; background:#000; }
.me-vp-poster{ position:absolute !important; inset:0; border-radius:0; display:none !important; }
.me-vp-poster.is-active{ display:block !important; }
.me-vp-media{ position:absolute; inset:0; z-index:3; }
.me-vp-media:empty{ display:none; }  /* لایه‌ی خالی روی دکمه‌ی پخش کلیک را نگیرد */
.me-vp-media iframe, .me-vp-media video{ position:absolute; inset:0; width:100% !important; height:100% !important; border:0; background:#000; }
.me-vp-play{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); z-index:4;
  width:72px; height:72px; border-radius:50% !important; border:0 !important; padding:0 !important; cursor:pointer;
  background:rgba(0,0,0,.55) !important; color:#fff !important; display:flex; align-items:center; justify-content:center;
  transition:transform .2s, background .2s;
}
.me-vp-play:hover{ background:var(--me-primary) !important; transform:translate(-50%,-50%) scale(1.07); }
.me-vp-stage.is-playing .me-vp-play, .me-vp-stage.is-playing .me-vp-poster{ display:none !important; }
.me-vp-caption{
  display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 2px 0;
  text-decoration:none; color:var(--me-text);
}
.me-vp-caption-title{ font-weight:800; font-size:15px; line-height:1.8; }
.me-vp-caption-more{ color:var(--me-primary); font-size:12.5px; white-space:nowrap; }
.me-vp-caption:hover .me-vp-caption-title{ color:var(--me-primary); }

/* فهرست: ارتفاعش همیشه برابر پلیر است و داخلش اسکرول می‌خورد */
.me-vp-list{ position:relative; min-height:260px; }
.me-vp-scroll{
  position:absolute; inset:0; overflow-y:auto; padding:4px 14px;
  border:1px solid var(--me-border); border-radius:var(--me-radius); background:var(--me-surface);
  scrollbar-width:thin;
}
.me-vp-item{
  display:flex !important; align-items:center; gap:12px; width:100%; text-align:right; cursor:pointer;
  background:none !important; border:0 !important; border-bottom:1px solid var(--me-border) !important;
  border-radius:0 !important; box-shadow:none !important; padding:11px 0 !important;
  color:var(--me-text) !important; font:inherit; text-transform:none; letter-spacing:0;
}
.me-vp-item:last-child{ border-bottom:0 !important; }
.me-vp-thumb{ width:104px; height:60px; flex-shrink:0; }
.me-vp-item-text{ display:flex; flex-direction:column; gap:5px; min-width:0; flex:1; }
.me-vp-item-title{
  font-size:13.5px; line-height:1.8; font-weight:600;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.me-vp-item-meta{ font-size:11.5px; color:var(--me-muted); }
.me-vp-item:hover .me-vp-item-title{ color:var(--me-primary); }
.me-vp-item.is-active .me-vp-item-title{ color:var(--me-primary); font-weight:800; }
.me-vp-item.is-active .me-vp-thumb{ outline:2px solid var(--me-primary); outline-offset:1px; }

.me-admin-note{
  margin:16px 0; padding:12px 16px; border-radius:8px; background:#fff4e5; color:#7a4a00;
  border:1px solid #f0c987; font-size:13px; line-height:1.9;
}

@media (max-width:782px){
  .me-vp{ grid-template-columns:1fr; gap:16px; }
  .me-vp-list{ min-height:0; }
  .me-vp-scroll{ position:static; max-height:340px; }
  .me-vp-play{ width:56px; height:56px; }
}

/* ---------- کارت‌های روی‌تصویر (ستون کناری) ---------- */
.me-ov-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:6px; }
.me-ov-card{ position:relative; display:block; border-radius:var(--me-radius); overflow:hidden; aspect-ratio:4/3; background:#111; text-decoration:none; color:#fff; }
.me-ov-card.is-big{ grid-column:1 / -1; aspect-ratio:16/9; }
/* اگر تعداد کارت‌های کوچک فرد باشد، آخرین کارت عرض کامل می‌گیرد تا نیمی از ردیف خالی نماند */
.me-ov-card:last-child:nth-child(even){ grid-column:1 / -1; aspect-ratio:16/9; }
.me-ov-img{ position:absolute; inset:0; border-radius:0; }
.me-ov-card::after{ content:""; position:absolute; inset:0; background:linear-gradient(transparent 28%, rgba(0,0,0,.88)); }
.me-ov-text{ position:absolute; z-index:2; right:0; left:0; bottom:0; padding:12px; display:flex; flex-direction:column; gap:5px; }
.me-ov-title{ font-size:12.5px; line-height:1.85; font-weight:700; color:#fff; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.me-ov-card.is-big .me-ov-title{ font-size:16px; line-height:1.9; font-weight:800; }
.me-ov-meta{ font-size:10.5px; color:#c9c9d3; }
.me-ov-card:hover .me-ov-title{ text-decoration:underline; }


/* ---------- «یادداشت‌ها» ---------- */
.me-notes{ margin:34px 0; }
.me-notes-row{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
.me-note{ display:flex; flex-direction:column; gap:12px; min-width:0; text-decoration:none; color:var(--me-text); }
.me-note-img{ width:100%; aspect-ratio:16/9; }
.me-note-title{ font-size:15px; line-height:1.95; font-weight:800; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.me-note:hover .me-note-title{ color:var(--me-primary); }
.me-note-by{ display:flex; align-items:center; gap:8px; font-size:12px; color:var(--me-muted); }
.me-note-by img{ width:26px; height:26px; border-radius:50%; object-fit:cover; flex-shrink:0; background:var(--me-img-bg); }
.me-note-by b{ color:var(--me-text); font-weight:700; }
.me-note-by time{ margin-inline-start:auto; }
@media (max-width:980px){ .me-notes-row{ grid-template-columns:1fr 1fr; gap:14px; } }
@media (max-width:520px){ .me-notes-row{ grid-template-columns:1fr; } }

/* بلوک‌های ستون کناری که با جاوااسکریپت به‌اندازه‌ی ارتفاع محتوا نمایش داده می‌شوند */
.me-fitblock[hidden]{ display:none !important; }

/* ===================== موبایل ===================== */
@media (max-width:782px){
  .me-hero{ grid-template-columns:1fr; padding:12px; gap:14px; }
  .mag-box:has(.me-hero){ padding:14px 0 !important; }
  .me-hero-main-title{ font-size:15.5px; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
  .me-hero-main-text{ padding:12px 14px; gap:5px; }
  .me-hero-main .me-badge{ font-size:10.5px; padding:2px 8px; }
  .me-hero-play, .me-hero-main:hover .me-hero-play{ width:44px; height:44px; top:12px; left:12px; transform:none; }
  .me-hero-play svg{ width:20px; height:20px; }
  .me-hero-item{ padding:10px 0 !important; border-top:1px solid rgba(255,255,255,.09) !important; }
  .me-hero-item:first-child{ border-top:none !important; }
  .me-hero-item-img{ width:96px; height:54px; }
  .me-latest-full{ grid-template-columns:1fr; }
  .me-latest-main{ order:1; }
  .me-latest-side{ order:2; }
  .me-editor-pick-card{ aspect-ratio:16/9; }
  .me-latest-item-thumb{ width:104px; height:58px; }
  .me-latest-item-excerpt{ display:none; }
  .me-cat-row{ grid-template-columns:1fr; }
  .me-ad-row{ grid-template-columns:1fr; }
  .me-scroll-btn{ display:none; }
  .me-reading-card{ flex-basis:210px; }
}

/* =====================================================================
   فوتر (طرح مرجع) - محتوای HTML در ابزارک «HTML سفارشی» قرار می‌گیرد
   ===================================================================== */
.me-footer{
  --f-bg:#ffffff; --f-text:#23232a; --f-muted:#62626f; --f-line:rgba(0,0,0,.08); --f-deco:rgba(0,0,0,.035);
  position:relative; overflow:hidden; background:var(--f-bg); color:var(--f-text);
  padding:48px 24px 22px; direction:rtl; font-size:13px; line-height:2;
}
html.dark-skin .me-footer, body.dark-skin .me-footer{
  --f-bg:#141518; --f-text:#e6e6ec; --f-muted:#8f8f9b; --f-line:rgba(255,255,255,.08); --f-deco:rgba(255,255,255,.04);
}
/* خنثی کردن پس‌زمینه و فاصله‌های پیش‌فرض فوتر جنه فقط وقتی فوتر ما داخل آن است */
#footer:has(.me-footer){ background:var(--me-surface) !important; margin-top:40px; }
#footer:has(.me-footer) .footer-widget-area,
#footer:has(.me-footer) .container-wrapper{ padding:0 !important; margin:0 !important; background:none !important; border:0 !important; }
#footer .widget:has(.me-footer), #footer .widget_custom_html:has(.me-footer){
  padding:0 !important; margin:0 !important; background:none !important; border:0 !important; box-shadow:none !important;
}
#footer .widget:has(.me-footer) .widget-title{ display:none !important; }

/* لوگوی محو سایت (جایگزین نوارهای مورب قبلی) — در موبایل و تبلت نمایش داده نمی‌شود */
.me-footer-watermark{
  position:absolute; z-index:0; left:46%; top:44%; transform:translate(-50%,-50%);
  width:min(460px,38%); height:auto; opacity:.08; pointer-events:none; user-select:none;
}
html.dark-skin .me-footer-watermark, body.dark-skin .me-footer-watermark{ opacity:.12; }

.me-footer-top{
  position:relative; z-index:1; display:grid; gap:32px;
  grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) minmax(0,1.9fr); align-items:start;
}
.me-footer-brand{ display:flex; flex-direction:column; gap:14px; }
.me-footer-logo img{ display:block; height:40px; width:auto; }
.me-footer-accent{ width:44px; height:3px; border-radius:3px; background:var(--me-accent); }
.me-footer h4{ margin:0 0 10px; font-size:13.5px; font-weight:800; color:var(--f-text); }
.me-footer-links{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px; }
.me-footer-links a{ color:var(--f-text); text-decoration:none; font-weight:600; }
.me-footer-links a:hover{ color:var(--me-primary); }
.me-footer-col .me-footer-links a{ font-weight:400; color:var(--f-muted); }
.me-footer-col .me-footer-links a:hover{ color:var(--me-primary); }

.me-footer-partners h4{ text-align:left; color:var(--f-muted); font-weight:600; font-size:12px; }
.me-footer-logos{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px 20px; align-items:center; }
.me-footer-logos a{ display:flex; align-items:center; justify-content:center; min-height:36px; text-decoration:none; color:var(--f-muted); font-weight:800; font-size:13px; opacity:.85; transition:opacity .2s; }
.me-footer-logos a:hover{ opacity:1; }
.me-footer-logos img{ max-height:30px; max-width:100%; width:auto; display:block; }
html.dark-skin .me-footer-logos img, body.dark-skin .me-footer-logos img{ filter:brightness(0) invert(.85); }

.me-footer-bottom{
  position:relative; z-index:1; margin-top:36px; padding-top:18px; border-top:1px solid var(--f-line);
  display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap;
}
.me-footer-legal{ display:flex; flex-direction:column; gap:4px; }
.me-footer-copy{ margin:0; color:var(--f-muted); font-size:12px; }
.me-footer-credit{ margin:0; font-size:12px; }
.me-footer-social{ display:flex; gap:6px; direction:ltr; }
.me-footer-social a{
  width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  color:var(--f-muted); transition:color .2s, background .2s;
}
.me-footer-social a:hover{ color:#fff; background:var(--me-primary); }
.me-footer-social svg{ width:17px; height:17px; }

/* ---------- خوانایی فوتر ----------
   جنه رنگ متن و لینک‌های فوتر را سفید و ظاهر لیست‌ها را خودش تعیین می‌کند (روی زمینه‌ی سفید ما دیده نمی‌شد).
   اینجا با !important رنگ‌ها و ظاهر لیست فقط برای فوتر خودمان بازنویسی می‌شود. */
.me-footer, .me-footer p, .me-footer span, .me-footer li, .me-footer h4{ color:var(--f-text) !important; }
.me-footer a{ color:var(--f-text) !important; text-decoration:none !important; background:none !important; }
.me-footer a:hover{ color:var(--me-primary) !important; }
.me-footer .me-footer-col .me-footer-links a,
.me-footer .me-footer-copy,
.me-footer .me-footer-partners h4,
.me-footer .me-footer-logos a{ color:var(--f-muted) !important; }
.me-footer .me-footer-logos a:hover{ color:var(--me-primary) !important; }
.me-footer .me-footer-social a{ color:var(--f-muted) !important; }
.me-footer .me-footer-social a:hover{ color:#fff !important; background:var(--me-primary) !important; }
.me-footer .me-footer-credit, .me-footer .me-footer-credit span{ color:var(--f-muted) !important; }
.me-footer .me-footer-credit a{ color:var(--me-primary) !important; font-weight:700; }
.me-footer .me-footer-credit a:hover{ text-decoration:underline !important; }
html.dark-skin .me-footer .me-footer-credit a, body.dark-skin .me-footer .me-footer-credit a,
html.dark-skin .me-footer a:hover, body.dark-skin .me-footer a:hover{ color:#8ea2ff !important; }
html.dark-skin .me-footer .me-footer-social a:hover, body.dark-skin .me-footer .me-footer-social a:hover{ color:#fff !important; }
.me-footer ul, .me-footer li{ list-style:none !important; margin:0 !important; padding:0 !important; background:none !important; border:0 !important; }
.me-footer li::before, .me-footer li::after{ content:none !important; display:none !important; }

@media (max-width:900px){
  .me-footer-watermark{ display:none !important; }
  .me-footer-top{ grid-template-columns:1fr 1fr; }
  .me-footer-partners{ grid-column:1 / -1; }
  .me-footer-partners h4{ text-align:right; }
}
@media (max-width:560px){
  .me-footer{ padding:34px 16px 18px; }
  .me-footer-top{ grid-template-columns:1fr; gap:24px; }
  .me-footer-logos{ grid-template-columns:repeat(3,minmax(0,1fr)); }
  .me-footer-bottom{ flex-direction:column-reverse; text-align:center; }
}

/* پیام «WM Video Playlists» خود جنه:
   وقتی «ناحیه‌ی ویژه»ی یک دسته روی «Videos list» تنظیم شده یا فرمت یک خبر «Playlist» است و افزونه نصب نیست،
   جنه برای همه یک عنوان و پیام نصب افزونه چاپ می‌کند. ما از این قابلیت استفاده نمی‌کنیم (لیست پخش خودمان برای آپارات/mp4 است)،
   پس کل آن بخش خالی پنهان می‌شود. */
.slider-area:has(a[href*="tie-install-plugins"]),
.featured-area:has(a[href*="tie-install-plugins"]){ display:none !important; }



/* ======================= متن مرتب در همه‌ی سایت (صفحه‌ی اول، دسته‌ها، تک‌خبر) =======================
   پاراگراف‌ها و چکیده‌ها دوطرفه (justify) با ارتفاع خط یکدست؛ تیترها «متعادل» تا خط آخر تک‌کلمه‌ای نماند. */
.me-s-body p, .me-s-body li, .me-s-lead, .me-s-rate-sub, .me-cm-text, .me-cm-text p,
.me-a-seo-text, .me-a-seo-text p, .entry-content p, .post-excerpt,
.me-feed-excerpt, .me-row-excerpt, .me-latest-item-excerpt, .me-cat-card-excerpt{
  text-align:justify; text-justify:inter-word; text-wrap:pretty; hyphens:manual;
}
.me-feed-excerpt, .me-row-excerpt, .me-latest-item-excerpt, .me-cat-card-excerpt, .me-s-lead{ line-height:2.1; }
/* تیترها هم دوطرفه (طبق درخواست «همه جاستیفای»)، با ارتفاع خط یکدست؛ text-wrap:pretty از خط آخرِ تک‌کلمه‌ای جلوگیری می‌کند */
.me-s-title, .me-a-title, .me-a-hero-title, .me-feed-title, .me-row-title, .me-latest-item-title, .me-hero-main-title,
.me-hero-item-title, .me-note-title, .me-s-read-title, .me-ov-title, .me-a-card-title, .me-a-hcard-title, .me-vp-item-title,
.me-cat-card-title, .me-s-rate h3, .me-gsrc-text b, .entry-title, .post-title, .post-excerpt{
  text-align:justify; text-justify:inter-word; text-wrap:pretty; hyphens:manual;
}
.me-feed-title, .me-row-title, .me-latest-item-title, .me-note-title, .me-s-read-title, .me-ov-title, .me-a-card-title,
.me-a-hcard-title, .me-vp-item-title, .me-cat-card-title, .me-hero-item-title{ line-height:1.95; }
.me-ov-card.is-big .me-ov-title, .me-hero-main-title{ line-height:2; }

/* عنوان بخش‌ها (مثل «خواندنی‌های ویژه») همیشه یک خط؛ لینک «مشاهده…» کوچک‌تر و کنارش */
.me-latest-head{ flex-wrap:nowrap; }
.me-latest-head h2{ white-space:nowrap; text-align:start; text-wrap:nowrap; }
.me-latest-head .me-more{ white-space:nowrap; margin-inline-start:auto; }
@media (max-width:520px){
  .me-latest-head h2{ font-size:17px; }
  .me-latest-head .me-more{ font-size:11px; }
  .me-latest-head .me-head-icon{ width:30px; height:30px; } .me-latest-head .me-head-icon svg{ width:17px; height:17px; }
}

/* ======================= ریلز: سازگاری با سافاری آیفون =======================
   علت ایراد: ارتفاع کارت ریلز فقط با aspect-ratio (داخل یک اسکرولر flex) تعیین می‌شد؛ در بعضی نسخه‌های سافاری آیفون
   این ترکیب فرو می‌ریزد و کارت چند پیکسل ارتفاع می‌گیرد. اینجا ارتفاع ۹:۱۶ با روش padding (که همه‌جا کار می‌کند)
   ساخته می‌شود و دکمه‌های فلش دسکتاپ در موبایل مخفی‌اند. */
.ndr-reels-track{ align-items:flex-start; -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain; touch-action:pan-x pan-y; }
.ndr-reel-card{
  aspect-ratio:auto !important; height:auto !important; min-height:0;
  width:clamp(120px, 38vw, 158px); flex:0 0 clamp(120px, 38vw, 158px) !important; position:relative; overflow:hidden;
}
@media (min-width:783px){ .ndr-reel-card{ width:150px; flex-basis:150px !important; } }
.ndr-reel-card::before{ content:""; display:block; padding-top:177.7778%; }          /* ۹:۱۶ */
.ndr-reel-card > img, .ndr-reel-card > picture, .ndr-reel-card > video{
  position:absolute !important; inset:0; width:100% !important; height:100% !important; object-fit:cover;
}
@media (max-width:782px){ .ndr-reels-arrow, .ndr-reels .me-scroll-btn{ display:none !important; } }

/* پلیر ریلز (مودال): عرض را از ارتفاع حساب می‌کنیم، نه فقط aspect-ratio؛ و از ارتفاع واقعی دیدگاه (dvh) در سافاری استفاده می‌شود */
.ndr-rp-stage{
  height:min(92vh, 820px); width:calc(min(92vh, 820px) * 9 / 16); max-width:100vw; aspect-ratio:auto;
}
@supports (height:100dvh){ .ndr-rp-stage{ height:min(92dvh, 820px); width:calc(min(92dvh, 820px) * 9 / 16); } }


/* ======================= میزگرد (و ریلز + میزگرد کنار هم) ======================= */
.me-duo{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.15fr); gap:30px; align-items:start; margin:34px 0; }
.me-duo .ndr-reels, .me-duo .me-round{ margin:0; }
.me-round{ margin:34px 0; }
.me-round-body{ display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:22px; align-items:start; margin-top:6px; }
.me-duo .me-round-body{ grid-template-columns:minmax(0,1fr); }
.me-round-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 18px; margin-top:6px; }
.me-round-card{ display:flex; flex-direction:column; gap:9px; min-width:0; text-decoration:none; color:var(--me-text); }
.me-round-card .me-round-img{ width:100%; aspect-ratio:16/9; } .me-round-card .me-round-title{ font-size:14px; }
.me-round-card:hover .me-round-title{ color:var(--me-primary); }
.me-round-big, .me-round-row{ display:flex; text-decoration:none; color:var(--me-text); }
.me-round-big{ flex-direction:column; gap:10px; min-width:0; }
.me-round-thumb{ position:relative; display:block; border-radius:var(--me-radius); overflow:hidden; background:var(--me-img-bg); }
.me-round-big .me-round-img{ width:100%; aspect-ratio:16/9; }
.me-round-play{
  position:absolute; inset:0; margin:auto; width:54px; height:54px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.55); color:#fff; transition:background .2s, transform .2s;
}
.me-round-play svg{ width:26px; height:26px; }
.me-round-row .me-round-play{ width:30px; height:30px; } .me-round-row .me-round-play svg{ width:15px; height:15px; }
.me-round-big:hover .me-round-play, .me-round-row:hover .me-round-play{ background:var(--me-primary); transform:scale(1.07); }
.me-round-title{ font-size:15px; line-height:1.95; font-weight:800; text-align:justify; text-wrap:pretty; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.me-round-big .me-round-title{ font-size:16.5px; }
.me-round-big:hover .me-round-title, .me-round-row:hover .me-round-title{ color:var(--me-primary); }
.me-round-meta{ font-size:11.5px; color:var(--me-muted); }
.me-round-list{ display:flex; flex-direction:column; }
.me-round-row{ align-items:flex-start; gap:14px; padding:12px 0; border-bottom:1px solid var(--me-border); }
.me-round-row:first-child{ padding-top:0; } .me-round-row:last-child{ border-bottom:0; }
.me-round-text{ flex:1; min-width:0; display:flex; flex-direction:column; gap:6px; }
.me-round-row .me-round-thumb{ flex:0 0 120px; } .me-round-row .me-round-img{ width:100%; aspect-ratio:16/9; }
@media (max-width:980px){ .me-duo{ grid-template-columns:minmax(0,1fr); gap:18px; } .me-round-body{ grid-template-columns:minmax(0,1fr); } }


/* ======================= «جدیدترین ویدیوها» با دو تب (ویدیوهای کوتاه / ویدیوهای بلند) ======================= */
.me-vtabs{ margin:34px 0; }
.me-vtabs .ndr-reels{ margin:0; }
.me-vtabs .ndr-reels-head{ display:none !important; }                      /* عنوان خود افزونه: عنوان بخش بالا کافی است */
.me-vtabs-long .me-scroll-track{ gap:16px; }
.me-vcard{ flex:0 0 clamp(210px, 24%, 270px); display:flex; flex-direction:column; gap:10px; text-decoration:none; color:var(--me-text); min-width:0; scroll-snap-align:start; }
.me-vcard-thumb{ position:relative; display:block; border-radius:var(--me-radius); overflow:hidden; background:var(--me-img-bg); }
.me-vcard-img{ width:100%; aspect-ratio:16/9; }
.me-vcard-play{
  position:absolute; top:10px; right:10px; width:30px; height:30px; border-radius:50%; background:#fff; color:#111;
  display:flex; align-items:center; justify-content:center; box-shadow:0 2px 8px rgba(0,0,0,.28);
}
.me-vcard-play svg{ width:15px; height:15px; margin-inline-start:2px; }
.me-vcard-title{ font-size:14px; line-height:1.95; font-weight:800; text-align:justify; text-wrap:pretty; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.me-vcard:hover .me-vcard-title{ color:var(--me-primary); }
@media (max-width:782px){ .me-vcard{ flex-basis:68%; } }


/* ===================== جدول‌های متن خبر (مشخصات، مقایسه، ...) =====================
   مشکل قبلی: جدولِ display:block با عرض‌های ثابت ویرایشگر (width/colgroup/inline) چیدمان صفحه را می‌شکست.
   حالا: جدول همیشه display:table و ۱۰۰٪ عرضِ متن؛ عرض‌های ثابت نادیده گرفته می‌شود؛ در موبایل
   (اگر محتوا جا نشد) فقط خودِ جدول اسکرول افقی می‌خورد، نه کل صفحه. */
.entry-content .me-table-wrap, .me-s-body .me-table-wrap{ max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; margin:1.4em 0; border-radius:10px; border:1px solid var(--me-border, rgba(0,0,0,.12)); }
.entry-content figure.wp-block-table{ margin:1.4em 0; max-width:100%; overflow-x:auto; }
.entry-content table, .me-s-body table{
  display:table !important; width:100% !important; max-width:100% !important; table-layout:auto;
  border-collapse:separate; border-spacing:0; margin:1.4em 0; font-size:14.5px; line-height:1.9;
  direction:rtl; text-align:right; background:transparent; border:1px solid var(--me-border, rgba(0,0,0,.12)); border-radius:10px; overflow:hidden;
}
.me-table-wrap > table, figure.wp-block-table > table{ margin:0 !important; border:0; border-radius:0; }
.entry-content table colgroup, .entry-content table col{ width:auto !important; }
.entry-content table th, .entry-content table td{
  width:auto !important; min-width:0; height:auto !important; padding:10px 14px; vertical-align:middle;
  text-align:right !important; text-justify:auto; overflow-wrap:normal; word-break:normal; hyphens:none;
  border:0; border-bottom:1px solid var(--me-border, rgba(0,0,0,.1));
}
.entry-content table tr:last-child > th, .entry-content table tr:last-child > td{ border-bottom:0; }
.entry-content table td + td, .entry-content table th + th, .entry-content table td + th, .entry-content table th + td{ border-inline-start:1px solid var(--me-border, rgba(0,0,0,.08)); }
.entry-content table p{ margin:0; text-align:inherit; }
.entry-content table caption{ caption-side:top; padding:10px 14px; font-weight:800; text-align:right; }

/* سطر عنوان (thead یا اولین ردیف th یا ردیفی که یک سلول تمام‌عرض دارد): نوار آبی تیره مثل نمونه */
.entry-content table thead th, .entry-content table thead td,
.entry-content table tr:first-child > th[colspan], .entry-content table tr:first-child > td[colspan]:only-child,
.entry-content table tbody tr:first-child > th:only-child, .entry-content table tr:first-child > th:first-child:last-child{
  background:var(--me-primary-dark, #203888) !important; color:#fff !important; font-weight:800; text-align:center !important; border-bottom:0;
}
.entry-content table thead th *, .entry-content table tr:first-child > th[colspan] *{ color:#fff !important; }
/* ردیف‌های راه‌راه */
.entry-content table tbody tr:nth-child(even) > td, .entry-content table tbody tr:nth-child(even) > th{ background:rgba(64,80,152,.07); }
.entry-content table tbody tr:nth-child(odd) > td, .entry-content table tbody tr:nth-child(odd) > th{ background:transparent; }
.entry-content table tbody th, .entry-content table td:first-child:not(:only-child){ font-weight:700; }
html.dark-skin .entry-content table tbody tr:nth-child(even) > td, body.dark-skin .entry-content table tbody tr:nth-child(even) > td,
html.dark-skin .entry-content table tbody tr:nth-child(even) > th, body.dark-skin .entry-content table tbody tr:nth-child(even) > th{ background:rgba(255,255,255,.06); }
@media (max-width: 600px){
  .entry-content table, .me-s-body table{ font-size:13.5px; }
  .entry-content table th, .entry-content table td{ padding:8px 10px; }
}

/* ===================== لوگوی هدر در موبایل و تبلت =====================
   لوگو کل عرضِ جای لوگو را پر می‌کند (با حفظ نسبت)، وسط‌چین، بدون حاشیه‌ی اضافه‌ی جنه.
   ارتفاع بیشینه را با --me-m-logo-h می‌توان تغییر داد (پیش‌فرض ۴۶px). */
@media (max-width: 991px){
  #theme-header #logo, .header-layout-1 #theme-header #logo{
    margin:0 !important; padding:0 !important; float:none !important; width:100% !important; max-width:100% !important;
    display:flex !important; align-items:center; justify-content:center; line-height:0;
  }
  #theme-header #logo a{ display:flex !important; align-items:center; justify-content:center; width:100%; height:100%; }
  #theme-header #logo img, #theme-header #logo svg{
    display:block; width:100% !important; max-width:100% !important; height:auto !important; max-height:var(--me-m-logo-h, 46px) !important;
    margin:0 auto !important; object-fit:contain; object-position:center;
  }
  #theme-header #logo .logo-text, #theme-header #logo .site-title{ line-height:1.4; }
  #theme-header .logo-container, #theme-header .components-container .logo-container{ padding-top:6px; padding-bottom:6px; }
  #theme-header .container-wrapper.logo-container, #theme-header .logo-container .container{ min-height:0; }
}
@media (max-width: 480px){ #theme-header #logo img{ --me-m-logo-h:40px; } }
