.header.search-opened .main-nav,
.header.search-opened .header__lang,
.header.search-opened .header__phone
{
  display: none;
}

.header__content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 42px;
  height: 94px;
}

.header__right-side {
  display: flex;
  align-items: center;
  gap: 42px;
  justify-content: space-between;
  flex-grow: 1;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 42px;
  font-size: 13px;
  line-height: 16px;
  color: var(--greyColor);
}

.header__lang {
  position: relative;
  display: flex;
  align-items: center;
  font-weight: 400;
  width: 43px;
  transition: ease-in .3s;
}

.header__lang-hidden {
  display: none;
}

.header__lang-visual {
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header__lang-trigger {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.header__lang-trigger:hover + .header__lang-current {
  color: var(--greenColor);
  text-shadow: 0 0 .5px var(--greenColor), 0 0 .5px var(--greenColor);
}

.header__lang-drop {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 41px);
  z-index: 20;
  background: #fff;
  border-radius: 20px;
  width: 130px;
  padding: 20px;
  box-shadow: 3px 4px 10px rgba(0, 0, 0, 0.2);
}

.header__lang-menu {
  padding: 0;
  margin: 0;
  list-style-type: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-size: 14px;
}

.header__lang-option {
  text-transform: uppercase;
  cursor: pointer;
  transition: .3s;
}

.header__lang-option.current {
  pointer-events: none;
  color: var(--bgGreyColor);
}

.header__lang-option:hover {
  color: var(--greenColor);
}

.header__lang.open .header__lang-drop {
  display: block;
}

.header__lang.open .header__lang-current {
  color: var(--greenColor);
  text-shadow: 0 0 .5px var(--greenColor), 0 0 .5px var(--greenColor);
}

.header__phone {
  font-weight: 600;
}

.header__phone:hover {
  color: var(--greenColor);
}

.search-block__trigger {
  padding: 0;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.main-nav__list {
  padding: 0;
  margin: 0;
  list-style-type: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 42px;
}

.main-nav__item {
  position: relative;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--greyColor);
}

.main-nav__link {
  display: block;
  padding: 39px 0;
  transition: ease-in .3s;
}

.main-nav__link:hover {
  color: var(--greenColor);
  text-shadow: 0 0 .5px var(--greenColor), 0 0 .5px var(--greenColor);
}

.main-nav__link.current {
  color: var(--greenColor);
  text-shadow: 0 0 .5px var(--greenColor), 0 0 .5px var(--greenColor);
}

.sub-nav {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  display: none;
  width: max-content;
  border-radius: 20px;
  background: #fff;
}

.sub-nav::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 0;
  background-color: transparent;
  width: 100%;
  height: 10px;
}

.sub-nav.opened {
  display: block;
}

.sub-nav__content {
  padding: 10px 17px 11px;
}

.sub-nav__list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.sub-nav__item {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--greyColor);
  transition: .3s ease;
}

.sub-nav__item:not(.sub-nav__item:last-child) {
  margin-bottom: 18px;
}

.sub-nav__item:hover {
  color: var(--greenColor);
}

.sub-nav__link.current {
  color: var(--greenColor);
}

.sub-nav__header {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  gap: 39px;
}

.sub-nav__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--greyColor);
  width: 130px;
}

.sub-nav__body {
  padding: 0 16px 10px 0;
}

.sub-nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 39px;
}

.sub-nav__branch {
  width: 130px;
}

.sub-nav__branch.selected {
  color: var(--greenColor);
}

.sub-nav__cell {
  display: flex;
  align-items: center;
  flex-grow: 1;
  gap: 10px;
}

.sub-nav__link:hover {
  color: var(--greenColor);
}

.sub-nav__row:not(.sub-nav__row:last-child) {
  margin-bottom: 18px;
}

.sub-nav__group {
  padding-bottom: 15px;
}

.sub-nav__detach {
  border-top: 1px solid var(--greyColor);
  padding-top: 15px;
}

.search-block.opened {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  z-index: 20;
}

.search-block__hidden {
  display: none;
}

.search-block.opened .search-block__hidden{
  display: block;
}

.search-block.opened .search-block__trigger {
  position: absolute;
  right: 637px;
  top: 50%;
  translate: 0 -50%;
}

.search-block__field {
  position: absolute;
  width: 0;
  height: 33px;
  right: 0;
  top: 50%;
  translate: 0 -50%;
  transition: width .2s ease;
}

.search-block__field.opened {
  width: 621px;
  transition: width .2s ease;
}

.search-block__field.opened input {
  padding: 8.5px 30px 8.5px 23px;
}

.search-block__field input {
  border: none;
  outline: none;
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 16.5px;
  background: rgba(145, 147, 137, 0.15);
  outline: none;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--greyColor);
}

.search-block__field input::placeholder {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  color: #fff;
}

.search-block__reset {
  position: absolute;
  right: 16px;
  top: 50%;
  translate: 0 -50%;
  background-color: transparent;
  background-image: url(../assets/images/icons/close.svg);
  background-repeat: no-repeat;
  width: 14px;
  height: 14px;
  border: 1px solid transparent;
  padding: 0;
  cursor: pointer;
}

.menu-burger {
  position: relative;
  background: transparent;
  display: none;
  padding: 0;
  border: none;
  width: 23px;
  height: 24px;
}

.menu-burger span {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--greenColor);
  border-radius: 5px;
  transition: .3s ease;
}

.menu-burger::before, .menu-burger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--greenColor);
  border-radius: 5px;
  transition: .3s ease;
}

.menu-burger::before {
  top: 9px;
}

.menu-burger::after {
  top: 18px;
}

/*Media */

@media(max-width: 1200px) {

  .main-nav__list {
    gap: 32px;
  }
}

@media(max-width: 1110px) {
  .menu-burger {
    display: block;
    position: relative;
    right: 0;
  }

  .header {
    position: relative;
  }

  .header__content {
    position: static;
    height: 60px;
  }

  .header__right-side {
    display: none;
    position: absolute;
    left: 0;
    top: 60px;
    background-color: var(--bgColor);
    border-radius: 0;
    padding: 12px 20px 20px;
    width: 100%;
    min-height: 335px;
    z-index: 12;
    flex-direction: column;
    align-items: flex-start;
  }

  .header__actions {
    display: block;
    position: static;
    min-width: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  .header__phone, .search-block {
    display: none;
  }

  .header__lang {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.26;
    color: var(--greenColor);
    gap: 32px;
    width: auto;
  }

  .header__lang-hidden {
    display: block;
  }

  .header__lang-visual {
    position: relative;
    width: 34px;
  }

  .header__lang-visual::after {
    content: '';
    position: absolute;
    right: 0;
    background-image: url("../assets/images/icons/triangle-down.svg");
    background-repeat: no-repeat;
    width: 10px;
    height: 7px;
  }

  .header__lang img {
    display: none;
  }

  .header__lang-trigger {
    position: absolute;
    width: 100%;
    height: 100%;
  }

  .main-nav {
    width: 100%;
  }

  .main-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .main-nav__item {
    width: 100%;
    font-size: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--greyColor);
  }

  .main-nav__item:not(:first-child) {
    padding-top: 9px;
  }

  .main-nav__item::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 14px;
    width: 16px;
    height: 11px;
    background-image: url("../assets/images/icons/shevron-green.svg");
    background-repeat: no-repeat;
    transition: .3s ease;
  }

  .main-nav__item:first-child::after {
    top: 0;
  }

  .main-nav__link {
    padding: 0;
    text-transform: uppercase;
    width: fit-content;
  }

  .header.open {
    background-color: var(--bgColor);
  }

  .header.open .header__right-side {
    display: flex;
  }

  .header.open .menu-burger::before {
    opacity: 0;
  }

  .header.open .menu-burger span{
    rotate: 45deg;
    transform-origin: 7% 21%;
    width: 29px;
  }

  .header.open .menu-burger::after {
    rotate: -45deg;
    transform-origin: 5% 95%;
    width: 29px;
  }

  .sub-nav {
    width: 100%;
    position: static;
    background: transparent;
    display: none;
  }

  .main-nav__item.open .sub-nav {
    display: block;
  }

  .main-nav__item.open::after {
    rotate: -180deg;
  }

  .header__lang-drop {
    left: 98px;
    top: calc(100% + 10px);
  }
}

@media(max-width: 575px) {
  .header {
    background-color: #ffffff;
  }

  .sub-nav__header {
    display: none;
  }

  .sub-nav__body {
    padding: 0;
  }

  .sub-nav__row {
    align-items: flex-start;
    gap: 10px;
    flex-direction: column;
  }

  .sub-nav__content {
    padding-top: 25px;
  }

  .sub-nav__branch {
    width: 100%;
    height: 25px;
    position: relative;
  }

  .sub-nav__cell {
    display: none;
    padding-left: 10px;
  }

  .main-nav__item {
    font-size: 13px;
  }

  .sub-nav__link_nest {
    position: relative;
  }

  .sub-nav__branch::after {
    content: '';
    position: absolute;
    top: 6px;
    right: -11px;
    background-image: url(../assets/images/icons/triangle-down.svg);
    background-repeat: no-repeat;
    width: 10px;
    height: 7px;
    transition: .3s ease;
  }

  .sub-nav__branch.open::after {
    rotate: -180deg;
  }

  .sub-nav__branch.open + .sub-nav__cell {
    display: flex;
  }
}