/* masonry galley */
.ti_albums {
  clear: both;
  overflow: hidden;
  box-sizing: border-box;
  width: calc(100% + 80px);
  margin-left: -40px;
  margin-right: -40px;
  
  //display: none;
}

.ti_gallery_wrapper {
  width: calc(33.3333% - 80px);
	margin: 0px 40px 40px 40px;
	float: left;
}

@media screen and (max-width: 1180px) {
  .ti_albums {
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
  }
  .ti_gallery_wrapper {
    width: calc(50% - 40px);
      margin: 0px 20px 20px 20px;
      float: left;
  }
}

@media screen and (max-width: 767px) {
  .ti_gallery_wrapper {
    width: calc(100% - 40px);
      margin: 0px 20px 20px 20px;
      float: left;
  }
}

.ti_gallery {
  position: relative;
}

.ti_galleryCamIcon {
  position: absolute;
  bottom: 10px;
  left: 10px;
  color: white;
  font-size: 22px;
  line-height: 22px;
  text-shadow: 1px 1px 1px #ccc;
}

.ti_galleryCounter {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 16px;
  line-height: 16px;
  color: white;
  margin-bottom: 0px;
  text-shadow: 1px 1px 1px #ccc;
}

.ti_galleryTitle {
  font-weight: bold !important;
}

.ti_preview_image {
  height: 0px;
  padding-bottom: 65%;
  background-repeat: no-repeat;
  background-size: cover;
}

.ti_gallery article {
  break-inside: avoid-column;
  padding-bottom: 20px;
}

.ti_gallery figure {
  margin: 0px;
  font-size: 0px;
}

.ti_gallery figure a {
  font-size: 0px;
  line-height: 0px;
  text-decoration: none;
}

.ti_gallery figure img {
    width: 100%;
	height: auto;
}

/* lightbox */
.ti_lightbox_wrapper {
  position: fixed;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  text-align: center;
  background-color: rgba(0,0,0,0.85);
  display: none;
  z-index: 100;
}

.ti_lightbox_content {
  width: calc(100% - 10%);
  margin-left: 5%;
  height: calc(100vh - 100px);
  margin-top: 50px;
}

.ti_lightbox_content figure {
  margin: 0px;
  width: 100%;
  height: 100%;
}

.ti_lightbox_content figure img{
  height: auto;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

.ti_lightbox_wrapper button {
  position: absolute;
}

.ti_lightbox_close {
  top: 50px;
  right: 50px;
}

.ti_lightbox_prev {
  top: 50vh;
  left: 50px;
}

.ti_lightbox_next {
  top: 50vh;
  right: 50px;
}

.ti_lightbox_wrapper figcaption {
  position: absolute;
}

.ti_lightbox_preloader {
  display: none;
}

