.wrapper {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

header {
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-white);
}

.header__content {
  display: flex;
  flex-direction: row;
  margin: 13px 16px;
  align-items: center;
  gap: 10px;
  color: var(--primary-text);
}

.header__logo {
  width: 149px;
  height: 48px;
}

.header__logo-link.disabled {
  pointer-events: none;
  cursor: default;
}

.header__right {
  flex-grow: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.header__menu {
  order: 2;
  justify-content: flex-end;
}

.header__personal {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  order: 1;
}

footer {
  border-top: 1px solid var(--bg-gray);
}

.footer__section {
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 17px;
  align-items: flex-start;
  margin: 18px 16px;
  color: var(--gray-medium);
}

.footer__block {
  order: 2;
}

.footer__menu {
  order: 1;
}

.scroll-to-top {
  display: none;
  position: fixed;
  bottom: 158px;
  right: 16px;
  z-index: 999;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background-color: var(--bg-gray);
  align-items: center;
  justify-content: center;
}

.scroll-to-top__icon {
  width: 16px;
  height: 16px;
  z-index: 1000;
}

body.popup-open {
  overflow: hidden;
}

body.popup-open header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2000;
}

body.popup-open footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 2000;
  background-color: var(--bg-white);
}

@media (min-width: 768px) {
  body.popup-open header {
    z-index: 9;
  }

  body.popup-open footer {
    z-index: 9;
  }
}

@media (min-width: 1024px) {
  .header__content {
    margin: 20px 30px;
    gap: 20px;
    justify-content: space-between;
  }

  .header__right {
    justify-content: space-between;
    gap: 30px;
    align-items: flex-start;
  }

  .header__menu {
    order: 1;
  }

  .header__personal {
    gap: 10px;
    order: 2;
  }

  .footer__section {
    font-size: 16px;
    flex-direction: row;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    margin: 20px 30px;
  }

  .footer__block {
    order: 1;
  }

  .footer__menu {
    order: 2;
  }

  .scroll-to-top {
    bottom: 152px;
    right: 50px;
    z-index: 999;
    width: 50px;
    height: 50px;
  }

  .scroll-to-top__icon {
    width: 24px;
    height: 24px;
  }

  .scroll-to-top:hover {
    background-color: var(--bg-white);
  }
}

@media (min-width: 1200px) {
  .header__content {
    margin: 13px 50px;
    padding: 0 7px;
    gap: 20px;
  }

  .header__logo {
    width: 190px;
    height: 55px;
  }

  .header__right {
    align-items: center;
  }

  .header__personal {
    gap: 15px;
  }

  .footer__section {
    margin: 20px 50px;
  }
}

@media (min-width: 1400px) {
  .header__content {
    margin: 13px 80px;
    padding: 0 15px;
    gap: 80px;
  }

  .header__logo {
    width: 211px;
    height: 68px;
  }

  .footer__section {
    margin: 20px 80px;
  }
}

@media (min-width: 1700px) {
  .header__content {
    margin: 13px 100px;
    gap: 8.5%;
  }

  .footer__section {
    margin: 20px 100px;
  }

  .scroll-to-top {
    right: 100px;
  }
}

@media (min-width: 1900px) {
  .header__content {
    margin: 13px 5.2%;
    gap: 7.5%;
  }
}

@media (min-width: 2000px) {
  .header__content {
    gap: 8.2%;
  }
}