.nav {
    width: 100%;
    height: 120px;
    display: none;
    margin-top: 20px;
    font-family: 'Comfortaa', sans-serif;
}

.nav>* {
    min-width: 60px;
    height: 20px;
    float: left;
    clear: right;
    text-decoration: none;
    border: 1px solid #999;
    border-radius: 2.5px;
    padding: 2.5px 15px;
    margin: 1px 5px;
    text-transform: uppercase;
    text-align: center;
    font-size: 0.8em;
    line-height: 1.5em;
    color: #333;
    margin-right: 1em;
}

nav.main-nav {
  width: 40%;
  height: 90%;
  display: inline-block;
  margin: 0;
  padding:0 1%;
  position:fixed;
  margin: 2% 0 0 0;
  right:-80%;
  z-index: 1000;
  background-color: #FFFFFF;
  /*
  background-color: rgba(255,255,255,0.5);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  */
  animation-name: navClose;
  animation-duration: 0.5s;
  animation-timing-function: ease-in-out;
}

.pages.nav-open-pages {
    margin-left: -43%;
    animation-name: navOpenPages;
    animation-duration: 0.5s;
    animation-timing-function: ease-in-out;
}

.pages.nav-open-pages * {
    filter: blur(4px);
    -webkit-filter: blur(4px);
}

nav.main-nav.nav-open{
  right: 6%;
  animation-name: navOpen;
  animation-duration: 0.5s;
}

@keyframes navOpen {
 from {right: -80%;}
 to {right: 0;}
}

@keyframes navClose {
 from {right: 0;}
 to {right: -80%;}
}

@keyframes navOpenPages {
 from {margin-left: 0;}
 to {margin-left: -43%;}
}

@keyframes navClosePages {
 from {margin-left: -43%;}
 to {margin-left: 0;}
}

nav.main-nav ul{
  margin-top: 100px;
}

nav.main-nav ul li{
  list-style: none;
  height: 60px;
  align-items: center;
}

nav.main-nav ul li a{
  font-family: 'Comfortaa', sans-serif;
  text-decoration: none;
  color: #005570;
  line-height: 60px;
  font-size: 1.5em;
  cursor: pointer;
  display: inline-block;
  width: 90%;
}

nav.main-nav ul li a:hover{
  color: #B10239;
}

header.menu {
  width: 4%;
  height: 90%;
  display: inline-block;
  margin: 2% 0 0 0;
  position:fixed;
  cursor: pointer;
  top:0;
  right:0;
  z-index: 2000;
  background-color: rgba(255,255,255,1);
  padding: 0 0.5%;
  text-align: center;
  display: inline-block;
  justify-content: center;
  align-items: flex-start;

}

header.menu.on {
  background-color: rgba(255,255,255,1);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

header.menu svg{
  margin-top: 20px;
}

header.menu .menu-text{
  color: #005570;
  text-transform: uppercase;
  font-size: 0.8em;
  width: 100px;
  height: 18px;
  display: block;
  margin-top: 40px;
  margin-left: calc(50% - 3px);
  transform: translate(-50%,-50%) rotate(90deg);
}

/*
header.menu:not(.on) .menu-text:first-of-type, 
header.menu.on .menu-text:last-of-type{
  display: block !important;
}

header.menu:not(.on) .menu-text:last-of-type, 
header.menu.on .menu-text:first-of-type{
  display: none !important;
}
*/

header.menu:hover{
  color: #B10239;
  fill: #B10239;
}

header.menu:hover .line{
  stroke: #B10239;
}

header.menu:hover .menu-text{
  color: #B10239;
}

header.mobile-header-logo{
  display:none;
}

@media only screen and (max-width: 768px) {
  header.menu{
    width: 100%;
    height: 50px;
    margin-top:0;
    justify-content: right;
  }

  header.menu svg{
    width:50px;
    text-align: right;
    float:right;
    margin-top: 0;
  }

  header.menu .menu-text{
    display: none !important;
  }

  .pages, .pages.nav-open-pages {
      margin-left: 2.5%;
      animation-name:none;
  }

  nav.main-nav{
      width: 90%;
      right:auto;
      margin-top: -200%;
      margin-left: 2.5%;
  }

  nav.main-nav.nav-open{
    right:auto;
    margin-top:15%;
  }

  @keyframes navOpen {
   from {margin-top: -200%;}
   to {margin-top: 15%;}
  }

  @keyframes navClose {
   from {margin-top: 15%;}
   to {margin-top: -200%;}
  }

  .mobile-header-logo{
    background: url(../media/images/logo.svg) no-repeat;
    background-size: contain;
    height: 60%;
    width: 50px;
    margin: 3% 3%;
    float: left;
    clear:right;

  }
}

svg {
  display: block;
  width: 90%;
  height: 50px;
}

.line {
  fill: none;
  stroke: #005570;
  stroke-width: 6px;
  stroke-linecap: square;
  stroke-linejoin: bevel;
}

/* Hamburger */
.line.top,
.line.bottom {
  stroke-dasharray: 50px 600px;
  stroke-dashoffset: 0px;
}

.line.cross {
  stroke-dasharray: 50px 60px;
  stroke-dashoffset: 0px;
}

/* Cross */
.on .line.top,
.on .line.bottom {
  stroke-dasharray: 70.71px 600px;
  stroke-dashoffset: -392px;
}

.on .line.cross {
  stroke-dasharray: 50px 60px;
  stroke-dashoffset: 51px;
}

/* Timing */
.line.cross {
  -webkit-transition: 0.35s stroke-dasharray ease 0.35s, 0.35s stroke-dashoffset ease 0.35s, 0.35s stroke ease 0s;
  transition: 0.35s stroke-dasharray ease 0.35s, 0.35s stroke-dashoffset ease 0.35s, 0.35s stroke ease 0s;
}

.line.top {
  -webkit-transition: 0.525s stroke-dasharray ease 0s, 0.525s stroke-dashoffset ease 0s, 0.35s stroke ease 0s;
  transition: 0.525s stroke-dasharray ease 0s, 0.525s stroke-dashoffset ease 0s, 0.35s stroke ease 0s;
}

.line.bottom {
  -webkit-transition: 0.525s stroke-dasharray ease 0.35s, 0.525s stroke-dashoffset ease 0.35s, 0.35s stroke ease 0s;
  transition: 0.525s stroke-dasharray ease 0.35s, 0.525s stroke-dashoffset ease 0.35s, 0.35s stroke ease 0s;
}

.on .line.cross {
  -webkit-transition: 0.35s stroke-dasharray ease 0s, 0.35s stroke-dashoffset ease 0s, 0.35s stroke ease 0s;
  transition: 0.35s stroke-dasharray ease 0s, 0.35s stroke-dashoffset ease 0s, 0.35s stroke ease 0s;
}
