/* Общие доработки po-plan.ru (07.11.2026): главная и страницы кейсов.
   Подключается после встроенных стилей страницы, поэтому перекрывает их без !important там,
   где хватает порядка. */

/* ── Шапка-док: логотип кликается ──
   Меню растянуто на всю ширину шапки и перекрывало логотип: клик по «по плану» попадал в меню. */
.dock .dock-menu { pointer-events: none !important; }
.dock.is-live .dock-menu a { pointer-events: auto; }
.dock-logo { z-index: 3; }

/* ── Частые вопросы: ответы на всю ширину, плавное раскрытие (site-ui.js) ── */
.faq-a p { max-width: none; }
.faq-item[open] .faq-a { animation: none !important; }
.faq-anim { overflow: hidden; }
.faq-item > summary { transition: color .25s ease; }

/* ── Способ связи в формах: Telegram / MAX / Звонок ── */
.way-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.way {
  flex-direction: row !important; justify-content: center; gap: 9px !important;
  min-height: 48px; padding: 10px 12px !important; border-radius: 14px !important;
  border: 1px solid rgba(10, 15, 26, .12) !important; background: #F4F2EF !important;
  transition: background .25s ease, border-color .25s ease, transform .2s ease !important;
}
.way:hover { border-color: rgba(10, 15, 26, .28) !important; transform: translateY(-1px); }
.way-ico { width: 22px; height: 22px; justify-content: center; align-items: center; }
.way-ico svg { width: 20px !important; height: 20px !important; }
.way-lbl { font-size: 13.5px !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important; color: #201E1E !important; }
.way:has(input:checked) { background: #201E1E !important; border-color: #201E1E !important; }
.way:has(input:checked) .way-ico svg, .way:has(input:checked) .way-lbl { color: #F6F5F3 !important; }
.way:has(input:focus-visible) { outline: 2px solid #201E1E; outline-offset: 2px; }
@media (max-width: 420px) {
  .way { flex-direction: column !important; gap: 5px !important; min-height: 64px; }
}

/* ── «Понравился сайт?» в окне кейса: ровная строка значков ── */
.cm-cta-row { flex-wrap: nowrap !important; }
.cm-soc { flex: 0 0 auto; width: 48px !important; height: auto !important; min-height: 46px; padding: 0 !important;
  display: inline-flex !important; align-items: center; justify-content: center; border-radius: 12px !important; }
.cm-soc svg { width: 20px !important; height: 20px !important; }

/* ── Окно кейса на телефоне: компактная шапка, без блока заявки ── */
@media (max-width: 900px) {
  .cm-cta { display: none !important; }
  .cm-head { margin-bottom: 18px !important; }
  .cm-toprow { margin-bottom: 12px !important; gap: 10px !important; align-items: center !important; }
  .cm-tags { gap: 6px !important; flex-wrap: nowrap !important; min-width: 0; overflow: hidden; }
  .cm-tag { font-size: 11.5px !important; padding: 5px 10px !important; border-radius: 8px !important; }
  .cm-top-acts .cm-btn--sm { padding: 6px 11px !important; font-size: 12px !important; border-radius: 9px !important; }
  .cm-title { font-size: 26px !important; margin-bottom: 4px !important; }
  .cm-subtitle { font-size: 14.5px !important; line-height: 1.45 !important; margin: 0 !important; }
  .cm-facts { margin-top: 14px !important; }
  .cm-fact { padding: 10px 0 !important; gap: 8px !important; }
  .cm-fact + .cm-fact { padding-left: 12px !important; }
  .cm-fact-ico svg { width: 16px !important; height: 16px !important; }
  .cm-fact-k { display: none !important; }
  .cm-fact-v { font-size: 13.5px !important; font-weight: 600 !important; }
  .cm-stack { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; gap: 6px !important;
    margin: 12px -2px 0 !important; padding: 0 2px 2px !important; }
  .cm-stack::-webkit-scrollbar { display: none; }
  .cm-stack__chip { flex: none; height: 30px !important; padding: 0 10px !important; font-size: 12px !important; border-radius: 8px !important; }
  .cm-stack__chip img { height: 15px !important; }
  .cm-stack__chip img.is-wide { height: 9px !important; }
}

/* ── Контакты: телефон первым ── */
.contact-way--phone span { font-weight: 600; }

/* ── Подвал (по мотивам dterra.ru): слева большая «Оставить заявку» и контакты, справа колонки ссылок ── */
.site-foot { background: #0E0D0D !important; color: #F6F5F3; padding: clamp(56px, 7vw, 104px) clamp(20px, 5vw, 88px) clamp(28px, 3vw, 40px) !important; }
.site-foot__in { display: block !important; }
.sf-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 80px); align-items: start; }
.sf-lead { display: flex; flex-direction: column; align-items: flex-start; }
.sf-kicker { font-size: 15px; font-weight: 500; color: rgba(246, 245, 243, .9); margin: 0 0 10px; }
.sf-lead .foot-cta { display: block; padding: 0 !important; margin: 0; border: 0; background: none !important; color: #F6F5F3 !important;
  font-family: "Manrope", sans-serif; font-weight: 500 !important; font-size: clamp(42px, 4.6vw, 72px) !important; line-height: .98; letter-spacing: -.045em;
  white-space: normal !important; max-width: 5.6em; word-spacing: 100vw;
  text-align: left; text-transform: none; cursor: pointer; box-shadow: none !important; transform: none !important; transition: opacity .2s ease; }
.sf-lead .foot-cta::first-letter { text-transform: uppercase; }
.sf-lead .foot-cta::after { display: none; }
.sf-lead .foot-cta:hover { opacity: .72; }
.sf-note { margin: 18px 0 0; max-width: 340px; font-size: 15.5px; line-height: 1.5; color: rgba(246, 245, 243, .78); }
.sf-direct { display: flex; flex-direction: column; gap: 6px; margin-top: 26px; }
.sf-direct a { color: #F6F5F3; text-decoration: none; font-size: 16px; width: fit-content; transition: opacity .2s ease; }
.sf-direct a:hover { opacity: .7; }
.sf-direct a.sf-phone { font-size: clamp(20px, 1.7vw, 24px); font-weight: 500; letter-spacing: -.02em; }
.sf-direct .sf-im { display: inline-flex; align-items: center; gap: 7px; }
.sf-direct .sf-im svg { width: 15px; height: 15px; }
.sf-col { display: flex; flex-direction: column; min-width: 0; }
.sf-h { font-size: 16px; font-weight: 600; color: #F6F5F3; letter-spacing: -.01em; margin: 0 0 12px; text-decoration: none; }
a.sf-h:hover { opacity: .75; }
.sf-col .sf-h:not(:first-child) { margin-top: 26px; }
.sf-col > a:not(.sf-h) { color: rgba(246, 245, 243, .78); text-decoration: none; font-size: 14.5px; line-height: 1.4; padding: 5px 0; width: fit-content; transition: color .2s ease; }
.sf-col > a:not(.sf-h):hover { color: #F6F5F3; }
.sf-bottom { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr); gap: 24px clamp(36px, 5vw, 80px);
  align-items: end; margin-top: clamp(56px, 7vw, 96px); }
.sf-bottom .foot-logo { color: #F6F5F3; text-decoration: none; }
.site-foot .foot-logo { font-size: clamp(25px, 2.25vw, 32px) !important; gap: .34em !important; display: inline-flex; align-items: center; letter-spacing: -.04em; }
.site-foot .foot-logo__smile { height: .78em !important; width: 1.105em !important; display: inline-flex; }
.site-foot .foot-logo__smile svg { width: 100%; height: 100%; display: block; }
.site-foot .foot-logo__word { font-size: 28px !important; margin-top: -7px !important; }
.sf-copy { margin-top: 14px; font-size: 13px; color: rgba(246, 245, 243, .5); }
.sf-req { font-size: 13px; line-height: 1.6; color: rgba(246, 245, 243, .55); }
.sf-req b { color: rgba(246, 245, 243, .85); font-weight: 600; }
.sf-req .foot-accred { display: flex; margin-top: 8px !important; font-size: 13px; }
.sf-req .org-btn { margin-top: 14px !important; }
.sf-legal { display: flex; flex-direction: column; gap: 6px; }
.sf-legal a { font-size: 13px; color: rgba(246, 245, 243, .55); text-decoration: none; width: fit-content; transition: color .2s ease; }
.sf-legal a:hover { color: #F6F5F3; }
.sf-legal-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.sf-top-btn { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(246, 245, 243, .35); background: none; color: #F6F5F3;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s ease, color .2s ease; }
.sf-top-btn:hover { background: #F6F5F3; color: #0E0D0D; }
.sf-top-btn svg { width: 20px; height: 20px; }
@media (max-width: 1000px) {
  .sf-grid { grid-template-columns: 1fr 1fr; }
  .sf-lead { grid-column: 1 / -1; }
  .sf-bottom { grid-template-columns: 1fr 1fr; }
  .sf-bottom > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .sf-grid, .sf-bottom { grid-template-columns: 1fr; }
  .sf-bottom { gap: 26px; }
}

/* ── Плавающие кнопки связи не лезут поверх окон кейса, заявки и реквизитов ── */
body.case-open .cw,
body:has(.modal-overlay.is-open) .cw,
body:has(#orgModal.is-open) .cw,
body:has(.msg-popup[aria-hidden="false"]) .cw { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }

/* ── Первый экран на телефоне: меню по центру, «делаем сайты по плану» ниже меню ── */
@media (max-width: 600px) {
  .nh-top { justify-content: center; padding-top: 6px; }
  .nh-top__pad, .nh-top__lk { display: none !important; }
  .nh-nav { flex: 0 1 auto !important; justify-content: center !important; gap: 22px !important; }
  .nh-nav__link { font-size: 14px !important; }
  .nh-main { padding-top: 34px; }
}

/* ── Окно кейса на телефоне: на весь экран ── */
@media (max-width: 900px) {
  .case-modal { padding: 0 !important; align-items: stretch !important; }
  .case-modal-card { width: 100% !important; max-width: none !important; height: 100vh !important; height: 100dvh !important;
    max-height: none !important; border-radius: 0 !important; }
  .case-modal-shot { flex: 0 0 44dvh !important; }
  .cm-toprow { flex-wrap: wrap !important; }
  .cm-tags { overflow: visible !important; }
}

/* ── Страница кейса: «Назад к кейсам» (на телефоне вместо хлебных крошек) ── */
.cp-back { display: none; }
@media (max-width: 900px) {
  .cp-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 18px; padding: 10px 16px 10px 11px;
    border-radius: 100px; background: #EDEAE5; color: #201E1E; font-size: 15px; font-weight: 600; text-decoration: none;
    -webkit-tap-highlight-color: transparent; transition: background .2s ease; }
  .cp-back:active { background: #E2DDD5; }
  .cp-back svg { width: 18px; height: 18px; }
  .cp .cp-crumbs { display: none; }
}

/* ── «Нам доверяют»: бегущая строка логотипов клиентов (порядок как в кейсах) ── */
.trust { position: relative; z-index: 1; padding: clamp(40px, 6vh, 72px) 0 clamp(20px, 3vh, 36px); }
.trust__label { padding: 0 clamp(20px, 5vw, 88px); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px;
  letter-spacing: .12em; text-transform: uppercase; color: #8f8e89; }
.trust__track { overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.trust__belt { display: flex; width: max-content; animation: trustMove 70s linear infinite; }
.trust__track:hover .trust__belt { animation-play-state: paused; }
.trust__set { display: flex; align-items: center; flex: none; }
.trust__set img { display: block; width: auto; margin-right: clamp(48px, 6vw, 88px); filter: invert(1); opacity: .45; transition: opacity .25s ease; }
.trust__set img:hover { opacity: 1; }
@keyframes trustMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 700px) { .trust__set { zoom: .6; } .trust__set img { margin-right: 64px; } }
@media (prefers-reduced-motion: reduce) { .trust__belt { animation: none; } }

/* ── «Почему „По Плану“» (по мотивам блока преимуществ dterra.ru) ── */
.adv { background: var(--bg, #F9F7F7); padding: clamp(70px, 9vh, 120px) clamp(20px, 5vw, 88px) clamp(30px, 4vh, 50px); }
.adv__title { margin: 0 0 clamp(36px, 5vh, 64px) !important; }
.adv__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(36px, 5vh, 64px) clamp(28px, 4vw, 64px); }
.adv__item { display: flex; flex-direction: column; min-width: 0; }
.adv__ic { width: 44px; height: 44px; color: #0A0F1A; stroke-width: 1.6; margin-bottom: 24px; transition: transform .6s cubic-bezier(.34, 1.56, .64, 1); }
.adv__item:hover .adv__ic { transform: rotate(-12deg) scale(1.06); }
.adv__t { margin: 0; padding-top: 22px; border-top: 1px solid rgba(10, 15, 26, .14); font-family: "Manrope", sans-serif;
  font-size: clamp(17px, 1.35vw, 20px); font-weight: 600; letter-spacing: -.015em; line-height: 1.3; color: #0A0F1A; }
.adv__d { margin: 12px 0 0; font-size: clamp(14.5px, 1.1vw, 16px); line-height: 1.55; color: var(--fg-soft, #4a4642); max-width: 400px; }
@media (max-width: 900px) { .adv__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .adv__grid { grid-template-columns: 1fr; gap: 34px; } .adv__ic { width: 38px; height: 38px; margin-bottom: 16px; } .adv__t { padding-top: 16px; } }
