/* ═══════════════════════════════════════════════════════════
   پورتال خبری — صفحه خبر (سبک سایت‌های خبری حرفه‌ای)
   تکمیلی بر main.css / account.css
   ═══════════════════════════════════════════════════════════ */

/* ── هیرو تصویری تمام‌عرض خبر ────────────────────────────── */
.ni-hero { position: relative; margin-top: 26px; }
.ni-hero__media { position: relative; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-lg); }
.ni-hero__media img { display: block; width: 100%; height: clamp(280px, 46vw, 470px); object-fit: cover; }
.ni-hero__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6,13,31,.94) 0%, rgba(6,13,31,.55) 45%, rgba(6,13,31,.12) 75%, transparent 100%);
}
.ni-hero__body {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: clamp(18px, 4vw, 38px) clamp(20px, 4.5vw, 44px);
  color: #fff;
}
.ni-hero__toprow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ni-hero__cat {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold-grad); color: #17223f;
  font-size: 12px; font-weight: 800;
  padding: 6px 15px; border-radius: 99px;
}
.ni-hero__breaking {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--err); color: #fff;
  font-size: 12px; font-weight: 800;
  padding: 6px 15px; border-radius: 99px;
  animation: niPulse 1.6s ease-in-out infinite;
}
@keyframes niPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,69,70,.5); }
  50%      { box-shadow: 0 0 0 7px rgba(212,69,70,0); }
}
.ni-hero__title {
  font-size: clamp(19px, 3.3vw, 31px);
  font-weight: 900; line-height: 1.75;
  text-shadow: 0 2px 14px rgba(0,0,0,.45);
}
.ni-hero__meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 13px; font-size: 12.5px; color: rgba(255,255,255,.82); }
.ni-hero__meta span { display: inline-flex; align-items: center; gap: 6px; }
.ni-hero__meta svg { color: var(--gold-400); }

/* ── نوار ابزار خبر (زیر هیرو) ───────────────────────────── */
.ni-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 0; margin-top: 18px;
  border-bottom: 1px solid var(--line);
}
.ni-toolbar__share-label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.ni-toolbar__share-label svg { color: var(--gold-600); }
.ni-share { display: flex; align-items: center; gap: 7px; }
.ni-share a, .ni-share button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--navy-50); color: var(--navy-700);
  transition: background .2s, color .2s, transform .2s var(--ease);
  cursor: pointer; border: 1px solid transparent; font-family: inherit;
}
.ni-share a:hover, .ni-share button:hover { background: var(--gold-grad); color: #17223f; transform: translateY(-2px); }
.ni-toolbar__spacer { flex: 1; }
.ni-toolbar__time { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.ni-toolbar__time svg { color: var(--gold-500); }
.ni-print {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 700; color: var(--text-2);
  border: 1px solid var(--line); border-radius: 11px;
  padding: 9px 15px; background: var(--surface);
  transition: border-color .2s, color .2s; cursor: pointer; font-family: inherit;
}
.ni-print:hover { border-color: var(--gold-400); color: var(--gold-600); }
.ni-print svg { color: var(--gold-600); }

/* ── بدنه خبر ────────────────────────────────────────────── */
.ni-lead {
  font-weight: 700; color: var(--navy-850) !important;
  background: linear-gradient(135deg, var(--navy-50), #fbf8f0);
  padding: 18px 22px !important;
  border-radius: var(--r-md);
  border-inline-start: 4px solid var(--gold-500);
  font-size: 15.5px !important; line-height: 2.2 !important;
}
.ni-body p { font-size: 15.5px; line-height: 2.35; color: var(--text); }
.ni-body h2 {
  position: relative; font-size: 18px; font-weight: 800; color: var(--navy-850);
  margin: 34px 0 14px; padding-inline-start: 15px;
}
.ni-body h2::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 70%; border-radius: 3px; background: var(--gold-grad);
}
.ni-body h3 { font-size: 16px; font-weight: 800; color: var(--navy-850); margin: 26px 0 12px; }
.ni-body ul { padding-inline-start: 4px; list-style: none; }
.ni-body ul li {
  position: relative; padding-inline-start: 26px; margin-bottom: 9px;
  font-size: 15px; line-height: 2.2; color: var(--text);
}
.ni-body ul li::before {
  content: ''; position: absolute; inset-inline-start: 4px; top: 15px;
  width: 9px; height: 9px; border-radius: 3px;
  background: var(--gold-grad); transform: rotate(45deg);
}

/* برچسب انتهای خبر */
.ni-endmark {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-top: 34px; padding-top: 24px; border-top: 1px dashed var(--line);
  color: var(--muted); font-size: 12.5px;
}
.ni-endmark::before, .ni-endmark::after { content: ''; width: 44px; height: 1px; background: var(--line); }

/* منبع خبر */
.ni-source {
  display: flex; align-items: center; gap: 8px;
  background: var(--navy-50); border: 1px solid var(--navy-100);
  border-radius: var(--r-sm); padding: 10px 15px;
  font-size: 12.5px; color: var(--text-2); margin-top: 16px;
}
.ni-source svg { color: var(--gold-600); flex-shrink: 0; }

/* ── اخبار مرتبط تصویری ─────────────────────────────────── */
.ni-related { margin-top: 46px; }
.ni-related__title {
  display: flex; align-items: center; gap: 9px;
  font-size: 17px; font-weight: 800; color: var(--navy-850); margin-bottom: 18px;
}
.ni-related__title svg { color: var(--gold-600); }
.ni-related__title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.ni-related__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ni-rel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.ni-rel-card:hover { transform: translateY(-5px); box-shadow: var(--sh-md); border-color: var(--gold-400); }
.ni-rel-card__media { position: relative; display: block; }
.ni-rel-card__media img { display: block; width: 100%; height: 135px; object-fit: cover; }
.ni-rel-card__cat {
  position: absolute; top: 10px; inset-inline-start: 10px;
  background: rgba(10,22,48,.82); color: var(--gold-300);
  font-size: 10.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 99px;
  backdrop-filter: blur(4px);
}
.ni-rel-card__body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 7px; }
.ni-rel-card__body h4 { font-size: 13.5px; font-weight: 700; color: var(--text); line-height: 1.9; }
.ni-rel-card:hover h4 { color: var(--gold-700); }
.ni-rel-card__date { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.ni-rel-card__date svg { color: var(--gold-500); }

/* پیام کپی لینک */
.ni-copymsg {
  position: fixed; bottom: 26px; inset-inline-start: 50%; transform: translateX(50%) translateY(16px);
  background: var(--navy-900); color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 12px 22px; border-radius: 99px;
  box-shadow: var(--sh-lg);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s;
  z-index: 300;
}
.ni-copymsg.is-visible { opacity: 1; visibility: visible; transform: translateX(50%) translateY(0); transition-delay: 0s; }

/* ── چاپ ─────────────────────────────────────────────────── */
@media print {
  .topbar, .header, .drawer, .np-ticker, .ni-toolbar, .ni-share, .ni-print,
  .ni-related, aside, .footer, .cta-banner, .to-top, .searchbar { display: none !important; }
  .ni-hero__media img { height: auto; }
  .ni-hero__media::after { display: none; }
  .ni-hero__body { position: static; padding: 14px 0 0; color: var(--text); }
  .ni-hero__title { text-shadow: none; }
}

/* ── واکنش‌گرایی ─────────────────────────────────────────── */
@media (max-width: 992px) {
  .ni-related__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ni-hero__media { border-radius: var(--r-md); }
  .ni-hero__media img { height: 300px; }
  .ni-hero__title { font-size: 17.5px; }
  .ni-toolbar__time { display: none; }
  .ni-related__grid { grid-template-columns: 1fr; gap: 12px; }
  .ni-rel-card { display: flex; align-items: stretch; }
  .ni-rel-card__media { flex-shrink: 0; width: 130px; }
  .ni-rel-card__media img { height: 100%; width: 130px; }
  .ni-rel-card__cat { display: none; }
  .ni-body p { font-size: 15px; }
}

/* ── زمان مطالعه روی کارت‌های فهرست اخبار ────────────────── */
.art-card__meta .rt { color: var(--gold-600); font-weight: 600; }

/* ══ 8.7 — دکمه لایک خبر ══ */
.ni-like {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1.5px solid var(--line, #e5e8ef); background: #fff;
  color: var(--navy-800, #152548); border-radius: 999px;
  padding: 7px 15px; cursor: pointer; font-family: inherit;
  transition: all .25s var(--ease, cubic-bezier(.22,.61,.36,1));
}
.ni-like svg { color: var(--muted); transition: color .25s, transform .25s; }
.ni-like b { font-size: 13px; font-weight: 800; }
.ni-like__lbl { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.ni-like:hover { border-color: var(--gold-500); transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(201,162,75,.5); }
.ni-like.is-liked { border-color: var(--gold-500); background: linear-gradient(160deg, #fdf6e3, #fff); }
.ni-like.is-liked svg { color: var(--gold-600); fill: var(--gold-500); transform: scale(1.12); }
.ni-like.is-liked .ni-like__lbl { color: var(--gold-600); }
.ni-like.is-bump svg { animation: likeBump .45s var(--ease, cubic-bezier(.22,.61,.36,1)); }
@keyframes likeBump { 0% { transform: scale(1); } 40% { transform: scale(1.45) rotate(-12deg); } 100% { transform: scale(1.12); } }

/* نشان لایک/نظر روی کارت‌های خبر */
.np-eng { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--gold-600, #b08a35); }
.np-eng svg { opacity: .8; }

/* ═══════════ نسخه ۱۸ — مرتب‌سازی + آیکون خدمات سایدبار ═══════════ */
.np2-sort {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: -14px 0 28px;
}
.np2-sort__lbl {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.2px; font-weight: 800; color: var(--muted, #64748b);
}
.np2-sort__lbl svg { color: var(--gold-600, #b08a35); }
.np2-sort .chip { padding: 6px 15px; }
.np-mini__ic {
  display: inline-flex; flex-shrink: 0;
  color: var(--gold-600, #b08a35); opacity: .9;
}
@media (prefers-reduced-motion: reduce) {
  .np2-sort .chip { transition: none !important; }
}
