/* ============================================================
   Блог: название раздела в крошках и карточка статьи с обложкой.
   Подключается после style.css, использует его токены из :root.
   ============================================================ */

/* Название раздела стоит в крошках и остаётся единственным h1 страницы */
.breadcrumbs__current {
  display: inline;
  margin: 0;
  font: inherit;
  color: var(--text-secondary);
}

.blog-list {
  margin-top: 24px;
}

.blog-card {
  padding: 0 0 28px;
}

.blog-card + .blog-card {
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

/* ---------- Обложка: картинка, два слоя затемнения и текст поверх ---------- */

.blog-card__cover {
  /* Цвет затемнения в формате «R G B»; обложке другой гаммы задаётся прямо на ней же */
  --cover-tint: 10 51 80;
  --cover-text: #fff;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 4 / 3;
  padding: 16px 20px 20px;
  overflow: hidden;
  border-radius: var(--r-md);
  background: rgb(var(--cover-tint));
  color: var(--cover-text);
  text-decoration: none;
}

.blog-card__cover:hover {
  text-decoration: none;
}

.blog-card__image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card__cover:hover .blog-card__image {
  transform: scale(1.03);
}

.blog-card__cover::before,
.blog-card__cover::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  z-index: -1;
  pointer-events: none;
}

/* Сверху короткое затемнение под дату и время чтения */
.blog-card__cover::before {
  top: 0;
  height: 40%;
  background: linear-gradient(
    to bottom,
    rgb(var(--cover-tint) / 0.85) 0%,
    rgb(var(--cover-tint) / 0.6) 45%,
    rgb(var(--cover-tint) / 0) 100%
  );
}

/* Снизу плотное затемнение под заголовок, уходит в прозрачность к середине */
.blog-card__cover::after {
  bottom: 0;
  height: 72%;
  background: linear-gradient(
    to top,
    rgb(var(--cover-tint) / 0.96) 0%,
    rgb(var(--cover-tint) / 0.88) 45%,
    rgb(var(--cover-tint) / 0) 100%
  );
}

.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgb(var(--cover-tint) / 0.6);
}

.blog-card__reading {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.blog-card__clock {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.blog-card__title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--cover-text);
  text-align: left;
  text-shadow: 0 1px 3px rgb(var(--cover-tint) / 0.5);
}

.blog-card__cta {
  font-size: 15px;
  font-weight: 600;
}

.blog-card__excerpt {
  margin: 14px 0 0;
  padding: 0 20px;
  line-height: 1.6;
  color: var(--text-primary);
}

.blog-card__more {
  display: block;
  margin-top: 12px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-dark);
}

@media (max-width: 400px) {
  .blog-card__cover {
    padding: 14px 16px 16px;
  }

  .blog-card__title {
    font-size: 19px;
  }
}

/* ---------- Статья: та же обложка-карточка как заголовок страницы ---------- */

article .blog-card__cover {
  /* margin-top коллапсирует с отступом .breadcrumbs выше и даёт тот же зазор, что на /blog/ у .blog-list */
  margin-top: 24px;
  margin-bottom: 24px;
}

/* ---------- Статья: текстовая колонка с теми же боковыми отступами, что внутри обложки ---------- */

.article-body {
  padding: 0 20px;
}

/* ---------- Статья: единая типографика текста (один межстрочный интервал, один отступ) ---------- */

.article-lead {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 24px;
}

article p {
  line-height: 1.7;
  margin-bottom: 20px;
}

article .section-title {
  text-align: left;
}

article .legal-title {
  margin-top: 24px;
  margin-bottom: 8px;
}

article .content-list,
article .content-list-tight {
  list-style: disc;
  line-height: 1.7;
  margin-bottom: 20px;
}

article .content-list li,
article .content-list-tight li {
  margin-bottom: 10px;
}

article .content-list li:last-child,
article .content-list-tight li:last-child {
  margin-bottom: 0;
}
