/* ==========================================================================
   Блок новостей — чистая адаптивная версия (заменяет Tilda Zero Block).
   Контент берётся из news.json и рендерится через js/news.js.
   Дизайн повторяет исходные карточки Tilda: чёрная плашка, голубая рамка
   #009fe3, скругление 15px, картинка слева, белый заголовок, серый источник.
   ========================================================================== */

.news-section {
  background-color: #000000;
  color: #ffffff;
  padding: 60px 0 80px;
  font-family: 'Geologica', sans-serif;
}

.news-section__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.news-section__title {
  color: #ffffff;
  font-family: var(--t-text-font, Arial);
  font-size: 30px;
  line-height: 1.55;
  font-weight: 400;
  text-transform: uppercase;
  margin: 0 0 32px;
}

/* Сетка карточек: 2 колонки на десктопе, 1 на мобильном */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Карточка */
.news-card {
  display: flex;
  gap: 18px;
  min-height: 220px;
  padding: 16px;
  box-sizing: border-box;
  background-color: #000000;
  border: 1px solid #009fe3;
  border-radius: 15px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.news-card:hover {
  box-shadow: 0 0 18px rgba(0, 159, 227, 0.45);
  transform: translateY(-2px);
}

/* Если последняя новость осталась одна в нижнем ряду — ставим её по центру
   между двумя верхними (ширина как у одной колонки). Только для 2-колоночной
   раскладки; на мобильном (1 колонка) сбрасывается в media-блоке ниже. */
.news-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 12px);
}

.news-card__img {
  flex: 0 0 190px;
  width: 190px;
  height: 188px;
  object-fit: cover;
  border-radius: 12px;
  background-color: #111;
}

.news-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.news-card__title {
  color: #ffffff;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 400;
  margin: 0 0 auto;
}

.news-card__source {
  font-size: 16px;
  color: #b2b2b2;
  margin: 12px 0 8px;
}

.news-card__more {
  font-size: 18px;
  text-decoration: underline;
  color: #ffffff;
}

.news-empty {
  color: #b2b2b2;
  font-size: 18px;
}

/* Мобильная раскладка: одна колонка, картинка сверху */
@media screen and (max-width: 980px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
  .news-section__title {
    font-size: 24px;
  }
  .news-card {
    flex-direction: column;
  }
  .news-card:last-child:nth-child(odd) {
    grid-column: auto;
    width: 100%;
  }
  .news-card__img {
    flex-basis: auto;
    width: 100%;
    height: 180px;
  }
}
