/* Контейнер новостей */
.news__container {
  padding: 32px 0;
  margin: 100px auto 50px auto;
  max-width: 1200px;
  width: 100%;
  box-sizing: border-box;
}

/* Заголовок */
.news__title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

/* Каждый элемент новости */
.news__item {
  display: flex;
  flex-wrap: wrap; /* позволяет переносить элементы */
  gap: 24px;
  align-items: flex-start;
  border-radius: 12px;
  border: 1px solid #e3e8ee;
  border-left: 4px solid #60a5fa;
  padding: 20px;
  margin-bottom: 40px;
  box-sizing: border-box;
  transition: transform 0.5s;
}

.news__item:hover {
  transform: scale(1.02);
}

/* Изображение новости */
.news__item-image {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

/* Контент новости */
.news__item-content {
  flex: 1 1 0;
  min-width: 0; /* предотвращает вылаз за пределы flex */
}

/* Дата */
.news__item-date {
  font-size: 0.95rem;
  color: #7a869a;
  margin-bottom: 8px;
  display: block;
}

/* Заголовок новости */
.news__item-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2a3a5e;
  margin-bottom: 8px;
}

/* Текст новости */
.news__item-text {
  font-size: 1.1rem;
  color: #344563;
  line-height: 1.6;
  margin-bottom: 8px;
  word-break: break-word;
}

/* Ссылки */
.news__item-link {
  color: #2563eb;
  text-decoration: underline;
  font-size: 1rem;
  transition: color 0.2s;
}

.news__item-link:hover {
  color: #34d399;
}

/* Ограничение всех изображений внутри текста */
.news__item-text img {
  max-width: 100% !important; /* не выйдет за пределы родителя */
  height: auto !important;
  display: block;
  margin: 10px auto;
}

/* Ограничение контейнеров WP-блоков */
.news__item-text .wp-block-cover,
.news__item-text .wp-block-image,
.news__item-text figure {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* Изображения внутри WP-блоков */
.news__item-text .wp-block-cover img,
.news__item-text .wp-block-image img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  display: block;
}

/* Мобильная версия */
@media (max-width: 600px) {
  .news__container {
    padding: 16px 8px;
  }

  .news__title {
    font-size: 1.3rem;
  }

  .news__item-text {
    font-size: 1rem;
  }

  .news__item {
    flex-direction: column;
    gap: 12px;
  }

  .news__item-image {
    width: 100%;
    height: auto; /* автоматически сохраняет пропорции */
  }

  .news__item-text img {
    max-width: 100% !important;
    height: auto !important;
  }
}
