/* Mobile adaptation safe overrides (non-desktop) */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
  height: auto;
}

* {
  box-sizing: border-box;
}

@media (max-width: 767px) {
  :root {
    --mobile-side-gap: 14px;
  }

  html,
  body {
    width: 100% !important;
    min-width: 0 !important;
  }

  body,
  .area,
  .section,
  .container,
  .cont,
  .wrapper1,
  .wrapper2,
  .grid,
  .gridwrap,
  .col,
  .cell {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .area,
  .section,
  .container,
  .cont,
  .wrapper1,
  .wrapper2,
  .grid,
  .gridwrap {
    padding-left: var(--mobile-side-gap) !important;
    padding-right: var(--mobile-side-gap) !important;
  }

  .container,
  .cont,
  .gridwrap {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .grid,
  .gridwrap {
    display: block !important;
  }

  .grid .col,
  .gridwrap .col,
  .col[style] {
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .cont .cont,
  .wrapper1 .wrapper1,
  .wrapper2 .wrapper2 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .widget-text .text,
  .cr-text,
  .textable,
  .p {
    font-size: clamp(14px, 3.8vw, 17px) !important;
    line-height: 1.45 !important;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .font-header,
  .widget-text h1,
  .widget-text h2,
  .widget-text h3,
  .widget-text h4,
  .widget-text h5,
  .widget-text h6 {
    line-height: 1.15 !important;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .widget-text h1,
  .widget-text h1 span,
  .widget-text h1 strong {
    font-size: clamp(28px, 8.2vw, 36px) !important;
    line-height: 1.12 !important;
    letter-spacing: 0.01em !important;
  }

  .widget-text h2,
  .widget-text h2 span,
  .widget-text h2 strong {
    font-size: clamp(24px, 7vw, 32px) !important;
    line-height: 1.15 !important;
  }

  .widget-text h3,
  .widget-text h3 span,
  .widget-text h3 strong {
    font-size: clamp(17px, 4.8vw, 22px) !important;
    line-height: 1.25 !important;
  }

  .widget-text p,
  .widget-text p span,
  .widget-text p strong {
    font-size: clamp(15px, 4.2vw, 19px) !important;
    line-height: 1.35 !important;
  }

  /* Первый экран PlatformaLP: убираем десктопные гигантские размеры на телефоне. */
  .node15 span,
  .node15 strong {
    font-size: clamp(28px, 8.2vw, 38px) !important;
    line-height: 1.12 !important;
  }

  .node16 span,
  .node16 strong {
    font-size: clamp(18px, 5vw, 23px) !important;
    line-height: 1.3 !important;
  }

  .node17 .grid,
  .node17 .gridwrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    align-items: center !important;
  }

  .node17 .col {
    width: 100% !important;
  }

  .node17 .bgimage {
    height: 34px !important;
    margin-bottom: 4px !important;
  }

  .node17 h3,
  .node17 h3 span {
    font-size: 16px !important;
    line-height: 1.25 !important;
  }

  .node27 .body,
  .node27 .outer,
  .node27 .inner,
  .macros-form .body {
    width: 100% !important;
    max-width: 100% !important;
  }

  .node28 p:first-child span,
  .node28 p:first-child strong {
    font-size: clamp(26px, 7.6vw, 34px) !important;
    line-height: 1.1 !important;
  }

  .node28 p:nth-child(2) span,
  .node28 p:nth-child(2) strong {
    font-size: clamp(16px, 4.5vw, 20px) !important;
    line-height: 1.3 !important;
  }

  .btn,
  .btn-legacy,
  button,
  input[type="button"],
  input[type="submit"] {
    min-height: 44px;
    font-size: 16px !important;
    line-height: 1.2;
    white-space: normal;
    padding: 12px 16px !important;
  }

  .button-wrapper,
  .button-container,
  .widget-button,
  .widget-button .btn,
  .widget-button .btn-legacy,
  .widget-image,
  .widget-image img,
  .bgimage {
    max-width: 100% !important;
  }

  .input,
  .form-control,
  input,
  textarea,
  select {
    min-height: 44px;
    font-size: 16px !important;
  }

  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  iframe {
    width: 100% !important;
    min-width: 0 !important;
  }

  .xs-none {
    display: none !important;
  }
}

@media (max-width: 414px) {
  :root {
    --mobile-side-gap: 12px;
  }

  .btn,
  .btn-legacy,
  button,
  input[type="button"],
  input[type="submit"] {
    font-size: 15px !important;
    padding: 11px 14px !important;
  }
}
