/* ===== Стили карточек новостей из БД (news-feed.js) ===== */

/* Центровка всего блока новостей внутри t915 */
[data-record-type="915"] .t915 {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Скрываем Tilda-фид (карточки, табы, прелоадер) —
   наш DB-фид размещён вне .t-feed, внутри .t915 */
[data-record-type="915"] .js-feed.t-feed {
  display: none !important;
}

.news-db-feed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  width: 100%;
  margin: 32px auto 0;
  padding: 0 20px;
  box-sizing: border-box;
}

.news-db-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s, transform 0.2s;
}
.news-db-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.14);
  transform: translateY(-2px);
}

.news-db-card__link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-db-card__img-wrap {
  position: relative;
  aspect-ratio: 1.3;
  overflow: hidden;
  background: #f0f0f0;
}

.news-db-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-db-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.news-db-card__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-db-card__body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-db-card__title {
  font-family: 'Nunito Sans', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px;
  color: #1a1a1a;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-db-card__descr {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.45;
  margin: 0 0 auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-db-card__date {
  font-size: 0.78rem;
  color: #999;
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Кнопка «Загрузить ещё» */
.news-load-more {
  display: block;
  margin: 32px auto;
  padding: 14px 40px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Nunito Sans', Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.news-load-more:hover {
  background: #333;
}

/* Бейдж типа (Блог / Новость) */
.news-db-card__type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(245, 44, 68, 0.85);
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Адаптивность --- */
@media (max-width: 768px) {
  .news-db-feed {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .news-db-feed {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 12px;
  }
}
