img {
  max-width: 100%;
  height: auto;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}


.wsmenu-list > li.is-open > .megamenu {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.wsmenu-list > li.is-open > .wsmenu-submenu {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.wsmenu-list > li:focus-within > .megamenu,
.wsmenu-list > li:focus-within > .wsmenu-submenu {
  display: block;
  opacity: 1;
  visibility: visible;
}


@media screen and (max-width: 1024px) {

  button,
  input[type="submit"],
  input[type="button"],
  .btn,
  a.btn {
    min-height: 44px;
    min-width: 44px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    cursor: pointer;
  }

  .form-order label,
  .form-site label,
  .bottom-form label {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    cursor: pointer;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="search"],
  select,
  textarea,
  .form-control {
    font-size: 16px !important;
  }
}


@media screen and (max-width: 767px) {

  /* --- Партнёры: горизонтальный свайп ---
     :has(> .col-lg-3) отличает партнёров от
     новостей — оба в .container.news, но
     только у партнёров дети .col-lg-3 */

  .container.news .row.justify-content-between:has(> .col-lg-3) {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 12px;
    padding: 16px 0;
    margin: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .container.news .row.justify-content-between:has(> .col-lg-3)::-webkit-scrollbar {
    display: none;
  }

  .container.news .row.justify-content-between > .col-sm-4.col-lg-3 {
    flex: 0 0 160px !important;
    max-width: 160px !important;
    width: 160px !important;
    padding: 0 !important;
    scroll-snap-align: start;
  }

  .container.news .row.justify-content-between > .col-lg-3 .item {
    margin-bottom: 0;
  }

  .container.news .row.justify-content-between > .col-lg-3 .item img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  /* --- Форма заказа: табы в стек --- */

  .form-order .nav-tabs {
    flex-direction: column;
  }

  .form-order .nav-tabs .nav-link {
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    border-radius: 0;
  }

  .form-site textarea.form-control {
    min-height: 100px;
  }
}


@media screen and (max-width: 576px) {

  /* --- Кнопки в колонку --- */

  .top-button .item {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .top-button .item a.btn {
    width: 100%;
    text-align: center;
    margin: 0;
  }

  /* --- Футер: увеличенные touch-зоны --- */

  .footer .contact-bt a.phon,
  .footer .contact-bt a.mail {
    display: block;
    padding: 8px 0;
    font-size: 1.125rem;
  }

  .menu-footer li a {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 6px 0;
  }

  a.link-pr {
    padding: 10px 0;
    font-size: 1rem;
  }
}


@media screen and (max-width: 380px) {

  body {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .breadcrumb {
    font-size: 0.75rem;
    padding: 0.5rem 0;
  }
}