/* General *********************/
.section-end {
  margin-bottom: 20px;
}

.section-end p:last-child {
  display: inline-block;
}

/* WET4 and Bootstrap changes *********************/
details section:first-of-type h2 {
  margin-top: 20px;
}

.mfp-title span {
  display: block;
}

.mfp-title a {
  color: white;
}

/* Home link *********************/
.home-category {
  clear: both;
  height: 90px;
  line-height: 90px;
}

.home-category > a {
  float: left;
}

.home-category > a img {
  display: block;
  margin-right: 20px;
  vertical-align: middle;
  text-decoration: none;
}

.home-category span {
  display: inline-block;
  line-height: 1.4375;
  margin-bottom: 40px;
  text-decoration: underline;
  vertical-align: middle;
}

/* Important *********************/
.important-notice {
  margin-top: 10px;
  padding: 10px;
  border: 1px dotted #cccccc;
}

.important-notice-header {
  color: #aa0000;
  margin-bottom: 10px;
  font-weight: bold;
  font-size: 14px;
}

#search_lib {
  margin-bottom: 30px;
}

/* Icons *********************/
[href$=".psd"],
[href$=".zip"],
[href$=".egret"],
[href$=".doc"],
[href$=".pdf"],
[href$=".xls"],
[href$=".rtf"],
[href$=".pot"],
[href$=".ppt"],
[href$=".pps"],
[href$=".pptm"],
[href$=".docx"],
[href$=".xlsx"],
[href$=".pptx"],
[href$=".pub"] {
  position: relative;
  margin-left: 20px;
}

[href$=".psd"]:before,
[href$=".zip"]:before,
[href$=".egret"]:before,
[href$=".doc"]:before,
[href$=".pdf"]:before,
[href$=".xls"]:before,
[href$=".rtf"]:before,
[href$=".pot"]:before,
[href$=".ppt"]:before,
[href$=".pps"]:before,
[href$=".pptm"]:before,
[href$=".docx"]:before,
[href$=".xlsx"]:before,
[href$=".pptx"]:before,
[href$=".pub"]:before {
  color: #333;
  content: "\e025";
  font-family: "Glyphicons Halflings";
  font-size: 1em;
  position: absolute;
  left: -20px;
}

.contact-email {
  position: relative;
  margin-left: 25px;
}

.contact-email:before {
  color: #333;
  content: "\2709";
  font-family: "Glyphicons Halflings";
  font-size: 1em;
  position: absolute;
  left: -25px;
}

.image-caption {
  margin-top: 10px;
  margin-bottom: 0;
}

/* Map *********************/
#distMap {
  display: inline-block;
  margin-top: 38px;
}

.map-link {
  background-color: #333;
  margin-top: 10px;
  padding: 3px 8px;
}

.map-link a:link {
  color: #fff;
}

.map-link a:visited {
  color: #fff;
}

/* Photo grids *********************/
ul.factsheet-photos {
  padding-left: 0;
}

.factsheet-photos li {
  display: inline-block;
  vertical-align: top;
  margin: 7px 0;
  zoom: 1;
  *display: inline;
}

.factsheet-photos [class*="col-"] img {
  width: 100%;
}

/* Photo grid custom media queries **********/
.gallery-row {
  display: flex;
  flex-wrap: wrap;
  padding: 0 4px;
}

/* Create three equal columns that sits next to each other */
.gallery-col {
  flex: 33.3%;
  max-width: 33.3%;
  padding: 0 4px;
}

.gallery-col img {
  margin-top: 8px;
  vertical-align: middle;
  width: 100%;
}

/* Responsive layout - makes a one column-layout instead of three columns */
@media screen and (max-width: 800px) {
  .gallery-row {
    flex-wrap: wrap-reverse;
  }

  .gallery-col {
    flex: 50%;
    max-width: 50%;
  }
  .gallery-row > .gallery-col:last-child {
    display: flex;
    max-width: 100%;
  }

  .gallery-row > .gallery-col:last-child > div:first-child {
    margin-right: 4px;
  }

  .gallery-row > .gallery-col:last-child > div:nth-child(2n + 0) {
    margin-left: 4px;
  }
}

/* Responsive layout - makes the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
  .gallery-col {
    flex: 100%;
    max-width: 100%;
  }
  .gallery-row > .gallery-col:last-child {
    flex-flow: column;
  }

  .gallery-row > .gallery-col:last-child > div:nth-child(1n + 0) {
    margin-right: 0;
    margin-left: 0;
  }
}

/* Custom media queries *********************/
@media (max-width: 480px) {
  /* Photo grids */
  .factsheet-photos li {
    width: 100%;
  }
}

@media (min-width: 480px) {
  /* General */
  .pull-right-xs {
    float: right;
    max-width: 300px;
  }

  /* Photo grids */
  .pull-right-xs .photo-single {
    margin-left: 15px;
  }

  /* Other customs */
  .home-category > a img {
    display: inline;
  }

  .home-category span {
    margin-bottom: 0;
  }

  #search_lib {
    min-width: 325px;
    width: 50%;
  }

  #distMap {
    margin-top: 0;
    position: relative;
  }

  .map-link {
    position: absolute;
    left: 0;
    top: 20px;
  }

  .factsheet-photos li:nth-child(2n + 1) {
    clear: left;
  }
}

@media (min-width: 640px) {
  /* Photo grids */
  .factsheet-photos li:nth-child(2n + 1) {
    clear: none;
  }
}

@media (min-width: 768px) {
  .factsheet-photos li:nth-child(3n + 1) {
    clear: left;
  }
}
