.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 9999;
  background: #fff;
  transition-timing-function: cubic-bezier(.4, 0, .2, 1);
  transition-duration: .5s;
}

.header .container {
  width: 1368px;
}

@media (max-width: 1367px) {
  .header .container {
    width: 100%;
  }
}

@media (min-width: 1200px) {

  /* body {
    transition: padding-top .5s;
  }
  body.header-hide-top-part {
    margin-top: -36px;
  } */
  /* body {
    transition-timing-function: cubic-bezier(.4, 0, .2, 1);
  transition-duration: .5s;
  } */
  .header-hide-top-part .header {
    transform: translate(0, -36px);
  }
}

.header-top-part {
  background: #F8F8F8;
  font-size: 14px;
}

.header-top-part .container {
  height: 36px;
  justify-content: end;
}

.header-top-part-menu {
  display: flex;
  align-items: center;
}

.header-top-part-menu ul {
  display: flex;
  gap: 23px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.header-top-part-menu ul li:last-child {
  margin-right: 13px;
}

html[lang="ru-RU"] .header-phone a:first-child:after {
  content: "|";
  color: #a3a2a2;
  font-size: 16px;
  margin-left: 12px;
  margin-right: 12px;
}


.header-top-part a:hover {
  color: #4E74F5;
}


@media (max-width: 1199px) {
  .header-top-part {
    display: none;
  }

  .header-wa-mob {
    display: block !important;
    order: 3;
    margin-top: -3px;
    transform: translate(-5px, 0px);
  }
}

.header-bottom-part {
  /* box-shadow: 0 4px 20px rgba(183, 184, 193, .15); */
  height: 75px;
  display: flex;
  position: relative;
}

.main-logo-link {
  width: 230px;
  display: block;
}

.main-logo-link img {
  width: 100%;
  height: 100%;
}

.header-bottom-part .container>*,
.header-bottom-part .left a {
  display: flex;
  align-items: center;
}

.header-bottom-part-menu {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  /* gap: 2px; */
}

.header-tel svg {
  margin-right: 5px;

}


.header-wa {
  display: flex;
  align-items: center;
}

.header-wa svg {
  margin-right: 5px;
  margin-left: 3px;
}

.header-bottom-part .main-btn a {
  line-height: 48px;
  height: 49px;
  border-radius: 22px;
  text-align: center;
  display: block;
  font-size: 16px;
  padding: 0 20px;
  color: #000 !important;
  border-color: #000 !important;
}

.header-bottom-part .main-btn a:hover {
  background-color: #000 !important;
  border-color: #000 !important;
}

@media (max-width: 1350px) and (min-width: 1200px) {
  .main-logo-link {
    width: 210px;
  }

  .header-bottom-part-menu>div>ul>li>a {
    font-size: 14px;
  }

  .header-wa {
    font-size: 14px;
  }

  .header-wa svg {
    width: 17px;
    height: 17px;
  }

  .header-bottom-part .main-btn a {
    font-size: 14px;
    padding: 0 15px;
    height: 39px;
    line-height: 37px;
  }

}

@media (max-width: 1199px) {
  .header-bottom-part {
    height: 55px;
  }

  .main-logo-link {
    width: 200px;
  }

  .header-bottom-part .left {
    order: 2;
  }

  .header-bottom-part .center {
    display: none;
  }

  .header-bottom-part .right {
    display: none;
  }

  .mob-menu-btn {
    display: block !important;
    position: relative;
    float: right;
    border: 0 none;
    margin: 0;
    padding: 8px 0 10px 0px;
    border-radius: 0;
    background: 0 0;
    height: 55px;
    outline: none !important;
    cursor: pointer;
  }

  .header.mob-open .mob-menu-btn {
    width: 39px;
  }

  .header.mob-open .mob-menu-btn:before,
  .header.mob-open .mob-menu-btn:after {
    position: absolute;
    right: 12px;
    bottom: 16px;
    content: ' ';
    height: 25px;
    width: 2px;
    background-color: #000;
  }

  .header.mob-open .mob-menu-btn:before {
    transform: rotate(45deg);
  }

  .header.mob-open .mob-menu-btn:after {
    transform: rotate(-45deg);
  }

  .mob-menu-btn span {
    display: block;
    height: 2px;
    border-radius: 1px;
    background: #000;
    width: 25px;
    margin-top: 7px;
  }

  .mob-menu-btn span:first-child {
    margin-top: 0;
  }

  .header.mob-open .mob-menu-btn span {
    display: none;
  }

  .header-wa svg {
    margin-right: 0;
  }
}

.header-bottom-part-menu>div>ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-bottom-part-menu>div>ul>li>.sub-menu {
  text-align: left;
  position: absolute;
  top: 75px;
  right: 0;
  width: 100%;
  background: #fff;
  overflow-y: auto;
  z-index: 9999999999999999999;
  transition: visibility;
  transition-delay: 0.1s;
  visibility: hidden;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: center;
  padding-top: 32px;
  max-height: calc(100vh - 150px);
  padding-bottom: 24px;
}


.menu-overlay-wrap {
  position: absolute;
  right: 0;
  visibility: hidden;
  transition: visibility;
  transition-delay: 0.1s;
  top: 75px;
}

.header-bottom-part-menu>div:hover+.menu-overlay-wrap {
  visibility: visible;
}

.header-bottom-part .menu-overlay {
  content: '';
  display: block;
  width: 100vw;
  height: 100vh;
  background-color: rgb(25 28 31 / 0.4);
}

.header-bottom-part-menu>div:hover>ul>li>.sub-menu {
  visibility: visible;
}

.header-bottom-part-menu>div>ul>li>a {
  position: relative;
  cursor: default;
  color: #000;
  border-radius: 22px;
  padding: 10px 16px;
  transition: background-color 300ms cubic-bezier(0.15, 0.5, 0.5, 1);
  display: inline-block;
  padding-top: 13px;
  font-weight: 500;
  font-size: 17px;
}

.header-bottom-part-menu>div:hover>ul>li>a {
  background-color: #f1f1f2;
}

.header-bottom-part-menu>div:hover>ul>li>a:before {
  height: 30px;
  bottom: -30px;
  display: block;
  content: '';
  width: 100%;
  left: 0;
  position: absolute;
}

.header-bottom-part-menu>div>ul>li>.sub-menu>li {
  width: 334px;
  margin-bottom: 20px;
  display: block;
  float: left;
  position: relative;
  margin-top: 8px;
}

@media (max-width: 1368px) {
  .header-bottom-part-menu>div>ul>li>.sub-menu>li {
    width: calc(25% - 8px);
  }
}

.header-bottom-part-menu>div>ul>li>.sub-menu>li>a {
  display: none;
}

.header-bottom-part-menu>div>ul>li>.sub-menu>li>.sub-menu>li {
  padding-bottom: 16px;
}

.header-bottom-part-menu>div>ul>li>.sub-menu a {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 9999px;
  transition: background-color 300ms cubic-bezier(0.15, 0.5, 0.5, 1);
}

.header-bottom-part-menu>div>ul>li>.sub-menu a:hover {
  background-color: #f7f7f7;
}

.header-bottom-part-menu>div>ul>li>.sub-menu .sub-menu {
  list-style: none;
  padding: 0;
}

.header-bottom-part-menu>div>ul>li>.sub-menu>li>.sub-menu>li>a {
  cursor: default;
  font-weight: 600;
}

.header-bottom-part-menu>div>ul>li>.sub-menu>li>a:after {
  display: none !important;
}

.header-bottom-part-menu>div>ul>li>.sub-menu>li>.sub-menu>li>a:hover {
  cursor: default;
  background: transparent !important;
}

/* Новый fade-div */
.sub-menu-fade {
  position: absolute;
  height: 32px;
  pointer-events: none;
  z-index: 99999999999999999999999999999;
  background: linear-gradient(0deg, #fff 20%, rgba(255, 255, 255, 0) 100%);
  left: 15px;
  right: 15px;
}


@media (max-width: 1199px) {
  .header-bottom-part .center {
    position: absolute;
    width: 100%;
    height: calc(100vh - 105px);
    top: 55px;
    z-index: 9999999999999999999999999999;
    background: #fff;
    left: 0;
    padding-top: 24px;
  }

  .sub-menu-fade {
    display: none;
  }

  .header-bottom-part-menu {
    padding-left: 16px;
    padding-right: 16px;
    gap: 8px;
    overflow-x: auto;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
  }

  .header-bottom-part-menu::-webkit-scrollbar {
    display: none;
    /* for Chrome, Safari and Opera */
  }

  .header-bottom-part-menu>div>ul>li>a {
    padding: 8px 10px;
    font-weight: 500;
    white-space: nowrap;
  }

  .header-bottom-part-menu>div:hover>ul>li>a {
    background-color: transparent;
  }

  .header-bottom-part-menu>div.selected>ul>li>a {
    background-color: #e2e2e7;
  }

  .header-bottom-part-menu>div>ul>li>.sub-menu>li>.sub-menu>li>a {
    font-weight: 500;
    color: #000;
    padding: 12px 8px;
    position: relative;
    width: 100%;
  }

  .header-bottom-part-menu>div>ul>li>.sub-menu>li>.sub-menu>li>a:after {
    content: "";
    width: 20px;
    height: 20px;
    top: 19px;
    right: 0;
    background: url(https://imperiallegal.com/wp-content/themes/IL2024/img/navigate-right.svg) no-repeat center center / contain;
    position: absolute;
    transition: .5s;
    transform: rotate(90deg);
  }

  .header-bottom-part-menu>div>ul>li>.sub-menu>li>.sub-menu>li>a.open:after {
    transform: rotate(-90deg);
  }

  .header-bottom-part-menu>div>ul>li>.sub-menu a:hover {
    background-color: transparent;
  }

  .header-bottom-part-menu>div>ul>li>.sub-menu>li>.sub-menu>li>.sub-menu a {
    font-size: 14px;
    padding: 12px 16px;
    color: #000;
  }

  .header-bottom-part-menu>div:hover>ul>li>a:before {
    display: none;
  }

  .header-bottom-part-menu>div:hover>ul>li>.sub-menu {
    visibility: hidden;
  }

  .header-bottom-part-menu>div.selected>ul>li>.sub-menu {
    visibility: visible;
  }

  .menu-overlay-wrap {
    display: none;
  }

  .header-bottom-part-menu>div>ul>li>.sub-menu {
    max-height: calc(100vh - 211px);
    display: block;
    padding-left: 16px;
    padding-right: 16px;
    transition: none;
  }

  .header-bottom-part-menu>div>ul>li>.sub-menu>li {
    width: 100%;
  }

  .header-bottom-part-menu>div>ul>li>.sub-menu>li>.sub-menu>li>.sub-menu {
    display: none;
    background-color: #fff;
    border-radius: 8px;
    margin-left: 8px;
  }

  .header-bottom-part-menu>div>ul>li>.sub-menu>li>.sub-menu>li {
    padding-bottom: 0;
  }

  .header-bottom-part-menu>div>ul>li>.sub-menu>li {
    margin: 0;
  }

  .header-bottom-part-menu>div>ul>li>.sub-menu>li>.sub-menu>li.opened>.sub-menu {}

  .header.mob-open,
  .header.mob-open .center,
  .header.mob-open .header-bottom-part-menu>div>ul>li>.sub-menu {
    background-color: #f7f7f7;
    transition: none;
  }
}

@media (max-width: 320px) {
  .header-bottom-part .right {
    display: none;
  }
}