/* =========================================================
   SeoErudit — шаблон страницы кейса
   Файл: css/case.css
   Все классы страницы кейса начинаются с префикса .cp- (case page),
   чтобы не конфликтовать со стилями темы seoerudit (style.css).
   Зависимости: css/fonts.css (Inter + Unbounded).
   ========================================================= */

:root {
  /* Фирменные цвета (взяты из style.css темы seoerudit) */
  --se-navy: #101972;          /* основной тёмно-синий: логотип, заголовки, рамки */
  --se-navy-deep: #020841;     /* фон подвала */
  --se-red: #c81c38;           /* основная кнопка, акценты в заголовках */
  --se-red-hover: #9b162b;
  --se-orange: #ff7400;        /* вторичный акцент, цифры, ссылки «Читать дальше» */
  --se-orange-hover: #cc5d00;
  --se-ink: #2c3137;           /* основной текст и заголовки */
  --se-ink-2: #404b69;         /* второстепенный текст */
  --se-muted: #646e86;         /* даты, подписи */
  --se-line: #e5e5e5;          /* разделители */
  --se-bg: #fafafe;            /* фон шапки и светлых секций */
  --se-lavender: #eaecfc;      /* фон блоков-акцентов */
  --se-lavender-2: #f4f5fe;
  --se-white: #fff;

  --se-font-head: "Unbounded", sans-serif;
  --se-font-body: "Inter", sans-serif;

  --se-radius: 8px;            /* радиус кнопок и полей, как на сайте */
  --se-radius-lg: 12px;
  --se-shadow: 0 8px 16px -8px rgba(15, 15, 15, .2);
  --se-shadow-card: 0 4px 24px rgba(16, 25, 114, .08);

  --cp-col: 920px;             /* ширина колонки текста кейса */
}

/* ---------- Каркас страницы ---------- */
.cp {
  color: var(--se-ink);
  font-family: var(--se-font-body);
  font-size: 16px;
  line-height: 1.6;
  padding-bottom: 96px;
}
.cp *,
.cp *::before,
.cp *::after { box-sizing: border-box; }

.cp-col {
  width: var(--cp-col);
  max-width: 100%;
  margin: 0 auto;
}

/* ---------- Хлебные крошки (повторяют .breadcrumbs темы) ---------- */
.cp-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 16px 0;
}
.cp-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  color: #1f222c;
  font-size: 15px;
  line-height: 1.5;
}
.cp-breadcrumbs li + li::before {
  content: "";
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin: 0 4px;
  background: url("../img/arrow.svg") no-repeat center;
}
.cp-breadcrumbs a {
  display: block;
  padding: 4px;
  border-radius: 4px;
  color: #1f222c;
  text-decoration: none;
  transition: background .3s;
}
.cp-breadcrumbs a:hover { background: #f1f2f8; }
.cp-breadcrumbs .cp-breadcrumbs__home {
  width: 24px;
  height: 24px;
  font-size: 0;
  background: url("../img/home.svg") no-repeat center;
}
.cp-breadcrumbs [aria-current="page"] {
  color: var(--se-navy);
  padding: 4px;
}

/* ---------- 1. Шапка кейса ---------- */
.cp-hero { padding: 32px 0 8px; }

.cp-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 16px;
}
.cp-kicker__service {
  color: var(--se-orange);
  font-family: var(--se-font-head);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
}
a.cp-kicker__service:hover { text-decoration: underline; }
.cp-kicker__tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--se-navy);
  border-radius: 999px;
  color: var(--se-navy);
  font-size: 13px;
  font-weight: 600;
}
.cp-kicker__date {
  color: var(--se-muted);
  font-size: 15px;
  font-weight: 600;
}

.cp-title {
  margin: 0;
  color: var(--se-ink);
  font-family: var(--se-font-head);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  text-wrap: balance;
}
.cp-title em,
.cp-h2 em {
  font-style: normal;
  color: var(--se-red);
}

.cp-metric {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 24px 0 0;
  padding: 20px 24px;
  border-left: 4px solid var(--se-orange);
  background: var(--se-lavender-2);
  border-radius: 0 var(--se-radius-lg) var(--se-radius-lg) 0;
}
.cp-metric__value {
  color: var(--se-orange);
  font-family: var(--se-font-head);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}
.cp-metric__label {
  color: var(--se-navy);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.cp-lead {
  margin: 24px 0 0;
  color: var(--se-ink-2);
  font-size: 20px;
  line-height: 1.55;
}

/* Таблица фактов о проекте */
.cp-facts {
  width: 100%;
  margin: 32px 0 0;
  border-collapse: collapse;
  font-size: 16px;
}
.cp-facts caption {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.cp-facts tr { border-bottom: 1px solid var(--se-line); }
.cp-facts tr:first-child { border-top: 1px solid var(--se-line); }
.cp-facts th,
.cp-facts td {
  padding: 14px 0;
  text-align: left;
  vertical-align: top;
}
.cp-facts th {
  width: 36%;
  padding-right: 24px;
  color: var(--se-muted);
  font-weight: 400;
}
.cp-facts td {
  color: var(--se-ink);
  font-weight: 500;
}
.cp-facts a {
  color: var(--se-navy);
  text-underline-offset: 3px;
}
.cp-facts a:hover { color: var(--se-red); }

/* ---------- 2. Разделы кейса ---------- */
.cp-section { padding-top: 56px; }

.cp-h2 {
  margin: 0 0 20px;
  color: var(--se-ink);
  font-family: var(--se-font-head);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}
.cp-h3 {
  margin: 28px 0 12px;
  color: var(--se-navy);
  font-family: var(--se-font-head);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  text-transform: uppercase;
}

.cp-prose p { margin: 0 0 16px; }
.cp-prose p:last-child { margin-bottom: 0; }
.cp-prose strong { color: var(--se-navy); font-weight: 700; }
.cp-prose a {
  color: var(--se-red);
  text-underline-offset: 3px;
}
.cp-prose a:hover { color: var(--se-red-hover); }

/* Маркированный список с фирменным маркером-галочкой (как в тарифах на главной) */
.cp-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.cp-list li {
  position: relative;
  padding: 0 0 0 34px;
  margin: 0 0 12px;
}
.cp-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--se-navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* Исходные данные «Точка А» */
.cp-start {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.cp-start li {
  padding: 18px 20px;
  border: 1px solid var(--se-line);
  border-radius: var(--se-radius-lg);
  background: var(--se-white);
}
.cp-start b {
  display: block;
  margin-bottom: 4px;
  color: var(--se-navy);
  font-family: var(--se-font-head);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}
.cp-start span {
  color: var(--se-ink-2);
  font-size: 14px;
  line-height: 1.45;
}

/* Этапы работ */
.cp-steps {
  counter-reset: cp-step;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.cp-step {
  counter-increment: cp-step;
  position: relative;
  padding: 24px 0 24px 72px;
  border-bottom: 1px solid var(--se-line);
}
.cp-step:last-child { border-bottom: 0; }
.cp-step::before {
  content: counter(cp-step, decimal-leading-zero) ".";
  position: absolute;
  left: 0;
  top: 22px;
  color: var(--se-orange);
  font-family: var(--se-font-head);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}
.cp-step__title {
  margin: 0 0 4px;
  color: var(--se-ink);
  font-family: var(--se-font-head);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  text-transform: uppercase;
}
.cp-step__meta {
  margin: 0 0 12px;
  color: var(--se-muted);
  font-size: 14px;
  font-weight: 600;
}
.cp-step .cp-list { margin-bottom: 0; }
.cp-step .cp-list li { margin-bottom: 8px; }

.cp-pdf {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0 0;
  padding: 16px 20px;
  border: 1px dashed var(--se-navy);
  border-radius: var(--se-radius-lg);
  color: var(--se-navy);
  text-decoration: none;
  transition: background .3s;
}
.cp-pdf:hover { background: var(--se-lavender-2); }
.cp-pdf__icon {
  flex: 0 0 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--se-radius);
  background: var(--se-red);
  color: #fff;
  font-family: var(--se-font-head);
  font-size: 11px;
  font-weight: 700;
}
.cp-pdf__text { font-weight: 600; line-height: 1.4; }
.cp-pdf__text small {
  display: block;
  color: var(--se-muted);
  font-weight: 400;
  font-size: 14px;
}

/* ---------- 3. Результат ---------- */
.cp-kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}
.cp-kpi {
  padding: 24px;
  border: 1px solid var(--se-line);
  border-radius: var(--se-radius-lg);
  background: var(--se-white);
  box-shadow: var(--se-shadow-card);
}
.cp-kpi__value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--se-navy);
  font-family: var(--se-font-head);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}
.cp-kpi__from {
  color: var(--se-muted);
  font-size: 22px;
}
.cp-kpi__arrow {
  color: var(--se-orange);
  font-size: 22px;
}
.cp-kpi__label {
  margin: 0;
  color: var(--se-ink-2);
  font-size: 15px;
  line-height: 1.45;
}
.cp-kpi--accent {
  border-color: transparent;
  background: var(--se-navy);
}
.cp-kpi--accent .cp-kpi__value { color: #fff; }
.cp-kpi--accent .cp-kpi__from { color: #b8bde6; }
.cp-kpi--accent .cp-kpi__label { color: #dfe2fa; }

/* Скриншоты-доказательства */
.cp-figure {
  margin: 0 0 24px;
}
.cp-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--se-line);
  border-radius: var(--se-radius-lg);
  box-shadow: var(--se-shadow-card);
  background: #fff;
}
.cp-figure figcaption {
  margin-top: 10px;
  color: var(--se-muted);
  font-size: 14px;
  line-height: 1.45;
}
.cp-figure--zoom img { cursor: zoom-in; }

/* ---------- 4. Вывод ---------- */
.cp-insight {
  position: relative;
  margin: 0;
  padding: 32px 36px;
  border-radius: var(--se-radius-lg);
  background: var(--se-navy);
  color: #fff;
  overflow: hidden;
}
.cp-insight::after {
  /* лупа из логотипа — декоративный водяной знак */
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 200px;
  height: 200px;
  border: 24px solid rgba(255, 116, 0, .16);
  border-radius: 50%;
  pointer-events: none;
}
.cp-insight p {
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.55;
}
.cp-insight p:last-of-type { margin-bottom: 0; }
.cp-insight strong { color: var(--se-orange); }

.cp-quote {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 24px 0 0;
  padding: 24px;
  border-radius: var(--se-radius-lg);
  background: var(--se-lavender);
}
.cp-quote img {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.cp-quote blockquote { margin: 0; }
.cp-quote blockquote p {
  margin: 0 0 8px;
  color: var(--se-ink);
  font-size: 16px;
  line-height: 1.55;
}
.cp-quote cite {
  font-style: normal;
  color: var(--se-navy);
  font-size: 14px;
  font-weight: 600;
}
.cp-quote cite span { color: var(--se-muted); font-weight: 400; }

/* ---------- 5. Кнопка / CTA ---------- */
.cp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 32px;
  border: 0;
  border-radius: var(--se-radius);
  background: var(--se-red);
  box-shadow: var(--se-shadow);
  color: #fff;
  font-family: var(--se-font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  text-decoration: none;
  cursor: pointer;
  transition: background .3s, transform .3s;
}
.cp-btn svg { width: 24px; height: 24px; stroke: currentColor; }
.cp-btn:hover { background: var(--se-red-hover); }
.cp-btn:active { transform: translateY(1px); }
.cp-btn:focus-visible,
.cp-related__more:focus-visible,
.cp-cta__msg:focus-visible {
  outline: 3px solid var(--se-orange);
  outline-offset: 3px;
}
.cp-btn--orange { background: var(--se-orange); }
.cp-btn--orange:hover { background: var(--se-orange-hover); }
.cp-btn--border {
  background: transparent;
  border: 1px solid var(--se-navy);
  box-shadow: none;
  color: var(--se-navy);
}
.cp-btn--border:hover { background: var(--se-navy); color: #fff; }

.cp-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 56px;
  padding: 24px;
  border-radius: var(--se-radius-lg);
  background: var(--se-lavender);
}
.cp-cta__person {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.cp-cta__person img {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}
.cp-cta__name {
  color: var(--se-ink);
  font-family: var(--se-font-head);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
}
.cp-cta__job { color: var(--se-ink-2); font-size: 14px; }
.cp-cta__text {
  margin: 4px 0 0;
  color: var(--se-ink-2);
  font-size: 15px;
  line-height: 1.45;
}
.cp-cta__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.cp-cta__msg {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--se-radius);
  background: #fff;
  transition: transform .3s;
}
.cp-cta__msg:hover { transform: translateY(-2px); }
.cp-cta__msg img { width: 28px; height: 28px; }

/* ---------- 6. Похожие кейсы (повторяют карточки блога) ---------- */
.cp-related { padding-top: 96px; }
.cp-related__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.cp-related__head .cp-h2 { margin: 0; font-size: 32px; }
.cp-related__more {
  color: var(--se-navy);
  font-weight: 600;
  text-underline-offset: 4px;
  white-space: nowrap;
}
.cp-related__more:hover { color: var(--se-red); }

.cp-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--se-line);
  border-radius: 4px;
  background: #fff;
  transition: box-shadow .3s, transform .3s;
}
.cp-card:hover {
  box-shadow: var(--se-shadow-card);
  transform: translateY(-2px);
}
.cp-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px 4px 0 0;
}
.cp-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 16px 24px;
}
.cp-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--se-muted);
  font-size: 13px;
  font-weight: 600;
}
.cp-card__meta .cp-kicker__tag { height: 22px; font-size: 12px; padding: 0 8px; }
.cp-card__title {
  margin: 0 0 12px;
  color: var(--se-ink);
  font-family: var(--se-font-head);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}
.cp-card__title a {
  color: inherit;
  text-decoration: none;
}
.cp-card__title a::after {
  /* вся карточка кликабельна */
  content: "";
  position: absolute;
  inset: 0;
}
.cp-card__title a:focus-visible { outline: none; }
.cp-card:focus-within { outline: 3px solid var(--se-orange); outline-offset: 2px; }
.cp-card__text {
  margin: 0 0 16px;
  color: var(--se-ink-2);
  font-size: 15px;
  line-height: 1.5;
}
.cp-card__result {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: var(--se-radius);
  background: var(--se-lavender-2);
  color: var(--se-navy);
  font-size: 14px;
  font-weight: 600;
}
.cp-card__more {
  margin-top: auto;
  color: var(--se-orange);
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline dotted;
  text-underline-offset: 4px;
}

.cp-quote__author { margin: 0; }

.cp-sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Адаптив ---------- */
@media (max-width: 1199px) {
  .cp-title { font-size: 34px; }
}
@media (max-width: 992px) {
  .cp-cards { grid-template-columns: repeat(2, 1fr); }
  .cp-cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 767px) {
  .cp { padding-bottom: 64px; }
  .cp-hero { padding-top: 16px; }
  .cp-title { font-size: 26px; }
  .cp-metric { padding: 16px 18px; }
  .cp-metric__value { font-size: 26px; white-space: normal; }
  .cp-metric__label { font-size: 16px; }
  .cp-lead { font-size: 17px; }
  .cp-facts th, .cp-facts td { display: block; width: 100%; padding: 0; }
  .cp-facts tr { display: block; padding: 12px 0; }
  .cp-facts th { margin-bottom: 2px; font-size: 14px; }
  .cp-section { padding-top: 40px; }
  .cp-h2 { font-size: 22px; }
  .cp-start { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cp-start li { padding: 14px; }
  .cp-start b { font-size: 19px; }
  .cp-start span { font-size: 13px; }
  .cp-step { padding-left: 0; padding-top: 56px; }
  .cp-step::before { top: 20px; font-size: 22px; }
  .cp-kpis { grid-template-columns: 1fr; }
  .cp-kpi__value { font-size: 28px; }
  .cp-insight { padding: 24px 22px; }
  .cp-insight p { font-size: 17px; }
  .cp-quote { flex-direction: column; }
  .cp-cta { padding: 20px; }
  .cp-cta__person { align-items: flex-start; }
  .cp-cta__person img { flex-basis: 56px; width: 56px; height: 56px; }
  .cp-cta__actions { width: 100%; flex-wrap: wrap; }
  .cp-cta__actions .cp-btn { flex: 1 1 100%; padding: 0 16px; }
  .cp-related { padding-top: 64px; }
  .cp-related__head { flex-direction: column; align-items: flex-start; }
  .cp-related__head .cp-h2 { font-size: 24px; }
  .cp-cards { grid-template-columns: 1fr; }
}
@media (max-width: 340px) {
  .cp-start { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .cp-title { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  .cp *, .cp *::before, .cp *::after { transition: none !important; }
}

/* =========================================================
   Дополнения для темы WordPress
   ========================================================= */
/* пункт без заголовка — текст сразу у номера */
.cp-step--plain .cp-step__text > :first-child { margin-top: 0; }
.cp-step__text > :last-child { margin-bottom: 0; }
.cp-step--plain::before { top: 20px; }
.cp-step__text p { margin: 0 0 8px; }

/* кнопка CTA — ссылка на модалку темы */
a.cp-btn { text-decoration: none; }

/* текст из визуального редактора: нумерованные списки результата */
.cp-prose ol { padding-left: 22px; }
.cp-prose ol li { margin-bottom: 8px; }
.cp-prose ol li::marker { color: var(--se-orange); font-weight: 700; }

/* просмотр скриншота */
.se-lightbox[hidden] { display: none; }
.se-lightbox {
	position: fixed; inset: 0; z-index: 10001;
	display: grid; place-items: center; padding: 24px;
	border: 0; background: rgba(2, 8, 65, .85); cursor: zoom-out;
}
.se-lightbox img { max-width: min(1200px, 100%); max-height: 90vh; border-radius: 8px; background: #fff; }
body.is-locked { overflow: hidden; }

/* кейс на всю ширину контейнера сайта */
.cp { --cp-col: 100%; }

/* на полной ширине — текст чуть крупнее */
.cp .cp-prose,
.cp .cp-step__text { font-size: 16px; line-height: 1.6; }
.cp .cp-facts th { width: 30%; }