/* ================================================================
   S.T.A.L.K.E.R. 2 Wiki — New Articles Slide-out Panel
   ================================================================ */

/* ─── OVERLAY ───────────────────────────────────────────────── */
.np-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 99998;
  pointer-events: none;
}
.np-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* ─── ПАНЕЛЬ ────────────────────────────────────────────────── */
.np-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 460rem;
  max-width: 92vw;
  background: var(--bgColorMainBlack, #0c0905);
  border-right: 1rem solid rgba(224, 175, 76, 0.15);
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Rubik', sans-serif;
}
.np-panel.is-active { transform: translateX(0); }

/* Декоративна золота лінія справа */
.np-panel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 2rem;
  background: linear-gradient(180deg,
    transparent,
    rgba(224, 175, 76, 0.4) 30%,
    var(--accentlite, #ffd47a) 50%,
    rgba(224, 175, 76, 0.4) 70%,
    transparent);
  pointer-events: none;
}

/* ─── HEADER ────────────────────────────────────────────────── */
.np-header {
  flex-shrink: 0;
  padding: 22rem 24rem 16rem;
  border-bottom: 1rem solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(224, 175, 76, 0.04), transparent);
}
.np-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14rem;
}
.np-title {
  display: flex;
  align-items: center;
  gap: 12rem;
  margin: 0;
}
.np-title__icon {
  width: 32rem;
  height: 32rem;
  color: var(--accent, #E0AF4C);
  filter: drop-shadow(0 0 8rem rgba(224, 175, 76, 0.4));
  flex-shrink: 0;
}

/* Текстовий блок: основна назва + підпис в стовпчик */
.np-title__text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  line-height: 1;
}
.np-title__main {
  font-family: 'Oswald', sans-serif;
  font-size: 22rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5rem;
  color: var(--colorMain, #fff);
}
.np-title__sub {
  font-family: 'Rubik', sans-serif;
  font-size: 10rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.3rem;
  color: var(--colorGalk);
  opacity: 0.75;
}
.np-title__count {
  background: var(--accent, #E0AF4C);
  color: var(--bgColorMainBlack, #0c0905);
  font-size: 12rem;
  font-weight: 600;
  padding: 2rem 8rem;
  border-radius: 10rem;
  margin-left: 4rem;
  letter-spacing: 0;
  font-family: 'Oswald', sans-serif;
}
.np-title__count[hidden] { display: none; }

.np-close {
  width: 32rem;
  height: 32rem;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-radius: 8rem;
  color: var(--colorFwoolf-black, #a0a0a0);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s, transform 0.1s;
  padding: 0;
}
.np-close:hover {
  background: rgba(224, 175, 76, 0.12);
  color: var(--accent, #E0AF4C);
}
.np-close:active { transform: scale(0.92); }
.np-close svg {
  width: 16rem;
  height: 16rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ─── ТАБИ ──────────────────────────────────────────────────── */
.np-tabs {
  display: flex;
  gap: 4rem;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -2rem;
  padding: 0 2rem;
}
.np-tabs::-webkit-scrollbar { display: none; }

.np-tab {
  flex-shrink: 0;
  padding: 7rem 12rem;
  background: transparent;
  border: 1rem solid transparent;
  border-radius: 6rem;
  color: var(--colorFwoolf-black, #a0a0a0);
  font-family: 'Oswald', sans-serif;
  font-size: 11rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8rem;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  display: flex;
  align-items: center;
  gap: 6rem;
  white-space: nowrap;
}
.np-tab:hover { color: var(--colorMain, #fff); }
.np-tab.is-active {
  background: rgba(224, 175, 76, 0.1);
  border-color: rgba(224, 175, 76, 0.25);
  color: var(--accent, #E0AF4C);
}
.np-tab__count {
  background: rgba(255, 255, 255, 0.08);
  color: var(--colorFwoolf-black, #a0a0a0);
  font-size: 10rem;
  padding: 1rem 5rem;
  border-radius: 6rem;
  letter-spacing: 0;
  min-width: 18rem;
  text-align: center;
  font-weight: 600;
}
.np-tab.is-active .np-tab__count {
  background: var(--accent, #E0AF4C);
  color: var(--bgColorMainBlack, #0c0905);
}

/* ─── BODY (список) ─────────────────────────────────────────── */
.np-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8rem 0;
}
.np-body::-webkit-scrollbar { width: 6rem; }
.np-body::-webkit-scrollbar-track { background: transparent; }
.np-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3rem;
}
.np-body::-webkit-scrollbar-thumb:hover {
  background: rgba(224, 175, 76, 0.3);
}

/* ─── СЕКЦІЯ (Сьогодні / Вчора / Цього тижня) ───────────────── */
.np-section { margin-bottom: 4rem; }
.np-section__head {
  padding: 14rem 24rem 8rem;
  font-family: 'Oswald', sans-serif;
  font-size: 11rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5rem;
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  gap: 10rem;
}
.np-section__head::after {
  content: '';
  flex: 1;
  height: 1rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
}

/* ─── КАРТКА СТАТТІ ─────────────────────────────────────────── */
.np-item {
  display: flex;
  gap: 12rem;
  padding: 10rem 24rem;
  margin-bottom: 2rem;
  cursor: pointer;
  border-left: 3rem solid transparent;
  position: relative;
  transition: background 0.18s, border-color 0.18s;
  text-decoration: none;
  color: inherit;
}
.np-item:hover {
  background: rgba(255, 255, 255, 0.02);
  border-left-color: rgba(224, 175, 76, 0.5);
}
.np-item.is-new {
  border-left-color: var(--accentlite, #ffd47a);
  background: rgba(224, 175, 76, 0.04);
}
.np-item.is-new::before {
  content: '';
  position: absolute;
  top: 14rem;
  right: 18rem;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: var(--accent, #E0AF4C);
  box-shadow: 0 0 8rem var(--accent, #E0AF4C);
}

.np-item__cover {
  width: 72rem;
  height: 72rem;
  border-radius: 8rem;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, rgba(224, 175, 76, 0.15), rgba(0, 0, 0, 0.4));
  border: 1rem solid rgba(224, 175, 76, 0.15);
}
.np-item__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.np-item__cover--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(224, 175, 76, 0.4);
}
.np-item__cover--empty svg { width: 28rem; height: 28rem; }

/* Бейдж категорії — поряд з датою у meta-рядку */
.np-item__category {
  display: inline-block;
  padding: 2rem 7rem;
  background: rgba(224, 175, 76, 0.1);
  border: 1rem solid rgba(224, 175, 76, 0.25);
  border-radius: 4rem;
  color: var(--accentlite, #ffd47a);
  font-family: 'Oswald', sans-serif;
  font-size: 9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180rem;
}

/* Мітка *SPLR — накладається на обкладинку у лівому верхньому куті */
.np-item__splr {
  position: absolute;
  top: 4rem;
  left: 4rem;
  background: rgba(0, 0, 0, 0.75);
  color: var(--accent, #E0AF4C);
  font-family: 'Oswald', sans-serif;
  font-size: 8rem;
  font-weight: 600;
  letter-spacing: 0.4rem;
  padding: 2rem 5rem;
  border-radius: 4rem;
  text-shadow: 0 0 4rem rgba(224, 175, 76, 0.6);
  -webkit-backdrop-filter: blur(4rem);
  backdrop-filter: blur(4rem);
  z-index: 2;
  pointer-events: none;
  line-height: 1;
}

/* Бейдж "Рекомендована стаття" — зірочка у правому верхньому куті обкладинки */
.np-item__featured {
  position: absolute;
  top: 4rem;
  right: 4rem;
  width: 18rem;
  height: 18rem;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(4rem);
  backdrop-filter: blur(4rem);
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 0 8rem rgba(224, 175, 76, 0.5);
}
.np-item__featured img {
  width: 11rem;
  height: 11rem;
  display: block;
  filter: drop-shadow(0 0 2rem rgba(224, 175, 76, 0.8));
}

.np-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4rem;
}

.np-item__title {
  font-family: 'Oswald', sans-serif;
  font-size: 14rem;
  font-weight: 500;
  color: var(--colorMain, #fff);
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-wrap: break-word;
}

.np-item__meta {
  display: flex;
  align-items: center;
  gap: 10rem;
  font-size: 11rem;
  color: var(--colorFwoolf-black, #a0a0a0);
  flex-wrap: wrap;
}
.np-item__meta-icon {
  width: 11rem;
  height: 11rem;
  opacity: 0.6;
  flex-shrink: 0;
}
.np-item__meta-row {
  display: inline-flex;
  align-items: center;
  gap: 4rem;
}

/* Бейдж типу */
.np-item__type {
  display: inline-flex;
  align-items: center;
  padding: 1rem 6rem;
  border-radius: 4rem;
  font-family: 'Oswald', sans-serif;
  font-size: 9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5rem;
}
.np-item__type--weapon    { background: rgba(239, 68, 68, 0.12);  color: #ef4444; }
.np-item__type--armor     { background: rgba(74, 158, 255, 0.12); color: #4a9eff; }
.np-item__type--artifact  { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
.np-item__type--item      { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.np-item__type--mod       { background: rgba(34, 197, 94, 0.12);  color: #22c55e; }
.np-item__type--character { background: rgba(56, 189, 248, 0.12); color: #38bdf8; }
.np-item__type--other     { background: rgba(255, 255, 255, 0.06); color: #a0a0a0; }

/* ─── EMPTY ─────────────────────────────────────────────────── */
.np-empty {
  padding: 80rem 24rem;
  text-align: center;
  color: var(--colorFwoolf-black, #a0a0a0);
}
.np-empty__icon {
  width: 56rem;
  height: 56rem;
  margin: 0 auto 16rem;
  opacity: 0.3;
}
.np-empty__text {
  font-size: 14rem;
  margin: 0;
}

/* ─── FOOTER ────────────────────────────────────────────────── */
.np-footer {
  flex-shrink: 0;
  padding: 12rem 24rem;
  border-top: 1rem solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12rem;
  min-height: 56rem;
}

.np-mark-read {
  background: transparent;
  border: none;
  color: var(--colorFwoolf-black, #a0a0a0);
  font-family: 'Rubik', sans-serif;
  font-size: 12rem;
  cursor: pointer;
  padding: 6rem 10rem;
  border-radius: 6rem;
  transition: background 0.18s, color 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 6rem;
}
.np-mark-read:hover {
  background: rgba(224, 175, 76, 0.08);
  color: var(--accent, #E0AF4C);
}
.np-mark-read svg { width: 14rem; height: 14rem; }
.np-mark-read[hidden] { display: none; }

.np-view-all {
  background: var(--accent, #E0AF4C);
  color: var(--bgColorMainBlack, #0c0905);
  border: none;
  padding: 8rem 16rem;
  border-radius: 6rem;
  font-family: 'Oswald', sans-serif;
  font-size: 11rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1rem;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 6rem;
  text-decoration: none;
  margin-left: auto;
}
.np-view-all:hover {
  background: var(--accentlite, #ffd47a);
  transform: translateY(-1rem);
}

/* ─── MOBILE ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .np-panel {
    width: 100vw;
    max-width: 100vw;
  }
  .np-header { padding: 18rem 18rem 14rem; }
  .np-title { font-size: 18rem; }
  .np-item { padding: 10rem 18rem; }
}

/* Body scroll lock */
body.np-panel-open { overflow: hidden; }

/* ─── ТРИГЕР У NAVBAR (кнопка "Нові статті") ───────────────── */
.np-trigger-badge {
  position: absolute;
  top: -2rem;
  right: -2rem;
  background: var(--accent, #E0AF4C);
  color: var(--bgColorMainBlack, #0c0905);
  font-family: 'Oswald', sans-serif;
  font-size: 9rem;
  font-weight: 600;
  min-width: 16rem;
  height: 16rem;
  padding: 0 4rem;
  border-radius: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
  pointer-events: none;
}
.np-trigger-badge[hidden] { display: none; }
