/* =========================================================
   Статьи — каталог материалов
   Клиника доктора Сонина
   Выпадающие фильтры используют стиль .dfilter-* со страниц
   «Врачи» / «Библиотека заболеваний» (biblioteka-styles.css).
   ========================================================= */

/* центрированные хлебные крошки, как на странице «Библиотека» */
.page-head .breadcrumbs { justify-content: center; }

.stati-section {
  padding: 58px 0 70px;
  background: #F6F7F9;
}

/* ── Табы разделов (Новости / Статьи / Кейсы) ─────────────── */
.stati-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}
.stati-tab {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 13px 24px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: background 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.stati-tab:hover { color: var(--violet); }
.stati-tab.is-active {
  color: #fff;
  background: var(--violet);
  border-color: var(--violet);
  box-shadow: 0 10px 24px rgba(90, 58, 210, 0.28);
}

/* ── Полоса фильтров ──────────────────────────────────────── */
.stati-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 34px;
}
/* dfilter-плашки занимают первые две колонки сетки карточек */
.stati-filters .dfilter-select-wrap {
  grid-column: span 1;
  /* на сером фоне страницы плашки делаем белыми, чтобы были заметны */
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.stati-filters .dfilter-select-wrap.open {
  background: #fff;
  box-shadow: 0 14px 34px rgba(40, 26, 96, 0.18);
}

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

.stat-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-card);
  padding: 16px 16px 26px;
  text-decoration: none;
  color: inherit;
  will-change: transform;
  transition: box-shadow 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.stat-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-6px);
}

.stat-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-soft);
}
.stat-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.stat-card:hover .stat-cover img { transform: scale(1.04); }

.stat-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 0 14px;
}

.stat-tag-slot {
  display: flex;
  align-items: flex-start;
  min-height: 27px;
  margin: 22px 0 16px;
}

.stat-tag {
  display: inline-flex;
  align-items: center;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 6px 14px;
  border-radius: 999px;
}

.stat-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 12px;
  text-wrap: balance;
}

.stat-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 22px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stat-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}
.stat-author img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: var(--bg-soft);
}
.stat-author .stat-author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s var(--ease-out);
}
.stat-card:hover .stat-author-name { color: var(--violet); }

.stat-date {
  font-size: 13px;
  color: var(--text-light);
  margin: 16px 0 0;
}

.stati-empty {
  grid-column: 1 / -1;
  padding: 70px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 17px;
}

/* пагинация переиспользует .bib-pagination / .bib-page из biblioteka-styles.css */
#stati-pagination { margin-top: 46px; }

/* ── Адаптив ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stati-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stati-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .stati-grid { grid-template-columns: 1fr; }
  .stati-filters { grid-template-columns: 1fr; }
  .stat-card { padding: 14px 14px 24px; }
  .stat-body { padding: 0 10px; }
  .stat-title { font-size: 18px; }
}
