/* ════════════════════════════════════════════════════════
   footer-mobile.css — подвал на телефоне (собирает footer-mobile.js):
   телефон и мессенджеры сверху, ниже — раскрывающиеся разделы.
   На компьютере и планшете — прежний подвал в колонки.
   ════════════════════════════════════════════════════════ */
.sfm { display: none; }

@media (max-width: 640px) {
  .site-footer .sf2 { display: none !important; }
  .sfm {
    display: block; position: relative; z-index: 2;
    padding: 30px 20px 72px;
    font-family: var(--font-sans, "Manrope", sans-serif);
  }

  .sfm-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .sfm-phone {
    font-family: var(--font-sans, "Manrope", sans-serif); font-weight: 500;
    font-size: clamp(15px, 5vw, 20px); letter-spacing: .01em; line-height: 1; white-space: nowrap;
    color: #fff; text-decoration: none;
  }
  .sfm-icons { display: flex; gap: 6px; flex: 0 0 auto; }
  .sfm-icon {
    width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255, 255, 255, .28); color: #fff; text-decoration: none;
    transition: background .25s, border-color .25s;
  }
  .sfm-icon:active { background: #E7385A; border-color: #E7385A; }
  .sfm-icon svg { width: 15px; height: 15px; }
  .sfm-hours { margin: 10px 0 0; font-size: 12px; color: rgba(255, 255, 255, .5); }

  .sfm-acc { margin-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); }
  .sfm-sec { border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .sfm-sec__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 0; cursor: pointer; list-style: none;
    font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: #fff;
    -webkit-tap-highlight-color: transparent;
  }
  .sfm-sec__head::-webkit-details-marker { display: none; }
  .sfm-sec__plus { width: 12px !important; height: 12px !important; }
  .sfm-sec__plus { position: relative; width: 14px; height: 14px; flex: 0 0 auto; transition: transform .3s ease; }
  .sfm-sec__plus::before, .sfm-sec__plus::after {
    content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; margin-top: -.5px; background: currentColor;
  }
  .sfm-sec__plus::after { transform: rotate(90deg); }
  .sfm-sec[open] .sfm-sec__plus { transform: rotate(45deg); }
  .sfm-sec[open] .sfm-sec__body { animation: sfmIn .35s ease; }
  @keyframes sfmIn { from { opacity: 0; transform: translateY(-4px); } }

  .sfm-sec__body { padding: 0 0 18px; }
  .sfm-links { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 16px; }
  .sfm-links--one { grid-template-columns: 1fr; }
  .sfm-links a { font-size: 13.5px; line-height: 1.35; color: rgba(255, 255, 255, .72); text-decoration: none; }
  .sfm-links a:active { color: #fff; }
  .sfm-links .sf2-badge { margin-left: 4px; }
  .sfm-text { display: flex; flex-direction: column; gap: 8px; }
  .sfm-addr { font-size: 14px; color: #fff; text-decoration: none; }
  .sfm-note { margin: 0; font-size: 12.5px; line-height: 1.55; color: rgba(255, 255, 255, .55); }
  .sfm-route { margin-top: 4px; font-size: 13px; color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 4px; }
  .sfm-form { margin-top: 6px; }
  .sfm-form .sf2-sub__label { display: none; }
  .sfm-form .sf2-form { max-width: none; }

  .sfm-foot { margin: 16px 0 0; font-size: 10px; line-height: 1.5; color: rgba(255, 255, 255, .38); }
}
@media (max-width: 640px) { .site-footer .footer-giraffe { pointer-events: none; } }

/* Документы — заметные кнопки; внизу только «Разработчик» во всю ширину */
@media (max-width: 640px) {
  .sfm-docs { display: flex; flex-direction: column; gap: 8px; padding: 2px 0 16px; }
  .sfm-doc {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 12px;
    background: rgba(255, 255, 255, .05); color: #fff !important; text-decoration: none !important;
    font-size: 12px; letter-spacing: .03em; -webkit-tap-highlight-color: transparent;
    transition: background .2s ease, border-color .2s ease;
  }
  .sfm-doc::after { content: "→"; opacity: .55; font-size: 13px; }
  .sfm-doc:active { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .35); }
  .sfm-docs__copy { margin: 6px 0 0; font-size: 10.5px; color: rgba(255, 255, 255, .4); }

  .site-footer .footer-copy, .site-footer .footer-legal > :not(.sf2-dev) { display: none !important; }
  .site-footer .footer-legal { display: block !important; width: 100% !important; padding: 0 !important; margin: 0 !important; }
  .site-footer .footer-legal .sf2-dev {
    display: flex !important; align-items: center; justify-content: center; gap: 7px;
    width: 100% !important; box-sizing: border-box; margin: 0 !important; padding: 8px 14px !important;
    border-radius: 10px !important; font-size: 10.5px !important; letter-spacing: .12em !important;
    color: rgba(255, 255, 255, .72) !important;
    background: rgba(255, 255, 255, .04) !important;
    border: 1px solid rgba(255, 255, 255, .55) !important;
  }
  .site-footer .footer-legal .sf2-dev:active { background: rgba(231, 56, 90, .14) !important; color: #fff !important; }
  .site-footer .footer-bottom { padding-top: 16px !important; padding-bottom: 18px !important; }
}

/* жираф в конце пути выходит за правый край — обрезаем по подвалу, чтобы
   на iPhone страницу нельзя было сдвинуть вбок; форма звонка чуть компактнее */
.site-footer { overflow-x: clip; }
@supports not (overflow: clip) { .site-footer { overflow-x: hidden; } }
@media (max-width: 640px) {
  .sfm-note { font-size: 11.5px !important; line-height: 1.5 !important; }
  .sfm-form .sf2-form { gap: 8px !important; min-width: 0 !important; }
  .sfm-form .sf2-input { height: 44px !important; min-width: 0 !important; flex: 1 1 auto !important; width: auto !important; padding: 0 14px !important; }
  .sfm-form .sf2-send { width: 44px !important; height: 44px !important; flex: 0 0 44px !important; }
  .sfm-form .sf2-consent span, .sfm-form .sf2-consent a { font-size: 10.5px !important; }
}

/* все разделы подвала — одинаковые аккуратные кнопки (как «Документы», компактнее) */
@media (max-width: 640px) {
  .sfm-sec__body { padding-bottom: 14px; }
  .sfm-links, .sfm-links--one { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 6px !important; }
  .sfm-docs { gap: 6px !important; padding: 0 0 14px !important; }
  .sfm-links a, .sfm-doc, .sfm-route, .sfm-addr {
    display: flex !important; align-items: center; justify-content: space-between; gap: 6px;
    min-height: 36px; box-sizing: border-box; padding: 8px 11px !important;
    border: 1px solid rgba(255, 255, 255, .16) !important; border-radius: 10px !important;
    background: rgba(255, 255, 255, .04) !important;
    color: rgba(255, 255, 255, .86) !important; text-decoration: none !important;
    font-size: 11.5px !important; line-height: 1.25 !important; letter-spacing: .02em !important;
    -webkit-tap-highlight-color: transparent; transition: background .2s ease, border-color .2s ease;
  }
  .sfm-links a::after, .sfm-doc::after, .sfm-route::after, .sfm-addr::after { content: "→"; flex: 0 0 auto; opacity: .45; font-size: 11px !important; }
  .sfm-links a:active, .sfm-doc:active, .sfm-route:active, .sfm-addr:active { background: rgba(255, 255, 255, .11) !important; border-color: rgba(255, 255, 255, .32) !important; }
  .sfm-links .sf2-badge { margin-left: auto; margin-right: 4px; }
  /* адрес и часы: адрес и маршрут — кнопки, подписи — мелким текстом между ними */
  .sfm-sec .sfm-text { display: flex; flex-direction: column; gap: 6px; }
  .sfm-sec .sfm-text .sfm-note { margin: 2px 2px; font-size: 11px !important; line-height: 1.45 !important; }
  .sfm-route { color: #fff !important; border-color: rgba(231, 56, 90, .45) !important; justify-content: center !important; }
  .sfm-route::after { content: none; }
}

/* телефон: жираф уходит за правый край — обрезаем по подвалу жёстко
   (overflow: hidden работает во всех версиях Safari), чтобы страницу
   нельзя было сдвинуть вбок */
@media (max-width: 700px) {
  .site-footer { overflow: hidden !important; }
}
