/*
  EcomRank Article Content v2 Compact
  Более спокойная версия: меньше H1/H2, основной текст 17px, компактнее отступы.
  Bootstrap 5 остаётся основой, этот CSS только нормализует статью.
*/

/* Контейнер для blog-страниц: убирает боковые отступы контейнера layout */
.blog-container {
  padding-left: 0;
  padding-right: 0;
}

/* Общая страница статьи */
.article-page-wrap {
  max-width: 1040px;
}

.article-page-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 22px;
  box-shadow: 0 14px 42px rgba(15, 23, 42, .055);
  overflow: hidden;
}

/* Верх статьи: внешний шаблон сайта */
.article-header {
  padding: 28px 28px 22px;
  background:
    radial-gradient(circle at 12% 8%, rgba(13, 110, 253, .08), transparent 30%),
    radial-gradient(circle at 90% 8%, rgba(118, 75, 162, .08), transparent 32%),
    #fff;
}

.article-type-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .38rem .75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.article-title {
  max-width: 850px;
  font-size: clamp(1.8rem, 3.4vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -.035em;
  font-weight: 850;
  color: #111827;
  margin: 0 0 14px;
}

.article-description {
  max-width: 760px;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  color: #475467;
  margin: 0 0 16px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  align-items: center;
  color: #667085;
  font-size: .88rem;
}

.article-cover-wrap {
  padding: 0 28px 26px;
  background: #fff;
}

.article-cover-img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  display: block;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .09);
}

/* Контент из редактора */
.article-content {
  padding: 0 28px 32px;
  font-size: 1.0625rem; /* 17px */
  line-height: 1.68;
  color: #263044;
}

.article-content > *:first-child {
  margin-top: 0;
}

.article-content p {
  margin: 0 0 1.1rem;
}

.article-content h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  line-height: 1.22;
  letter-spacing: -.02em;
  font-weight: 820;
  color: #111827;
  margin: 2.6rem 0 1rem;
}

.article-content h3 {
  font-size: clamp(1.18rem, 2vw, 1.4rem);
  line-height: 1.3;
  font-weight: 780;
  color: #172033;
  margin: 1.9rem 0 .8rem;
}

.article-content h4 {
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 760;
  color: #172033;
  margin: 1.55rem 0 .65rem;
}

.article-content ul,
.article-content ol {
  margin: 0 0 1.35rem;
  padding-left: 1.3rem;
}

.article-content li {
  margin-bottom: .38rem;
  padding-left: .12rem;
}

.article-content a {
  color: #0d6efd;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
}

.article-content figure {
  margin: 1.8rem 0;
}

.article-content figcaption {
  margin-top: .6rem;
  font-size: .86rem;
  line-height: 1.48;
  color: #667085;
}

/* Блоки, которые можно вставлять из HTML-редактора */
.article-content .article-summary-box {
  margin: 0 0 1.75rem;
  padding: 1.25rem;
  background: #f8fafc;
  border: 1px solid #e6eaf0;
  border-radius: 18px;
}

.article-content .article-summary-box .lead {
  color: #344054;
  font-size: 1.08rem;
  line-height: 1.55;
}

.article-content .kpi-card {
  height: 100%;
  padding: .9rem;
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 15px;
}

.article-content .kpi-label {
  font-size: .78rem;
  color: #667085;
  margin-bottom: .32rem;
}

.article-content .kpi-value {
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  line-height: 1;
  font-weight: 850;
  letter-spacing: -.035em;
  color: #111827;
  margin-bottom: .32rem;
}

.article-content .kpi-note {
  font-size: .82rem;
  line-height: 1.35;
  color: #667085;
}

.article-content .note-box {
  margin: 1.55rem 0;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e3a5f;
}

.article-content .note-box.note-success {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: #14532d;
}

.article-content .note-box.note-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #713f12;
}

.article-content .note-box.note-danger {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #7f1d1d;
}

.article-content .step-card {
  padding: 1rem 1.05rem;
  border: 1px solid #e6eaf0;
  border-radius: 16px;
  background: #fff;
  height: 100%;
}

.article-content .step-card p {
  font-size: .98rem;
  line-height: 1.55;
}

.article-content .step-num {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eef3ff;
  color: #0d6efd;
  font-size: .92rem;
  font-weight: 800;
  margin-bottom: .65rem;
}

/* Таблицы */
.article-content .table-responsive {
  margin: 1.55rem 0;
  border: 1px solid #e6eaf0;
  border-radius: 16px;
  overflow: auto;
  box-shadow: 0 7px 20px rgba(15, 23, 42, .035);
}

.article-content table {
  margin-bottom: 0;
  font-size: .92rem;
  line-height: 1.42;
}

.article-content table th {
  white-space: nowrap;
  font-weight: 750;
}

.article-content .table-dark th {
  background-color: #172033 !important;
}

.article-content table th,
.article-content table td {
  padding: .65rem .75rem;
}

/* Низ статьи */
.article-tags,
.article-categories,
.article-author-box {
  padding: 0 28px 26px;
}

.article-author-box-inner {
  background: #f8fafc;
  border: 1px solid #e6eaf0;
  border-radius: 16px;
  padding: .95rem;
}

/* Мобильная версия */
@media (max-width: 767.98px) {
  .blog-container {
    padding-left: 0px;
    padding-right: 0px;
  }

  .article-page-wrap {
    padding-left: 0;
    padding-right: 0;
  }

  .article-page-card {
    border-radius: 18px;
  }

  .article-header {
    padding: 22px 16px 18px;
  }

  .article-type-badge {
    font-size: .75rem;
    margin-bottom: 12px;
  }

  .article-title {
    font-size: 1.85rem;
    line-height: 1.1;
    letter-spacing: -.032em;
  }

  .article-description {
    font-size: 1rem;
    line-height: 1.52;
  }

  .article-meta {
    font-size: .84rem;
  }

  .article-cover-wrap {
    padding: 0 16px 20px;
  }

  .article-cover-img {
    border-radius: 15px;
  }

  .article-content {
    padding: 0 16px 26px;
    font-size: 1rem; /* 16px */
    line-height: 1.65;
  }

  .article-content p {
    margin-bottom: 1rem;
  }

  .article-content h2 {
    font-size: 1.45rem;
    line-height: 1.23;
    margin: 2.25rem 0 .9rem;
  }

  .article-content h3 {
    font-size: 1.2rem;
    margin: 1.7rem 0 .75rem;
  }

  .article-content .article-summary-box {
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 1.45rem;
  }

  .article-content .article-summary-box .lead {
    font-size: 1rem;
  }

  .article-content .kpi-card {
    padding: .85rem;
  }

  .article-content .kpi-value {
    font-size: 1.55rem;
  }

  .article-content .note-box {
    padding: .95rem 1rem;
    border-radius: 15px;
  }

  .article-content table {
    font-size: .86rem;
  }

  .article-content table th,
  .article-content table td {
    padding: .58rem .65rem;
  }

  .article-tags,
  .article-categories,
  .article-author-box {
    padding-left: 16px;
    padding-right: 16px;
  }
}
