body {
  background-color: #242424;
  color: #aaaaaa;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  font: 16px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.container {
  margin: 0 auto;
  text-align: left;
  width: 96%;
}

a, a:link, a:visited {
  color: #999999;
  text-decoration: underline;
}

a:hover {
  color: #dadada;
}

/* remove SMALLCAPS style and dotted underline from some browsers */
abbr[title] {
  text-decoration: none;
  font-variant: none;
  border-bottom: none;
}

abbr[title="exposure"]::after { content: "s" }
abbr[title="film speed"]::before { content: "ISO " }
abbr[title="aperture"]::before { content: "f/" }
abbr[title="focal length"]::after { content: "mm" }
abbr[title="camera make and model"], abbr[title="date"] {
    display: block;
}

/* header */
header {
  padding: 1em 0;
  color: #eeeeee;
}
header h1, header h2 {
  color: #eeeeee;
  margin: 10px 0;
}
header h1 a, header h1 a:link, header h1 a:visited,
header h2 a, header h2 a:link, header h2 a:visited {
  color: #eeeeee;
  text-shadow: 0 2px 0 #000;
  text-decoration: none;
}
header h1 a:hover, header h2 a:hover {
  color: #fff;
  text-decoration: none;
}

#menu ul {
  list-style-type: none;
  margin: 0 0 10px;
  padding: 0;
}
#menu ul li {
  display: inline-block;
}
#menu ul li a, #menu ul li a:link, #menu ul li a:visited {
  color: #aaaaaa;
  border-bottom: 1px solid #aaaaaa;
  padding-bottom: 2px;
  margin-left: 5px;
  text-decoration: none;
}
#menu ul li a:hover {
  color: #eeeeee;
  border-color: #eeeeee;
  text-decoration: none;
}

/* gallery */
#albums ul {
  list-style-type: none;
  padding-left: 0;
}
#albums ul li {
  display: inline-block;
  margin: 0 55px 30px 0;
  text-align: center;
  vertical-align: top;
  width: 280px;
}
#albums ul li:nth-child(3n+3) {
  margin-right: 0;
}
#albums ul li a img {
  opacity: 1;
  -webkit-transition: opacity 0.2s ease-in;
  -moz-transition-property: opacity;
  -moz-transition-duration: 0.2s;
  -moz-box-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  -webkit-box-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  -o-box-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
#albums ul li a:hover img {
  opacity: .5;
}

.album_title {
  display: block;
  color: #eeeeee;
  font-size: 1.3em;
  font-variant: small-caps;
  font-weight: bold;
}

/* galleria */
#gallery {
  line-height: 0;
  width: 100%;
  height: 600px;
  clear: both;
}
#gallery video {
  position: absolute;
  top: 10%;
  width: 100%;
  margin: 0 auto;
}
.galleria-theme-classic .galleria-info-text {
  background-color: rgba(0, 0, 0, 0.7);
}

.icons {
  top: 10px;
  right: 20px;
  padding: 5px;
  z-index: 2;
  position: absolute;
  text-align: right;
}
.icons a {
  cursor: pointer;
}
.icons img {
  opacity: .7;
}
.icons img:hover {
  opacity: .9;
}

/* Mimic .galleria-stage to use the same area for the map */
#galleria-map {
  position: absolute;
  bottom: 80px;
  left: 10px;
  top: 0;
  right: 10px;
}

/* footer */
footer {
  clear: both;
  display: block;
  margin: 1em 0;
  text-align: center;
}
footer a:link, footer a:visited {
  font-weight: bold;
  text-decoration: none;
}
footer a:hover {
  border-bottom: 1px solid;
  text-decoration: none;
}
footer span:not(:last-child):after {
  content: ' - ';
}

@media only screen and (min-width: 980px) {
  .container {
    width: 960px;
  }

  #gallery {
    width: 980px;
    margin: 0 0 40px -10px;
  }

  header h1, #menu {
    display: inline-block;
    width: 49.5%;
  }
  #menu {
    text-align: right;
  }
}
/* Editorial grid gallery */
.editorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: 220px;
  grid-auto-flow: dense;
  gap: 6px;
  margin: 20px 0;
}
.editorial-grid .grid-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #111;
}
.editorial-grid .grid-item.span-2-2 { grid-column: span 2; grid-row: span 2; }
.editorial-grid .grid-item.span-2-1 { grid-column: span 2; }
.editorial-grid .grid-item.span-1-2 { grid-row: span 2; }

.editorial-grid .grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease, filter 0.6s ease;
}
.editorial-grid .grid-item:hover img {
  transform: scale(1.06);
  filter: brightness(0.85);
}

.editorial-grid .grid-item .grid-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  color: #eeeeee;
  font-size: 0.85em;
  letter-spacing: 0.03em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.editorial-grid .grid-item:hover .grid-caption {
  opacity: 1;
  transform: translateY(0);
}

.editorial-grid .play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #eeeeee;
  font-size: 2em;
  opacity: 0.85;
  pointer-events: none;
}

/* Lightbox */
#lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1000;
}
#lightbox-overlay.active {
  display: flex;
}
#lightbox-media img, #lightbox-media video {
  max-width: 92vw;
  max-height: 82vh;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
#lightbox-caption {
  color: #cccccc;
  margin-top: 14px;
  font-size: 0.95em;
  letter-spacing: 0.03em;
}
#lightbox-close, .lightbox-nav {
  position: absolute;
  color: #eeeeee;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 2em;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
#lightbox-close:hover, .lightbox-nav:hover {
  opacity: 1;
}
#lightbox-close { top: 20px; right: 30px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

@media only screen and (max-width: 600px) {
  .editorial-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    grid-auto-rows: 140px;
    gap: 4px;
  }
}

/* Fullscreen button + true-fullscreen behaviour */
#lightbox-fullscreen {
  position: absolute;
  top: 20px;
  right: 80px;
  color: #eeeeee;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.7em;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  z-index: 1010;
}
#lightbox-fullscreen:hover {
  opacity: 1;
}

#lightbox-overlay:fullscreen {
  background: #000;
  padding: 0;
}
#lightbox-overlay:fullscreen #lightbox-media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lightbox-overlay:fullscreen #lightbox-media img,
#lightbox-overlay:fullscreen #lightbox-media video {
  max-width: 100vw !important;
  max-height: 100vh !important;
  width: auto;
  height: auto;
  box-shadow: none;
}
#lightbox-overlay:fullscreen #lightbox-caption {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
  z-index: 1010;
}
#lightbox-overlay:fullscreen #lightbox-close,
#lightbox-overlay:fullscreen #lightbox-fullscreen,
#lightbox-overlay:fullscreen .lightbox-nav {
  z-index: 1010;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}

/* Hide image filename captions */
.editorial-grid .grid-item .grid-caption {
  display: none !important;
}
#lightbox-caption {
  display: none !important;
}
