/* Keep the brand and links on separate rows on wide screens. */
.site-navigation {
  padding: 0.5rem 1rem;
}

.site-navigation .site-navigation-container {
  display: flex;
  flex-wrap: wrap;
}

.site-navigation-brand {
  display: block;
  margin-left: auto;
}

.site-navigation-brand img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 80px;
}

.site-navigation .navbar-collapse {
  flex-basis: 100%;
}

.site-navigation .navbar-nav {
  width: 100%;
  padding: 0.5rem 0;
}

.site-navigation .nav-link {
  padding: 0.5rem 0.75rem;
  line-height: 20px;
  white-space: nowrap;
}

.site-navigation .site-navigation-toggle {
  float: none;
  width: 44px;
  height: 44px;
  padding: 10px;
}

/* A CSS menu icon works even when the external icon font is unavailable. */
.site-navigation-toggle-icon {
  display: block;
  height: 18px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}

.site-navigation-spacer {
  height: 148px;
}

/* Collapse before the nine links become cramped or wrap. */
@media (max-width: 1199.98px) {
  .site-navigation .navbar-collapse {
    max-height: calc(100vh - 96px);
    overflow-y: auto;
  }

  .site-navigation-spacer {
    height: 96px;
  }
}

@media (min-width: 1200px) {
  .site-navigation-brand {
    flex-basis: 100%;
  }

  .site-navigation-brand img {
    margin-left: auto;
  }

  .site-navigation .navbar-nav {
    justify-content: center;
  }
}
