/* vidjet.css — стили для рекомендательного блока
   Автор: Alex
   Версия: 2.2 (чистый стиль, адаптив, без рамок)
*/

/* Контейнер */
.rec-wrap {
  color: #111;
  padding: 12px 0;
}

/* Сетка карточек */
.rec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

/* Карточка */
.rec-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}
article.rec-card {
    margin: 0;
}


.rec-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}


/* Изображение */
.rec-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 3/2;
  background: #f1f1f1;
  overflow: hidden;
}
.rec-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Заголовок */
.rec-title {
  margin: 10px 12px 6px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

/* Описание */
.rec-desc {
  margin: 4px 12px 8px;
  font-size: 14px;
  color: #333;
  line-height: 1.2;
}

/* Ссылка */
.rec-link {
  margin: 0 12px 12px;
  justify-self: end;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.rec-link:hover {
  text-decoration: underline;
}

/* Скелетон при загрузке */
.skel {
  animation: rec-pulse 1.3s ease-in-out infinite;
  background: linear-gradient(90deg, #eee, #f6f6f6, #eee);
  background-size: 200% 100%;
}
@keyframes rec-pulse {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* Адаптив: вертикально на мобильных */
@media (max-width: 768px) {
  .rec-grid {
    grid-template-columns: 1fr;
  }
.rec-thumb {
  width: 80%;
  margin: 0 auto;
}

}
