/* Main menu settings */
#centeredmenu {
   clear:both;
/*    float:left; */
   margin:0;
   margin-top: .5em;
   padding:0;
   /* border-bottom:1px solid #000; */ /* black line below menu */
   width:100%;
   /* font-family:Verdana, Geneva, sans-serif; */ /* Menu font */
   font-size:100%; /* Menu text size */
   z-index:1000; /* This makes the dropdown menus appear above the page content below */
   position:relative;
}

/* Top menu items */
#centeredmenu ul {
   margin:0;
   padding:0;
   list-style:none;
/*    float:right; */
/*    position:relative;
   right:50%; */
}
#centeredmenu ul li {
   margin:0 0 0 1px;
   padding:0;
   float:left;
   position:relative;
   left:1%;
   top:1px;
}
#centeredmenu ul li a {
   display:block;
   margin:0;
   padding:.6em .5em .4em;
   font-size:1em;
   line-height:1em;
   background:#eee;
   text-decoration:none;
   color:#444;
/*    font-weight:bold; */
   border-bottom:1px solid #000;
}
#centeredmenu ul li.active a {
   color:#fff;
   background:#000;
}
#centeredmenu ul li a:hover {
   background:#36f; /* Top menu items background colour */
   color:#fff;
   border-bottom:1px solid #03f;
}
#centeredmenu ul li:hover a,
#centeredmenu ul li.hover a { /* This line is required for IE 6 and below */
   background:#36f; /* Top menu items background colour */
   color:#fff;
   border-bottom:1px solid #03f;
}

/* Submenu items */
#centeredmenu ul ul {
   display:none; /* Sub menus are hiden by default */
   position:absolute;
   top:2em;
   left:0;
   right:auto; /*resets the right:50% on the parent ul */
   width:10em; /* width of the drop-down menus */
}
#centeredmenu ul ul li {
   left:auto;  /*resets the left:50% on the parent li */
   margin:0; /* Reset the 1px margin from the top menu */
   clear:left;
   width:100%;
}
#centeredmenu ul ul li a,
#centeredmenu ul li.active li a,
#centeredmenu ul li:hover ul li a,
#centeredmenu ul li.hover ul li a { /* This line is required for IE 6 and below */
   font-size:1em;
   font-weight:normal; /* resets the bold set for the top level menu items */
   background:#eee;
   color:#444;
   line-height:1.4em; /* overwrite line-height value from top menu */
   border-bottom:1px solid #ddd; /* sub menu item horizontal lines */
}
#centeredmenu ul ul li a:hover,
#centeredmenu ul li.active ul li a:hover,
#centeredmenu ul li:hover ul li a:hover,
#centeredmenu ul li.hover ul li a:hover { /* This line is required for IE 6 and below */
   background:#36f; /* Sub menu items background colour */
   color:#fff;
}

/* Flip the last submenu so it stays within the page */
#centeredmenu ul ul.last {
   left:auto; /* reset left:0; value */
   right:0; /* Set right value instead */
}

/* Make the sub menus appear on hover */
#centeredmenu ul li:hover ul,
#centeredmenu ul li.hover ul { /* This line is required for IE 6 and below */
   display:block; /* Show the sub menus */
}

#centeredmenu ul li span {
   display: inline-block;
   width: 10px;
   height: 10px;
   font-size: 10px;
}
#centeredmenu input.cb {
   display: none;
   z-index: 10;
}
div.hm {
   border: 1px solid #fe6666;
   border-radius: 4px;
   display: none;
}
div.bars {
   position: absolute;
   top: -77px;
   right: 16px;
   z-index: 5;
   width: 26px;
   height: 26px;
}
div.bars div {
   width: 26px;
   height: 3px;
   background-color: #ffffff;
   margin: 6px 0;
}
div.close {
   position: absolute;
   top: -77px;
   right: 16px;
   width: 26px;
   height: 26px;
   z-index: 5;
}
div.close:before, div.close:after {
   position: absolute;
   top: 7px;
   left: 22px;
   content: ' ';
   height: 27px;
   width: 3px;
   background-color: #ffffff;
}
div.close:before {
   transform: rotate(45deg);
}
div.close:after {
   transform: rotate(-45deg);
}

/* Responsive layout 640px */
@media (max-width: 640px) {
   .bars, .close {
      text-align: right;
      padding: 5px 10px 10px 10px;
      color: #ffffff;
      font-size: 25px;
      display: block;
   }
   #menu {
      display: none;
      margin: 50px 0 30px 0;
      min-height: 200px;
      height: auto;
   }
   #centeredmenu ul li {
      float: none;
      position: static;
      padding: 2px;
   }
   #centeredmenu ul li a {
      background: #fe6666;
      border-bottom: 0;
      font-weight: bold;
      color: #ffffff;
   }
   #centeredmenu ul ul li {
      padding-left: 0px;
   }
   #centeredmenu ul li:hover a,
   #centeredmenu ul li:hover ul li a {
      background: #ff0000;
      color: #ffffff;
      border-bottom: 0;
   }
   #centeredmenu input.cb {
      position: absolute;
      top: -77px;
      right: 16px;
      display: block;
      width: 40px;
      height: 40px;
      cursor: pointer;
      opacity: 0;
   }
   #centeredmenu ul ul.last {
      position: static;
   }
   #centeredmenu input.cb:checked ~ .close {
      display: block;
   }
   #centeredmenu input.cb:checked ~ .bars {
      display: none;
   }
   #centeredmenu input.cb:not(:checked) ~ .close {
      display: none;
   }
   #centeredmenu input.cb:not(:checked) ~ .bars {
      display: block;
   }
   #centeredmenu input.cb:checked ~ #menu {
      background-color: #fe6666;
      display: block;
   }
   #centeredmenu input.cb:checked ~ #search-container {
      background-color: #fe6666;
      display: block;
   }
}
