#nav li a {
  display: block;
  position: relative;
}
#nav .menu-item-has-children > a:after {
  display: block;
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transition: .2s;
  margin: auto;
}
#nav .menu-item-has-children > a:after {
  content:"\02228";
  font-size: 10px;
}
#nav .menu-item-has-children > a.open:after {
  content:"\02227";
}
#nav .menu-item-has-children > a.open:after{
  background: transparent;
}
#nav .menu-item-has-children .sub-menu {
  display: none;
}
@media only screen and ( max-width : 767px ) {
  .overlay {
    width: 0;
    height: 0;
    position: fixed;
    z-index: 11;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity .5s;
    background: rgba(255,255,255,.7);
  }
  .overlay.open {
    width: 100%;
    height: 100%;
    opacity: 1;
  }
  #main {
    transition: all .5s;
    min-height: 100vh;
  }
  #main.open {
    width: 100%;
  }
  #menu_btn {
    top: 12px;
    right: 15px;
    transition: .3s;
    cursor: pointer;
    position: fixed;
    z-index: 9999;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 1px solid #10005a;
    border-radius: 50%;
  }
  .menu-trigger {
    width: 18px;
    height: 16px;
    position: relative;
  }
  .menu-trigger span {
    display: inline-block;
    box-sizing: border-box;
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #10005a;
    transition: all .5s;
  }
  .menu-trigger span:nth-of-type(1) {
    top: 0;
  }
  .menu-trigger span:nth-of-type(2) {
    top: 7px;
  }
  .menu-trigger span:nth-of-type(3) {
    bottom: 0;
  }
  #menu_btn.active .menu-trigger span:nth-of-type(1) {
    transform: translateY(7px) rotate(-45deg);
  }
  #menu_btn.active .menu-trigger span:nth-of-type(2) {
    opacity: 0;
  }
  #menu_btn.active .menu-trigger span:nth-of-type(3) {
    transform: translateY(-7px) rotate(45deg);
  }
  #nav {
    width: 280px;
    height: 100%;
    overflow: auto;
    padding: 90px 0;
    background: #10005a;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 12;
    transform: translate(280px);
    transition: all .5s;
    z-index: 999;
  }
  #nav.open {
    transform: translateZ(0);
  }
  #nav li {
    padding: 0 20px;
  }
  #nav li a {
    position: relative;
    padding: 20px;
    color: #fff;
  }
  #nav .menu-item-has-children .sub-menu {
    padding: 20px;
    list-style: none;
    margin-left: 8px;
  }
  #nav .menu-item-has-children > a:first-of-type {
    position: relative;
    padding-right: 2em;
  }
  #nav .menu-item-has-children .sub-menu li {
    padding: 0;
    margin-bottom: 20px;
  }
  #nav .menu-item-has-children .sub-menu li:last-child {
    margin-bottom: 0;
  }
  #nav .menu-item-has-children .sub-menu li a {
    padding: 0;
  }
}

@media print, screen and ( min-width : 768px ) {
  #menu_btn,.overlay {
    display: none;
  }
  #nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
  }
  #nav li {
    position: relative;
    margin: 0;
    padding: 14px;
  }
  #nav .menu-item-has-children > a {
    padding-right: 16px;
  }
  #nav li ul.sub-menu {
    flex-direction: column;
    background: #fff;
    position: absolute;
    width: max-content;
    left: 50%;
    top: 100%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    padding: 8px 0;
    z-index: 9999;
  }
  #nav li ul.sub-menu li {
    width: 100%;
  }
  #nav li ul.sub-menu li a {
    line-height: 1.6em;
  }
  #nav li ul.sub-menu li a:hover {
    color: #10005a;
  }
}
