.navFadeIn {
  animation-name: navFadeInAnim !important;
  animation-duration: 0.5s;
  background-color: rgba(20, 60, 140, 1);
}
.navFadeOut {
  animation-name: navFadeOutAnim !important;
  animation-duration: 0.5s;
  background-color: rgba(20, 60, 140, 0);
}

@keyframes navFadeInAnim {
  from {background-color: rgba(20, 60, 140, 0);}
  to {background-color: rgba(20, 60, 140, 1);}
}
@keyframes navFadeOutAnim {
  from {background-color: rgba(20, 60, 140, 1);}
  to {background-color: rgba(20, 60, 140, 0);}
}

nav {
  background-color: rgba(20, 60, 140, 0);
  position: relative;
  padding: 0;
  width: 100%;
  height: 60px;
  text-align: right;
  z-index: 100;
}

#navbar span a {
  float: left;
  padding: 0;
  height: 60px;
  color: white;
  text-decoration-line: none;
}
#navbar span a img {
  padding: 5px;
  padding-left: 20px;
  width: 50px;
  height: 50px;
}
#navbar span a h2 {
  margin: 0;
  padding: 15px 0;
  padding-left: 5px;
  height: 30px;
  font-family: 'Lobster';
  font-weight: normal;
}

.navbutton {
  float: right;
  margin: 10px;
  margin-top: 18px;
  margin-bottom: 18px;
  padding: 1px;
  color: white;
  text-decoration-line: none;
  font-size: 20px;
  font-family: 'Alata';
}
.navbutton:hover {
  color: rgb(100,180,255);
  border-bottom-width: 2px;
  border-bottom-style: solid;
  border-bottom-color: rgb(100,180,255);
}
.navbutton:nth-child(3) {
  margin-right: 30px;
}

.navtoggle {
  display: none;
  float: right;
  margin: 10px;
  margin-left: 0;
  margin-right: 20px;
  width: 40px;
  height: 40px;
}
#navbar1, #navbar2, #navbar3 {
  background-color: white;
  margin: 6px 0;
  width: 40px;
  height: 5px;
  transition: 0.5s;
}
.change #navbar1 {
  transform: rotate(-45deg) translate(-8px, 8px);
}
.change #navbar2 {
  opacity: 0;
}
.change #navbar3 {
  transform: rotate(45deg) translate(-8px, -8px);
}
#navdisplay {
  visibility: hidden;
  background-color: rgb(20, 60, 140);
  position: fixed;
  top: -200px;
  padding: 0;
  padding-top: 10px;
  width: 100%;
  height: 60px;
  text-align: right;
  z-index: 90;
  transition: 0.8s;
}
.displaychange {
  transform: translateY(259.5px)
}
.navdisplaybutton {
  float: left;
  margin: 10px;
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 1px;
  color: white;
  text-decoration-line: none;
  font-size: 20px;
  font-family: 'Arial';
}
.navdisplaybutton:hover {
  color: rgb(20,20,60);
  border-bottom-width: 2px;
  border-bottom-style: solid;
  border-bottom-color: rgb(100,180,255);
}
.navdisplaybutton:nth-child(1) {
  margin-left: calc(100% - 360px);
}

@media (max-width: 760px) {
  .navbutton {
    display: none;
  }
  
  .navdropdown {
    display: none;
  }

  .navtoggle {
    display: block;
  }

  #navdisplay {
    height: 60px;
  }
}

@media (max-width: 500px) {
  #navdisplay {
    height: 160px;
  }

  .navdisplaybutton {
    margin: 15px;
    margin-left: auto !important;
    margin-right: auto;
    width: 100%;
    text-align: center;
  }
}