.header__container {
  position: relative;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.header {
  padding: 14px 20px;
  display: flex;
  background: var(--color-white-100);
}

.header__menu {
  background: var(--color-white-100);
  position: absolute;
  top: 47px;
  left: 0;
  right: 0;
  padding: var(--spacing-lg) 20px;
  border-top: 1px solid var(--color-grey-500);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

@media (width >= 1200px) {
  .header {
    justify-content: space-between;
    padding: 16px 32px;
    align-items: center;
  }
  
  .body.open-menu .header__menu:not(:root),
  .header__menu:not(:root) {
    display: block;
    visibility: visible;
    opacity: 1;
    position: static;
    display: flex;
    border-top: none;
    padding: 0;

    & .nav,
    & .nav__list,
    & .nav__list--external  {
      display: flex;
      align-items: center;

      & li  {
        width: auto;
        & a {
          padding: 12px 16px;
          font-size: 14px;

          &::after {
            display: none;
          }
        }
      }
    }

    & .nav__list--external {
      border-top: none;
      padding: 0;
      margin: 0;
      &::before {
        content: "";
        width: 1px;
        height: 17px;
        display: block;
        background-color: var(--color-grey-500);
      }
    }
    & .header__cta {
      margin: 0;

      & .cta-button {
        font-size: 14px;
        padding: 12px 16px;
        line-height: 1.2;
        &::after {
          display: none;
        }
      }
    }
  }
}

.header__title {
  margin: 0;
  line-height: 0;
  width: 200px;
  height: 20px;

  & img {
    width: 100%;
  }
}


.nav__list {
  margin: 0;

  & li {
    list-style: none;
    width: 100%;
    line-height: 1;
    
    > a {
      display: flex;
      padding: var(--spacing-md);
      width: 100%;
      align-items: center;
      justify-content: space-between;

      &::after {
        content: '';
        display: block;
        width: 20px;
        height: 20px;
        background-image: url(../images/arrow-right.svg);
      }
    }
  }
}

.nav__list--external{
  border-top: 1px solid var(--color-grey-500);
  padding-top: 7px;
  margin-top: 7px;
}

.header__cta {
  margin-top: 24px;
}

.header__menu-button {
  position: absolute;
  z-index: 9999;
  cursor: pointer;
  width: 24px;
  height: 24px;
  top: 12px;
  right: 20px;
}

.header__menu-button span {
  display: inline-block;
  transition: all 0.4s;
  position: absolute;
  left: 3px;
  height: 2px;
  background-color: #000000;
  width: 18px;

  &:nth-of-type(1) {
    top: 6px;
  }

  &:nth-of-type(2) {
    top: 11px;
  }

  &:nth-of-type(3) {
    top: 16px;
  }
}

@media (width >= 1200px) {
  .header__menu-button {
    display: none;
  }

  .header__title {
   width: 320px;
   height: 32px;
  }
}

.body.open-menu {
  overflow: hidden;

  & .header__container {
    height: 100%;
  }

  & .header__menu {
    height: 100%;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  & .header__menu-button span {

    &:nth-of-type(1) {
      transform: translateY(5px) rotate(-45deg);
    }

    &:nth-of-type(2) {
      opacity: 0;
    }

    &:nth-of-type(3) {
      transform: translateY(-5px) rotate(45deg);
    }
  }
}

.companies-page {
  .header__cta {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
}