/* news.css — блок «Новости» на главной, список и страница новости.
   Подключать после main.css и home.css (переменные --accent*, --cool*). */

/* ================= Карточка ================= */
.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #141922;
  border: 1px solid #1D2129;
  transition: border-color 250ms, transform 300ms cubic-bezier(.22, 1, .36, 1);
}
.news-card:hover { border-color: #2E3442; transform: translateY(-3px); }
.news-card:focus-within { border-color: var(--cool-light); }

.news-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #10141B;
}
.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(.22, 1, .36, 1), filter 400ms;
  filter: saturate(.9);
}
.news-card:hover .news-card__media img { transform: scale(1.04); filter: saturate(1); }
/* затемнение снизу — чтобы рубрика читалась на любой фотографии */
.news-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 21, 27, .45) 0%, transparent 35%);
  pointer-events: none;
}
.news-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 500 11px 'JetBrains Mono', monospace;
  letter-spacing: .3em;
  color: #3A3F4B;
  background:
    linear-gradient(rgba(147, 151, 171, .05) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(147, 151, 171, .05) 1px, transparent 1px) 0 0 / 32px 32px;
}

/* рубрика */
.news-card__cat {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  font: 600 10.5px/1 'JetBrains Mono', monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(17, 21, 27, .78);
  border-left: 2px solid #9397AB;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.news-card__cat--exhibition { border-left-color: var(--accent); }
.news-card__cat--project    { border-left-color: var(--cool-light); }
.news-card__cat--press      { border-left-color: #3CCB7F; }
.news-card__cat--static { position: static; display: inline-block; }

.news-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 22px;
}
.news-card__date {
  font: 500 11.5px/1 'JetBrains Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #75798C;
}
.news-card__title {
  margin: 12px 0 0;
  font-size: 18px;
  line-height: 1.32;
  font-weight: 500;
  color: #E9E9ED;
  text-wrap: balance;
}
.news-card__title a { color: inherit; }
/* вся карточка кликабельна, но в разметке одна ссылка — удобно для скринридера */
.news-card__title a::after { content: ""; position: absolute; inset: 0; }
.news-card__title a:focus-visible { outline: none; }
.news-card__lead {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: #9397AB;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card__place { margin: 10px 0 0; font-size: 13.5px; color: #75798C; }
.news-card__more {
  margin-top: auto;
  padding-top: 18px;
  font: 600 11px/1 'JetBrains Mono', monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.news-card__more span { display: inline-block; transition: transform 250ms; }
.news-card:hover .news-card__more span { transform: translateX(4px); }

.news-card--big .news-card__title { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.22; }

/* ================= Блок на главной ================= */
.news-block {
  padding: clamp(80px, 11vh, 140px) clamp(20px, 4vw, 56px);
  background: #11151B;
  border-bottom: 1px solid #1D2129;
}
.news-block__inner { max-width: 1520px; margin: 0 auto; }
.news-block__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 5vh, 52px);
}
.news-eyebrow {
  font: 500 10.5px/1 'JetBrains Mono', monospace;
  letter-spacing: .26em;
  color: var(--accent-text);
  margin-bottom: 18px;
}
.news-block__title, .news-page__title {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -.025em;
  color: #E9E9ED;
}
.news-all {
  flex: none;
  padding: 12px 18px;
  border: 1px solid rgba(var(--accent-rgb), .55);
  font: 600 11.5px/1 'JetBrains Mono', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-text);
  transition: background 250ms, color 250ms;
}
.news-all:hover { background: rgba(var(--accent-rgb), .12); color: var(--accent-soft); }

/* сетка: первая новость крупно слева, остальные — столбиком справа */
.news-grid { display: grid; gap: 20px; }
.news-grid--1 { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.news-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.news-grid--3 {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
}
.news-grid--3 > .news-card--big { grid-row: 1 / 3; }
.news-grid--3 > .news-card:not(.news-card--big) { flex-direction: row; }
.news-grid--3 > .news-card:not(.news-card--big) .news-card__media { flex: 0 0 44%; aspect-ratio: auto; min-height: 100%; }
.news-grid--3 > .news-card--big .news-card__media { aspect-ratio: 16 / 9; }

/* ================= Страница списка ================= */
.news-main {
  max-width: 1520px;
  margin: 0 auto;
  padding: clamp(36px, 6vh, 64px) clamp(20px, 4vw, 56px) 96px;
}
.news-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 28px 0 32px; }
.news-tab {
  padding: 8px 14px;
  border: 1px solid #2C3038;
  font: 500 11px/1.2 'JetBrains Mono', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #9397AB;
}
.news-tab:hover { color: #fff; border-color: #4A4F5C; }
.news-tab.is-active { color: #fff; border-color: var(--accent); background: rgba(var(--accent-rgb), .12); }
.news-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 20px;
  margin-top: 8px;
}
.news-page__title + .news-list { margin-top: 36px; }
.news-pager { display: flex; justify-content: center; gap: 24px; margin-top: 40px; color: #9397AB; font-size: 14px; }
.news-pager a { color: #fff; }
.news-empty { margin-top: 32px; color: #9397AB; }

/* ================= Страница новости ================= */
.news-main--article { max-width: 1180px; }
.news-back {
  display: inline-block;
  margin-bottom: 26px;
  font: 500 12px/1 'JetBrains Mono', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #9397AB;
}
.news-back:hover { color: #fff; }
.news-draft {
  margin-bottom: 24px;
  padding: 12px 16px;
  border-left: 3px solid #F2B84B;
  background: #1B1F27;
  color: #E9E9ED;
  font-size: 14.5px;
}
.news-draft a { margin-left: 8px; color: var(--cool-light); text-decoration: underline; }

.article__meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.article__meta time { font: 500 12px 'JetBrains Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: #75798C; }
.article__title {
  margin: 22px 0 0;
  max-width: 920px;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -.025em;
  color: #E9E9ED;
  text-wrap: balance;
}
.article__lead { margin: 20px 0 0; max-width: 760px; font-size: 18px; line-height: 1.6; color: #B2B6CA; }
.article__cover { margin: clamp(28px, 4vh, 44px) 0 0; border: 1px solid #1D2129; background: #10141B; }
.article__cover img { display: block; width: 100%; max-height: 620px; object-fit: cover; }

.article__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(32px, 5vh, 52px);
}

.article__body { font-size: 17px; line-height: 1.75; color: #C9CDD8; }
.article__body > :first-child { margin-top: 0; }
.article__body p { margin: 0 0 1.1em; }
.article__body h2 { margin: 1.8em 0 .6em; font-size: 24px; line-height: 1.25; font-weight: 500; color: #E9E9ED; }
.article__body ul { margin: 0 0 1.2em; padding: 0; list-style: none; }
.article__body li { position: relative; padding-left: 24px; margin-bottom: .45em; }
.article__body li::before { content: ""; position: absolute; left: 0; top: .78em; width: 12px; height: 2px; background: var(--accent); }
.article__body blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--cool-light);
  font-size: 19px;
  color: #E9E9ED;
}
.article__body a { color: var(--cool-light); text-decoration: underline; text-underline-offset: 3px; }
.article__body strong { color: #E9E9ED; font-weight: 600; }

/* ---------- без карточки события: одна колонка по центру ----------
   Строка ~70 знаков — комфортная длина для чтения. Заголовок, обложка
   и текст выровнены по одной оси, «Другие новости» остаются на всю ширину. */
.news-main--single .news-back,
.news-main--single .news-draft,
.news-main--single .article { max-width: 820px; margin-left: auto; margin-right: auto; }
.news-main--single .news-back { display: block; width: fit-content; margin-left: max(0px, calc((100% - 820px) / 2)); }
.news-main--single .article__layout { grid-template-columns: minmax(0, 1fr); }
.news-main--single .article__body { font-size: 18px; line-height: 1.75; }
.news-main--single .article__body p:first-child { font-size: 19.5px; line-height: 1.65; color: #E9E9ED; }   /* первый абзац — вводный */
.news-main--single .article__cover img { max-height: 520px; }

/* карточка события */
.event-card {
  position: sticky;
  top: 100px;
  padding: 24px;
  background: #141922;
  border: 1px solid #1D2129;
  border-top: 2px solid var(--accent);
}
.event-card__label { font: 500 10.5px 'JetBrains Mono', monospace; letter-spacing: .24em; color: #75798C; margin-bottom: 14px; }
.event-card dl { margin: 0; }
.event-card dl > div { padding: 12px 0; border-bottom: 1px dashed #2C3038; }
.event-card dl > div:last-child { border-bottom: 0; }
.event-card dt { font-size: 12.5px; color: #75798C; }
.event-card dd { margin: 4px 0 0; font-size: 15.5px; line-height: 1.45; color: #E9E9ED; }
.event-card__booth { font-family: 'JetBrains Mono', monospace; color: #fff; }
.event-card__link { display: inline-block; margin-top: 14px; font-size: 14.5px; color: var(--cool-light); }
.event-card__cta {
  display: block;
  margin-top: 18px;
  padding: 13px 16px;
  text-align: center;
  background: var(--accent);
  color: #fff;
  font: 600 11.5px/1 'JetBrains Mono', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: background 200ms;
}
.event-card__cta:hover { background: var(--accent-hover); color: #fff; }

.news-more { margin-top: clamp(64px, 9vh, 104px); padding-top: 40px; border-top: 1px solid #1D2129; }
.news-more__title { margin: 0 0 28px; font-size: 24px; font-weight: 500; color: #E9E9ED; }
.news-more__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

/* ================= Адаптив ================= */
@media (max-width: 1000px) {
  .news-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .news-grid--3 > .news-card--big { grid-row: auto; }
  .article__layout { grid-template-columns: minmax(0, 1fr); }
  .event-card { position: static; }
  .news-more__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .news-grid--2 { grid-template-columns: minmax(0, 1fr); }
  .news-grid--3 > .news-card:not(.news-card--big) .news-card__media { flex-basis: 38%; }
  .news-grid--3 > .news-card:not(.news-card--big) .news-card__body { padding: 14px 16px; }
  .news-grid--3 > .news-card:not(.news-card--big) .news-card__title { font-size: 15.5px; }
  .news-grid--3 > .news-card:not(.news-card--big) .news-card__cat { display: none; }
  .article__body { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .news-card, .news-card__media img, .news-card__more span { transition: none; }
}