/* ═══════════ news.css — فیدِ اخبار (شبیهِ اینستاگرام) + نمایشِ استوری ═══════════ */
.nw { position: relative; z-index: 2; --nw-gold: #ffbe18; --nw-gold-2: #ffd86b; --nw-bg: #0d1017; --nw-card: #141822; --nw-line: rgba(255,255,255,.09); --nw-ink: #f2f3f7; --nw-muted: #9aa2b2;
  max-width: 600px; margin: 0 auto; padding: 110px 16px 120px; direction: rtl; }
.nw-head { text-align: center; margin-bottom: 26px; }
.nw-eyebrow { margin: 0 0 8px; font-family: "Orbitron", sans-serif; letter-spacing: .4em; font-size: 12px; font-weight: 700; color: var(--nw-gold); }
.nw-head h1 { margin: 0 0 8px; font-size: clamp(24px, 4vw, 32px); font-weight: 900; color: #fff; }
.nw-head p { margin: 0; font-size: 14px; line-height: 1.9; color: var(--nw-muted); }
.nw-empty { text-align: center; padding: 40px 16px; color: var(--nw-muted); border: 1px dashed var(--nw-line); border-radius: 16px; }

.nw-feed { display: flex; flex-direction: column; gap: 18px; }
.nw-card { background: var(--nw-card); border: 1px solid var(--nw-line); border-radius: 18px; overflow: hidden; }
.nw-card__top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 14px; color: var(--nw-ink); }
.nw-card__top b { font-weight: 800; }
.nw-ago { margin-inline-start: auto; font-size: 12px; color: var(--nw-muted); }
.nw-ava { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: "Orbitron", sans-serif; font-weight: 800; font-size: 15px;
  color: #1d1500; background: linear-gradient(135deg, var(--nw-gold-2, #ffd86b), var(--nw-gold, #ffbe18)); box-shadow: 0 0 0 2px #141822, 0 0 0 4px rgba(255,190,24,.55); }

/* رسانه: یک یا چند اسلاید (اسکرولِ افقی با اسنپ) */
.nw-media { position: relative; background: #000; max-height: 75vh; }
.nw-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.nw-track::-webkit-scrollbar { display: none; }
.nw-slide { position: relative; flex: 0 0 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; scroll-snap-align: center; display: block; }
.nw-slide img, .nw-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.nw-slide:focus-visible { outline: 3px solid var(--nw-gold); outline-offset: -3px; }
/* دایرهٔ پلی = ویدیو */
.nw-play { position: absolute; inset: 0; margin: auto; width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.9); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: transform .2s ease, background .2s ease; pointer-events: none; }
.nw-play svg { width: 28px; height: 28px; fill: #fff; transform: translateX(2px); }
.nw-slide:hover .nw-play { transform: scale(1.06); background: rgba(0,0,0,.6); }
.nw-count { position: absolute; top: 10px; inset-inline-start: 10px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0,0,0,.6); pointer-events: none; }
.nw-dots { position: absolute; bottom: 10px; inset-inline: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.nw-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); transition: background .2s ease, transform .2s ease; }
.nw-dots i.is-on { background: #fff; transform: scale(1.2); }

/* متن: خطِ اول + «… بیشتر» ⇒ باز شدنِ نرمِ متنِ کامل از پایین */
.nw-cap { padding: 12px 14px 14px; color: var(--nw-ink); font-size: 14.5px; line-height: 1.9; }
.nw-cap__line { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.nw-cap__short { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-cap__more { flex: none; padding: 0; border: 0; background: none; color: var(--nw-muted); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; min-height: 32px; }
.nw-cap__more:hover { color: #fff; }
.nw-cap__more:focus-visible { outline: 2px solid var(--nw-gold); outline-offset: 2px; border-radius: 4px; }
.nw-cap__full { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.nw-cap__full > div { overflow: hidden; }
.nw-cap__full p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.nw-cap.is-open .nw-cap__line { display: none; }
.nw-cap.is-open .nw-cap__full { grid-template-rows: 1fr; }

.nw-more { text-align: center; margin-top: 22px; }
.nw-more__btn { min-height: 46px; padding: 0 22px; border-radius: 12px; border: 1px solid rgba(255,190,24,.45); background: rgba(255,190,24,.08); color: var(--nw-gold-2);
  font: 800 14px "Vazirmatn", sans-serif; cursor: pointer; }
.nw-more__btn:hover { background: rgba(255,190,24,.16); }
.nw-more__btn[hidden] { display: none; }
/* کارتی که از اسلایدرِ صفحهٔ اصلی به آن آمده‌اند — کوتاه برجسته می‌شود */
.nw-card { scroll-margin-top: 96px; transition: box-shadow .4s ease, border-color .4s ease; }
.nw-card.is-hl { border-color: rgba(255,190,24,.8); box-shadow: 0 0 0 3px rgba(255,190,24,.25), 0 18px 40px -18px rgba(255,190,24,.45); }

/* ═══════════ نمایشِ خبر (پنجرهٔ ساده) ═══════════ */
.nv-lock, .nv-lock body { overflow: hidden; }
.nv { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; direction: rtl; color: #f2f3f7; }
.nv[hidden] { display: none; }
.nv:focus { outline: none; }
.nv__scrim { position: absolute; inset: 0; background: rgba(6,7,11,.9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.nv.is-in .nv__card { animation: nvIn .2s ease-out; }
@keyframes nvIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

.nv__card { position: relative; z-index: 1; display: grid; width: min(1040px, calc(100vw - 140px)); height: min(86dvh, 760px);
  grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "media head" "media text" "media foot";
  background: #12151d; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); }

.nv__head { grid-area: head; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.nv__head .nw-ava { box-shadow: 0 0 0 2px #12151d, 0 0 0 4px rgba(255,190,24,.5); }
.nv__who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.nv__who b { font-size: 15px; } .nv__who span { font-size: 12.5px; color: #9aa2b2; }
.nv__x { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 0; background: rgba(255,255,255,.06); color: #e9edf3; cursor: pointer; display: grid; place-items: center; transition: background .15s ease; }
.nv__x:hover { background: rgba(255,255,255,.14); }
.nv__x svg, .nv__side svg, .nv__mnav svg, .nv__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.nv__media { grid-area: media; position: relative; background: #000; display: grid; place-items: center; min-height: 0; overflow: hidden; }
/* دسکتاپ: تصویر کلِ قاب را پر می‌کند (بدونِ بریدن، وسط‌چین) */
.nv__stage { position: absolute; inset: 0; touch-action: pan-y; aspect-ratio: auto !important; }
.nv__stage img, .nv__stage video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; user-select: none; -webkit-user-drag: none; }
.nv__mnav { position: absolute; top: 50%; margin-top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff;
  display: grid; place-items: center; cursor: pointer; transition: background .15s ease, opacity .15s ease; }
.nv__mnav:hover:not(:disabled) { background: rgba(0,0,0,.8); }
.nv__mnav:disabled { opacity: 0; pointer-events: none; }
.nv__mnav[hidden] { display: none; }
.nv__mnav--prev { right: 12px; } .nv__mnav--next { left: 12px; }
.nv__dots { position: absolute; bottom: 12px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.nv__dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.4); }
.nv__dots i.is-on { background: #fff; }

.nv__text { grid-area: text; min-height: 0; overflow-y: auto; padding: 16px; font-size: 16px; line-height: 1.95; color: #eef0f5; overscroll-behavior: contain; }
.nv__text p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.nv__foot { grid-area: foot; display: flex; align-items: center; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.07); }
.nv__btn { flex: 1; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04); color: #e9edf3; font: 700 13.5px "Vazirmatn", sans-serif; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.nv__btn:hover:not(:disabled) { border-color: rgba(255,190,24,.6); color: #ffd86b; }
.nv__btn:disabled { opacity: .35; cursor: not-allowed; }
.nv__pos { flex: none; font-size: 12.5px; color: #9aa2b2; font-variant-numeric: tabular-nums; min-width: 52px; text-align: center; }

.nv__side { position: absolute; top: 50%; z-index: 2; margin-top: -26px; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.07); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .15s ease, opacity .15s ease; }
.nv__side:hover:not(:disabled) { background: rgba(255,255,255,.16); }
.nv__side:disabled { opacity: 0; pointer-events: none; }
.nv__side--prev { right: 24px; } .nv__side--next { left: 24px; }
.nv button:focus-visible { outline: 2px solid #ffbe18; outline-offset: 2px; }

/* تبلت و موبایل: تمام‌صفحه — بالا عنوان و بستن، وسط تصویر، زیرش متن، پایین دکمه‌های خبرِ قبلی/بعدی */
@media (max-width: 899px) {
  .nv__card { width: 100vw; height: 100dvh; border-radius: 0; border: 0;
    grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-areas: "head" "media" "text" "foot"; }
  .nv__head { padding: calc(10px + env(safe-area-inset-top)) 12px 10px; }
  /* موبایل: قاب به نسبتِ خودِ عکس، حداکثر ۵۸٪ ارتفاعِ صفحه */
  .nv__media { display: block; }
  .nv__stage { position: relative; inset: auto; width: 100%; max-height: 58dvh; aspect-ratio: var(--nv-ar, 16 / 9) !important; }
  .nv__text { font-size: 15.5px; padding: 14px 16px; }
  .nv__side { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nw-cap__full, .nw-play, .nw-dots i, .nw-card { transition: none; }
  .nv.is-in .nv__card { animation: none; }
}
