/* Shared phone layout: content determines height, words wrap at language boundaries. */
@media (max-width: 767px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  .heading .heading__title h1,
  .home-page .heading__title h1 {
    font-size: clamp(24px, 6.6vw, 30px);
    line-height: 1.25;
    overflow-wrap: normal;
    word-break: normal;
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 6 3 3;
  }
  .mobile-home__systems { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
  .mobile-home__works { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
  .mobile-home__works a { padding: 12px 14px; gap: 12px; line-height: 1.4; }
  .mobile-home__works a > span { flex: 0 0 auto; }
  .heading__text .mobile-subtitle-sentence { display: block; }
  .heading__text .mobile-subtitle-sentence + .mobile-subtitle-sentence { margin-top: 1.25em; }
  .mobile-home__system { padding: 12px 14px; }
  .mobile-home__icon-row { margin-bottom: 8px; }
  .mobile-home__system strong,
  .mobile-home__works a,
  .mobile-home__complex strong {
    overflow-wrap: normal;
    word-break: normal;
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 6 3 3;
  }
  .mobile-home__system strong { font-size: 17px; line-height: 1.35; }
  .mobile-home__description { margin-top: 4px; font-size: 13px; line-height: 1.45; }
  .services-details__item-title .h3,
  .services-details__item-title h3,
  .articles__item-title .h3,
  .articles__item-title h3,
  .gallery__case-title {
    word-break: normal;
    overflow-wrap: normal;
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 6 3 3;
    line-height: 1.35;
  }
  .services-details__item-in { padding: 20px 18px; }
  .services-details__item-top { height: auto !important; }
  .articles__item-content { padding: 18px 18px 20px; }
  .gallery__case-preview { height: auto; overflow: visible; }
  .gallery__case-preview > img { height: clamp(180px, 55vw, 260px); }
  .gallery__case-card { position: relative; left: auto; bottom: auto; width: 100%; padding: 18px; }
  .gallery__case-title { font-size: 20px; }
  .services__slider .swiper-wrapper { align-items: flex-start; }
  .services__slider.swiper { overflow: hidden; }
  .services__item { height: auto; max-height: none; }
  .services__item-in { height: auto; }
  .services__item-image::before { padding-top: 66.6667%; }
  .services__item-content,
  .services__item.hovered .services__item-content { height: auto; transform: none !important; transition: none; }
  .services__item-visible { height: auto; padding: 12px 16px; }
  .services__item-row--heading {
    height: auto !important;
    min-height: 0;
    gap: 10px;
  }
  .services__item-row:first-child { margin-bottom: 6px; padding-bottom: 0; border-bottom: 0 !important; }
  .services__item-column { min-width: 0; }
  .services__item-icon { flex: 0 0 32px; max-width: 32px; margin-right: 0; }
  .services__item-title .h3,
  .services__item-title h3 {
    font-size: 18px;
    line-height: 1.35;
    overflow-wrap: normal;
    word-break: normal;
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 6 3 3;
  }
  .services__item-title, .services__item-title:hover { color: #020577 !important; }
  .services__item-price { color: #5a6475; margin-top: 4px; font-size: 13px; line-height: 1.4; }
  .services__item-visible > .services__item-row:not(:first-child) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .services__item-link { font-size: 13px; line-height: 1.45; }
  .services__item-link a {
    display: flex;
    align-items: center;
    min-height: 40px;
    color: #33456a;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 6 3 3;
  }
  .services__item-link a::after { display: none; }
  .services__item-link .js-modal-link {
    display: inline-flex; width: auto; padding: 6px 14px;
    border: 1px solid #ccd3e3; border-radius: 3px;
    background: #f4f6fb; color: #020577;
  }
  .services__item-hidden { display: none; height: auto; overflow: visible; padding: 0 18px 16px; }
  .services__item.hovered .services__item-hidden { display: none; }
  .services__item-descr { font-size: 14px; line-height: 1.5; }

  /* All floating contact shortcuts share a single, explicit mobile opener. */
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .mobile-contacts-toggle {
    position: fixed; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 2147483647; min-height: 28px; padding: 3px 10px;
    border: 1px solid #ccd3e3; border-radius: 24px;
    background: #fff; color: #15234d; box-shadow: 0 3px 14px #15234d26;
    font: inherit; font-size: 11px; line-height: 20px;
  }
  body:not(.mobile-contacts-open) .soyuz-contact-dock,
  body:not(.mobile-contacts-open) [data-umnico-logo],
  body:not(.mobile-contacts-open) [data-umnico-loader],
  body:not(.mobile-contacts-open) .dialogai-consultant-widget,
  .soyuz-vk-widget { visibility: hidden !important; pointer-events: none !important; }
  body.mobile-contacts-open .soyuz-contact-dock {
    display: flex !important; visibility: visible !important; pointer-events: auto !important;
    right: 12px !important; bottom: calc(74px + env(safe-area-inset-bottom)) !important;
    width: 180px; padding: 12px 12px 46px; border: 1px solid #ccd3e3;
    border-radius: 16px; background: #fff; box-shadow: 0 4px 24px #15234d33;
  }
  body.mobile-contacts-open .soyuz-contact-dock__links {
    display: grid; grid-template-columns: repeat(3, 44px); gap: 10px; padding: 0;
  }
  body.mobile-contacts-open .soyuz-contact-dock__links a,
  body.mobile-contacts-open .soyuz-contact-dock__links a.soyuz-contact-dock__email {
    position: static; width: 44px; height: 44px; order: initial; font-size: 24px;
  }
  body.mobile-contacts-open .soyuz-contact-dock__links svg,
  body.mobile-contacts-open .soyuz-contact-dock__links a:nth-child(3) svg { width: 24px; height: 24px; }
  body.mobile-contacts-open [data-umnico-logo] {
    visibility: visible !important; pointer-events: auto !important;
    right: 24px !important; bottom: calc(82px + env(safe-area-inset-bottom)) !important;
    min-width: 132px; min-height: 36px;
  }
  body.mobile-contacts-open .dialogai-consultant-widget {
    visibility: visible !important; pointer-events: auto !important;
    right: 24px !important; bottom: calc(254px + env(safe-area-inset-bottom)) !important;
    width: 44px !important; height: 44px !important;
  }
  body .back-top { right: auto !important; left: 12px !important; bottom: calc(12px + env(safe-area-inset-bottom)) !important; width: 40px; height: 40px; background: #ffffffb3 !important; border: 1px solid #87909d; color: #697587; filter: none; }
  body .back-top path { stroke: currentColor; }
  body.menu-open .mobile-contacts-toggle,
  body:has(.modal-block.visible) .mobile-contacts-toggle { visibility: hidden; }
}
@media (min-width: 768px) { .mobile-contacts-toggle { display: none; } }
