body, html {
	/* needed to stop the menu from creating horizontal scrollbar if positioned off stage to the right */
	overflow-x:hidden !important;
	position:relative !important;
}
body {
	z-index: -1 !important;
}
html {
	z-index: 1 !important;
}
#menuToggle {
  position: absolute;
  top: 30px;
  right: 30px;
  z-index: 2;
}

/* Button reset */
#menuToggle button {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  position: relative;
    z-index: 1;
}

/* Hamburger lines */
#menuToggle span {
  display: block;
  width: 33px;
  height: 4px;
  margin-bottom: 5px;
  background: #cd171e;
  border-radius: 3px;
  transition: transform 0.4s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* Open state (X) */
#menuToggle button[aria-expanded="true"] span:first-child {
  transform: rotate(45deg) translate(6px, 6px);
    background: #FFF;
}

#menuToggle button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

#menuToggle button[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
    background: #FFF;
}

/* Menu panel */
#mobilemenu {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100vh;
  padding: 100px 30px;
  background: #cd171e;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
}

#menuToggle button[aria-expanded="true"] + #mobilemenu {
  transform: translateX(0);
}

#mobilemenu li
{
  padding: 5px;
  font-size: 16px;
}
#mobilemenu a:link, #mobilemenu a:visited, #mobilemenu button {
	text-decoration: none;
	color: #fff;
    text-align: left;
}
#mobilemenu a:hover {
	color: #fff;
}

.mobilenavsublink {
	margin: 10px 5px;
}
.mobilenavsublink a {
	padding: 5px 5px 5px 0px;
}
.mobilenavsublink a:link, .mobilenavsublink a:visited {
	color: #fff !important;
}

.submenu-toggle + ul {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.submenu-toggle[aria-expanded="true"] + ul {
  max-height: 500px; /* enough to show all items */
}
