* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}
nav {
  background: #222;
  padding: 0 15px;
}
a {
  cursor: pointer;
  font-size: 1.2rem;
  color: white;
  text-decoration: none;
}
.menu,
.submenu {
  list-style-type: none;
  z-index: 100;
}
.logo {
  color: white;
  font-size: 20px;
  padding: 7.5px 10px 7.5px 0;
}
.item {
  padding: 15px 10px 10px;
}
.item a:hover,
.item a:hover::after {
  color: #ccc;
}
/* Mobile menu */
.menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}
.menu li a,
.menu li h1 {
  display: block;
  padding: 15px 5px;
}
.menu li.subitem a {
  padding: 15px;
}
.toggle {
  order: 1;
  font-size: 20px;
}
.menu .toggle a {
  position: relative;
  width: 40px;
  height: 28px;
}
.menu .toggle a span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: #fff;
  border-radius: 4px;
  display: inline-block;
  transition: all .4s;
  box-sizing: border-box;
}
.menu .toggle a span:nth-of-type(1){
  top: 0;  
}
.menu .toggle a span:nth-of-type(2){
  top: 12;
}
.menu .toggle a span:nth-of-type(3){
  bottom: 0;
}
.active span:nth-of-type(1) {
  -webkit-transform: translateY(12px) rotate(-45deg);
  transform: translateY(12px) rotate(-45deg);
}
.active span:nth-of-type(2) {
  opacity: 0;
}
.active span:nth-of-type(3) {
  -webkit-transform: translateY(-14px) rotate(45deg);
  transform: translateY(-14px) rotate(45deg);
}
.item {
  order: 3;
  width: 100%;
  text-align: center;
  display: none;
}
.active .item {
  display: block;
}
/* Mobile submenu */
.submenu {
  display: none;
}
.submenu-active .submenu {
  display: block;
}
.has-submenu i {
  font-size: 12px;
}
.has-submenu > a::after {
  font-family: "Icons";
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
  content: "\f107";
  color: white;
  padding-left: 5px;
}
.subitem a {
  color: white;
  padding: 10px 15px;
}
.subitem a:hover {
  color: #ccc;
}
.submenu-active {
  background-color: #111;
  border-radius: 3px;
}

/* Desktop menu */
@media all and (min-width: 960px) {
  .menu {
    justify-content: center;
    align-items: flex-start;
    flex-wrap: nowrap;
    background: none;
  }
  .logo {
    flex: 1;
    order: 0;
  }
  .item {
    order: 1;
    position: relative;
    display: block;
    width: auto; /* 100%(mobile) -> auto(desktop) */
  }
  .subitem{
    min-width: 250px;
  }
  .submenu-active .submenu {
    display: block;
    position: absolute;
    left: 0;
    top: 68px;
    background: #111;
  }
  .toggle {
    flex: 1;
    text-align: right;
    display: none;
  }
  .submenu-active {
    border-radius: 0;
  }
}
