/* ============================================================
   sections/news-page.css — страница «Новости форума» (листинг).
   Контент самодостаточный: не завязан на .page, переживает iframe
   визуального редактора Битрикса.
   Схема брейкпоинтов проекта (дискретные ступени):
     БАЗА            = дизайн 1920
     @max-width 1919 = дизайн 1440
     @max-width 1023 = дизайн 768
     @max-width 767  = дизайн 360
   Значения адаптива портированы из fok2 (pages/news.css), классы —
   архивные (без префикса .s-). Токены — base.css. overflow-x:clip
   задан глобально в layout.css — здесь не дублируем.
   ============================================================ */

/* Вертикальные поля страницы (между шапкой/подвалом и контентом) */
.newspage { padding-block: 56px 120px; }

/* ---------- Хлебные крошки ---------- */
.crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 400 16px/24px var(--font-text);
  color: var(--c-secondary);
}
.crumbs a { opacity: .6; transition: opacity .2s; }
.crumbs a:hover { opacity: 1; }
.crumbs span { opacity: .35; }
.crumbs b { font-weight: 400; opacity: 1; color: var(--c-text); }

/* ---------- Шапка страницы ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-top: 36px;
}
.page-head__l {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.page-head__title {
  /* H1 текучий clamp как fok2: 72px@1920 → 56px@1440 (дизайн) → 28px на узкой мобиле */
  font: 400 clamp(28px, 8px + 3.333vw, 72px)/1.06 var(--font-display);
  text-transform: uppercase;
  color: var(--c-text);
}
.page-head__count {
  font: 400 16px/24px var(--font-text);
  color: var(--c-secondary);
  opacity: .7;
  padding-bottom: 12px;
}

/* ---------- Панель фильтров ---------- */
.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--c-line);
}
.filters__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 22px;
  border: 1px solid rgba(9, 30, 37, .2);
  border-radius: var(--r-8);
  font: 400 16px/24px var(--font-text);
  color: var(--c-text);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
}
.chip:hover { border-color: rgba(9, 30, 37, .5); }
.chip.is-active { background: var(--c-dark); border-color: var(--c-dark); color: #fff; }
.filters__year { position: relative; flex: none; }
.select {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(9, 30, 37, .2);
  border-radius: var(--r-8);
  font: 400 16px/24px var(--font-text);
  color: var(--c-text);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .2s;
}
.select:hover { border-color: rgba(9, 30, 37, .5); }
.select svg { width: 16px; height: 16px; opacity: .6; stroke: currentColor; fill: none; }

/* ---------- Главная (featured) новость ---------- */
.feature {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  margin-top: 56px;
  align-items: stretch;
}
.feature__media {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 560px;
}
.feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.feature:hover .feature__media img { transform: scale(1.03); }
.feature__tag {
  position: absolute;
  top: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--c-accent);
  font: 500 13px/20px var(--font-text);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #fff;
}
.feature__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 8px 0;
  min-width: 0;
}
.feature__date { font: 400 14px/20px var(--font-text); color: var(--c-secondary); opacity: .7; }
.feature__title {
  margin-top: 22px;
  font: 400 40px/46px var(--font-display);
  text-transform: uppercase;
  color: var(--c-text);
}
.feature__lead {
  margin-top: 24px;
  font: 400 20px/30px var(--font-text);
  color: var(--c-text);
  opacity: .85;
}
.feature__more {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  margin-top: 36px;
  padding: 0 28px;
  border-radius: var(--r-8);
  background: var(--c-accent);
  font: 400 16px/24px var(--font-text);
  color: #fff;
  transition: background-color .2s;
}
.feature__more .icon { transition: transform .2s; stroke: currentColor; fill: none; }
.feature__more:hover { background: #a93019; }
.feature__more:hover .icon { transform: translateX(4px); }

/* ---------- Сетка новостей ---------- */
.news-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 48px;
  margin-top: 80px;
}
.ncard { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.ncard__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1.5 / 1;
  border-radius: 12px;
  overflow: hidden;
}
.ncard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ncard:hover .ncard__media img { transform: scale(1.04); }
.ncard__tag {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  background: rgba(9, 30, 37, .72);
  backdrop-filter: blur(4px);
  font: 500 12px/16px var(--font-text);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #fff;
}
.ncard__date { font: 400 14px/20px var(--font-text); color: var(--c-secondary); opacity: .65; }
.ncard__title {
  font: 400 22px/28px var(--font-display);
  text-transform: uppercase;
  color: var(--c-text);
  transition: color .2s;
}
.ncard:hover .ncard__title { color: var(--c-accent); }
.ncard__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font: 500 14px/20px var(--font-text);
  color: var(--c-accent);
}
.ncard__more .icon { transition: transform .2s; stroke: currentColor; fill: none; }
.ncard:hover .ncard__more .icon { transform: translateX(4px); }

/* ---------- Пагинация / показать ещё ---------- */
.pager { display: flex; flex-direction: column; align-items: center; gap: 32px; margin-top: 88px; }
.pager__more {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 32px;
  border: 1px solid rgba(9, 30, 37, .25);
  border-radius: var(--r-8);
  font: 400 16px/24px var(--font-text);
  color: var(--c-text);
  transition: border-color .2s, background-color .2s;
}
.pager__more:hover { border-color: var(--c-dark); background: rgba(9, 30, 37, .04); }
.pager__more .icon { stroke: currentColor; fill: none; }
.pager__nums { display: flex; align-items: center; gap: 6px; }
.pager__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: var(--r-8);
  font: 400 15px/20px var(--font-text);
  color: var(--c-text);
  opacity: .6;
  transition: background-color .2s, opacity .2s;
}
.pager__num:hover { opacity: 1; background: rgba(9, 30, 37, .06); }
.pager__num.is-active { background: var(--c-accent); color: #fff; opacity: 1; }
.pager__num--gap { opacity: .4; pointer-events: none; }
.pager__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(9, 30, 37, .25);
  border-radius: var(--r-8);
  transition: border-color .2s;
}
.pager__arrow:hover { border-color: var(--c-dark); }
.pager__arrow .icon { stroke: currentColor; fill: none; }
.pager__arrow--prev svg { transform: scaleX(-1); }

/* ---------- Подписка (нижняя плашка) ---------- */
.subscribe {
  position: relative;
  margin-top: 140px;
  border-radius: 24px;
  background: var(--c-dark);
  overflow: hidden;
  padding: 88px 96px;
}
.subscribe__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .22;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
  mask-image: linear-gradient(90deg, transparent, #000 60%);
  pointer-events: none;
}
.subscribe__inner { position: relative; max-width: 640px; }
.subscribe__title {
  margin-top: 18px;
  font: 400 40px/48px var(--font-display);
  text-transform: uppercase;
  color: #fff;
}
.subscribe__text { margin-top: 16px; font: 400 16px/24px var(--font-text); color: #fff; opacity: .7; }
.subscribe__form { display: flex; gap: 12px; margin-top: 32px; }
.subscribe__input {
  flex: 1 1 auto;
  height: 56px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: var(--r-8);
  background: rgba(255, 255, 255, .06);
  font: 400 16px/24px var(--font-text);
  color: #fff;
}
.subscribe__input::placeholder { color: rgba(255, 255, 255, .5); }

/* ============================================================
   1440 — max-width:1919px
   ============================================================ */
@media (max-width: 1919px) {
  .newspage { padding-block: 40px 96px; }

  .page-head { margin-top: 28px; }
  .page-head__l { gap: 16px; }

  .filters { margin-top: 40px; padding-bottom: 24px; }
  .chip { height: 40px; padding: 0 20px; font-size: 15px; line-height: 20px; }
  .select { height: 40px; padding: 0 16px; font-size: 15px; line-height: 20px; }

  .feature { grid-template-columns: 768px 1fr; gap: 40px; margin-top: 48px; }
  .feature__media { height: 460px; }
  .feature__title { margin-top: 20px; font-size: 40px; line-height: 46px; }
  .feature__lead { font-size: 18px; line-height: 28px; }

  .news-list { gap: 40px; margin-top: 64px; }
  .ncard__title { font-size: 22px; line-height: 28px; }

  .pager { margin-top: 72px; }

  .subscribe { margin-top: 120px; padding: 64px 80px; }
  .subscribe__inner { max-width: 560px; }
  .subscribe__title { font-size: 32px; line-height: 40px; }
}

/* ============================================================
   1280–1024 — промежуточный (как fok2 @1279): фичер-грид резиновый,
   иначе фикс-медиа 768 режет заголовок статьи на 1100–1279.
   ============================================================ */
@media (max-width: 1279px) {
  .feature { grid-template-columns: minmax(0, 1.1fr) 1fr; gap: 32px; }
  .feature__media { height: 420px; }
  .feature__title { font-size: 34px; line-height: 40px; }
  .news-list { gap: 36px 32px; }
}

/* ============================================================
   768 — max-width:1023px
   ============================================================ */
@media (max-width: 1023px) {
  .newspage { padding-block: 32px 80px; }

  .filters { flex-wrap: wrap; }

  .feature { grid-template-columns: 1fr; gap: 28px; align-items: stretch; }
  .feature__media { height: 360px; }
  .feature__body { justify-content: flex-start; padding: 0; }
  .feature__title { font-size: 32px; line-height: 38px; }
  .feature__lead { font-size: 17px; line-height: 26px; margin-top: 18px; }
  .feature__more { margin-top: 28px; }

  .news-list { grid-template-columns: repeat(2, 1fr); gap: 32px; margin-top: 48px; }

  .subscribe { margin-top: 96px; padding: 48px 40px; }
}

/* ============================================================
   360 — max-width:767px  (гаттер контейнера автоматически 16px)
   ============================================================ */
@media (max-width: 767px) {
  .newspage { padding-block: 24px 64px; }

  .page-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .page-head__count { padding-bottom: 0; }

  .filters { flex-direction: column; align-items: stretch; gap: 16px; margin-top: 28px; padding-bottom: 20px; }
  .filters__tags {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -4px;
    padding: 0 4px 4px;
  }
  .filters__tags::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .filters__year { align-self: flex-start; }

  .feature { gap: 22px; margin-top: 36px; }
  .feature__media { height: 220px; }
  .feature__title { font-size: 28px; line-height: 32px; }
  .feature__lead { font-size: 16px; line-height: 24px; }
  .feature__more { width: 100%; justify-content: center; padding: 0 20px; }

  .news-list { grid-template-columns: 1fr; gap: 28px; margin-top: 40px; }
  .ncard__media { aspect-ratio: 16 / 11; }
  .ncard__title { font-size: 20px; line-height: 26px; }

  .pager { margin-top: 56px; gap: 24px; }
  .pager__more { width: 100%; justify-content: center; }
  .pager__nums { gap: 4px; flex-wrap: wrap; justify-content: center; }

  .subscribe { margin-top: 72px; padding: 32px 24px; border-radius: 18px; }
  .subscribe__bg {
    opacity: .12;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 85%);
    mask-image: linear-gradient(180deg, transparent, #000 85%);
  }
  .subscribe__title { font-size: 24px; line-height: 30px; }
  .subscribe__form { flex-direction: column; gap: 12px; }
  .subscribe__input { width: 100%; }
  .subscribe__form .btn--primary { width: 100%; justify-content: center; }
}

/* ============================================================
   480 — узкая мобила (как fok2 @479)
   ============================================================ */
@media (max-width: 479px) {
  .feature__media { height: 190px; }
  .feature__title { font-size: 24px; line-height: 28px; }
  .feature__more { width: 100%; justify-content: center; padding: 0 20px; }
  .ncard__title { font-size: 19px; line-height: 25px; }
  .pager__nums { flex-wrap: wrap; justify-content: center; }
  .pager__more { width: 100%; justify-content: center; }
}
