/* 29.11.2026: общие доработки для всех страниц (карточки-ссылки, форма заявки, нижняя панель связи, cookie, анимации) */

/* карточки, ставшие ссылками */
a.op-card, a.news-card { display: block; color: inherit; text-decoration: none; }
a.dl { color: inherit; text-decoration: none; }
a.op-card:focus-visible, a.news-card:focus-visible, a.dl:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }

/* анимации появления: контент видим без JS и при «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-children] > *, .hero h1 .ln span, .alert-stamp {
    opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important;
  }
  html { scroll-behavior: auto; }
}

/* длинные слова в заголовках не вылезают за экран телефона */
.sp-title, h1 { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 480px) { .sp-title { font-size: clamp(22px, 7.2vw, 32px); } }

/* форма заявки → /api/send */
.lf-hp { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.lf-consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-size: 12.5px; line-height: 1.5; color: var(--fg2); cursor: pointer; text-align: left; text-transform: none; letter-spacing: 0; font-family: inherit; }
.lf-consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--amber); cursor: pointer; }
.lf-consent a { color: var(--amber); text-decoration: underline; text-underline-offset: 2px; }
.cf-turnstile { margin: 4px 0 12px; min-height: 0; }
form [type=submit]:disabled { opacity: .65; cursor: progress; }
.lf-status:empty { display: none; }
.lf-status { margin-top: 12px; font-size: 13px; line-height: 1.55; }
.lf-status.form-err { padding: 12px 14px; border: 1px solid var(--red, #a8322d); background: rgba(168,50,45,.12); color: var(--fg); text-align: center; }
.lf-msgr { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.lf-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; font-size: 13px; font-weight: 600; text-decoration: none; color: #fff !important; border-radius: 2px; }
.lf-wa { background: #1b7a45; } .lf-wa:hover { background: #155f36; }
.lf-tg { background: #1d6fa5; } .lf-tg:hover { background: #175a86; }
.form-success { display: flex; flex-direction: column; gap: 8px; padding: 22px 18px; border: 1px solid var(--green2, #6f9a54); background: rgba(111,154,84,.10); color: var(--fg); font-size: 14px; line-height: 1.6; text-align: center; }
.form-success strong { font-family: 'Oswald', sans-serif; font-size: 18px; letter-spacing: .03em; text-transform: uppercase; color: var(--fg); }
.form-success:focus { outline: none; }
.lf-ref { font-variant-numeric: tabular-nums; }

/* нижняя панель связи на телефоне: одна строка, до 64px */
.mbar { display: none; }
@media (max-width: 900px) {
  .mbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    display: flex; gap: 8px; align-items: center;
    box-sizing: border-box; height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(11,14,15,.96); border-top: 1px solid var(--olive-dk, #4a5a3c);
  }
  .mbar a {
    flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 500; letter-spacing: .04em;
    text-decoration: none; color: #fff; border-radius: 2px;
  }
  .mbar a svg { width: 18px; height: 18px; flex: none; fill: currentColor; }
  .mbar .mb-tg { background: #1d6fa5; }
  .mbar .mb-wa { background: #1b7a45; }
  body.has-mbar { padding-bottom: calc(60px + 16px + env(safe-area-inset-bottom, 0px)); }
  body.menu-open .mbar { display: none; }
}

/* cookie: компактно, до 80px; при видимой панели связи — над ней */
.ck-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 950;
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: nowrap;
  padding: 10px 16px; max-height: 80px; box-sizing: border-box;
  background: #0b0e0f; border-top: 1px solid var(--line2, #3a4046);
  color: var(--fg2, #b9b6ab); font-size: 12.5px; line-height: 1.4;
}
.ck-bar[hidden] { display: none !important; }
.ck-bar a { color: var(--amber, #d4a73c); text-decoration: underline; text-underline-offset: 2px; }
.ck-bar .ck-btns { display: flex; gap: 8px; flex: none; }
.ck-bar button {
  min-height: 36px; padding: 6px 12px; font: 600 12px/1 'JetBrains Mono', monospace; letter-spacing: .03em;
  border: 1px solid var(--amber, #d4a73c); cursor: pointer; white-space: nowrap; border-radius: 2px;
}
.ck-bar .ck-yes { background: var(--amber, #d4a73c); color: #14181a; }
.ck-bar .ck-no { background: transparent; color: var(--amber, #d4a73c); }
@media (max-width: 900px) {
  .ck-bar { bottom: calc(60px + env(safe-area-inset-bottom, 0px)); padding: 8px 12px; gap: 10px; font-size: 11.5px; }
  .ck-bar .ck-btns { flex-direction: column; gap: 6px; }
  .ck-bar button { min-height: 28px; padding: 5px 10px; font-size: 11px; }
}
/* страницы без нижней панели (печатные чек-листы) */
body:not(.has-mbar) .ck-bar { bottom: 0; }
@media print { .ck-bar, .mbar { display: none !important; } body.has-mbar { padding-bottom: 0; } }
