.header {
  position: relative;

  &.fixed {
    background-color: $white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .1);

    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;

    .header__top {
      display: none;
    }

    .header__center {
      padding-top: 0.8rem;
      padding-bottom: 0.8rem;
    }

    .nav__item {
      padding-top: 0.8rem;
      padding-bottom: 0.8rem;
    }

    @include media-breakpoint-down(lg) {
      .header__top-left {
        display: none;
      }

      .header__center {
        border-bottom: 0;
      }
    }
  }
}

.header__top {
  padding: 1.2rem 0;

  background-color: #F7F7FC;
  border-bottom: 1px solid #EEEEF3;
}

.header__top-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  @include media-breakpoint-down(md) {
    justify-content: flex-start;
  }
}

.header__top-nav {
  display: flex;
  justify-content: flex-end;
  list-style: none;

  font-size: 1.2rem;
}

.header__top-nav-item {
  margin-left: 2.4rem;

  &:first-child {
    margin-left: 0;
  }
}

.header__top-nav-link {
  display: flex;
  align-items: center;

  color: $dark;
  text-decoration: none;

  transition: color .1s linear;

  &:hover {
    color: $blue;
  }
}

.header__top-nav-icon {
  margin-right: 4px;
}

.header__center {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;

  border-bottom: 1px solid #F2F2F2;

  @include media-breakpoint-down(lg) {
    flex-wrap: wrap;
    padding: 1.2rem 0;
  }
}

.header__center-left {
  display: flex;
  align-items: center;

  @include media-breakpoint-down(lg) {
    display: none;
  }

  @include media-breakpoint-down(sm) {
    order: 1;
  }
}

.header__logo {
  max-height: 51px;
  &--mobile {
    display: none;
    
    @include media-breakpoint-down(lg) {
      max-height: 48px;
      max-width: 125px;
      padding: 0 2rem;
      display: flex;
      justify-content: center;
      align-items: center;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
    }
  }
}

.header__center-middle {
  padding-left: 6rem;
  padding-right: 2rem;
  flex-grow: 1;

  @include media-breakpoint-down(lg) {
    order: 3;
    padding-left: 0;
    padding-right: 0;
  }
}

.header__center-right {
  @include media-breakpoint-down(lg) {
    flex-grow: 1;
    order: 2;
    width: 100%;

    display: flex;
    justify-content: flex-start;
  }

  @include media-breakpoint-down(sm) {
    order: 2;
  }
}

.header__actions {
  display: flex;
  align-items: center;

  font-size: 1.5rem;
  list-style: none;

  @include media-breakpoint-down(lg) {
    justify-content: flex-end;
    margin-left: auto;
  }

  &--mobile {
    display: none;

    @include media-breakpoint-down(lg) {
      display: flex;
      justify-content: flex-start;
      margin-left: 0;
    }
  }
}

.header__actions-item {
  display: flex;
  margin-left: 2rem;

  &:first-child {
    margin-left: 0;
  }

  @include media-breakpoint-down(lg) {
    margin-left: 1rem;
  }
}

.header__actions-link {
  display: flex;
  align-items: center;
  position: relative;

  text-decoration: none;
  color: #606060;

  &:hover {
    color: $blue;

    .header__actions-icon {
      stroke: $blue;
    }
  }
}

.header__actions-link-text {
  margin-left: 0.6rem;
}

.header__actions-link-label {
  width: 18px;
  height: 18px;
  margin-left: .4rem;
  display: flex;
  align-items: center;
  justify-content: center;

  background-color: rgba(#8E8EA1, 0.1);
  border-radius: 50%;

  font-size: 1rem;
  line-height: 1;
  color: $primary;

  @include media-breakpoint-down(lg) {
    width: 20px;
    height: 20px;
    margin-left: 5px;
  }
}

.header__actions-icon {
  display: block;
  width: 24px;
  height: 24px;

  transition: stroke .1s linear;

  fill: none;
  stroke: #606060;

  @include media-breakpoint-down(lg) {
    width: 24px;
    height: 24px;
  }
}

.header__actions-text {
  display: block;
  line-height: 1;
  margin-left: 0.5rem;
  transition: color .1s linear;

  @include media-breakpoint-down(lg) {
    display: none;
  }
}

.header__bottom {
  background-color: $primary;
  position: relative;

  @include media-breakpoint-down(lg) {
    padding: 0;
  }
}


.header__btn-toggle {
  display: block;
  padding: 12px;
  min-width: 48px;
  width: 25px;
  height: 25px;
  background: transparent;
  border: none;
}