/* Reset elements with annoying defaults */
body,
h1, h2, h3, h4, h5, h6,
p,
ul, ol, li,
img,
a {
  margin: 0;
  padding: 0;
  list-style: none;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  border: none;
  text-decoration: none;
}

/* Layout */
html,
body {
  height: 100%;
}
#container {
  margin: 0 auto;
  width: 700px;
  height: 100%;
}
#main {
  position: relative;
  height: auto;
  min-height: 100%;
  float: left; /* creates "block formatting context" for contained floats */
}
#header {
  height: 100px;
}
.logo {
  float: left;
  width: 160px;
  text-align: center;
  height: 100%;
}
#content {
  float: left;
  width: 500px;
}
#sidebar {
  float: left;
  width: 160px;
}
#footer {
  position: absolute;
  margin-left: 180px;
  width: 500px;
  text-align: center;
  left: 0;
  bottom: 0; /* stick to bottom */
}

/* Non-layout padding and margins */
#navigation {
  padding-bottom: 2em; /* footer height */
}
#content {
  margin: 0 20px;
  padding-bottom: 4em; /* footer height + padding */
}
#footer {
  padding: 5px;
}
h1 {
  padding-top: 20px;
}
h1,
.tagline {
  display: block;
  padding-left: 20px;
  padding-right: 20px;
  overflow: hidden;
}
.logo img {
  padding: 4px 0;
}
#navigation h3 {
  margin-top: 10px;
}
#navigation h3.first {
  margin-top: 0;
}
#navigation ul {
  margin-top: 4px;
}
#navigation h3,
#navigation ul li a,
#navigation h3.first span {
  padding: 2px 10px;
}
#navigation h3,
#navigation h3.first span {
  padding-top: 1px;
}
#navigation h3.first {
  padding: 0; /* space for cut-out */
}
#navigation a {
  display: block;
}
#sidebar .decoration {
  margin: 10px auto;
}
#content h2 {
  margin-bottom: 13px;
}
#content p,
#content ol,
#content ul,
#content table {
  margin: 10px 0;
}
#content li {
  margin-bottom: 4px;
}
#content h3 {
  margin: 15px 0 5px;
}
#content h4 {
  margin: 10px 0 5px;
}

/* Fonts */
body {
  font-family: "Lucida Grande", "Segoe UI", Arial, sans-serif;
  font-size: 12px;
}
h1,
h2,
h3,
h4,
h5,
h6,
#navigation,
#navigation a,
table,
#alert {
  font-family: "Gill Sans", "Gill Sans MT", Arial, sans-serif;
  font-size: 12px;
}
input,
textarea,
label {
  font-family: "Lucida Grande", "Segoe UI", Arial, sans-serif;
  font-size: 11px; /* to ensure consistent sizing across browsers */
}
h1 {
  font-size: 2.1em;
}
.tagline {
  font-family: Georgia, serif;
  font-size: 1.4em;
  font-style: italic;
  text-align: right;
}
#navigation {
  font-size: 1em;
}
#navigation h3 {
  font-size: 1.1em;
}
#content {
  font-size: 1em;
}
#content h2 {
  font-size: 1.6em;
}
#content h3 {
  font-size: 1.4em;
}
#content h4 {
  font-size: 1.3em;
  font-style: italic;
}
#content h5 {
  font-size: 1em;
  font-weight: bold;
}

/* Colours */
body {
  background-color: #eeeeee;
}
body,
a {
  color: #000;
}
.tagline {
  color: #888;
}
#main,
.logo {
  background-color: #fff;
  color: #000;
}
#sidebar {
  background-color: #f5f0fa;
}
#navigation h3 {
  background-color: #411e63;
  color: #fff;
}
#navigation a:hover {
  background-color: #dfd1ef;
  color: #000;
}
#navigation .active,
#navigation .active a,
#navigation .active a:hover {
  background-color: #a687c3;
  color: #fff;
}
#content a,
#footer a {
  color: #32469b;
  text-decoration: underline;
}
#content hr {
  width: 30%;
  color: #888;
  height: 1px;
  margin-top: 2em;
  margin-bottom: 2em;
}

/* Images */
#sidebar .decoration {
  background-image: url(/images/small-dolphin.png);
  background-repeat: no-repeat;
  display: block;
  height: 20px;
  text-indent: -9999px;
  width: 51px;
}
#main {
  margin: 0 -25px;
  padding: 0 25px;
  background-image: url(/images/main-bg.png);
  background-repeat: repeat-y;
  background-position: left top;
}
#navigation h3 {
  background-image: url(/images/nav-gradient.png);
  background-repeat: repeat-x;
  border-bottom: 1px solid #a687c3;
}
#navigation h3.first span {
  color: inherit;
  display: block;
  background-image: url(/images/nav-cutout.png);
  background-repeat: no-repeat;
  background-position: 100% top;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}
table.small {
  width: 60%;
}
td, th {
  padding: 2px 5px;
  border: 1px solid #aaa;
}
th {
  font-weight: normal;
  background-color: #eee;
  color: #333;
}
td.highlight {
  color: #755295;
  font-style: italic;
  text-align: center;
}
tr.total td,
tr.total th {
  color: #666;
  font-style: italic;
}

/* Lists */
#content ol li {
  list-style: decimal;
}
#content ul li {
  list-style: disc;
}
#content ol,
#content ul {
  margin-left: 2.5em;
}

/* Maps and figures */
#content .photo,
#content .figure,
#content .map {
  text-align: center;
  margin: 20px 0;
}
#content img {
    max-width: 500px;
}
#content .photo img {
  max-width: 300px;
}
#content .figure img {
    margin-right: 20px;
}
#content .left img,
#content .right img {
    margin-right: 0;
}
#content .photo img,
#content .map iframe {
  border: 1px solid #666;
}
#content .left {
  float: left;
  margin: 10px 20px 10px 0;
}
#content .right {
  float: right;
  margin: 10px 0 10px 20px;
}
#content .caption {
  font-size: .9em;
  color: #666;
}
#content .slideshow {
  position: relative;
  height: 302px;
  display: none; /* revealed by JS */
}
#content .slideshow .slide {
  position: absolute;
  left: 0;
  top: 0;
  text-align: center;
  display: none; /* revealed by JS */
  opacity: 0;
  overflow: hidden;
  width: 100%;
  line-height: 300px;
}
#content .slideshow .slide img {
  vertical-align: middle;
  max-width: 500px;
  max-height: 300px;
}

/* Forms */
#content form p.condition,
#content form p.submit,
#content form p.agree {
  margin-top: 20px;
}
#content form p.submit {
  text-align: center;
}
#content form p.submit input {
  margin-left: 10px;
  margin-right: 10px;
}
#content form p.agree {
  font-weight: bold;
}
#content form table td,
#content form table th {
  border: 1px solid #fff;
  line-height: 1.5;
}
#content form .missing th {
  background-color: #efb3b3;
}
#content form table th {
  width: 30%;
  text-align: left;
  font-weight: normal;
}
#content form th label {
  display: block;
}
form .note {
  font-size: .9em;
  color: #666;
}
textarea {
  padding: 2px;
}

/* Alert */
#alert {
  display: none;
  position: fixed;
  left: 0;
  top: -28px;
  height: 26px;
  width: 100%;
  line-height: 26px;
  background-color: #ef7979;
  color: #000;
  text-align: center;
  border-top: 1px solid #db6161;
  cursor: pointer;
}
#alert .close {
  display: block;
  float: right;
  text-indent: -9999px;
  margin: 5px 20px;
  width: 16px;
  height: 16px;
  background-image: url(/images/close-box.png);
  background-repeat: none;
}

/* Gallery */
#content .photo-gallery,
#content .photo-gallery li {
    list-style: none;
    margin: 0;
    padding: 0;
}
#content .photo-gallery li {
    width: 150px;
    height: 150px;
    margin: 0 15px 10px 0;
    float: left;
    text-align: center;
}
#content .photo-gallery a {
    line-height: 150px;
}
#content .photo-gallery img {
    line-height: 150px;
    vertical-align: middle;
}
