html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article,aside,details,figcaption,figure,footer,header,main,hgroup,menu,nav,section{
  display: block;
  position: relative;
}

.gallery figure{
	display: inline-block;
}


/* Some defaults */
body{
  line-height: 1.4em;
  min-width: 320px;
}

h1,h2,h3,h4,h5,h6{
  padding-bottom: 1em;
  line-height: 1.5em;
}

p,blockquote{
  padding-bottom: 0.7em;
}

h1,h2,h3,h4,h5,h6,strong{
  font-weight: bold;
}

table{
  border-collapse: collapse;
  border-spacing: 0;
}

*{
  box-sizing: border-box;
}

/* ********************************************************************************* */
/* Typography */
/* ********************************************************************************* */

:root{
  font-size: 18px;
  line-height: 1.4em;
  font-family: sans-serif;
}

h1{
  font-size: 1.4em;
}
h2{
  font-size: 1.3em;
  margin-top: 1em;
}
h2.no-top-margin{
  margin-top: 0;
}
h3{
  font-size: 1.1em;
}
h4{
  font-size: 1em;
}

footer,
.small-print{
  font-size: 0.8em;
}

sup {
  vertical-align: super;
  font-size: smaller;
}

/* ********************************************************************************* */
/* Structure */
/* ********************************************************************************* */

header,
main,
footer{
  width: 100%;
}

.section-wrapper{
  max-width: 1024px;
  min-width: 320px;
  padding: 30px 10px 30px 10px;
  margin: 0 auto 0 auto;
  position: relative;
}
.no-padding{
  padding: 0;
  min-width: 300px;
}

header{
  background-color: white;
}
header > .section-wrapper{
  padding: 0;
}

main{
  background-color: #ffFFFF;
}

footer{
  background-color: #666666;  
}
footer > .section-wrapper{
  text-align: center;
}

/* To understand flexbox go to https://css-tricks.com/snippets/css/a-guide-to-flexbox/ */
.flex-container{
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: flex-start;
  align-content: flex-start;
  padding: 1rem 0 0 0;
}

.flex-container div, .flex-container img{
  max-width: 100%;
  display: inline-block;
  padding: 0 0.5rem;
  margin-bottom: 1rem;
}

.clear-both{
  clear: both;
}

/* ********************************************************************************* */
/* Header excluding navigation */
/* ********************************************************************************* */

#above-nav{
  padding: 10px;
  min-height: 300px;
  font-weight: bold;
  position: relative;
  background-color: cream;
  background-image: url('../images/banner3123.gif');
  background-size: cover;
  background-position: center;
}

#site-title{
	position: absolute;
	left: 250px;
	top: 49px;
	font-size: 30px;
	color: black;
	font-weight:bold;
	/*width: 500px;*/
	height: 110px;
  
}

#site-tagline{
  position: absolute;
  left: 250px;
  top: 110px;
  font-size: 20px;
  color: yellow;

}

#site-logo{
  max-width: 140px;
}

/* start tabs */
#tabs{
  position: absolute;
  top: -10px;
  right: 10px;
  list-style: none;
  font-size: 0; /* cure blank space problem */
}
#tabs > li{
  display: inline-block;
  margin-right: 5px;
}
#tabs > li:last-of-type{
  margin-right: 0;
}
#tabs > li > a:link,
#tabs > li > a:visited,
#tabs > li > a:hover
{
  font-size: 14px;
  font-weight: normal;
  padding: 12px 10px 8px 10px;
  line-height: 2em;
  background-color: blue;
  color: white;
  text-decoration: none;
  -webkit-border-bottom-right-radius: 5px;
  -webkit-border-bottom-left-radius: 5px;
  -moz-border-radius-bottomright: 5px;
  -moz-border-radius-bottomleft: 5px;
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
  transition: background-color, 400ms;
}
#tabs > li > a:hover{
  background-color: red;
}

@media screen and (max-width: 960px){
  #site-logo{
    display: block;
    margin: 0 auto;
    padding-top: 30px;
  }
  #site-title,
  #site-tagline{
    text-align: center;
    position: relative;
    left: 0;
    top: 0;
    padding-top: 30px;
    padding-bottom: 10px;
  }
  #site-tagline{
    padding-top: 10px;
    padding-bottom: 20px;
  }
}

/* ********************************************************************************* */
/* Main */
/* ********************************************************************************* */

main img{
  max-width: 100%;
  height: auto;
}

/* these classes appear in the 'class' drop down list for images */
img.no-margin{
  margin: 0;
}
img.s-margin{
  margin: 1px;
}
img.m-margin{
  margin: 3px;
}
img.l-margin{
  margin: 7px;
}
img.xl-margin{
  margin: 20px;
}
img.align-left{
  float: left;
  margin: 0 7px 7px 0;
}
img.align-right{
  float: right;
  margin: 0 0 7px 7px;
}

/* ********************************************************************************* */
/* Navigation */
/* ********************************************************************************* */

/* global and defaults */
#nav-wrapper{
  width: 100%;
  z-index: 988;
  background-color: gray;
}
nav{
  z-index: 999;
  max-width: 1024px;
  min-width: 320px;
  margin: 0 auto;
}
nav ul{
  list-style: none;
  text-align: center;
}
nav a:link,
nav a:visited,
nav a:hover{
  font-size: 18px;
  line-height: 3em; /* Height of main menu tabs. 1em = 1 x current font size */
  color: black; /* colour of menu item text */
  text-decoration: none;
  display: block;
  padding: 10px;
}
nav a:hover{
  color: black /* colour of menu item text when hovered */
}

/* top level menu items on desktop */
nav > ul > li{
  display: inline-block;
}
a.has-sub-menu:before{
  content:'\2193  ';
}
a.has-sub-menu.active:before{
  content:'\2191  ';
}

/* sub menus on desktop */
nav > ul> li > ul{
  display: none; /* hide sub menu until shown */
  position: absolute;
  border: solid 1px black;
  background-color: lightgray;
  z-index: 100;
  padding: 0.5em;
}
nav > ul> li > ul.active{
  display: block;
}
nav > ul> li > ul > li > a:link{
  line-height: 2em;
  padding: 0.25em 10px;
}

/* top level menu items on mobile */
@media screen and (max-width: 960px){
  nav > ul{
    display:none; /* hide sub menus by default */
    border-top: solid 1px black;
  }
  nav.active > ul{
    display: block;
  }
  nav > ul > li{
    display: block;
    margin: 0;
    border-bottom: solid 1px black;
  }
  nav > ul > li > a{
      padding: 0 10px;
  }
  /* sub menus on mobile */
  nav > ul > li > ul.active{
    display: block; /* show sub menu when active */
    position: relative;
    border: none;
    border-top: dotted 1px black;
    background-color: transparent;
    padding: 0;
  }
  nav > ul > li > ul > li{
    border-bottom: dotted 1px black;
  }
  nav > ul > li > ul > li:last-of-type{
    border-bottom: none;
  }
  nav > ul > li > ul > li > a:link{
    padding: 10px 10px 10px 20px;
    background-color: blue; /* background color of sub menus */
  }
}

@media screen and (min-width: 960px){
  /* nav-buttons variant for desktop mode */
  nav.buttons{
    padding-left: 5px;
  }
  nav.buttons > ul > li > a:link,
  nav.buttons > ul > li > a:visited,
  nav.buttons > ul > li > a:hover
  {
    background: rgb(255, 255, 255); /* IE 8 fallback - solid white with no hover mode */
    background: rgba(255,255,255,0.5); /* normal colour of button */
    padding: 0 10px;
    margin: 10px 5px;
    line-height: 2em;
    transition: all 400ms;
  }
  nav.buttons > ul > li > a:hover
  {
     background: rgba(255,255,255,0.9); /* colour of button when hovered */
  }
  nav.rounded > ul > li > a{
    border-radius: 7px;
  }
  nav.light > ul > li > a:link,
  nav.light > ul > li > a:visited,
  nav.light > ul > li > a:hover{
    background: rgb(0, 0, 0); /* IE 8 fallback - solid white with no hover mode */
    background: rgba(0,0,0,0.3); /* normal colour of button */
  }
  nav.light > ul > li > a:hover{
    background: rgba(0,0,0,0.7); /* normal colour of button */
  }
  /* additions for fixed menu feature */
  #nav-wrapper.fixed{
    position: fixed;
    right: 0;
    left: 0;
    top: 0;
  }
  main.fixed-nav{
    padding-top: 75px;
  }
}

/* ********************************************************************************* */
/* Burger Button */
/* ********************************************************************************* */

#menu-toggle{
  display: none; /* hide by default */
  cursor: pointer;
  text-align: center;
  line-height: 50px;
  padding: 4px 0 0 0;
}
#menu-toggle:hover{
  color:gray;
}

#burger-button{
  vertical-align: middle;
  display: inline-block;
  margin-top: -2px;
  width: 50px;
  height: 50px;
  padding-top: 7px;
}
#burger-button > span{
  background: black;
  display: block;
  margin: 0 11px;
  margin-top: 5px;
  min-height: 5px;
  transition: all 0.25s ease;
  -webkit-transition: all 0.25s ease;
}
#menu-toggle:hover > #burger-button > span{
  background: blue;
}
#burger-button.active span:first-child{
  -ms-transform: rotate(45deg); /* IE 9 */
  -webkit-transform: rotate(45deg); /* Chrome, Safari, Opera */
  transform: rotate(45deg);
  margin-top: 15px;
}
#burger-button.active span:nth-child(2){
  display: none;
}
#burger-button.active span:last-child{
  -ms-transform: rotate(-45deg); /* IE 9 */
  -webkit-transform: rotate(-45deg); /* Chrome, Safari, Opera */
  transform: rotate(-45deg);
  margin-top: -5px;
}
@media screen and (max-width: 960px){
  #menu-toggle{
    display: block;
  }
}
