/* Shared navigation styles.
 *
 * Styles the site navigation (rendered by src/nav/index.js) uniformly across
 * every page, so the nav look-and-feel is defined once instead of being
 * copy-pasted into each page's stylesheet.
 *
 * Pages whose layout needs a different nav placement can override the outer
 * box in their own CSS, e.g. full-width navs or a different outer margin:
 *   .nav-modern { width: 100%; margin: 0 0 16px; }
 */

.nav-modern {
  width: 100%;
  background: #333;
  color: #fff;
  overflow: visible;
  border-radius: 14px;
  margin: 24px 24px 16px;
}

.nav-modern ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

.nav-modern li {
  position: relative;
}

.nav-modern a {
  color: #fff;
  text-decoration: none;
  padding: 12px 15px;
  display: block;
  line-height: normal;
  text-align: center;
  white-space: nowrap;
}

.nav-modern a:hover {
  background: #666;
  text-decoration: none;
}

.nav-modern li:first-child > a {
  border-radius: 14px 0 0 14px;
}

.nav-modern .dropdown-content {
  display: none;
  position: absolute;
  background-color: #333;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  border-radius: 0 0 14px 14px;
  top: 100%;
  left: 0;
  overflow: hidden;
}

.nav-modern li:hover .dropdown-content {
  display: block;
}

.nav-modern .dropdown-content a {
  padding: 12px 15px;
  text-align: left;
  white-space: nowrap;
  border-radius: 0;
}

.nav-modern .dropdown-content a:last-child {
  border-radius: 0 0 14px 14px;
}

.nav-modern .dropdown-content a:hover {
  background-color: #666;
}

@media (max-width: 600px) {
  .nav-modern .dropdown-content {
    position: static;
    box-shadow: none;
    border-radius: 0;
  }
  .nav-modern .dropdown-content a:last-child {
    border-radius: 0;
  }
}
