.gallery {
  position: relative;
  /* stack on top of sticky nav */
  clear: left;
  margin: 0 0 2em 0;
}

.js .gallery[style] {
  margin-top: 0 !important;
}

.gallery::after {
  content: "";
  display: table;
  width: 100%;
  clear: left;
}

.gallery--icon, .gallery-item a[data-panorama]::before, .gallery-item a[data-soundcloud-pageid]::before, .gallery-item a[data-vimeo-pageid]::before, .gallery-viewer .stack--liner--icon-hint, .gallery-viewer[data-panorama] .stack--liner::before, .gallery-viewer .stack--liner--icon-embed, .gallery-viewer[data-soundcloud-pageid] .stack--liner::before, .gallery-viewer[data-vimeo-pageid] .stack--liner::before {
  font-family: 'icomoon' !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 1.1em;
}

.gallery-item {
  display: inline-block;
  position: relative;
  width: 100%;
  max-width: 25%;
  text-align: center;
  vertical-align: top;
  padding: 0 1.1400652% 2.2801304%;
  padding-left: 1px;
  padding-left: 0.0625rem;
}

.gallery-columns-1 .gallery-item {
  max-width: 100%;
}

.gallery-columns-2 .gallery-item {
  max-width: 50%;
}

.gallery-columns-3 .gallery-item {
  max-width: 33.33333%;
}

.gallery-columns-4 .gallery-item {
  max-width: 25%;
}

.gallery-columns-5 .gallery-item {
  max-width: 20%;
}

.gallery-columns-6 .gallery-item {
  max-width: 16.66667%;
}

.gallery-columns-7 .gallery-item {
  max-width: 14.28571%;
}

.gallery-columns-8 .gallery-item {
  max-width: 12.5%;
}

.gallery-columns-9 .gallery-item {
  max-width: 11.11111%;
}

.js .gallery-item:first-child:last-child {
  display: none;
}

.gallery-item--icon, .gallery-item a::before {
  position: absolute;
  top: 0;
  vertical-align: top;
  line-height: 100%;
  color: #fff;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  width: 100%;
  height: 100%;
  border: 4px solid transparent;
  content: "+";
  right: 0;
  font-size: 1.5em;
  text-align: right;
  padding-right: .3em;
}

.gallery-item a {
  position: relative;
  display: block;
  -webkit-box-shadow: 0 0 0 0 currentColor;
  box-shadow: 0 0 0 0 currentColor;
}

.gallery-item a:hover::before, .gallery-item a:focus::before, .gallery-item a[data-viewing="true"]::before {
  color: #000;
  text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
  border-color: transparent;
}

.gallery > .gallery-item a:focus {
  outline: none;
}

.gallery > .gallery-item a:focus::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 4px solid rgba(0, 0, 0, 0.85);
}

.gallery > .gallery-item a[data-viewing="true"] {
  cursor: not-allowed;
  opacity: 1;
  border-color: #fff;
}

.gallery-item a[data-viewing="true"]::before {
  content: "-";
  background-color: rgba(255, 255, 255, 0.5);
  -webkit-transition: none;
  transition: none;
}

.gallery-item a[data-panorama]::before, .gallery-item a[data-soundcloud-pageid]::before, .gallery-item a[data-vimeo-pageid]::before {
  padding-top: .3em;
}

.gallery-item a[data-panorama]::before, .gallery-item a[data-panorama][data-viewing="true"]::before {
  content: "\e90a";
}

.gallery-item a[data-soundcloud-pageid]::before, .gallery-item a[data-soundcloud-pageid][data-viewing="true"]::before {
  content: "\e90c";
}

.gallery-item a[data-vimeo-pageid]::before, .gallery-item a[data-vimeo-pageid][data-viewing="true"]::before {
  content: "\e90b";
}

.gallery-item .gallery-caption {
  display: none;
}

.gallery-item .gallery-icon img {
  width: 100%;
  height: auto;
  max-width: 100%;
  margin: 0 auto;
}

.gallery-viewer.stack {
  position: relative;
  /* AP */
  z-index: 1;
  /* stack on top of sticky nav so that text can be selected */
  display: block;
  margin-bottom: .5em;
}

.gallery-viewer--header, .gallery-viewer--footer {
  margin: 4px;
  margin: 0.25rem;
}

.gallery-viewer--header > h2 {
  padding: 0.25em 0.8125em;
}

.gallery-viewer--header > h2, .gallery-viewer--caption {
  display: inline-block;
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
}

.gallery-viewer .stack--wrapper {
  background-color: transparent;
  opacity: 1;
  -webkit-transition: opacity .3s ease;
  transition: opacity .3s ease;
}

.gallery-viewer .stack--wrapper[data-loading] {
  opacity: 0;
}

.gallery-viewer .stack--liner {
  vertical-align: bottom;
  text-align: left;
  background: none;
}

.gallery-viewer .stack--liner--icon-hint, .gallery-viewer[data-panorama] .stack--liner::before {
  position: absolute;
  z-index: 2;
  top: 15.5px;
  top: 0.96875rem;
  right: 24px;
  color: white;
  font-size: 1.4em;
  text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black, 1px 1px 0 black;
}

.gallery-viewer .stack--liner--icon-embed, .gallery-viewer[data-soundcloud-pageid] .stack--liner::before, .gallery-viewer[data-vimeo-pageid] .stack--liner::before {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  color: rgba(0, 0, 0, 0.4);
  font-size: 48px;
  font-size: 3rem;
  margin-top: -24px;
  margin-top: -1.5rem;
  margin-left: -24px;
  margin-left: -1.5rem;
}

.gallery-viewer figure {
  display: none;
}

.gallery-viewer img {
  width: 100%;
  height: auto;
  max-height: 368px;
  visibility: hidden;
}

.entry-date .gallery-viewer img {
  max-height: 400px;
}

.gallery-viewer iframe {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

.gallery-viewer--expand {
  float: right;
  padding: .275em 1em;
  background-color: transparent;
  border: 4px solid transparent;
  border-radius: 0;
  color: white;
  text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black, 1px 1px 0 black;
  position: relative;
  right: 0;
  margin-right: -4.5em;
  opacity: 1;
}

.gallery-viewer--expand::after {
  content: "+";
  font-size: 2em;
  font-weight: 100;
}

.gallery-viewer--expand:hover, .gallery-viewer--expand:focus {
  outline: none;
  background-color: black;
  color: black;
  text-shadow: -1px -1px 0 white, 1px -1px 0 white, -1px 1px 0 white, 1px 1px 0 white;
}

.gallery-viewer:focus {
  outline: none;
}

.gallery-viewer:focus .stack--liner {
  position: relative;
}

.gallery-viewer--focus-border, .gallery-viewer:focus .stack--liner::after, .gallery-viewer[data-has-image="true"][data-expanded="true"]:focus .stack--liner::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 4px solid rgba(0, 0, 0, 0.85);
}

.gallery-viewer[data-attachment] .gallery-viewer--caption p {
  margin-bottom: 0;
}

.gallery-viewer[data-has-image="true"][data-expanded="true"] .gallery-viewer--expand {
  background-color: black;
  position: absolute;
  bottom: 0;
  right: 1px;
  margin-right: 0;
}

.gallery-viewer[data-has-image="true"][data-expanded="true"] .gallery-viewer--expand:hover, .gallery-viewer[data-has-image="true"][data-expanded="true"] .gallery-viewer--expand:focus {
  background-color: #666666;
  color: #666666;
}

.gallery-viewer[data-has-image="true"][data-expanded="true"] .gallery-viewer--expand::after {
  content: "-";
}

.gallery-viewer[data-has-image="true"][data-expanded="true"] .gallery-viewer--header,
.gallery-viewer[data-has-image="true"][data-expanded="true"] .gallery-viewer--footer {
  position: relative;
  top: auto;
  bottom: auto;
  left: auto;
  right: auto;
}

.gallery-viewer[data-has-image="true"][data-expanded="true"] .gallery-viewer--header > h2 {
  margin-bottom: 0;
}

.gallery-viewer[data-has-image="true"][data-expanded="true"] .gallery-viewer--header > h2,
.gallery-viewer[data-has-image="true"][data-expanded="true"] .gallery-viewer--caption {
  background-color: black;
  border: 4px solid black;
}

.gallery-viewer[data-has-image="true"][data-expanded="true"] .gallery-viewer--footer {
  margin-left: 0;
}

.gallery-viewer[data-has-image="true"][data-expanded="true"]:focus .gallery-viewer--footer {
  background-color: white;
  z-index: 1;
}

.gallery-viewer[data-has-image="true"][data-expanded="true"]:focus .gallery-viewer--footer:before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  border-top: 4px solid black;
}

.gallery-viewer[data-has-image="true"][data-expanded="true"] .stack--wrapper {
  background: none !important;
}

.gallery-viewer[data-has-image="true"][data-expanded="true"] img,
.entry-date .gallery-viewer[data-has-image="true"][data-expanded="true"] img {
  visibility: visible;
  max-height: none;
  -webkit-user-drag: none;
}

.gallery-viewer[data-has-image="false"] .gallery-viewer--header > h2 {
  background-color: black;
}

.no-js .gallery-viewer[data-has-image="false"] .stack--wrapper {
  display: none;
}

.gallery-viewer[data-has-image="true"] .gallery-viewer--header {
  position: absolute;
  top: 4px;
  top: 0.25rem;
  left: 4px;
  right: 4px;
  z-index: 2;
  padding-right: 4.5em;
  margin: 0;
}

.attachment .gallery-viewer[data-has-image="true"] .gallery-viewer--header {
  padding-right: 0;
}

.gallery-viewer[data-has-image="true"] .gallery-viewer--caption {
  padding: .75em 0.625em 0.625em;
}

.gallery-viewer[data-has-image="true"] .gallery-viewer--footer {
  position: absolute;
  bottom: 4px;
  bottom: 0.25rem;
  right: 4px;
  text-align: right;
  line-height: 1.45;
  margin: 0 0 0 4px;
  margin: 0 0 0 0.25rem;
}

.gallery-viewer[data-has-image="true"] figure {
  display: block;
}

.js .gallery-viewer[data-panorama] .stack--wrapper {
  display: block;
  background: none !important;
}

.gallery-viewer[data-panorama] .stack--liner::before {
  content: "\e90a";
}

.gallery-viewer[data-panorama] .img-wrapper {
  overflow-x: scroll;
}

.gallery-viewer[data-panorama] img {
  visibility: visible;
  width: auto;
  max-width: none;
}

.gallery-viewer[data-soundcloud-pageid] .stack--liner {
  background-color: rgba(0, 0, 0, 0.05);
}

.gallery-viewer[data-soundcloud-pageid] .stack--liner::before {
  content: "\e90c";
}

.gallery-viewer[data-soundcloud-pageid] .stack--liner .gallery-viewer--footer {
  background-color: white;
}

.gallery-viewer[data-vimeo-pageid] .stack--liner {
  background-color: rgba(0, 0, 0, 0.05);
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
}

.gallery-viewer[data-vimeo-pageid] .stack--liner iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.gallery-viewer[data-vimeo-pageid] .stack--liner::before {
  content: "\e90b";
}

.gallery-viewer[data-vimeo-pageid] .stack--liner img {
  max-height: 368px;
  visibility: hidden;
}

.gallery-viewer[data-vimeo-pageid] .stack--liner .gallery-viewer--footer {
  background-color: white;
}

@media (min-width: 25.0625rem) {
  .gallery-columns-1 .gallery-item {
    max-width: 25%;
  }
  .gallery-columns-2 .gallery-item {
    max-width: 25%;
  }
  .gallery-columns-3 .gallery-item {
    max-width: 25%;
  }
  .gallery-columns-4 .gallery-item {
    max-width: 25%;
  }
  .gallery-columns-5 .gallery-item {
    max-width: 25%;
  }
  .gallery-columns-6 .gallery-item {
    max-width: 25%;
  }
  .gallery-columns-7 .gallery-item {
    max-width: 25%;
  }
  .gallery-columns-8 .gallery-item {
    max-width: 25%;
  }
  .gallery-columns-9 .gallery-item {
    max-width: 25%;
  }
}

@media (min-width: 34.4375rem) {
  .gallery-columns-1 .gallery-item {
    max-width: 20%;
  }
  .gallery-columns-2 .gallery-item {
    max-width: 20%;
  }
  .gallery-columns-3 .gallery-item {
    max-width: 20%;
  }
  .gallery-columns-4 .gallery-item {
    max-width: 20%;
  }
  .gallery-columns-5 .gallery-item {
    max-width: 20%;
  }
  .gallery-columns-6 .gallery-item {
    max-width: 20%;
  }
  .gallery-columns-7 .gallery-item {
    max-width: 20%;
  }
  .gallery-columns-8 .gallery-item {
    max-width: 20%;
  }
  .gallery-columns-9 .gallery-item {
    max-width: 20%;
  }
}

@media (min-width: 44.4375rem) {
  .gallery {
    text-align: right;
    max-width: none;
    margin-bottom: 0;
  }
  .gallery-columns-1 .gallery-item {
    max-width: 100%;
  }
  .gallery-columns-2 .gallery-item {
    max-width: 100%;
  }
  .gallery-columns-3 .gallery-item {
    max-width: 100%;
  }
  .gallery-columns-4 .gallery-item {
    max-width: 100%;
  }
  .gallery-columns-5 .gallery-item {
    max-width: 100%;
  }
  .gallery-columns-6 .gallery-item {
    max-width: 100%;
  }
  .gallery-columns-7 .gallery-item {
    max-width: 100%;
  }
  .gallery-columns-8 .gallery-item {
    max-width: 100%;
  }
  .gallery-columns-9 .gallery-item {
    max-width: 100%;
  }
  .js .gallery-item:first-child:last-child {
    display: inline-block;
  }
  .gallery-viewer.stack {
    margin-bottom: 2em;
  }
  .gallery-viewer--expand {
    padding-top: .5em;
    padding-bottom: .5em;
  }
  .gallery-viewer--heading {
    padding: 13px 13px 9px;
    padding: 0.8125rem 0.8125rem 0.5625rem;
  }
  .gallery-viewer .stack--liner::before {
    top: 20px;
    top: 1.25rem;
    right: 23px;
  }
}

@media (min-width: 56.9375rem) {
  .gallery-item {
    display: block;
    float: left;
  }
  .js .gallery-item, .js .gallery-item:first-child:last-child {
    display: block;
  }
  .gallery-columns-1 .gallery-item {
    max-width: 50%;
  }
  .gallery-columns-2 .gallery-item {
    max-width: 50%;
  }
  .gallery-columns-3 .gallery-item {
    max-width: 50%;
  }
  .gallery-columns-4 .gallery-item {
    max-width: 50%;
  }
  .gallery-columns-5 .gallery-item {
    max-width: 50%;
  }
  .gallery-columns-6 .gallery-item {
    max-width: 50%;
  }
  .gallery-columns-7 .gallery-item {
    max-width: 50%;
  }
  .gallery-columns-8 .gallery-item {
    max-width: 50%;
  }
  .gallery-columns-9 .gallery-item {
    max-width: 50%;
  }
}
