div#vwrapper {
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  -moz-box-orient: vertical;
  -moz-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  height: 100%;
}

div#wrap {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  -moz-box-flex: 1;
  -ms-flex: 1;
  flex: 1 1 auto;
}

/* ------------------------------------------- */
/* Styling for elements defined in header      */
/* ------------------------------------------- */

header {
  display: flex;
  padding: 0.5em;
  height: 80px;
  background-color: #FFFFFF;
  width: 100%;
  flex: 0 0 80px;
  margin: 0 auto;
}
header .headerBox {
  text-align: center;
  /*margin: 0.5em; */
  max-height: 100px;
  flex: 1 auto;
}
.headerBox h1 {
  color: #FFFFFF;
  margin-bottom: 7px;
}

#header1 {
  text-align: left;
  padding-left: 1em;
  width:0;
}
#header2 {
  display: flex;
  flex-grow: 4;
  align-items: center;
}
#header3 {
  text-align: right;
  padding-right: 1em;
  width:0;
}

header::after {
  position: absolute;
  top: 0px;
  left: 0;
  height: 160px;
  width: 100%;
  z-index: -1;
  content: " ";
}

/* ------------------------------------------- */
/* Styling for elements defined in footer      */
/* ------------------------------------------- */

div#foot {
  margin-top: auto;
}

footer {
  height: auto;
  background-color: #323133;
  color: #c3d7ee;
  padding:0;
}
footer a {
  color: #40c1ac !important;
  text-decoration: none;
}
footer a:hover {
  color: #40c1ac !important;
  text-decoration: none;
}
footer a:visited {
  color: #40c1ac !important;
  text-decoration: none;
}

footer h2 {
 font-size: 1.125rem;
 font-weight: 600;
 text-transform: uppercase;
 line-height: 1;
 margin: 0;
 padding: 1.0rem 0;
}
#links {
  color: #c3d7ee;
  margin-right: 1em;
  padding:1%;
  width:100%;
}
#legal-footer {
  background-color: #000000;
  width:100%;
  padding: 1%;
  font-size: 90%;
}
#legal-footer a {
  margin-left:10px;
  padding: 0 1.5rem;
  color: #c3d7ee !important;
}
#nsf-footer {
  background-color: #FFFFFF;
  color: #000000;
  width:100%;
  padding: 1%;
}

#nsf-footer img {
  width: 15%;
}
footer p {
  /*max-width: 95%;*/
  margin: 8px auto;
  /*text-align: center;
  font-style: italic;*/
  font-size: 0.8em;
}

/* ------------------------------------------- */
/* Styling for narrow screens                  */
/* ------------------------------------------- */

@media all and (max-width: 980px) {
  /* Workaround for an IE bug with flexbox and max-width */
 footer {
   width:auto;
 }
}

@media all and (max-width: 900px) {
  header {
    flex-direction: column;
    height: auto;
  }

  .headerBox {
    margin: 0 !important;
    width: 100% !important;
    flex: 1 1 auto !important;
  }

  .headerBox img {
    display:block;
    margin-left:auto;
    margin-right: auto;
  }

  #header1 {
    padding-left: 0;
  }

  #container {
   flex-direction: column;
  }
  main {
   order:2; 
  }
  aside {
   order:1; 
   margin: 0;
  }

/*
  aside h2::after {
    content: "\2039";
    transform: rotate(270deg);
    display: inline-block;
    font-size: 2.5rem;
    margin-left: 80%;
    cursor: pointer;
  }

*/
}

@media all and (max-width: 600px) {
  footer {
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  -moz-box-orient: vertical;
  -moz-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  }
  .footerBox {
    margin: 0 !important;
    width: 100% !important;
    flex: 1 1 auto !important;
  }
  .headerBox h1 {
    font-size: 1.2em;
  }

}

