:root{
  --me-primary:#405098;
  --me-primary-dark:#203888;
  --me-on-primary:#f8f8f8;
  --me-hero-bg:#0b0b0f;
  --me-card-bg:#16161c;
  --me-radius:10px;
}

/* ===================== هیرو ===================== */
.me-hero{
  display:grid;
  grid-template-columns: 2fr 1fr;
  gap:18px;
  background:var(--me-hero-bg);
  padding:18px;
  border-radius:var(--me-radius);
}
.me-hero-video-inner{
  position:relative;
  aspect-ratio:16/9;
  border-radius:var(--me-radius);
  overflow:hidden;
  background:#000;
}
.me-hero-video-inner img{
  width:100%;height:100%;object-fit:cover;display:block;opacity:.85;
}
.me-play-btn{
  position:absolute;inset:0;margin:auto;width:64px;height:64px;
  border-radius:50%;border:none;cursor:pointer;
  background:rgba(64,80,152,.85);color:#fff;
  display:flex;align-items:center;justify-content:center;
}
.me-hero-video-title{
  position:absolute;bottom:0;right:0;left:0;
  padding:16px;color:#fff;font-weight:700;font-size:18px;
  background:linear-gradient(transparent, rgba(0,0,0,.85));
  text-decoration:none;
}
.me-hero-list{ display:flex; flex-direction:column; }
.me-hero-item{
  display:flex;gap:10px;align-items:center;
  padding:12px 0;border-top:1px solid rgba(255,255,255,.08);
  text-decoration:none;color:#eee;
}
.me-hero-item:first-child{border-top:none}
.me-hero-item-thumb{width:76px;height:56px;object-fit:cover;border-radius:6px;flex-shrink:0}
.me-hero-item-text{display:flex;flex-direction:column;gap:4px}
.me-hero-item-cat{color:var(--me-primary);font-size:12px;font-weight:700}
.me-hero-item-title{font-size:14px;line-height:1.6;font-weight:600}
.me-hero-item-time{font-size:11px;color:#999}

/* ===================== ریلزها ===================== */
.me-reels{ margin:28px 0; }
.me-reels-head{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.me-reels-head-bar{ width:4px; height:20px; background:var(--me-primary); border-radius:2px; }
.me-reels-head h2{ font-size:18px; margin:0; flex:1; }
.me-reels-more{ color:var(--me-primary); text-decoration:none; font-size:13px; }

.me-reels-row{ position:relative; display:flex; gap:12px; }

.me-reels-panel{
  flex:0 0 160px;
  background:var(--me-primary);
  color:#fff;
  border-radius:var(--me-radius);
  display:flex;flex-direction:column;justify-content:center;gap:6px;
  padding:20px 14px;text-decoration:none;
}
.me-reels-panel-title{ font-weight:800; font-size:16px; }
.me-reels-panel-sub{ font-size:12px; opacity:.85; }
.me-reels-panel-arrow{ font-size:20px; margin-top:8px; }

.me-reels-track{
  display:flex; gap:12px; overflow-x:auto; scroll-snap-type:x mandatory;
  flex:1; scrollbar-width:none;
}
.me-reels-track::-webkit-scrollbar{ display:none; }

.me-reel-card{
  scroll-snap-align:start;
  flex:0 0 150px; aspect-ratio:9/16;
  position:relative; border-radius:var(--me-radius); overflow:hidden;
  border:none; padding:0; cursor:pointer; background:var(--me-card-bg);
}
.me-reel-card img{ width:100%;height:100%;object-fit:cover;display:block; }
.me-reel-play{
  position:absolute; top:10px; left:10px; width:30px; height:30px;
  border-radius:50%; background:rgba(0,0,0,.55); color:#fff;
  display:flex;align-items:center;justify-content:center;
}
.me-reel-title{
  position:absolute; bottom:0; right:0; left:0; padding:10px 8px;
  color:#fff; font-size:12px; font-weight:600; text-align:right;
  background:linear-gradient(transparent, rgba(0,0,0,.85));
}

.me-reels-arrow{
  position:absolute; top:50%; transform:translateY(-50%);
  width:34px;height:34px;border-radius:50%;border:none;cursor:pointer;
  background:#fff; box-shadow:0 2px 8px rgba(0,0,0,.2); font-size:18px;
}
.me-reels-arrow-prev{ right:-6px; }
.me-reels-arrow-next{ left:-6px; }

/* ===================== مودال ریلز ===================== */
.me-reel-modal{
  position:fixed; inset:0; background:#000; z-index:99999;
  display:flex; align-items:center; justify-content:center;
}
.me-reel-modal[hidden]{ display:none; }
.me-reel-modal-inner{ position:relative; width:min(420px,92vw); }
.me-reel-modal-frame{
  position:relative; width:100%; aspect-ratio:9/16; background:#000;
  border-radius:12px; overflow:hidden;
}
.me-reel-modal-frame iframe{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:100%; height:177.7vw; max-height:none;
}
.me-reel-modal-close{
  position:absolute; top:-44px; left:0; background:none; border:none;
  color:#fff; font-size:22px; cursor:pointer; z-index:5;
}
.me-reel-modal-info{
  position:absolute; bottom:70px; right:16px; left:70px; color:#fff; z-index:4;
  text-shadow:0 2px 6px rgba(0,0,0,.7);
}
.me-reel-modal-title{ font-size:14px; margin:0 0 4px; font-weight:700; }
.me-reel-modal-desc{ font-size:12px; color:#eee; margin:0; line-height:1.7; }

.me-reel-modal-actions{
  position:absolute; bottom:14px; left:10px; display:flex; flex-direction:column;
  align-items:center; gap:16px; z-index:5;
}
.me-reel-action{
  width:40px; height:40px; border-radius:50%; border:none; cursor:pointer;
  background:rgba(255,255,255,.12); color:#fff; display:flex; align-items:center; justify-content:center;
}
.me-reel-modal-nav{
  width:34px; height:34px; border-radius:50%; border:none; cursor:pointer;
  background:rgba(255,255,255,.12); color:#fff; display:flex; align-items:center; justify-content:center;
}

/* ===================== آخرین مطالب (تب‌دار) ===================== */
.me-latest, .me-cat-section, .me-reading{ margin:28px 0; }
.me-latest-head{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.me-latest-head h2{ font-size:18px; margin:0; flex:1; }

.me-latest-tabs{
  display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px;
}
.me-latest-tab{
  border:1px solid rgba(0,0,0,.1); background:#fff; color:#444;
  border-radius:999px; padding:6px 16px; font-size:13px; cursor:pointer;
}
.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:inherit;
  border-top:1px solid rgba(0,0,0,.07);
}
.me-latest-item:first-child{ border-top:none; }
.me-latest-item-thumb{ width:130px; height:90px; object-fit:cover; border-radius:8px; flex-shrink:0; }
.me-latest-item-body{ display:flex; flex-direction:column; gap:6px; }
.me-latest-item-title{ font-weight:700; font-size:15px; }
.me-latest-item-excerpt{ font-size:13px; color:#777; line-height:1.7; }
.me-latest-item-meta{ display:flex; gap:14px; font-size:12px; color:#999; }

/* ===================== بخش دسته‌ای (ردیف کارت) ===================== */
.me-cat-row{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.me-cat-card{ text-decoration:none; color:inherit; display:flex; flex-direction:column; gap:8px; }
.me-cat-card img{ width:100%; aspect-ratio:16/10; object-fit:cover; border-radius:8px; }
.me-cat-card-title{ font-weight:700; font-size:14px; line-height:1.7; }
.me-cat-card-excerpt{ font-size:12px; color:#888; line-height:1.7; }
.me-cat-card-time{ font-size:11px; color:#aaa; }

/* ===================== فهرست‌های مطالعاتی ===================== */
.me-reading-row{ display:flex; gap:14px; overflow-x:auto; }
.me-reading-card{
  flex:0 0 240px; position:relative; border-radius:10px; overflow:hidden;
  aspect-ratio:4/3; text-decoration:none; color:#fff; display:block;
  background:#111;
}
.me-reading-card img{ width:100%; height:100%; object-fit:cover; opacity:.75; }
.me-reading-badge{
  position:absolute; top:10px; left:10px; background:rgba(0,0,0,.55);
  padding:4px 10px; border-radius:999px; font-size:11px;
}
.me-reading-title{
  position:absolute; bottom:12px; right:12px; left:12px; font-weight:800; font-size:16px;
}

/* ===================== آخرین مطالب کامل (تب + سایدبار) ===================== */
.me-latest-full{
  display:grid;
  grid-template-columns: 2fr 1fr;
  gap:20px;
  align-items:start;
}
.me-latest-ads{
  display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:18px;
}
.me-latest-ad{ display:block; border-radius:8px; overflow:hidden; }
.me-latest-ad img{ width:100%; display:block; }

.me-editor-pick-card{
  position:relative; display:block; border-radius:10px; overflow:hidden;
  aspect-ratio:4/3; text-decoration:none;
}
.me-editor-pick-card img{ width:100%; height:100%; object-fit:cover; }
.me-editor-pick-title{
  position:absolute; bottom:14px; right:14px; left:14px;
  color:#fff; font-weight:800; font-size:16px; line-height:1.7;
  text-shadow:0 2px 6px rgba(0,0,0,.6);
}

@media (max-width: 782px){
  .me-latest-full{ grid-template-columns:1fr; }
  .me-latest-ads{ grid-template-columns:1fr 1fr; }
  .me-cat-row{ grid-template-columns:1fr; }
  .me-latest-item-thumb{ width:96px; height:72px; }
  .me-hero{ grid-template-columns:1fr; }
  .me-reels-panel{ flex-basis:130px; }
  .me-reel-card{ flex-basis:120px; }
}

/* ===================== غیرفعال‌کردن کوتاه‌سازی متن پست در موبایل (تا ویدیو/محتوا از ابتدا کامل نمایش داده شود) ===================== */
@media (max-width: 782px){
  .single .entry-content,
  .single-post .entry-content,
  article .entry-content{
    max-height:none !important;
    overflow:visible !important;
    -webkit-mask-image:none !important;
    mask-image:none !important;
  }
}
