.site-header {
  .navbar-collapse {
    max-height: calc(100vh - 74px - 80px);
    overflow-y: scroll;
    flex-basis: 100%;
    flex-grow: 1;
    align-items: center;
    display: none;

    > *:first-child {
      margin-left: 0;
      margin-top: 1.8rem;
    }

    > *:nth-child(2) {
      margin-top: 0.5rem;
      padding-top: 1rem;
      padding-bottom: 0.5rem;

      > *:first-child {
        margin-bottom: 1rem;
      }
    }
  }

  .collapse {
    display: block;
    height: 0;
    transition: height 0.35s ease;
    visibility: hidden;

    &.show {
      height: auto;
      visibility: visible;
    }
  }

  .collapsing {
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
    display: block;
  }

  .navbar-nav {
    display: flex;
    flex-direction: column;
    align-items: center;

    .nav-link {
      color: #65748e;
      font-size: 1rem;
      padding: 0.5rem;
      display: block;
    }
  }

  .dropdown {
    position: relative;

    .dropdown-toggle {
      white-space: nowrap;
      height: unset;
      width: unset;
      position: unset;
      justify-content: center;

      &::after {
        border: none;
        font-size: 1rem;
        border-left-width: 0;
        left: unset;
        width: 0;
        margin-left: 0.25rem;
      }

      &:focus {
        outline: none;
      }
    }

    .dropdown-menu {
      padding: 0.5rem;
      animation: fadeIn 0.3s;
      z-index: 1000;
      top: 100%;
      left: 0;
      display: none;
      position: static;
      background-color: #fff;
      border-radius: 0.1875rem;
      border: 1px solid #d1d1d1;
      color: #65748e;
      min-width: 12rem;

      &.show {
        display: block;
      }
    }
  }
}

.mega-menu-bg {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 80px;
  display: none;
}

.dropdown-menu {
  .dropdown-item {
    border-radius: 0.1875rem;
    transition: all 0.2s ease-in-out;
    color: #566379;
    width: 100%;

    &:hover {
      background-color: #e7f3fc; /* baby blue */
      color: #2d3440; /* gray 900 */
      transition: all 0.2s ease-in-out;

      svg {
        fill: #2d3440; /* gray 900 */
        transition: all 0.2s ease-in-out;
      }
    }

    &.has-description:last-child,
    &.no-description:last-child {
      margin-bottom: 0;
    }

    &.has-description,
    &.no-description {
      margin-bottom: 4px;
      padding: 0.5rem;
    }
  }
}

.dropdown-multi {
  text-align: left;

  .dropdown-multi-title {
    color: #566379; /* gray 700 */
  }

  .dropdown-multi-description {
    display: none;
    margin-bottom: 0;
  }

  > .d-flex {
    flex-direction: column;
  }

  .d-flex {
    gap: 8px;
  }
}

.nav-image {
  width: 32px;
}

.nav-icon {
  line-height: 10px;
  margin-right: 8px;

  svg {
    fill: #7c899f; /* gray 500 */
    height: 16px;
    width: 16px;
  }
}

@media screen and (min-width: 56.875em) {
  .site-header {
    .navbar-collapse,
    .navbar-collapse.show {
      display: flex;
      flex-basis: auto;
      overflow: visible;
      visibility: visible;

      > *:first-child {
        margin-left: 1rem;
        margin-top: 0;
      }

      > *:nth-child(2) {
        margin: 0;
        margin-left: auto;
        padding: 0;

        > *:first-child {
          margin-bottom: 0;
        }
      }
    }

    .navbar-nav {
      flex-direction: row;
    }

    .dropdown {
      .dropdown-menu {
        box-shadow:
          0 2px 6px 2px #0000000d,
          0 1px 10px 0 #0000000f;
        position: absolute;
      }

      .dropdown-toggle::after {
        width: 12px;
      }
    }
  }

  .mega-menu-bg {
    display: block;
  }

  .dropdown-multi {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    border-radius: 8px !important;

    .dropdown-multi-title {
      font-weight: 600;
      color: #2d3440; /* gray 900 */
      margin-bottom: 0.5rem;
    }

    .dropdown-multi-description {
      display: block;
    }

    .d-flex {
      gap: 16px;
      flex-direction: row;
    }
  }

  .dropdown-menu {
    .dropdown-item.has-description {
      padding: 0.25rem 0.5rem;
      margin-bottom: 8px;
      width: 320px;
    }

    .dropdown-item.no-description {
      margin-bottom: 8px;
      line-height: 23.2px;
    }
  }

  .nav-image {
    width: 56px;
    margin: 8px;
  }
}
