/* ══════════════════════════════════════════════
   news.css — Стрічка новин
   user/themes/imcert/css/news.css
══════════════════════════════════════════════ */

/* ── Обгортка секції ── */
.news-section {
  padding: 72px 0 80px;
  background: #fff;
}

.news-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Шапка секції ── */
.news-section-header {
  text-align: center;
  margin-bottom: 48px;
}

.news-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  color: #124651;
  margin: 0 0 12px;
}

.news-section-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  color: #6a8a8d;
  margin: 0;
}

/* ── Фільтр по категоріях ── */
.news-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  justify-content: center;
}

.news-filter__btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 20px;
  border: 2px solid #e2eeee;
  border-radius: 30px;
  background: #fff;
  color: #6a8a8d;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.news-filter__btn:hover {
  border-color: #1a7a7a;
  color: #1a7a7a;
}

.news-filter__btn--active {
  background: #1a7a7a;
  border-color: #1a7a7a;
  color: #fff;
}

/* ── Сітка карток ── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── Картка ── */
.news-card {
  background: #f4f8f8;
  border: 1px solid #e2eeee;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(18, 70, 81, 0.1);
}

/* Зображення */
.news-card__img-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e2eeee;
  flex-shrink: 0;
}

.news-card__img-wrap--no-img {
  aspect-ratio: unset;
  height: 6px;
  background: #1a7a7a;
}

.news-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.news-card:hover .news-card__img {
  transform: scale(1.04);
}

/* Бейдж категорії */
.news-card__cat {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  background: rgba(18, 70, 81, 0.85);
  color: #fff;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.news-card__img-wrap--no-img .news-card__cat {
  display: none;
}

/* Тіло картки */
.news-card__body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.news-card__date {
  font-family: 'Montserrat', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #7aa0a0;
}

.news-card__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #124651;
  margin: 0;
  line-height: 1.4;
}

.news-card__excerpt {
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  color: #5a7a7d;
  line-height: 1.65;
  margin: 0;
  flex: 1;

  /* Обрізаємо текст до 3 рядків */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Посилання "Читати далі" */
.news-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #1a7a7a;
  text-decoration: none;
  transition: gap 0.2s, color 0.2s;
  align-self: flex-start;
}

.news-card__more:hover {
  color: #124651;
  gap: 10px;
}

.news-card__more svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ── Порожній стан ── */
.news-empty {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  color: #8aadad;
  text-align: center;
  padding: 48px 0;
  margin: 0;
}

/* ── Адаптив ── */
@media (max-width: 900px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .news-wrap        { padding: 0 16px; }
  .news-section     { padding: 48px 0 56px; }
  .news-grid        { grid-template-columns: 1fr; }
  .news-card__body  { padding: 18px 18px 20px; }
}
