/* Страница одной акции. Макет Claude Design, проект «Редизайн промокодной
   страницы», экран p1 (десктоп), p5 (телефон), p6 (тёмная тема).
   Подключается только на single custom_post — см. financehacks_custom_styles(). */

.fhp{
  --fhp-ink:#0A0A0A;          /* текст на лайме: в тёмной теме остаётся тёмным */
  --fhp-radius:20px;
  background:var(--fh-paper);
  color:var(--fh-ink);
}

/* ── Хлебные крошки ─────────────────────────────────── */
.fhp-crumbs{
  padding:14px 32px;border-bottom:2px solid var(--fh-line);
  font:600 12.5px/1.4 'Onest',system-ui,sans-serif;color:var(--fh-muted);
}
.fhp-crumbs a{color:inherit;text-decoration:none}
.fhp-crumbs a:hover{color:var(--fh-ink)}

/* ── Шапка страницы ─────────────────────────────────────
   Вторая редакция макета (01.09.2026): фон белый, кислота осталась точечно —
   подсветка величины в заголовке, тень у блока с действием, лаймовые блоки
   ниже. Креатив стал главным элементом: 660px, целиком, без обрезки —
   внутри него юридическая маркировка, её должно быть видно. */
.fhp-hero{
  padding:36px 32px 34px;background:var(--fh-paper);
  border-bottom:2px solid var(--fh-ink);
  display:grid;grid-template-columns:minmax(0,1fr) 720px;
  /* Только между колонками: общий gap добавлял 40px и между строками
     левой колонки, из-за чего щель перед блоком действия удваивалась. */
  column-gap:36px;row-gap:0;
  grid-template-areas:"info shot" "offer shot";
  align-items:center;
  /* Строки левой колонки держатся вместе и центрируются группой. Без этого
     они растягивались под высоту креатива, и между плашками сроков и блоком
     действия зияло около 100px пустоты. */
  align-content:center;
}
.fhp-hero-info{grid-area:info}
.fhp-hero-offer{grid-area:offer}
.fhp-shot{grid-area:shot}

.fhp-brandrow{display:flex;align-items:center;gap:12px;margin-bottom:20px;flex-wrap:wrap}
.fhp-tile{
  width:46px;height:46px;border-radius:12px;flex:none;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  font:800 20px/1 'Unbounded',sans-serif;text-decoration:none;
}
.fhp-tile img{width:100%;height:100%;object-fit:contain;padding:5px;box-sizing:border-box}
.fhp-brandname{font:700 15px/1.2 'Onest',sans-serif;color:var(--fh-ink);text-decoration:none}
.fhp-brandname:hover{text-decoration:underline}
.fhp-product{margin-top:4px;font:600 12px/1.3 'Onest',sans-serif;color:var(--fh-muted)}

.fhp-title{
  margin:0;font:900 36px/1.08 'Unbounded',sans-serif;letter-spacing:-.03em;
  color:var(--fh-ink);text-wrap:balance;
}
/* Величина выгоды подсвечена лаймом прямо в заголовке. Текст на лайме всегда
   тёмный — в тёмной теме лаймовые заливки не меняются. */
.fhp-title mark{background:var(--fh-acid);color:#0A0A0A;padding:0 8px;margin:0 -2px}

.fhp-lead{margin-top:16px;font:500 17px/1.5 'Onest',sans-serif;color:var(--fh-muted)}
.fhp-chips{margin-top:20px;display:flex;gap:8px;flex-wrap:wrap;font:700 12.5px/1 'Onest',sans-serif}
.fhp-chips span{padding:8px 13px;border-radius:999px;border:2px solid var(--fh-line);color:var(--fh-muted)}
.fhp-chips span.is-dark{background:var(--fh-ink);color:var(--fh-paper);border-color:var(--fh-ink)}

/* Блок с действием: номинал и кнопка рядом, лаймовая тень вместо заливки. */
.fhp-offer{
  /* По содержимому: иначе рамка и лаймовая тень тянулись во всю колонку,
     а справа от кнопки оставалась пустота. */
  width:fit-content;max-width:100%;
  margin-top:26px;padding:20px 22px;
  border:2px solid var(--fh-ink);border-radius:18px;box-shadow:5px 5px 0 var(--fh-acid);
  display:flex;gap:20px;align-items:center;flex-wrap:wrap;
}
.fhp-value{font:900 42px/1 'Unbounded',sans-serif;letter-spacing:-.04em;color:var(--fh-ink);white-space:nowrap}
.fhp-value.is-word{font-size:24px;white-space:normal;letter-spacing:-.02em;line-height:1.15}
.fhp-btn{
  display:inline-block;padding:17px 28px;border-radius:13px;
  background:var(--fh-ink);color:var(--fh-paper);
  font:700 15px/1 'Onest',sans-serif;text-align:center;text-decoration:none;white-space:nowrap;
}
.fhp-btn:hover{background:var(--fh-violet);color:#fff}
.fhp-note{margin-top:12px;font:400 12px/1.5 'Onest',sans-serif;color:var(--fh-muted);max-width:440px}

/* Креатив: высоту задаёт сама картинка.
   ⚠️ Ни фиксированной пропорции у рамки, ни object-fit — баннеры банков бывают
   и 16:9, и 4:3. При заданной пропорции сверху и снизу оставались белые поля,
   картинка выглядела вклеенной; при обрезке пропадала юридическая маркировка,
   а она напечатана внизу креатива и должна читаться целиком. */
.fhp-shot{border:2px solid var(--fh-ink);border-radius:20px;overflow:hidden;background:var(--fh-paper)}
.fhp-shot img{display:block;width:100%;height:auto}

/* ── Тело ───────────────────────────────────────────── */
.fhp-body{
  display:grid;grid-template-columns:1fr 336px;gap:28px;
  padding:30px 32px 36px;align-items:start;
}
.fhp-main{min-width:0;max-width:780px}
.fhp-h2{margin:0 0 18px;font:800 28px/1.15 'Unbounded',sans-serif;letter-spacing:-.03em;color:var(--fh-ink)}
.fhp-h2.is-next{margin-top:34px}

.fhp-steps{display:flex;flex-direction:column;gap:14px}
.fhp-step{
  display:grid;grid-template-columns:46px 1fr;gap:16px;align-items:start;
  padding:18px 20px;border:2px solid var(--fh-ink);border-radius:16px;
}
.fhp-step-num{
  width:46px;height:46px;border-radius:999px;background:var(--fh-acid);
  border:2px solid #0A0A0A;color:#0A0A0A;
  display:flex;align-items:center;justify-content:center;
  font:900 19px/1 'Unbounded',sans-serif;
}
.fhp-step-text{font:500 16.5px/1.5 'Onest',sans-serif;color:var(--fh-ink)}
.fhp-step-link{
  display:inline-block;margin-top:9px;
  font:700 13.5px/1 'Onest',sans-serif;color:var(--fh-violet);text-decoration:underline;
}

.fhp-text{font:400 17px/1.6 'Onest',sans-serif;color:var(--fh-ink);max-width:720px}
.fhp-text p{margin:0 0 14px}
.fhp-text a{color:var(--fh-violet)}
.fhp-text img{max-width:100%;height:auto;border-radius:14px}
.fhp-text ul{margin:0 0 14px;padding-left:20px}

.fhp-terms{margin-top:34px;padding:26px;border:2px solid var(--fh-ink);border-radius:var(--fhp-radius);background:var(--fh-bg)}
.fhp-terms .fhp-h2{font-size:22px;margin-bottom:16px}
.fhp-terms-list{display:flex;flex-direction:column;gap:12px}
.fhp-term{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:start}
.fhp-term i{width:8px;height:8px;margin-top:8px;border-radius:999px;background:var(--fh-violet)}
.fhp-term span{font:400 15.5px/1.55 'Onest',sans-serif;color:var(--fh-ink)}

.fhp-cta{
  margin-top:26px;padding:24px 26px;border:2px solid #0A0A0A;border-radius:var(--fhp-radius);
  background:var(--fh-acid);color:var(--fhp-ink);
  display:grid;grid-template-columns:1fr auto;gap:20px;align-items:center;
}
.fhp-cta-title{font:900 22px/1.15 'Unbounded',sans-serif;letter-spacing:-.03em}
.fhp-cta-sub{margin-top:8px;font:500 14.5px/1.5 'Onest',sans-serif;color:rgba(10,10,10,.72)}
.fhp-cta .fhp-btn{padding:16px 26px;border-radius:14px;white-space:nowrap}

.fhp-guide{margin-top:26px;padding:22px 24px;border:2px dashed rgba(10,10,10,.3);border-radius:var(--fhp-radius)}
.fhp-guide-title{font:800 17px/1.2 'Onest',sans-serif;color:var(--fh-ink)}
.fhp-guide-text{margin-top:8px;font:400 15px/1.55 'Onest',sans-serif;color:var(--fh-muted);max-width:640px}
.fhp-guide-link{display:inline-block;margin-top:12px;font:700 13.5px/1 'Onest',sans-serif;color:var(--fh-violet);text-decoration:underline}

.fhp-similar{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px}
.fhp-scard{
  display:flex;flex-direction:column;gap:11px;padding:18px;
  border:2px solid var(--fh-ink);border-radius:18px;background:var(--fh-paper);
  text-decoration:none;color:var(--fh-ink);
}
.fhp-scard:hover{box-shadow:4px 4px 0 var(--fh-ink)}
.fhp-scard-head{display:flex;align-items:center;gap:10px}
.fhp-scard-tile{
  width:36px;height:36px;border-radius:9px;flex:none;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  font:800 15px/1 'Unbounded',sans-serif;
}
.fhp-scard-tile img{width:100%;height:100%;object-fit:contain;padding:4px;box-sizing:border-box}
.fhp-scard-bank{font:700 13px/1.2 'Onest',sans-serif}
.fhp-scard-value{font:900 30px/1 'Unbounded',sans-serif;letter-spacing:-.04em;white-space:nowrap}
.fhp-scard-value.is-word{font-size:18px;white-space:normal}
.fhp-scard-title{font:600 14px/1.35 'Onest',sans-serif}
.fhp-scard-date{margin-top:auto;font:700 11.5px/1 'Onest',sans-serif;color:#E8391B}

/* ── Сайдбар ────────────────────────────────────────── */
.fhp-side{display:flex;flex-direction:column;gap:16px;position:sticky;top:16px}
.fhp-box{padding:22px;border:2px solid var(--fh-ink);border-radius:var(--fhp-radius);background:var(--fh-paper)}
.fhp-box-title{font:800 15px/1 'Unbounded',sans-serif;letter-spacing:-.02em;color:var(--fh-ink);margin-bottom:14px}
.fhp-facts{display:flex;flex-direction:column;gap:11px;font:500 13.5px/1.4 'Onest',sans-serif}
.fhp-fact{display:flex;justify-content:space-between;gap:12px;padding-bottom:11px;border-bottom:2px solid var(--fh-line)}
.fhp-fact:last-child{padding-bottom:0;border-bottom:0}
.fhp-fact b{font-weight:800;color:var(--fh-ink);text-align:right}
.fhp-fact span{color:var(--fh-muted)}

.fhp-box.is-acid{background:var(--fh-acid);border-color:#0A0A0A;color:var(--fhp-ink)}
.fhp-push-title{font:900 20px/1.1 'Unbounded',sans-serif;letter-spacing:-.03em}
.fhp-push-text{margin-top:9px;font:500 13.5px/1.5 'Onest',sans-serif;color:rgba(10,10,10,.72)}
.fhp-push-actions{margin-top:15px;display:flex;flex-direction:column;gap:9px}
.fhp-push-btn,.fhp-push-tg{
  display:block;padding:14px 16px;border-radius:12px;
  font:700 13.5px/1 'Onest',sans-serif;text-align:center;text-decoration:none;cursor:pointer;
  border:2px solid #0A0A0A;
}
.fhp-push-btn{background:#0A0A0A;color:#fff}
.fhp-push-tg{background:#fff;color:#0A0A0A}

.fhp-side-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:14px}
.fhp-side-head .fhp-box-title{margin:0;font-size:17px}
.fhp-side-all{font:600 12px/1 'Onest',sans-serif;color:var(--fh-violet);text-decoration:underline;white-space:nowrap}
.fhp-exp{display:flex;flex-direction:column;gap:12px}
.fhp-exp a{display:block;padding-bottom:12px;border-bottom:2px solid var(--fh-line);text-decoration:none}
.fhp-exp a:last-child{padding-bottom:0;border-bottom:0}
.fhp-exp-title{font:600 13.5px/1.35 'Onest',sans-serif;color:var(--fh-ink)}
.fhp-exp-date{margin-top:5px;font:800 11.5px/1 'Onest',sans-serif;color:#E8391B}

/* ── Акция завершена ────────────────────────────────── */
.fhp-expired{
  display:flex;flex-wrap:wrap;align-items:center;gap:14px;
  padding:14px 32px;background:#0A0A0A;color:#fff;
  font:700 14px/1.3 'Onest',sans-serif;
}
.fhp-expired a{color:var(--fh-acid);text-decoration:underline}

/* ── Тёмная тема (экран p6) ─────────────────────────────
   Правило макета: лаймовые блоки остаются лаймовыми с тёмным текстом,
   а чёрные заливки становятся лаймовыми. */
[data-theme="dark"] .fhp-scard,
[data-theme="dark"] .fhp-box:not(.is-acid){background:var(--fh-paper)}
[data-theme="dark"] .fhp-note{color:var(--fh-muted)}
[data-theme="dark"] .fhp-btn{background:var(--fh-acid);color:#0A0A0A}
[data-theme="dark"] .fhp-btn:hover{background:#fff;color:#0A0A0A}
[data-theme="dark"] .fhp-expired{background:var(--fh-paper);color:var(--fh-ink)}

@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .fhp-scard,
  :root:not([data-theme="light"]) .fhp-box:not(.is-acid){background:var(--fh-paper)}
  :root:not([data-theme="light"]) .fhp-btn{background:var(--fh-acid);color:#0A0A0A}
}

/* ── Телефон (экран p5): сайдбар полосами под текстом,
      действие липкое внизу ──────────────────────────── */
@media (max-width:1100px){
  .fhp-hero{grid-template-columns:1fr;column-gap:0;row-gap:22px;grid-template-areas:"info" "shot" "offer"}
  .fhp-body{grid-template-columns:1fr}
  .fhp-side{position:static}
  .fhp-similar{grid-template-columns:1fr 1fr}
}

@media (max-width:768px){
  .fhp-crumbs{padding:12px 16px}
  .fhp-hero{padding:22px 16px 24px}
  .fhp-title{font-size:30px;letter-spacing:-.03em}
  .fhp-lead{font-size:15.5px}
  .fhp-value{font-size:38px}
  .fhp-body{padding:22px 16px 28px;gap:20px}
  .fhp-h2{font-size:22px}
  .fhp-step{grid-template-columns:38px 1fr;gap:12px;padding:15px 16px}
  .fhp-step-num{width:38px;height:38px;font-size:16px}
  .fhp-step-text{font-size:15.5px}
  .fhp-text{font-size:16px}
  .fhp-terms{padding:20px}
  .fhp-cta{grid-template-columns:1fr;gap:14px}
  .fhp-cta .fhp-btn{width:100%;box-sizing:border-box}
  .fhp-similar{grid-template-columns:1fr}
  .fhp-expired{padding:12px 16px;font-size:13px}

  /* Липкая кнопка: на телефоне карточка с действием уезжает вверх экрана,
     а решение принимают внизу страницы. */
  .fhp-sticky{
    position:fixed;left:0;right:0;bottom:0;z-index:60;
    padding:10px 16px calc(10px + env(safe-area-inset-bottom));
    background:var(--fh-paper);border-top:2px solid var(--fh-ink);
    display:flex;gap:10px;align-items:center;
  }
  .fhp-sticky .fhp-value{font-size:22px;flex:none}
  .fhp-sticky .fhp-btn{flex:1 1 auto;padding:14px}
  body.fhp-has-sticky{padding-bottom:78px}
}
@media (min-width:769px){ .fhp-sticky{display:none} }

/* Плашка статуса подписки на этой странице не показывается: её место занял
   блок «Выгоды первыми» в сайдбаре, а кнопка там — пульт к этой же плашке.
   Из разметки не убираем — с ней работает pwa-subscribe.js. */
.fh-substatus-single{display:none}
