/* карточка */
.th-item {
  font-family: Arial, sans-serif;
  width: 100%; /* для сетки */
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* блок с изображением */
.th-img {
  width: 100%;
  height: 230px;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
}

/* изображение внутри карточки */
.th-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  transition: transform 0.35s ease;
}

/* заголовок */
.th-title-wrap {
  margin-top: 8px;
  height: 52px;
  overflow: hidden;
}

.th-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  word-wrap: break-word;
  text-align: left;
  transition: color 0.3s ease; /* плавное изменение цвета */
}

/* описание под заголовком */
.th-des {
  padding: 0 5px 5px;
  height: 16px;
}

/* эффект при наведении */
.th-item:hover .th-title {
  color: #4caf50; /* зелёный */
}

.th-item:hover .th-img img {
  transform: scale(1.005); /* уменьшенное увеличение картинки */
}


/* контейнер сетки */
.sect-content {
  width: 100%;
  box-sizing: border-box;
}

.sect-content.sect-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: #000;
  padding: 16px;
  box-sizing: border-box;
  border-radius: 8px;
  max-width: 1200px;
  margin: 0 auto; /* центрируем сетку */
}

/* адаптивные размеры */
@media (max-width: 1200px) {
  .sect-content.sect-items {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .sect-content.sect-items {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .sect-content.sect-items {
    grid-template-columns: repeat(2, 1fr);
  }
  .sect-content.sect-items .th-img {
    height: 190px;
  }
}

/* общий стиль для блока заголовков комментариев */
.comms-title {
  white-space: nowrap;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #eee;
}

/* стиль для обрезки текста с многоточием */
.comms-title.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
  box-sizing: border-box;
}
