#mobile-menu nav {
    background-color: rgba(0, 0, 0, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    margin: 0 auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}
#mobile-menu nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  position: absolute;
  left: 50%;
  top: 170px;
  transition: all 0.3s ease-in-out;
  transform: translateX(-50%);
}
#mobile-menu nav ul li {
  margin: 0;
  transform: translateY(50px);
  opacity: 0;
}
#mobile-menu nav ul li a {
    width: 100%;
    display: block;
    font-size: 16px;
    text-decoration: none;
    padding: 20px 0;
    text-align: center;
    color: #fff;
    transition: all 0.2s ease-in-out;
    -webkit-transition: all 0.8s ease-out;
    -moz-transition: all 0.8s ease-out;
    -o-transition: all 0.8s ease-out;
    transition: all 0.8s ease-out;
}
#mobile-menu nav ul li a:hover {
    color: #FFF;
    background-color: #666;
}

.toggle-btn {
    width: auto;
    position: relative;
    margin: 0;
    padding: 0;
    display: block;
    z-index: 10;
    cursor: pointer;
}
.toggle-btn .bar {
  width: 30px;
  height: 2px;
  margin: 7px auto;
  background-color: #fff;
  transition: all 0.3s ease-in-out;
}
.toggle-btn .bar:nth-child(2) {
  width: 20px;
}

#toggle:checked ~ nav {
    opacity: 1;
    visibility: visible;
    margin: 0;
    text-align: center;
    display: block;
}
#toggle:checked ~ nav ul {
    top: 10%;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    display: block;
}
#toggle:checked ~ nav ul li {
  transform: translateY(0px);
  opacity: 1;
}
#toggle:checked ~ nav ul li::before {
  display: none;
}
#toggle:checked ~ nav ul li:nth-child(1) {
  transition: all 0.3s cubic-bezier(0.6, 0, 0.8, 1.5) 0.1s;
}
#toggle:checked ~ nav ul li:nth-child(2) {
  transition: all 0.3s cubic-bezier(0.6, 0, 0.8, 1.5) 0.2s;
}
#toggle:checked ~ nav ul li:nth-child(3) {
  transition: all 0.3s cubic-bezier(0.6, 0, 0.8, 1.5) 0.3s;
}
#toggle:checked ~ nav ul li:nth-child(4) {
  transition: all 0.3s cubic-bezier(0.6, 0, 0.8, 1.5) 0.4s;
}
#toggle:checked ~ nav ul li:nth-child(5) {
  transition: all 0.3s cubic-bezier(0.6, 0, 0.8, 1.5) 0.5s;
}
#toggle:checked ~ nav ul li:nth-child(6) {
  transition: all 0.3s cubic-bezier(0.6, 0, 0.8, 1.5) 0.6s;
}
#toggle:checked ~ nav ul li:nth-child(7) {
  transition: all 0.3s cubic-bezier(0.6, 0, 0.8, 1.5) 0.7s;
}
#toggle:checked ~ nav ul li:nth-child(8) {
  transition: all 0.3s cubic-bezier(0.6, 0, 0.8, 1.5) 0.8s;
}
#toggle:checked ~ nav ul li:nth-child(9) {
  transition: all 0.3s cubic-bezier(0.6, 0, 0.8, 1.5) 0.9s;
}
#toggle:checked + label.toggle-btn .bar {
  background-color: lightgray;
}
#toggle:checked + label.toggle-btn .bar:nth-child(2) {
  transform: translateX(50px);
  opacity: 0;
}
#toggle:checked + label.toggle-btn .bar:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
#toggle:checked + label.toggle-btn .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media only screen and (max-width: 540px) {

#mobile-menu nav ul li a {
    padding: 15px 0;
}
    
}