/* COLOURS */

/*

DARK BLUE (backgr)
#4e4e4e

DARK BLUE2 (link hover, link borders)
#525252

DARK BLUE3 (close menu)
#7a7a7a

*/

.navbar {
  position:fixed;
  left:0;
  right:0;
  border:none;
}

/* Navigation Menu - Background */
.navigation {
  /* critical sizing and position styles */
  width: 300px;
  height: 100%;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  
  /* non-critical appearance styles */
  list-style: none;
  background-color: #4e4e4e;
}

a.closemenu {
    display:block;
    width:300px;
    padding: 2.1rem;
    padding-left: 55px;
    background-image:url('../images/closemenu.png');
    background-repeat:no-repeat;
    background-size:15px;
    background-position:30px 37px;
    color:#7a7a7a;
    font-size:1.4rem;
    line-height:1.6;
    text-transform: uppercase;
    transition: all 0.2s ease;
}
a.closemenu:hover {
    text-decoration:none;
}
a.closemenu.shrink {
    padding: 1.4rem;
    padding-left: 55px;
    background-position:30px 28px;
}

.navigation ul {
    border-top: 1px solid #525252;
}

/* Navigation Menu - List items */
.nav-item {
  /* non-critical appearance styles */
  width: 300px;
  border-bottom: 1px solid #525252;
}

.nav-item a, .nav-item label {
  /* non-critical appearance styles */
  display: block;
  width: 300px;
  padding: .7rem;
  padding-left: 30px;
  color: white;
  font-size: 1.4rem;
  line-height:1.6;
  text-decoration: none;
  transition: color 0.2s, background 0.5s;
  text-transform: uppercase;
  cursor: pointer;
  margin-bottom:0px;
  font-weight:normal;
}

.nav-item label {
    background-image:url(../images/hassubmenu.png);
    background-repeat:no-repeat;
    background-position:260px 15px;
    background-size:auto 16px;
}

.nav-item a:hover, .nav-item label:hover {
  color: #fff;
  background-color:#525252;
}

/* Site Wrapper - Everything that isn't navigation */
.site-wrap {
  /* Critical position and size styles */
  min-height: 100%;
  min-width: 100%;
  background-color: #fff; /* Needs a background or else the nav will show through */
  position: relative;
  top: 0;
  bottom: 100%;
  left: 0;
  z-index: 1;
  
  /* non-critical apperance styles */
  background-size: 200%;
}

/* Nav Trigger */
.nav-trigger, .bannernavx-trigger {
  /* critical styles - hide the checkbox input */
  position: fixed;
  clip: rect(0, 0, 0, 0);
}

label[for="nav-trigger"] {
  /* critical positioning styles */
  position: fixed;
  right: 55px;
  top: 31px;
  z-index: 4;
  transition: bottom 0.2s ease;
  
  /* non-critical apperance styles */
  height: 30px;
  width: 30px;
  cursor: pointer;
  background-image: url('../images/menu.png');
  background-repeat: no-repeat;
  /*
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' x='0px' y='0px' width='30px' height='30px' viewBox='0 0 30 30' enable-background='new 0 0 30 30' xml:space='preserve'><rect width='30' height='6'/><rect y='24' width='30' height='6'/><rect y='12' width='30' height='6'/></svg>");
  */
  background-size: contain;
}

/* Make the Magic Happen */
.nav-trigger + label, .site-wrap, nav {
  transition: left 0.2s ease;
}
/*
nav {
  -webkit-transition: all 0.2s ease;
  -moz-transition: all 0.2s ease;
  -o-transition: all 0.2s ease;
  -ms-transition: all 0.2s ease;
  transition: all 0.2s ease;
}
*/
.nav-trigger + label {
  right: 55px;
  transition: all 0.2s ease;
}
.nav-trigger:checked + label {
  right: 355px;
}
/*
.bannernavx-trigger ~ nav {
  left:0;
  right: 0;
  transition: all 0.2s ease;
}
    */
.bannernavx-trigger:checked ~ nav {
    left:-300px;
    right: 300px;
}

.nav-trigger:checked ~ .navigation {
  border: 4px solid red;
}
.nav-trigger:checked ~ .site-wrap, .nav-trigger:checked label[for="search-trigger"] {
  left: -300px;
  /*box-shadow: 0 0 5px 5px rgba(0,0,0,0.1);*/
}

.nav-trigger:checked ~ .site-wrap div div nav {
  left: -300px;
  right: 300px;
  transition: all 0.2s ease;
  /*transition: right 0.2s;*/
}

body {
	/* Without this, the body has excess horizontal scroll when the menu is open */
  overflow-x: hidden;
}

/* Micro reset */
*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;}
/*html, body { height: 100%; width: 100%; }*/


/* SHRINK STYLES */
label[for="nav-trigger"].shrink {
    top:21px;
}


/* SUB MENU STYLES */
li.has-submenu {
}
ul.submenu {
    margin-top:89px;
    position:absolute;
    top:0;
    left:0;
    width:300px;
    opacity:0;
    z-index:-1;
    background-color: #4e4e4e;
    height:100%;
    transition: all 0.2s ease;
}
ul.submenu.shrink {
    margin-top:69px;
}

.submenu-trigger {
  /* critical styles - hide the checkbox input */
  position: fixed;
  clip: rect(0, 0, 0, 0);
}
.submenu-trigger:checked ~ ul.submenu {
    opacity:100;
    z-index:5;
}

.nav-item a.submenu-back {
    padding-left:47px;
    background-image:url(../images/back.png);
    background-repeat:no-repeat;
    background-position:30px 18px;
    background-size:auto 16px;
    color:#7a7a7a;
}


@media (max-width: 768px) {
    label[for="nav-trigger"].shrink {
        right:35px;
    }
    .nav-trigger:checked + label {
      right: 335px;
    }
}

@media (max-width: 510px) {
    label[for="nav-trigger"].shrink {
        right:35px;
    }
    .nav-trigger:checked + label {
      right: 335px;
    }
    .navigation {
        overflow-y: auto;
        overflow-x: hidden;
    }    
}

@media (max-width: 440px) {
    label[for="nav-trigger"].shrink {
    	right:15px;
    }
    .nav-trigger:checked + label {
    	right:315px;
    }
    .navigation {
        overflow-y: auto;
        overflow-x: hidden;
    }    
}
