/* ============================================================
   article-cert.css — Стили контента статей блога (custom-* блоки)
   Цветовая схема: кремовый фон, золото #C9973A, тёмный #1a1a1a
   Подключается только на странице одной статьи.
   ============================================================ */

/* ── Переменные ──────────────────────────────────────────── */
:root {
  --gold:        #C9973A;
  --gold-light:  #E8C97A;
  --gold-dark:   #9B6F1E;
  --cream:       #F5F1EA;
  --cream-dark:  #EDE8DF;
  --dark:        #1a1a1a;
  --dark-mid:    #2E2E2E;
  --mid:         #4A4A4A;
  --muted:       #6B6B6B;
  --white:       #FFFFFF;
  --border:      #D9D0C1;
  --shadow:      rgba(90, 60, 10, 0.12);
}

/* ── Контейнер и обёртка ─────────────────────────────────── */
.custom-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Georgia', 'Times New Roman', serif;
}

.custom-main-content {
  background: var(--white);
  padding: 50px 60px;
  border-radius: 4px;
  box-shadow: 0 8px 40px var(--shadow);
  margin-top: 30px;
  border-top: 3px solid var(--gold);
}

/* ── Заголовки ───────────────────────────────────────────── */
.custom-header {
  color: var(--dark);
  font-size: 2.2rem;
  font-weight: 400;
  margin-bottom: 35px;
  line-height: 1.25;
  text-align: center;
  letter-spacing: 0.01em;
}

.custom-header span,
.custom-header em {
  color: var(--gold);
  font-style: italic;
}

.custom-section-title {
  color: var(--dark);
  font-size: 1.55rem;
  font-weight: 400;
  margin: 45px 0 18px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
  letter-spacing: 0.02em;
}

.custom-subsection {
  color: var(--dark-mid);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 30px 0 12px 0;
}

.custom-subheading {
  color: var(--mid);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 22px 0 8px 0;
}

/* ── Текстовые элементы ──────────────────────────────────── */
.custom-paragraph {
  line-height: 1.8;
  margin-bottom: 20px;
  color: var(--mid);
  text-align: justify;
  font-size: 0.97rem;
}

.custom-list {
  margin: 20px 0;
  padding-left: 28px;
}

.custom-list-item {
  margin-bottom: 10px;
  line-height: 1.7;
  color: var(--mid);
  font-size: 0.95rem;
}

.custom-highlight {
  color: var(--gold-dark);
  font-weight: 600;
}

/* ── Карточки-вызовы (challenge cards) ──────────────────── */
.custom-challenges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin: 30px 0;
}

.custom-challenge-card {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--white);
  padding: 28px;
  border-radius: 4px;
  text-align: center;
  box-shadow: 0 4px 18px var(--shadow);
}

.custom-challenge-icon {
  font-size: 2.6rem;
  margin-bottom: 14px;
  display: block;
}

.custom-challenge-card h4 {
  color: var(--white);
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.custom-challenge-card p {
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ── Подходы / преимущества (approach items) ─────────────── */
.custom-approaches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.custom-approach-item {
  background: var(--white);
  border: 1.5px solid var(--gold-light);
  border-radius: 4px;
  padding: 24px;
  text-align: left;
  transition: all 0.28s ease;
  box-shadow: 0 2px 10px var(--shadow);
}

.custom-approach-item:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 10px 28px var(--shadow);
}

.custom-approach-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  display: block;
}

.custom-approach-item h5 {
  color: var(--dark);
  margin: 0 0 8px 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.custom-approach-item p {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ── Блоки предупреждений и информации ───────────────────── */
.custom-warning-block {
  background: var(--cream-dark);
  padding: 24px 28px;
  border-radius: 4px;
  margin: 30px 0;
  border-left: 4px solid var(--gold);
}

.custom-warning-block h3 {
  color: var(--gold-dark);
  margin: 0 0 12px 0;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.custom-warning-block p {
  color: var(--dark-mid);
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.7;
}

.custom-info-block {
  background: var(--cream);
  padding: 24px 28px;
  border-radius: 4px;
  margin: 30px 0;
  border-left: 4px solid var(--gold-dark);
}

.custom-info-block h3 {
  color: var(--gold-dark);
  margin: 0 0 12px 0;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.custom-info-block p {
  color: var(--dark-mid);
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.7;
}

/* ── Блок успеха / призыв к действию ────────────────────── */
.custom-success-box {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--white);
  padding: 36px 40px;
  border-radius: 4px;
  margin: 40px 0;
  text-align: center;
  box-shadow: 0 6px 24px var(--shadow);
}

.custom-success-box h3 {
  color: var(--white);
  margin: 0 0 14px 0;
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.custom-success-box p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ── Шаги процесса ───────────────────────────────────────── */
.custom-process-steps {
  margin: 30px 0;
}

.custom-process-step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 24px 28px;
  background: var(--cream);
  border-radius: 4px;
  border-left: 4px solid var(--gold);
}

.custom-step-number {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--white);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  margin-right: 20px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px var(--shadow);
}

.custom-step-content h4 {
  margin: 0 0 8px 0;
  color: var(--dark);
  font-size: 1rem;
  font-weight: 600;
}

.custom-step-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ── Примеры и статистика ────────────────────────────────── */
.custom-examples-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 30px 0;
}

.custom-example-item {
  background: var(--cream);
  padding: 18px;
  border-radius: 4px;
  text-align: center;
  color: var(--gold-dark);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

.custom-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.custom-stat-item {
  text-align: center;
  padding: 26px 18px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--white);
  border-radius: 4px;
  box-shadow: 0 4px 16px var(--shadow);
}

.custom-stat-number {
  display: block;
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.custom-stat-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ── Таблицы ─────────────────────────────────────────────── */
.custom-documentation-table {
  background: var(--cream);
  border-radius: 4px;
  padding: 24px;
  margin: 30px 0;
  overflow-x: auto;
}

.custom-documentation-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
}

.custom-documentation-table th {
  background: #f8f5ef;
  color: #2e2e2e;
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.custom-documentation-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--mid);
  font-size: 0.9rem;
  line-height: 1.55;
}

.custom-documentation-table tr:last-child td {
  border-bottom: none;
}

.custom-documentation-table tr:hover td {
  background: var(--cream);
}

/* ── Карточки шаблонов / услуг ───────────────────────────── */
.custom-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin: 30px 0;
}

.custom-template-card {
  background: var(--cream-dark);
  border: 1.5px solid var(--gold-light);
  padding: 28px;
  border-radius: 4px;
  text-align: left;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.custom-template-card:hover {
  border-color: var(--gold);
  box-shadow: 0 6px 22px var(--shadow);
}

.custom-template-card h4 {
  color: var(--gold-dark);
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.custom-template-card p {
  color: var(--mid);
  margin: 0 0 14px 0;
  font-size: 0.92rem;
  line-height: 1.7;
}

.custom-template-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.custom-template-card li {
  color: var(--mid);
  margin: 7px 0;
  padding-left: 20px;
  position: relative;
  font-size: 0.9rem;
  line-height: 1.5;
}

.custom-template-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

/* ── Блок контактов ──────────────────────────────────────── */
.custom-contacts-block {
  background: var(--dark);
  padding: 28px 34px;
  border-radius: 4px;
  margin: 30px 0;
  color: var(--white);
  border-top: 3px solid var(--gold);
}

.custom-contacts-block h3 {
  color: var(--gold-light);
  margin: 0 0 18px 0;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.custom-contacts-block p {
  margin: 9px 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.6;
}

.custom-contacts-block strong {
  color: var(--white);
}

.custom-contacts-block a {
  color: var(--gold-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 151, 58, 0.35);
  transition: color 0.2s, border-color 0.2s;
}

.custom-contacts-block a:hover {
  color: var(--white);
  border-bottom-color: var(--white);
}

/* ── Блок сравнения ──────────────────────────────────────── */
.custom-comparison-block {
  background: var(--cream);
  padding: 26px;
  border-radius: 4px;
  margin: 30px 0;
  border: 1px solid var(--border);
}

.custom-comparison-block h3 {
  color: var(--dark);
  margin: 0 0 20px 0;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 400;
}

.custom-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.custom-comparison-item {
  background: var(--white);
  padding: 20px;
  border-radius: 4px;
  border: 1.5px solid var(--gold-light);
  transition: border-color 0.25s;
}

.custom-comparison-item:hover {
  border-color: var(--gold);
}

.custom-comparison-item h4 {
  color: var(--gold-dark);
  margin: 0 0 12px 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Изображения в статьях: компактно и одинаково ──────────── */
.article-image {
  margin: 24px 0;
  text-align: center;
}
.article-image img {
  width: 100%;
  max-width: 720px;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: 0 4px 20px var(--shadow);
}
.article-body img {
  max-width: 100%;
  max-height: 320px;
  width: auto;
  height: auto;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 16px auto;
  border-radius: 4px;
  box-shadow: 0 2px 12px var(--shadow);
}

/* ── Адаптивность ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .custom-main-content {
    padding: 36px 40px;
  }
  .article-image img {
    max-height: 360px;
  }
}

@media (max-width: 768px) {
  .custom-main-content {
    padding: 28px 24px;
  }
  .custom-header {
    font-size: 1.7rem;
  }
  .custom-section-title {
    font-size: 1.3rem;
  }
  .custom-approaches-grid,
  .custom-challenges-grid,
  .custom-templates-grid,
  .custom-examples-section {
    grid-template-columns: 1fr;
  }
  .custom-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .custom-comparison-grid {
    grid-template-columns: 1fr;
  }
  .custom-process-step {
    flex-direction: column;
  }
  .custom-step-number {
    margin-right: 0;
    margin-bottom: 14px;
  }
  .custom-success-box {
    padding: 26px 20px;
  }
  .custom-contacts-block {
    padding: 22px 20px;
  }
  .article-image img {
    max-height: 280px;
  }
  .article-body img {
    max-height: 260px;
  }
}

@media (max-width: 480px) {
  .custom-container {
    padding: 10px;
  }
  .custom-main-content {
    padding: 20px 16px;
  }
  .custom-stats-grid {
    grid-template-columns: 1fr;
  }
  .custom-header {
    font-size: 1.45rem;
  }
  .custom-documentation-table {
    padding: 14px;
  }
  .custom-documentation-table th,
  .custom-documentation-table td {
    padding: 10px 12px;
    font-size: 0.82rem;
  }
  .article-image img {
    max-height: 220px;
  }
  .article-body img {
    max-height: 200px;
  }
}
