/* ==========================================================================
   Страница «Новости» (news.html). Подключается после style.css.
   ========================================================================== */

/* --- Дата в боковой панели (общий стиль .date — в style.css) ---------- */

.modal__date {
  display: inline-block;
  margin-top: 18px;
  font-size: 1rem;
  line-height: 1.5rem;
}
.modal__date[hidden] { display: none; }

/* --- Сетка новостей ------------------------------------------------------ */

.news { margin-bottom: 100px; }

.news__list {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news__item {
  position: relative;
  width: 29.4%;
  margin-right: 5.9%;
  margin-bottom: 56px;
  padding-bottom: 38px;
}
.news__item:nth-child(3n) { margin-right: 0; }
.news__item--hidden { display: none; }
.news__item--revealed { animation: fadeInUp .6s var(--ease-out) both; }

.news__text--bold { font-weight: 700; }

/* Ссылка-заголовок: подчёркивание появляется только при наведении */
.news__item .link--text {
  background-image: linear-gradient(to right, transparent, transparent);
  animation: none;
}
.news__item .link--text:hover,
.news__item .link--text:focus-visible {
  background-image: linear-gradient(to right, var(--c-text), var(--c-text));
  background-size: 100% 2px;
  animation: line-in-text .4s;
}

.news__item p.news__text { margin: 1em 0; }

.news__date {
  position: absolute;
  bottom: 0;
  left: 0;
}

.news__more-button[hidden] { display: none; }

/* Текст новости в боковой панели */
.modal__content--news figure { margin: 0 0 24px; }
.modal__content--news img { display: block; max-width: 100%; height: auto; }
.modal__content--news figcaption { margin-top: 8px; font-size: .875rem; line-height: 1.25rem; opacity: .6; }
.modal__content--news blockquote {
  margin: 0 0 20px;
  padding-left: 20px;
  border-left: 2px solid var(--c-line);
}
.modal__content--news a { color: inherit; border-bottom: 1px solid rgba(10, 20, 40, .28); text-decoration: none; }
.modal__content--news a:hover,
.modal__content--news a:focus-visible { color: var(--c-navy-hover); border-bottom-color: rgba(0, 59, 103, .4); outline: none; }

@media (max-width: 1199px) {
  .news { margin-bottom: 69px; }
  .news__item { width: 47.1%; margin-right: 5.8%; margin-bottom: 40px; padding-bottom: 36px; }
  .news__item:nth-child(3n) { margin-right: 5.8%; }
  .news__item:nth-child(2n) { margin-right: 0; }
}

@media (max-width: 767px) {
  .news { max-width: 500px; margin: 15px 0 23px; }
  .news__item,
  .news__item:nth-child(3n) { width: 100%; margin-right: 0; margin-bottom: 33px; padding-bottom: 24px; }
  .news__text,
  .news__text--bold { font-size: .875rem; line-height: 1.375rem; }
  .news__date { font-size: .75rem; line-height: 1.0625rem; }
  .modal__date { margin-top: 12px; font-size: .75rem; line-height: 1.5rem; }
}

/* --- Контакты для прессы ------------------------------------------------- */

.contact--news { border-top: 1px solid rgba(10, 20, 40, .24); }
