.main-header {
  position: relative;
  width: 100%;
  max-width: 100vw;
  z-index: 3001;
  transform: translateY(0);
  transition: transform .3s ease, background-color .3s ease, top .5s ease;
  background-color: transparent;

  &.sticky-header {
    position: sticky;
    left: 0;
    top: 0;

    .main-header__menus {
      @media (max-width: $break-large - 1) {
        height: 100vh !important;
      }
    }

    .main-header__menus__inner {
      @media (max-width: $break-large - 1) {
        height: calc(100vh - var(--main-header-height)) !important;
      }
    }
  }

  a:focus {
    @include focus-light;
  }

  @media (min-width: $break-large) {
    border-bottom: none;
    max-width: 1800px;
    margin: 0 auto;
  }


  &.sticky-header {
    &.header-hidden {
      transform: translateY(-100%);
  
      .main-menu-active & {
        transform: translateY(0);
      }
  
      @media (min-width: $break-large) {
        top: -185px;
        transition: top .5s ease;
      }
    }
    .main-header__content-holder {
      background-color: $color-green-dark;
    }
  }

  &.sticky-header:not(.header-hidden) {
    // header bottom white line developed as :before to prevent header jump on slide animation
    &:before {
      content: '';
      position: absolute;
      bottom: -1px;
      width: 100%;
      height: 1px;
      background-color: $color-white;
      display: none;
    }

    @media (min-width: $break-large) {
      &:before {
        display: block;
      }
    }
  }

  *::before,
  *::after {
    box-sizing: border-box;
  }

  ul {
    padding: 0;
    margin: 0;

    li {
      padding: 0;
      margin: 0;
      list-style: none;
      &:before {
        display: none;
      }

      &::marker {
        content: none;
        color: transparent;
      }
    }
  }

  a {
    background: none;
    text-decoration: none;
    display: inline-block;
  }

  &__content-holder {
    display: flex;
    align-items: center;
    padding: 1.156rem 1rem;
    background-color: transparent;

    @media (min-width: $break-medium) {
      padding: 1.313rem 2.5rem;
    }

    @media (min-width: $break-large) {
      position: absolute;
      width: 100vw;
      max-width: 1800px;
      padding: 2.438rem 3.125rem 1.688rem;
      align-items: center;
      background-color: transparent;
      transition: background-color .1s ease;

      &:after {
        content: '';
        background-color: $color-green-dark;
        opacity: 0;
        position: absolute;
        width: 100vw;
        height: 185px;
        left: 0;
        margin-left: calc(((100vw - 100%) / 2 + var(--scrollbar-width)) * -1);
        top: -18px;
        z-index: -1;
        transition: opacity .3s ease;
      }
    }
  }

  &__logo {
    width: 100%;
    max-width: 11.4rem;
    flex-shrink: 0;
    margin-right: auto;
    opacity: 1;
    visibility: visible;
    z-index: 999;
    transition: opacity .3s ease, visibility .3s ease;

    @media (min-width: $break-medium) {
      max-width: 12.2rem;
    }

    @media (min-width: $break-large) {
      max-width: 27.3rem;
      flex-shrink: 1;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .search-opened & {
      opacity: 0;
      visibility: hidden;

      @media (min-width: $break-medium) {
        opacity: 1;
        visibility: visible;
      }
    }

    a {
      display: block;
      color: white;

      @media (min-width: $break-large) {
        display: flex;
        justify-content: center;
        align-items: center;
        min-width: 368px;
      }
    }

    svg {
      width: 100%;
      height: auto;
    }
  }

  &__menus {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: url("../assets/img/banner-image.jpg"), left center, no-repeat;
    background-size: cover;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition:  .3s ease;
    padding-top: var(--main-header-height) ;

    &__inner {
      overflow-y: auto;
      height: 100%;
      @media (min-width: $break-large) {
        position: static;
        display: flex;
        flex-direction: column-reverse;
        align-items: flex-start;
        width: 100%;
        overflow-y: visible;
      }
    }

    @media (min-width: $break-medium) {
      padding: 0;
      padding-top: var(--main-header-height) ;
    }

    @media (min-width: $break-large) {
      top: var(--main-header-height);
      background: transparent;
      max-width: calc(100% - 15.8rem);
      flex-shrink: 0;
      width: 100%;
      position: static;
      height: auto !important;
      padding: 0.375rem 2rem 0 2rem;
      opacity: 1;
      visibility: visible;
      transform: translateX(0);
      z-index: 2;
      overflow: visible;
      transition: opacity .3s ease , visibility .3s ease, transform .3s ease;
    }

    .search-opened & {
      @media (min-width: $break-large) {
        .secondary-menu {
          opacity: 0;
          visibility: hidden;
        }
      }
    }

    .main-menu {

      @media (min-width: $break-medium) {
        border-top: 1px solid white;
        border-bottom: 1px solid white;
      }

      @media (min-width: $break-large) {
        border: none;
        position: absolute;
        top: 80px;
        left: -415px;
        display: block;
        width: calc(100vw - 100px);
        border-top: 1px solid white;
        max-width: 1700px;
        margin: 0 50px;

        &:before {
          content: '';
          background-color: transparent;
          opacity: 0;
          transition: background-color .3s ease, opacity .3s ease;
        }
      }
    }

    .main-menu-active & {
      opacity: 1;
      visibility: visible;
      transition: .3s ease;

      li.main-menu__item {
        animation: menu_slide .3s forwards;

        @keyframes menu_slide {
          0% {
          }

          100% {
            opacity: 1;
            transform: translateX(0);
          }
        }

        @for $i from 1 through 20 {
          // :nth-child(1-20)
          &:nth-child(#{$i}) {

            // Delay the animation. Delay increases as items loop.
            animation-delay: $i * (1s / 10);
          }
        }

        @for $i from 1 through 10 {
          &:nth-child(#{$i}) .submenu {
            top: -($i * 58px) + 26px;
          }
        }
      }
    }
  }

  .menus-opener {
    position: relative;
    display: block;
    width: 1.75rem;
    height: 1.75rem;
    background: $color-green-light;
    border-radius: 2px;
    border: none;
    margin-right: 8px;
    opacity: 1;
    visibility: visible;
    transition: background-color .3s ease, opacity .3s ease, visibility .3s ease;
    z-index: 999;

    @media (min-width: $break-medium) {
      width: 2.75rem;
      height: 2.75rem;
    }

    &__holder {
      @media (min-width: $break-large) {
        display: none;
      }
    }

    &:hover {
      background: $color-white;

      .icon {
        color: $color-blue-dark;
      }

      &:before,
      &:after {
        color: $color-blue-dark;
      }
    }

    .icon {
      
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      display: block;
      width: 0.875rem;
      border-top: 3px solid black;
      transition: border-color .3s ease;
    }

    &:before,
    &:after {
      content: '';
      position: absolute;
      left: 50%;
      top: 50%;
      display: block;
      width: 0.875rem;
      border-top: 3px solid black;
      transition: transform .3s ease, border-color .3s ease;
      z-index: 1;
    }

    &:before {
      transform: translate(-50%, calc(-50% + 0.4rem));
    }

    &:after {
      transform: translate(-50%, calc(-50% - 0.4rem));
    }

    &.main-menu-active {
      background-color: $color-white;

      &:before,
      &:after {
        color: $color-blue-dark;
        transform: translate(-50%, -50%) rotate(-45deg);
      }

      &:after {
        transform: translate(-50%, -50%) rotate(45deg);
      }

      .icon {
        border: 0;
        opacity: 0;
      }

      &:hover {
        background: $color-blue-light;
      }
    }

    .search-opened & {
      opacity: 0;
      visibility: hidden;
    }
  }

  // styles for main menu placed in main header

  .main-menu {
    &__list {
      position: relative;
      padding: 1rem 0 2rem;
      @media (max-width: $break-medium - 1)  {
        height: auto !important;
      }

      @media (min-width: $break-medium) {
        padding: 2rem 0.313rem 2rem 1.313rem;
        overflow: hidden;

        &::before{
          content: "";
          width: 50%;
          position: absolute;
          right: 0;
          top: 0;
          background-color: $color-white;
          height: 100%;
        }
      }

      @media (min-width: $break-large) {
        padding: 0.813rem 0 0;
        display: flex;
        justify-content: space-between;
        overflow: visible;
        height: auto !important;

        &::before{
          content: none;
        }
      }

      &:after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: 0;
        width: 100%;
        height: 0.063rem;
        background-color: $color-white;
        transform: translateX(-50%);

        @media (min-width: $break-medium) {
          display: none;
        }
      }
    }

    &__item {
      position: relative;
      border-left: 1px solid $color-white;
      padding: 14.5px 0 14.5px;
      margin: 0 0 0 3.75rem;
      opacity: 0;
      transform: translateX(50%);

      @media (min-width: $break-medium) {
        padding: 1rem 0 1rem 0.875rem;
        width: calc(50% - 68px);
      }

      @media (min-width: $break-large) {
        opacity: 1;
        padding: 0 0 1.35rem;
        margin: 0;
        border: none;
        transform: none;
        width: auto;
      }

      &::before {
        content: '';
        position: absolute;
        bottom: -5px;
        left: -0.2rem;
        width: 100%;
        height: 2px;
        background-color: $color-green-light;
        display: none;
        opacity: 0;
        transition: opacity .3s ease;
        z-index: -1;

        @media (min-width: $break-large) {
          display: block;
          border-radius: 0;
          border: none;
          left: 0;
          bottom: unset;
          top: 1.688rem;
        }
      }

      &:nth-last-child(1):not(:nth-child(1)) {
    
        @media (min-width: $break-large) {
          .submenu {
            left: auto;
            right: 3.3rem;
          }
        }
      }

      &:nth-last-child(2):not(:nth-child(2)) {
        @media (min-width: $break-large) {
          .submenu {
            left: auto;
            right: 0;
          }
        }
      }

      &:nth-last-child(1):not(:nth-child(1)) {
        &::before {
          @media (min-width: $break-large) {
            width: 100%;
            right: 0;
            left: auto;
          }
        }

        .main-menu__link {
          @media (min-width: $break-large) {
            padding-right: 0;
          }
        }

        .submenu {
          @media (min-width: $break-large) {
            right: 0;
          }
        }
      }

      &.submenu-show {
        &::before {
          @media (min-width: $break-large) {
            opacity: 1;
          }
        }

        .submenu {
          @media (min-width: $break-large) {
            background-color: $color-green;
            top: 3.1rem;
            left: -53px;
            height: fit-content !important;
            opacity: 1;
            visibility: visible;
            transition: opacity .3s ease .2s, visibility .3s ease .2s;
            animation-fill-mode: forwards;
          }
        }
      }

    }

    &__link {
      width: calc(100% - 55px);
      margin: 0;
      padding: 0 0 0 0.875rem;
      font-family: $font-acumen-cond;
      @include fontsize(18px);
      line-height: 1.1;
      font-weight: 800;
      text-transform: uppercase;
      color: $color-white;
      transition: color .3s ease;

      @media (min-width: $break-medium) {
        padding: 0;
      }

      @media (min-width: $break-large) {
        width: fit-content;
        @include fontsize(24px);
      }
    }
  }

  .main-submenu {
    &__opener {
      position: absolute;
      left: -3.438rem;
      top: 0;
      border: none;
      width: 3rem;
      height: 3rem;
      transition: all .3s ease;
      background-color: transparent;

      @media (min-width: $break-medium) {
        right: 0;
        top: -0.5rem;
        width: 3.5rem;
        height: 3.5rem;
      }

      @media (min-width: $break-large) {
        display: none;
      }

      &:before {
        content: '';
        position: absolute;
        top: 1.188rem;
        left: 0;
        right: 0;
        margin-left: auto;
        margin-right: auto;
        background-image: url("data:image/svg+xml,%3Csvg width='11' height='11' viewBox='0 0 11 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.49488 4.49998L4.49488 0L6.50509 0.00860612V4.49137L11 4.49998C11 4.50872 11 6.5086 11 6.50002L6.50509 6.50862L6.50509 10.9914L4.49488 11V6.50002L0 6.50862C5.97579e-05 6.51729 0 4.49998 0 4.49137L4.49488 4.49998Z' fill='%23A4FFBF'/%3E%3C/svg%3E");
        background-size: cover;
        background-position: center;
        display: block;
        width: 12px;
        height: 12px;
        transition: 0.3s ease-in-out;

        @media (min-width: $break-medium) {
          top: 1.7rem;
        }
      }

      &.submenu-opened {

        &:before {
          transform:rotate(135deg);
        }
      }
    }
  }

  .submenu {
    display: none;
    background-color: $color-white;
    padding: 1.5rem 0;
    margin: 1.219rem 0 0 -3.75rem;

    &[aria-hidden='true'] {
      opacity: 0;
    }

    &[aria-hidden='false'] {
      opacity: 1;
    }

    @media (min-width: $break-medium) {
      margin: 0 0 2.8rem;
      top: -32px;
      right: 0;
      transform: translateX(100%);
      position: absolute;
      width: 50vw;
    }

    @media (min-width: $break-large) {
      position: absolute;
      margin: 0;
      opacity: 0;
      visibility: hidden;
      top: 100%;
      width: 26.4rem;
      left: -0.2rem;
      border-top: none;
      transform: translateX(0);
      background-color: $color-green-dark;
      transition: opacity .3s ease, visibility .3s ease;

      a {
        color: $color-white;
        padding: 0 1.5rem;
        margin-bottom: 0.5rem;

        &:focus {
          @include focus-light
        }

        &:hover {
          color: $color-green-light;
        }
      }
    }

    &__item {
      padding: 0.344rem 0;

      @media (min-width: $break-large) {
        padding: 0;

        &.submenu__link:first-of-type {
          padding-top: 0;
        }

        &.submenu__link:last-of-type {
          padding-bottom: 0;
        }
      }
    }

    &__link {
      width: 100%;
      padding: 0 1rem;
      font-size: 1rem;
      line-height: 1.3;
      font-weight: 500;
      color: $color-black;

      &:before {
        display: none;
      }

      @media (min-width: $break-medium) {
        padding: 0.25rem 3.125rem;
      }

      @media (min-width: $break-large) {
        color: $color-white;
        padding: 0.813rem 3.125rem;
        transition: none;
      }

      &:hover {
        color: $color-blue-dark;
        text-decoration: underline 1px;
        text-underline-offset: 2px;
        text-decoration-skip-ink: none
      }

      &:focus {
        outline-offset: -2px -3px;
        @include focus-dark();
      }
    }
  }

  // styles for secondary menu placed in main header

  .secondary-menu {
    padding: 2.9rem 0;

    @media (min-width: $break-medium) {
      padding: 1.5rem 0;
    }

    @media (min-width: $break-large) {
      padding: 0 39px 0 0;
      margin: 0 0 0 auto;
    }

    &__list {
      @media (min-width: $break-medium) {
        display: flex;
        justify-content: end;
        padding: 0 3.25rem 0 0;
      }

      @media (min-width: $break-large) {
        padding: 0 8rem 0 0;
      }
    }

    &__item {
      &:not(:last-child) {
        margin: 0;
        padding-bottom: 0.75rem;

        @media (min-width: $break-medium) {
          margin: 0 1rem 1.3rem 0;
        }

        @media (min-width: $break-large) {
          position: relative;
          margin: 0 3.55rem 0 0;
          padding: 0;
        }
      }

      .submenu {
        @media (min-width: $break-large) {
         left: 0;
        }
      }

      &:nth-last-child(1):not(:nth-child(1)),
      &:nth-last-child(2):not(:nth-child(2)) {
        @media (min-width: $break-large) {
          .submenu {
            left: auto;
            right: 0;
          }
        }
      }
    }

    &__link,
    .secondary-submenu__opener {
      border: none;
      padding: 0 1.8rem 0 0;
      @include fontsize(16px);
      line-height: 1.3;
      margin: 0 0 0.7rem 1rem;
      font-family: $font-acumen;
      font-weight: 400;
      color: $color-white;
      background: none;
      transition: color .3s ease, border-color .3s ease;

      @include focus-light();

      @media (min-width: $break-medium) {
        margin: 0 0 0.7rem 0;
      }

      @media (min-width: $break-large) {
        margin: 0;
        padding: 0 1.6rem 0.5rem 0;
        @include fontsize(15px);
        line-height: 1.3;
      }

      &:hover {
        color: $color-green-light;

        &:before {
          border-color: $color-green-light;
        }
      }
    }

    &__link {
      &:before {
        display: none;
      }

      @media (min-width: $break-medium) {
        padding: 0;
      }
      
      @media (min-width: $break-large) {
        padding: 0;
        @include fontsize(15px);
        line-height: 1.3;
      }
    }

    .submenu {
      margin: 0 0 3rem;
      border-width: 0.4rem;
      width: 110%;

      @media (min-width: $break-medium) {
        margin: 0 0 2rem;
        right: 0;
        top: 24px;
        height: fit-content;
        padding: 1rem 0;
        transform: translateX(0);


        ul li a {
          padding: 0 1rem;
        }
      }
    }
  }

  .secondary-submenu {
    display: none;
    border-width: 0.4rem;

    @media (min-width: $break-large) {
      position: absolute;
      left: 0;
      top: 100%;
    }

    &__opener {
      display: inline-block;
      position: relative;

      @media (forced-colors: active) and (prefers-color-scheme: 'light') {
        background-color: $color-white !important;
      }

      &:before {
        content: '';
        position: absolute;
        top: 0.2rem;
        right: 0.5rem;
        width: 0.6rem;
        height: 0.6rem;
        border-right: 0.15rem solid $color-white;
        border-bottom: 0.15rem solid $color-white;
        transform: rotate(45deg);
        transition: transform .3s ease, top .3s ease, background-color .3s ease;

        @media (min-width: $break-large) {
          border-right: 0.13rem solid $color-white;
          border-bottom: 0.13rem solid $color-white;
          width: 0.5rem;
          height: 0.5rem;
          background-color: $color-green-dark;
        }
      }

      &::after {
        content: '';
        position: absolute;
        bottom: -0.4rem;
        right: 0;
        width: 100%;
        height: 1px;
        background-color: $color-green-light;

        @media (min-width: $break-large) {
          display: block;
          bottom: 6px;
          width: 110%;
        }
      }

      &.submenu-opened {
        &:before {
          top: 7px;
          transform: rotate(225deg);
        }

        &::after {
          @media (min-width: $break-large) {
            opacity: 1;
          }
        }

        & + .submenu {
          opacity: 1;
          visibility: visible;
          width: 110%;
          right: 0;
          top: 24px;
          padding: 1rem 0;
          border-radius: 0 0 8px 8px;
        }
      }
    }
  }

  // styles for search placed in main header
  .search {
    &__box {


      @media (min-width: $break-medium) {

      }
    }

    &-submit-button {
      color: $color-black;
      position: absolute;
      right: -2.3rem;
      top: 1.45rem;
      transition: right .3s ease, color .3s ease;
      z-index: 10;

      @media (min-width: $break-large) {
        top: 41px;
        right: -32px;
        transition: right 0.3s ease;
      }

      .search-opened & {
        right: -1.25rem;

        @media (min-width: $break-large) {
          right: -22px;
          background-size: cover;
          top: 41px;
          //transition: right .3s ease;
        }
      }


    }


    &__opener,
    &__submit {
      height: 1.75rem;
      width: 1.75rem;
      background-color: $color-green-light;
      transition: background-color .3s ease;
      border: none;
      border-radius: 2px;
      padding: 0;
      display: flex;
      align-items: center;
      justify-content: center;

      @media (min-width: $break-medium) {
        width: 2.75rem;
        height: 2.75rem;
      }

      &:hover {
        background-color: $color-white;
      }

      span,
      img {
        display: block;
      }
    }

    &__opener {
      position: relative;
      transition: none;
      z-index: 999;

      @media (forced-colors: active) {
        background-color: $color-black !important;

        &::before,
        &::after {
          border-color: $color-white !important;
        }
      }

      .search__icon {
        display: flex;
        color: $color-black;
      }

      @media (min-width: $break-large) {
        position: absolute;
        transition: top .3s ease .3s, right .3s ease, background-color .3s ease;
        width: 2.188rem;
        height: 2.188rem;
        right: 50px;
        top: 2.9rem;
      }

      .search-opened & {

        .search__icon {
          display: none;
        }


      }

      &:before,
      &:after {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        display: block;
        width: 0.75rem;
        border-top: 1.75px solid;
        background-color: $color-white;
        opacity: 0;
        transition: opacity .3s ease;
        z-index: 1;

        @media (min-width: $break-large) {
          width: 0.75rem;
          border-top: 2px solid;
        }
      }

      .search-opened & {
        background-color: transparent;
        color: white;
        border: 1px solid $color-white;
      }

      &:before,
      &:after {
        transform: translate(-50%, -50%) rotate(-45deg);

        .search-opened & {
          opacity: 1;
        }
      }

      &:after {
        transform: translate(-50%, -50%) rotate(45deg);
      }
    }

    &__form {
      position: absolute;
      left: 0;
      top: 0;
      height: 100%;
      width: calc(100% - 5rem);
      padding: 1.1rem 0 0 2rem;
      opacity: 0;
      visibility: hidden;
      transition: opacity .3s ease, visibility .3s ease;
      z-index: 3;

      @media (min-width: $break-medium) {
        left: unset;
        width: calc(100% - 22rem);
        top: 9px;
        right: 126px;
        padding-top: 0.76rem;
      }

      @media (min-width: $break-large) {
        left: auto;
        width: calc(100% - 43rem);
        padding: 2.2rem 0 0;
      }

      .search-opened & {
        opacity: 1;
        visibility: visible;
        transition: none;

        .search__input {
          width: 100%;
          transform: translateX(0);

          &::placeholder {
            color: $color-white;
            transition: color .3s ease .6s;
          }
        }
      }
    }

    &__input {
      display: block;
      border: none;
      border-bottom: 1px solid $color-green-light;
      background: transparent;
      color: $color-white;
      @include fontsize(15px);
      line-height: 1.3;
      font-family: $font-acumen;
      font-weight: 500;
      appearance: none;
      border-radius: 0;
      padding: 0.25rem 0;
      transition: all .3s ease .3s, transform .3s ease .3s, outline 0ms 0ms;
      width: 1px;
      margin-left: auto;
      outline-offset: -3px;
      height: 28.5px;

      @media (forced-colors: active) and (prefers-color-scheme: 'light') {
        background-color: $color-white;
      }

      &::placeholder {
        color: transparent;
        transition: color .3s ease .6s,
      }

      &:focus {
        transition: none;
      }

      @media (min-width: $break-medium) {
        @include fontsize(16px);
        line-height: 1.4;
        padding: 0.55rem 0 0.74rem;
        height: 44px;
      }

      @media (min-width: $break-large) {
        padding: 8px 8px 8px 14px;
        @include fontsize(15px);
        line-height: 1.3;
        height: 36.8px;
      }
    }


    &__submit {
      position: absolute;
      right: -4rem;
      top: 1.125rem;
      transition: right .3s ease, background-color .3s ease, background-color .3s ease;
      font-size: 0;

      @media (min-width: $break-medium) {
        right: -5.5rem;
        top: 0.7rem;
      }

      @media (min-width: $break-large) {
        top: 2.3rem;
        right: -2.5rem;
        transition: right 0.3s ease;
        width: 35px;
        height: 35px;
      }


      .search-opened & {
        right: -1.563rem;

        @media (min-width: $break-medium) {
          right: -2.1rem;
          top: 0.75rem;
        }

        @media (min-width: $break-large) {
          right: -1.9rem;
          top: 2.3rem;
          transition: right .3s ease;
          background-image: url("data:image/svg+xml,%3Csvg width='18' height='17' viewBox='0 0 18 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8.04811' cy='8.03639' r='6.34694' stroke='currentColor' stroke-width='2'%3E%3C/circle%3E%3Cline x1='16.2401' y1='15.3867' x2='13.1331' y2='12.2797' stroke='currentColor' stroke-width='2' stroke-linecap='square'%3E%3C/line%3E%3C/svg%3E");
          background-size: 18px;
          background-repeat: no-repeat;
          background-position: center;
        }
      }
    }
  }
}

.main-menu-active .sticky-header {
  position: fixed;
}

.sticky-header {
  @media (min-width: $break-large) {

    .main-header__content-holder:after {
      opacity: 1;
      transition: opacity .3s ease;
    }

    .main-menu:before {
      content: '';
      opacity: 1;
      background-color: $color-green-dark;
      position: absolute;
      width: 100vw;
      height: 80px;
      left: -3px;
      margin-left: calc(((100vw - 100%) / 2 + var(--scrollbar-width)) * -1);
      top: -18px;
      z-index: -1;
      transition: opacity .3s ease;
    }
  }
}

nav.main-menu {

  .medium-sub-menu {
    display: none;
  }

  @media (min-width: $break-medium) and (max-width: $break-large) {
    display: flex;

    .main-submenu__opener.submenu-opened:before {
      transform: none;
    }

    .main-submenu__opener[aria-expanded="true"]:before {
      transform: rotate(135deg);
    }

    & > ul.main-menu__list {
      flex: 1;

      // div.submenu {
      //   display: none !important;
      // }
    }

    .medium-sub-menu {
      display: block;
      flex: 1.25;
      background-color: $color-white;
      li.submenu__item {
        padding: 0;
        margin: 0;
      }
      .main-menu__item {
        margin: 0;
        padding: 0;
        border: none;
      }
      button {
        display: none;

        &.submenu-opened {
          & + div.submenu {
            visibility: visible;
            max-height: initial;
            opacity: 1;
            overflow: scroll;
            padding: 32px 54px;
          }
        }
      }
      .main-menu__link {
        display: none;
      }

      .main-menu__list {
        padding: 0;
      }

      .submenu {
        visibility: hidden;
        position: unset;
        top: 0;
        padding: 0;
        margin: 0;
        width: unset;
        max-height: 0;
        opacity: 0;
        transition: opacity .3s ease 0s !important;
        overflow: hidden;
      }

      .submenu__link {
        padding: 0 0 8px 0;
        line-height: 1.4;
      }
    }

  }
}

div.alert--major + header.main-header .main-header__content-holder:after {
  z-index: 1;
  top: 0;
}
