/* ==========================================================================
   «Новости дня», новый домен (06.12.2026): главная, рубрики, своя статья, текстовые страницы, плашка cookie.
   Подключается ПОСЛЕ css/site.css (вёрстка ТЗ 108 + сетка ТЗ 117) и берёт из неё переменные, шапку,
   колонки, подвал, листы центра. Здесь только новое. Брейкпоинты те же: 1280 / 900 / 768 / 480.

   Разделы:
     H1. Полоса рубрик под шапкой
     H2. Карточки и строки своих новостей (n-card, n-row, n-feed)
     H3. Главная: «Главное» и разделы рубрик
     H4. Страница рубрики
     H5. Своя статья: подпись к фото, источник, «Ещё в рубрике»
     H6. Текстовые страницы (О проекте, политики, контакты)
     H7. Подвал с обязательными сведениями
     H8. Плашка cookie
     H9. Телефон (до 767)
   ========================================================================== */


/* ---------- H1. Полоса рубрик под шапкой ---------- */

/* Один ряд всегда: что не влезло — уходит целиком справа (правило владельца: «во второй ряд никогда»).
   Телефон — листается вбок (раздел H9). */
.rnav {
  background: var(--c-card);
  border-bottom: 1px solid var(--c-line);
}
.rnav__in {
  height: 46px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 4px;
  overflow: hidden;
}
.rnav__link {
  flex: none;
  height: 46px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  font-family: var(--f-tabs);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-head);
  border-bottom: 3px solid transparent;
  padding-top: 3px;
}
.rnav__link:first-child { margin-left: -12px; }
.rnav__link:hover { color: var(--c-link-hover); }
.rnav__link.is-active { color: var(--c-arrow); border-bottom-color: var(--c-accent); }


/* ---------- H2. Карточки и строки своих новостей ---------- */

/* Рубрика · время над заголовком */
.n-meta {
  display: block;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-meta);
}
.n-meta__rubric { color: var(--c-time); font-weight: 700; }

/* Карточка: картинка 16:9, рубрика · время, заголовок */
.n-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.n-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-img);
  object-fit: cover;
  background: #DCE3EC;
}
.n-card__title { font-weight: 600; font-size: 16px; line-height: 1.35; }
.n-card--big .n-card__title { font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
.n-card__lead { font-size: 15px; line-height: 1.5; color: #4A5872; }

/* Строка: маленькая картинка слева, рубрика · время и заголовок справа */
.n-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-line);
}
.n-row:last-child { border-bottom: 0; }
.n-row__img { width: 120px; height: 68px; border-radius: var(--r-img); object-fit: cover; background: #DCE3EC; }
.n-row__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.n-row__title { font-weight: 600; font-size: 15px; line-height: 1.4; }

/* Широкая строка на странице рубрики: картинка 240×135, подзаголовок */
.n-row--wide { grid-template-columns: 240px minmax(0, 1fr); gap: 18px; padding: 18px 0; }
.n-row--wide .n-row__img { width: 240px; height: 135px; }
.n-row--wide .n-row__title { font-size: 19px; line-height: 1.3; font-weight: 700; }
.n-row__lead { font-size: 15px; line-height: 1.5; color: #4A5872; }

/* «Лента новостей» в левой колонке: время и заголовок, свои новости */
.n-feed { display: block; padding: 10px 2px; border-bottom: 1px solid var(--c-line); }
.n-feed:last-child { border-bottom: 0; }
.n-feed__at { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 700; color: var(--c-time); }
.n-feed__title { display: block; font-weight: 500; font-size: 15px; line-height: 1.4; }
.n-feed__day {
  display: block;
  margin-top: 8px;
  padding: 6px 2px 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-meta);
  border-bottom: 1px solid var(--c-line);
}

/* Ссылка «Все новости →» под списком */
.more-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 2px 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-arrow);
}
.more-link svg { width: 14px; height: 14px; }

/* «Популярное» — свои новости по прочтениям, нумерованный список (как «Свежее») */
.box--top { padding: 6px 8px; }
.box--top > .box__title { margin-bottom: 0; padding: 8px 2px; }
.box--top .t-num { padding: 12px 0; }
.box--top .t-num__title { font-size: 15px; }

/* Боковые колонки (06.12): рекламы нет, колонки длиннее экрана — колонка едет вместе со страницей,
   закреплён только последний блок («Лента новостей» слева, «Главное за неделю» справа), пока не кончится центр. */
.col-left,
.col-right { position: static; align-self: stretch; }
.col-left > :last-child,
.col-right > :last-child { position: sticky; top: 16px; }

/* «Выбор редакции»: карточка и три строки, как в разделах рубрик на главной */
.box--pick { padding: 6px 8px 10px; display: flex; flex-direction: column; }
.box--pick > .box__title { margin-bottom: 12px; padding: 8px 2px; }
.box--pick > .n-card { padding: 0 2px; }
.pick__rows { margin-top: 8px; border-top: 1px solid var(--c-line); }
.pick__rows .n-row { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
.pick__rows .n-row__img { width: 96px; height: 64px; }
.pick__rows .n-row__title { font-size: 14px; }

/* «Фото дня»: снимок из своей статьи, подпись и лицензия */
.box--photo { padding: 6px 8px 12px; display: flex; flex-direction: column; gap: 8px; }
.box--photo > .box__title { padding: 8px 2px; }
.photo-day { display: flex; flex-direction: column; gap: 8px; padding: 0 2px; }
.photo-day__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-img); background: #DCE3EC; }
.photo-day__cap { font-weight: 600; font-size: 15px; line-height: 1.4; }
.photo-day__credit { padding: 0 2px; font-size: 12px; line-height: 1.4; color: var(--c-meta); }

/* «Не пропустите»: только строки */
.box--miss .pick__rows { margin-top: 0; border-top: 0; }

/* «По рубрикам»: подпись рубрики и заголовок */
.rub-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 2px; border-bottom: 1px solid var(--c-line); }
.rub-item:last-child { border-bottom: 0; }
.rub-item__rub { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c-arrow); }
.rub-item__title { font-weight: 500; font-size: 15px; line-height: 1.4; }

/* «Главное за неделю»: день недели вместо времени */
.box--week .n-feed__at { text-transform: none; }



/* ---------- H3. Главная ---------- */

/* Лист центра — как .sheet из site.css, но свой класс: на главной листы есть и на телефоне не нужны (H9) */
.n-sheet {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 20px 22px;
  background: var(--c-card);
  border-radius: var(--r-sheet);
  box-shadow: var(--sh-sheet);
}

/* «Главное»: большая новость и четыре карточки под ней */
.hero { gap: 20px; }
.hero__main { display: flex; flex-direction: column; gap: 12px; }
.hero__img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-img);
  object-fit: cover;
  background: #DCE3EC;
}
.hero__title { font-weight: 700; font-size: 32px; line-height: 1.17; letter-spacing: -0.02em; }
.hero__lead { font-size: 17px; line-height: 1.5; color: #4A5872; }
.hero__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 16px;
  padding-top: 20px;
  border-top: 1px solid var(--c-line);
}

/* Раздел рубрики: подпись со ссылкой, большая карточка слева, три строки справа */
.rsec__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--c-head);
}
.rsec__title { font-size: 20px; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; color: var(--c-head); }
.rsec__title a { color: inherit; }
.rsec__all { font-size: 13px; font-weight: 700; color: var(--c-arrow); white-space: nowrap; }
.rsec__body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0 20px;
  align-items: start;
}
.rsec__body > .n-card { padding-top: 12px; }
.rsec__list .n-row { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
.rsec__list .n-row__img { width: 96px; height: 64px; }
.rsec__list .n-row__title { font-size: 14px; }

/* 900–1279: центр 469–682 — карточка и строки друг под другом, когда узко */
@media (max-width: 1099px) {
  .rsec__body { grid-template-columns: minmax(0, 1fr); }
  .rsec__list .n-row:first-child { margin-top: 4px; }
}


/* ---------- H4. Страница рубрики ---------- */

.rpage__head { padding: 4px 0 0; }
.rpage__crumbs { font-size: 13px; color: var(--c-meta); }
.rpage__crumbs a { color: var(--c-meta); }
.rpage__crumbs a:hover { color: var(--c-link-hover); }
.rpage__title { margin-top: 6px; font-size: 36px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.rpage__desc { margin-top: 8px; font-size: 16px; line-height: 1.5; color: #4A5872; }

.rpage__list { display: flex; flex-direction: column; }
.rpage__list > .n-card--big { padding-bottom: 20px; border-bottom: 1px solid var(--c-line); }
.rpage__list > .n-card--big .n-card__title { font-size: 28px; line-height: 1.2; }

.btn--more { margin-top: 8px; }
.pager { display: flex; justify-content: center; gap: 6px; padding-top: 4px; }
.pager a, .pager span {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--c-tab);
  color: var(--c-head);
  font-weight: 700;
  font-size: 14px;
}
.pager .is-active { background: var(--c-head); color: #FFFFFF; }


/* ---------- H5. Своя статья ---------- */

.article__figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.article > .article__figure { margin-left: 0; margin-right: 0; }
.article__figure .article__img { width: 100%; }
.article__credit { font-size: 12px; line-height: 1.4; color: var(--c-meta); }
.article__credit-caption { color: var(--c-text); }
/* Ссылки в подписи автора: источник снимка и текст лицензии (06.12) */
.article__credit a,
.photo-day__credit a { color: inherit; text-decoration: underline; text-decoration-color: rgba(91, 107, 134, 0.45); text-underline-offset: 2px; }
.article__credit a:hover,
.photo-day__credit a:hover { color: var(--c-link-hover); text-decoration-color: currentColor; }

.article__sources { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--c-line); font-size: 13px; line-height: 1.5; color: var(--c-meta); }
.article__sources b { color: var(--c-text); font-weight: 600; }

.article__quote {
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--c-accent);
  font-size: 18px;
  line-height: 1.6;
  font-style: normal;
}

/* «Ещё в рубрике» под статьёй — свои новости */
.more-sec { display: flex; flex-direction: column; }
.more-sec > .box__title { margin-bottom: 2px; }


/* ---------- H6. Текстовые страницы ---------- */

.doc {
  padding: 32px 32px 36px;
  background: var(--c-card);
  border-radius: var(--r-sheet);
  box-shadow: var(--sh-sheet);
  font-size: 16px;
  line-height: 1.65;
}
.doc h1 { margin: 0 0 6px; font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; }
.doc .doc__date { margin: 0 0 22px; font-size: 13px; color: var(--c-meta); }
.doc h2 { margin: 26px 0 8px; font-size: 20px; line-height: 1.3; }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 22px; }
.doc li { margin: 0 0 6px; }
.doc a { color: var(--c-link-hover); text-decoration: underline; text-underline-offset: 2px; }
.doc .doc__fill { padding: 0 4px; border-radius: 4px; background: #FEF3C7; color: #92400E; font-weight: 600; }
.doc table { width: 100%; margin: 0 0 14px; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.doc th, .doc td { padding: 8px 10px; border: 1px solid var(--c-line); text-align: left; vertical-align: top; }
.doc th { background: #F1F5F9; font-weight: 700; }

/* Оглавление текстовых страниц в правой колонке */
.box--docs { padding: 6px 8px; }
.box--docs a { display: block; padding: 10px 2px; border-bottom: 1px solid var(--c-line); font-weight: 500; font-size: 15px; }
.box--docs a:last-child { border-bottom: 0; }
.box--docs a.is-active { color: var(--c-arrow); font-weight: 700; }


/* ---------- H7. Подвал с обязательными сведениями ---------- */

.footer--full .footer__in { padding-top: 30px; padding-bottom: 12px; align-items: flex-start; gap: 20px 28px; }
.footer__cols {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 28px;
}
.footer__col { display: flex; flex-direction: column; gap: 8px; }
.footer__col-title { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #8FA0BD; }
.footer__legal {
  padding-top: 14px;
  padding-bottom: 26px;
  border-top: 1px solid var(--c-head-sep);
  font-size: 12px;
  line-height: 1.6;
  color: #A9B6CC;
}
.footer__legal p { margin: 0 0 4px; }
.footer__legal b { color: #FFFFFF; font-weight: 600; }
.footer__age {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 8px;
  border: 1px solid #7D8CA8;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  color: #AEBBD1;
  vertical-align: middle;
}
@media (max-width: 1099px) {
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ---------- H8. Плашка cookie ---------- */

/* Внизу слева на ПК (карточка 440), во всю ширину на телефоне. Пока нет согласия — видна на всех страницах.
   Кнопка «Принять» запоминает выбор на 365 дней (js/cookie.js). Ссылка — на «Политику cookie». */
.cookie {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 60;
  width: 440px;
  max-width: calc(100vw - 40px);
  padding: 18px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--c-card);
  border-radius: 12px;
  box-shadow: 0 10px 34px rgba(15, 26, 46, 0.22), 0 1px 3px rgba(15, 26, 46, 0.12);
  color: var(--c-text);
}
.cookie__text { font-size: 14px; line-height: 1.5; }
.cookie__text a { color: var(--c-link-hover); text-decoration: underline; text-underline-offset: 2px; }
.cookie__actions { display: flex; gap: 10px; align-items: center; }
.cookie__btn {
  height: 40px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  background: var(--c-head);
  color: #FFFFFF;
  font-family: var(--f-main);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.cookie__btn:hover { background: #2F3D55; }
.cookie__link { font-size: 14px; font-weight: 600; color: var(--c-head); }


/* ---------- H9. Телефон (до 767) ---------- */

@media (max-width: 767px) {
  .rnav__in {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    height: 44px;
  }
  .rnav__in::-webkit-scrollbar { display: none; }
  .rnav__link { height: 44px; font-size: 14px; padding: 3px 10px 0; }
  .rnav__link:first-child { margin-left: -10px; }

  /* Листов на телефоне нет — разделы идут один под другим на белом фоне */
  .n-sheet { padding: 0; gap: 12px; border-radius: 0; box-shadow: none; background: none; }
  .hero__title { font-size: 24px; }
  .hero__lead { font-size: 16px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 4px; }
  .hero__grid .n-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--c-line); }
  .hero__grid .n-card:last-child { border-bottom: 0; }
  .hero__grid .n-card__img { grid-row: 1 / span 2; width: 120px; height: 68px; aspect-ratio: auto; }
  .hero__grid .n-card__title { font-size: 15px; }

  .rsec__head { padding-bottom: 8px; }
  .rsec__title { font-size: 17px; }
  .rsec__body > .n-card { padding-top: 12px; }
  .n-card--big .n-card__title { font-size: 19px; }

  .rpage__title { font-size: 28px; }
  .rpage__list > .n-card--big .n-card__title { font-size: 22px; }
  .n-row--wide { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 12px 0; }
  .n-row--wide .n-row__img { width: 120px; height: 68px; }
  .n-row--wide .n-row__title { font-size: 16px; font-weight: 600; }
  .n-row--wide .n-row__lead { display: none; }

  .doc { padding: 8px 0 20px; border-radius: 0; box-shadow: none; font-size: 16px; }
  .doc h1 { font-size: 26px; }

  .footer__cols { grid-template-columns: minmax(0, 1fr); }
  .footer--full .footer__in { padding-top: 22px; }

  .cookie { left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; padding: 14px 16px; gap: 12px; }
  .cookie__text { font-size: 13px; }
  .cookie__btn { flex: 1; }
}
