/* ================= СТРАНИЦА СПИСКА СТАТЕЙ ================= */

.articles-list-page {
  padding: 24px 20px 40px;
  background: #f7f3ee;
}

.articles-list-page__title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
  text-transform: uppercase;
}

.articles-list-page__empty {
  font-size: 14px;
  color: #777;
}

/* Сетка: 3 карточки в ширину, до 12 статей на страницу */
.articles-list-page__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 24px; /* горизонтальный отступ между колонками */
  row-gap: 32px; /* ВЕРТИКАЛЬНЫЙ ОТСТУП МЕЖДУ РЯДАМИ КАРТОЧЕК */
  margin-bottom: 32px;
}

/* Адаптив: планшеты */
@media (max-width: 1024px) {
  .articles-list-page__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Адаптив: мобильные */
@media (max-width: 640px) {
  .articles-list-page__grid {
    grid-template-columns: 1fr;
  }
}

/* ================= КАРТОЧКА СТАТЬИ (копия .article-item, но с твоими классами) ================= */

.articles-list-page__item {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 15px;
  background-color: #fff;
  border-bottom: 1px solid #ddd;
  box-shadow: -8px 8px 15px rgba(0, 0, 0, 0.1);
  margin: 0; /* ВАЖНО: никаких внешних отступов, только row-gap грида */
}

.articles-list-page__item-left {
  flex: 1;
}

/* верхняя строка: дата + комментарии */
.articles-list-page__item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.articles-list-page__item-date {
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  color: #999;
  display: block;
}

.articles-list-page__item-comments {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.articles-list-page__item-comments-count {
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  color: #999;
}

/* заголовок и текст */

.articles-list-page__item-title {
  font-family: 'Roboto', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #000;
  margin: 0 0 10px 0;
}

.articles-list-page__item-title a {
  color: #000;
  text-decoration: none;
}

.articles-list-page__item-title a:hover {
  text-decoration: underline;
}

.articles-list-page__item-excerpt {
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #000;
  margin: 0;
}

/* картинка */

.articles-list-page__item-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  flex: 1;
}

/* Адаптив карточки */

@media (max-width: 480px) {
  .articles-list-page__item-title {
    font-size: 18px;
  }

  .articles-list-page__item-excerpt {
    font-size: 14px;
  }
}
