/*
 * Тема stm2026 — новости: список (крупная карточка и сетка карточек, пагинация) и страница новости
 * (обложка, текст, «Поделиться», соседние и другие новости). Основа карточки (.pc) — components.css.
 */

/* ========================= Список новостей ========================= */

.newslist {
  padding: 36px 0 72px;
  background: var(--bg-sec);
}
.newslist > .wrap {
  display: flow-root;
}
.newslist .pager {
  margin-top: 40px;
}
.newslist-none {
  padding: 24px;
  border-radius: var(--r-16);
  background: #fff;
  color: var(--text-body);
}

/* --- Карточка новости: обложка 16:10, дата, заголовок и анонс не длиннее трёх строк --- */
.nc-img-link {
  display: block;
  overflow: hidden;
}
.nc-img {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.nc-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nc-img.is-tall img,
.news-mini-img.is-tall img {
  object-position: center top;
}
/* заглушка и картинка меньше места под обложку: по центру своего места */
.nc-img.ph,
.nc-img.img-native,
.news-mini-img.ph,
.news-mini-img.img-native {
  display: flex;
}
.nc-img.img-native img,
.news-mini-img.img-native img {
  width: auto;
  max-width: 55%;
  height: auto;
  max-height: 70%;
  object-fit: contain;
}
.nc-body {
  gap: 8px;
}
.nc-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nc-date,
.news-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--link);
  font-size: 13.5px;
  font-weight: 600;
}
.nc-date .ic,
.news-date .ic {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}
.nc-title {
  font-size: 19px;
  font-weight: 700;
}
.nc-title .pt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
.nc-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
}
.nc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
/* крупная карточка — первая новость страницы: обложка слева, текст справа */
.nc-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  margin-bottom: 28px;
  border-radius: var(--r-20);
}
.nc-lead .nc-img {
  height: 100%;
  min-height: 360px;
  aspect-ratio: auto;
}
.nc-lead .nc-body {
  justify-content: center;
  gap: 14px;
  padding: 40px;
  border-top: 0;
}
.nc-lead .nc-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.2;
}
.nc-lead .nc-text {
  color: var(--text-body);
  font-size: 16.5px;
  line-height: 1.6;
}
.nc-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--link);
  font-size: 15px;
  font-weight: 600;
}
.nc-more .ic {
  stroke-width: 2;
}

/* ========================= Страница новости ========================= */

.news-head {
  max-width: 860px;
}
.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin-top: 18px;
  color: var(--text-2);
  font-size: 14px;
}
.news-views {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.news-views .ic {
  stroke-width: 2;
}
.news-head h1 {
  margin-top: 12px;
  font-size: 44px;
}
.news {
  padding: 40px 0 80px;
}
.news-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  align-items: start;
}
.news-main {
  min-width: 0;
}
.news-cover {
  margin: 0 0 32px;
}
.news-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-18);
  object-fit: cover;
}
.news-cover figcaption {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 14px;
}
/* анонс новости — первым абзацем, крупнее основного текста */
.rich .rich-lead {
  color: var(--h);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.6;
}
.news-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.share {
  display: flex;
  align-items: center;
  gap: 10px;
}
.share-cap {
  margin-right: 4px;
  color: var(--text-2);
  font-size: 14px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-10);
  background: var(--brand);
  color: #fff;
}
.share-btn:hover {
  background: var(--accent-h);
  color: #fff;
  text-decoration: none;
}
.news-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
}
.news-back .ic {
  stroke-width: 2;
}
.news-near {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.near {
  gap: 4px;
  padding: 18px 20px;
  border-radius: var(--r-14);
  box-shadow: none;
}
.near-cap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 13px;
}
.near-cap .ic {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}
.near .pt {
  color: var(--h);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}
.near-next {
  align-items: flex-end;
  text-align: right;
}
.news-main .admin-edit {
  margin-top: 28px;
}
.news-aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  gap: 20px;
}
.news-other {
  padding: 18px 14px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-16);
  background: #fff;
}
.news-other h2 {
  margin: 0 0 8px 10px;
  font-size: 18px;
  font-weight: 700;
}
.news-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 10px;
  font-size: 14.5px;
  font-weight: 600;
}
.news-all .ic {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}
.news-mini {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 0;
  border-radius: var(--r-12);
  box-shadow: none;
}
.news-mini:hover {
  background: var(--bg-draft);
  box-shadow: none;
  transform: none;
}
.news-mini-img {
  display: block;
  width: 88px;
  height: 64px;
  border-radius: var(--r-8);
  overflow: hidden;
}
.news-mini-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-mini-img.img-native {
  padding: 6px;
}
.news-mini-img.img-native img {
  max-width: 100%;
  max-height: 100%;
}
.news-mini-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.news-mini-date {
  color: var(--text-2);
  font-size: 12.5px;
}
.news-mini .pt {
  color: var(--h);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

@media (max-width: 1023px) {
  .nc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  /* крупная карточка — обложка над текстом */
  .nc-lead {
    grid-template-columns: minmax(0, 1fr);
  }
  .nc-lead .nc-img {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .nc-lead .nc-body {
    padding: 28px;
  }
  .nc-lead .nc-title {
    font-size: 26px;
  }
  .news-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .news-aside {
    position: static;
  }
}
@media (max-width: 767px) {
  .newslist {
    padding: 18px 0 40px;
  }
  .nc-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .nc-lead {
    margin-bottom: 14px;
    border-radius: var(--r-16);
  }
  .nc-lead .nc-body {
    gap: 10px;
    padding: 18px 16px 20px;
  }
  .nc-lead .nc-title {
    font-size: 22px;
    letter-spacing: 0;
  }
  .nc-lead .nc-text {
    font-size: 15px;
  }
  .nc-title {
    font-size: 17px;
  }
  .newslist .pager {
    margin-top: 24px;
  }
  /* на телефоне «Все новости» — кнопка во всю ширину; карточки заявки нет: сразу ниже — телефон и кнопка звонка */
  .news-all {
    display: flex;
    justify-content: center;
    height: 48px;
    margin: 12px 0 8px;
    border: 1.5px solid #b9cbe0;
    border-radius: var(--r-10);
    color: var(--brand);
    font-size: 15px;
  }
  .news-aside .cta-card {
    display: none;
  }
  .news-meta {
    margin-top: 12px;
    font-size: 13px;
  }
  .news-head h1 {
    margin-top: 8px;
    font-size: 28px;
  }
  .news {
    padding: 20px 0 40px;
  }
  .news-cover {
    margin-bottom: 22px;
  }
  .news-cover img {
    border-radius: var(--r-14);
  }
  .rich .rich-lead {
    font-size: 17px;
  }
  /* в строке под новостью — только «Поделиться»: ко всем новостям ведёт кнопка под «Другими новостями» */
  .news-foot {
    padding: 18px 0;
  }
  .news-back {
    display: none;
  }
  .news-near {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 10px;
  }
  .near-next {
    align-items: flex-start;
    text-align: left;
  }
}
