/* gallery and album styling */
.gallery,
.albums {
  position: relative;
  margin: 0;
}

  .gallery .albums,
  .album .photos {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -moz-flex-wrap: wrap;
    flex-wrap: wrap;
    width: 100%;
  }

    .gallery .albums .album,
    .album .photos .photo {
      position: relative;
      width: 100%;
      margin-bottom: 1.875rem;
      padding: 0;
    }

@media (min-width: 640px) {
  .gallery .albums .album,
  .album .photos .photo {
    padding: 0 0.9375rem;
  }
}

.album .photos .photo {
  overflow: hidden;
}

@media (min-width: 640px) {
  .gallery .albums .album,
  .album .photos .photo {
    width: calc(100% / 2);
  }
}

@media (min-width: 1024px) {
  .gallery .albums .album,
  .album .photos .photo {
    width: calc(100% / 4);
  }
}

@media (min-width: 1200px) {
  .gallery .albums .album,
  .album .photos .photo {
    width: calc(100% / 5);
  }
}

@media (min-width: 1440px) {
  .gallery .albums .album,
  .album .photos .photo {
    width: calc(100% / 6);
  }
}

.gallery .albums .album img,
.album .photos .photo img {
  margin: 0 auto;
  position: relative;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
  /* default image styles */
  display: block;
  max-width: 100%;
  height: auto;
  -ms-interpolation-mode: bicubic;
}

.gallery .albums .album a,
.album .photos .photo a {
  display: block;
  position: relative;
  line-height: 0;
  text-align: center;
  width: 100%;
  height: 100%;
}

  .gallery .albums .album a:before,
  .album .photos .photo a:before {
    display: block;
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    background-image: url('/views/photogallery/photo-gallery-zoom.svg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 50% 50%;
    background-color: rgba(0, 0, 0, 0.65);
    -webkit-transition: all 0.25s;
    -moz-transition: all 0.25s;
    -o-transition: all 0.25s;
    transition: all 0.25s;
    z-index: 2;
  }

  .gallery .albums .album a:hover:before,
  .album .photos .photo a:hover:before {
    opacity: 1;
  }

  .gallery .albums .album a img,
  .album .photos .photo a img {
    z-index: 1;
  }

.album-name {
  position: absolute;
  width: 100%;
  bottom: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 5px;
}

@media (min-width: 640px) {
  .album-name {
    width: calc(100% - 30px);
  }
}

a.back-to-gallery {
  margin-top: 30px;
}

/* magnific */
.magnific-share {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 12px;
  left: 0;
  font-size: 20px;
  z-index: 1047;
}

@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
  .magnific-share {
    position: fixed;
    top: 0;
    background: rgba(0, 0, 0, 0.6);
  }
}

.magnific-share li {
  margin-right: 10px;
  display: inline-block;
}

  .magnific-share li:last-child {
    margin-right: 0;
  }

.magnific-share a {
  display: block;
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.65);
  display: block;
  width: 25px;
  height: 20px;
  background-image: url('/views/photogallery/share.svg');
  background-size: 100px 20px;
  background-repeat: no-repeat;
  opacity: 0.6;
}

  .magnific-share a:hover {
    opacity: 1;
  }

  .magnific-share a.twitter, .magnific-share a.x {
    background-position: -25px 0;
  }

  .magnific-share a.pinterest {
    background-position: -50px 0;
  }

  .magnific-share a.linkedin {
    background-position: -75px 0;
  }

@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
  .magnific-share a {
    padding: 7.5px 10px;
  }
}

.magnific-share a:hover,
.magnific-share a:focus {
  color: rgba(255, 255, 255, 1);
}

.magnific-share a:visited {
  color: rgba(255, 255, 255, 0.65);
}

.mfp-title strong,
.mfp-title span,
.mfp-title small {
  display: block;
  font-family: Helvetica, Arial, Sans-Serif;
  font-size: 13px;
  line-height: 16px;
}

.mfp-title small {
  font-size: 12px;
}

.mfp-counter {
  font-family: Helvetica, Arial, Sans-Serif;
  font-size: 12px;
}

@media (min-width: 640px) {
  img.mfp-img {
    max-width: 85vw !important;
    max-height: 85vh !important;
  }
}
