/* Mobile / tablet adaptation. Loaded after all other stylesheets; desktop (>= 992px) is untouched. */

@media (max-width: 991px) {
  html,
  body {
    min-width: 0 !important;
    overflow-x: hidden;
  }

  .header,
  .hero,
  .footer,
  [class*="footer"] {
    min-width: 0 !important;
  }

  .md {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  img,
  video,
  iframe {
    max-width: 100%;
  }

  /* ---- header ---- */
  .header__wrap {
    flex-wrap: wrap;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .header__wrap::after {
    content: "";
    order: 3;
    flex-basis: 100%;
    height: 0;
  }

  .header__icon {
    width: 16rem;
    height: 3.6rem;
  }

  .header__info {
    display: contents;
  }

  .header__logo {
    order: 1;
    margin-right: auto;
  }

  .header__language {
    order: 2;
    margin-right: 1.6rem;
  }

  .header__btn {
    order: 3;
  }

  .header__search {
    order: 4;
    margin-right: auto !important;
    margin-top: 0.8rem;
  }

  .header__registration {
    order: 5;
    margin-right: 0 !important;
    margin-top: 0.8rem;
  }

  .header__icon {
    background-position: left center;
  }

  /* ---- burger navigation: vertical panel under the header ---- */
  .nav__bg {
    display: none;
  }

  .nav__wrap {
    padding-top: 0.5rem;
    padding-bottom: 2rem;
    background-color: #1f2035;
    max-height: calc(100vh - 11rem);
    overflow-y: auto;
  }

  .nav__wrap .md {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100% !important;
  }

  .nav__item {
    margin: 0;
    border-bottom: 1px solid rgba(128, 128, 150, 0.25);
  }

  .nav__item:last-child {
    border-bottom: 0;
  }

  .nav__link {
    padding: 1.4rem 0;
    font-size: 1.6rem;
    white-space: normal;
  }

  .menu-open .page {
    padding-top: 14rem !important;
  }

  /* ---- hero on the home page ---- */
  .hero {
    height: auto;
    max-height: none;
    min-height: 100vh;
  }

  .hero__wrap {
    padding-top: 13rem;
    padding-bottom: 3rem;
    height: auto;
    min-height: 100vh;
  }

  .hero__content {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: auto;
    gap: 3rem;
  }

  .hero__title {
    padding-top: 2rem;
    padding-bottom: 3rem;
    padding-left: 2rem;
  }

  .hero__title-num {
    font-size: 5.6rem;
  }

  .hero__title-plus {
    font-size: 4.6rem;
  }

  .hero__mtpp {
    position: static !important;
    width: 100% !important;
    max-width: 32rem;
    margin: 0 0 3rem;
  }

  .ptrades,
  .hero__ptrades {
    width: 100% !important;
    max-width: 100%;
  }

  app-trades-pulse {
    display: block;
    width: 100%;
    margin-top: 0 !important;
  }

  /* ---- TOP-5 comparison matrix on the home page: keep the matrix, scroll it sideways ---- */
  .offers-top,
  .offers-body {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .offers-top {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: -4rem !important;
  }

  .offers__container {
    width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .offers__container > .offers-header,
  .offers__container > .offers-body,
  .offers__container > * {
    min-width: 87rem;
  }

  .offers-header__item,
  .offers-body__item {
    flex: 0 0 15rem !important;
    width: 15rem !important;
  }

  .offers-header__item_title2,
  .offers-body__item_desc,
  .offers-header__item_title {
    flex: 0 0 12rem !important;
    width: 12rem !important;
    position: sticky;
    left: 0;
    z-index: 6;
    background-color: #fff;
  }

  .offers-item:hover {
    transform: none !important;
    position: relative !important;
  }

  .offers-header__nav0 {
    position: sticky;
    left: 0;
    padding-left: 1.5rem;
    width: 100vw !important;
    min-width: 0;
    box-sizing: border-box;
  }

  .offers-header__item_title2,
  .offers-body__desc {
    padding-left: 1.5rem !important;
    box-sizing: border-box;
  }

  /* ---- listing cards (mcard) ---- */
  .mcards__wrap {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .mcards__item {
    width: 100% !important;
  }

  .mcard {
    flex-direction: column;
  }

  .mcard__picture,
  .mcard.is-active .mcard__picture {
    width: 100% !important;
    height: 22rem !important;
  }

  .mcard .mcard__content,
  .mcard.is-active .mcard__content {
    width: 100% !important;
  }

  .mcard__content .dl__dd {
    white-space: normal;
  }

  /* ---- fixed-width blocks from the desktop layout ---- */
  .modal-content,
  .w-480,
  .w-414,
  .w-715,
  .w-7xl,
  .min-w-7xl,
  .beta,
  .all-offers__container,
  .form-serach,
  .committee-form,
  .pa-content .form__userlist,
  .certificate-info,
  .certificate__documents,
  .package-info,
  .package-owner,
  .package__info,
  .auction-detail .mcards__item,
  .auction-detail__info,
  .auction-detail__bet,
  .pa-file,
  .user-profile__form,
  .country-classifier .form,
  .pa__openchat .pa__chat,
  .pa__openchat .pa__message,
  .props-set .form,
  .ui.styled.accordion,
  .f-modal--auth .modal-content,
  .modal-dealer__item--success,
  .modal-dealer__list,
  .requisit-item .char,
  .header-account__body-right {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  /* ---- footer ---- */
  .footer__content {
    flex-direction: column;
    align-items: flex-start;
    gap: 3rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .footer__nav {
    flex-wrap: wrap;
    gap: 2rem 0;
  }

  .footer__nav-list {
    padding-right: 2.5rem;
    margin-right: 2.5rem;
  }

  .footer-copy__wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }

  .footer__cards,
  .footer-soc {
    flex-wrap: wrap;
  }

  .footer__nav {
    flex-direction: column;
    gap: 1.6rem;
  }

  .footer__nav-list {
    padding-right: 0;
    margin-right: 0;
  }

  .footer__nav-list:after {
    display: none;
  }

  .footer__logo-icon {
    width: 20rem;
    background-position: left center;
  }

  /* sticky category bar of the TOP-5 matrix: the bar itself scrolls sideways */
  .offers-header.fixed,
  .offers-header.fixed-hidden,
  .offers-header.nofixed {
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .offers-header.fixed .offers-header__wrap,
  .offers-header.nofixed .offers-header__wrap {
    min-width: 87rem;
  }

  /* ---- modal windows ---- */
  .mw.modal,
  .modal.mw {
    padding: 3rem 2rem !important;
    width: calc(100% - 1rem) !important;
    max-width: 46rem !important;
    box-sizing: border-box;
    max-height: 92vh;
    overflow-y: auto;
  }

  .jquery-modal.blocker {
    padding: 1rem !important;
  }

  .modal .w-300,
  .modal form.w-300 {
    width: 100% !important;
  }
}
