/*!
 * Justified Gallery - v3.4.0
 * http://miromannino.com/projects/justified-gallery/
 * Copyright (c) 2014 Miro Mannino
 * Licensed under the MIT license.
 */

.justified-gallery {
  width: 100%;
  position: relative;
  overflow: hidden;
}
.justified-gallery > a,
.justified-gallery > div {
  position: absolute;
  display: inline-block;
  overflow: hidden;
}
.justified-gallery > a > img,
.justified-gallery > div > img {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  padding: 0;
  border: none;
}
.justified-gallery > a > .caption,
.justified-gallery > div > .caption {
  display: none;
  position: absolute;
  bottom: 0;
  padding: 5px;
  background-color: #000000;
  left: 0;
  right: 0;
  margin: 0;
  color: white;
  font-size: 12px;
  font-weight: 300;
  font-family: sans-serif;
}
.justified-gallery > a > .caption.caption-visible,
.justified-gallery > div > .caption.caption-visible {
  display: initial;
  opacity: 0.7;
  filter: alpha(opacity=70);
  /* IE8 or Earlier */
  -webkit-animation: justified-gallery-show-caption-animation 500ms 0 ease;
  -moz-animation: justified-gallery-show-caption-animation 500ms 0 ease;
  -ms-animation: justified-gallery-show-caption-animation 500ms 0 ease;
}
.justified-gallery > .spinner {
  position: absolute;
  bottom: 0;
  margin-left: -24px;
  padding: 10px 0 10px 0;
  left: 50%;
  opacity: initial;
  filter: initial;
  overflow: initial;
}
.justified-gallery > .spinner > span {
  display: inline-block;
  opacity: 0;
  filter: alpha(opacity=0);
  /* IE8 or Earlier */
  width: 8px;
  height: 8px;
  margin: 0 4px 0 4px;
  background-color: #000;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
  border-bottom-left-radius: 6px;
}

/**
 * Smart Grid Gallery Styles
 * 
 */

/* Style 1 - Fade caption */

.justified-gallery img {
  z-index: 1;
  -webkit-transform: translateZ(0);
}
.justified-gallery .sgg-caption {
  box-sizing: border-box;
  word-wrap: break-word;
  width: 100%;
  height: 100%;
  padding: 1em;
  overflow: hidden;
  cursor: pointer;
  position: absolute;
  opacity: 0;
  background: rgb(0,0,0);
  background: rgba(0,0,0,0.7);
  color: #fff;
  text-align: center;
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  transform-style: preserve-3d;
  z-index: 2;
}
.justified-gallery > div > .sgg-caption {
  cursor: default;
}
.justified-gallery a:hover .sgg-caption,
.justified-gallery div:hover .sgg-caption {
  opacity: 1;
}
.justified-gallery .sgg-caption span {
  display: block;
  position: relative;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
}
.justified-gallery .sgg-caption {
  -webkit-transition:all 0.45s ease-in-out;
  -moz-transition:all 0.45s ease-in-out;
  -o-transition:all 0.45s ease-in-out;
  -ms-transition:all 0.45s ease-in-out;
  transition:all 0.45s ease-in-out;
}

/* Style 2 - Fade sgg-caption and zoom image */

.justified-gallery.sgg-style-2 img {
  -webkit-transition:-webkit-transform 0.25s ease-in-out;
  -moz-transition:-moz-transform 0.25s ease-in-out;
  -o-transition:-o-transform 0.25s ease-in-out;
  -ms-transition:-ms-transform 0.25s ease-in-out;
  transition:transform 0.25s ease-in-out;
}
.justified-gallery.sgg-style-2 a:hover img,
.justified-gallery.sgg-style-2 div:hover img {
  opacity: 1;
  transform:scale(1.15,1.15);
  -webkit-transform:scale(1.15,1.15);
  -moz-transform:scale(1.15,1.15);
  -ms-transform:scale(1.15,1.15);
  -o-transform:scale(1.15,1.15);
}

/* Style 3 - Caption slide from bottom */

.justified-gallery.sgg-style-3 .sgg-caption {
  opacity: 1;
  height: auto;
  top: 100%;
  -webkit-transition:all 0.15s ease-in-out;
  -moz-transition:all 0.15s ease-in-out;
  -o-transition:all 0.15s ease-in-out;
  -ms-transition:all 0.15s ease-in-out;
  transition:all 0.15s ease-in-out;
}
.justified-gallery.sgg-style-3 a:hover .sgg-caption, 
.justified-gallery.sgg-style-3 div:hover .sgg-caption {
  opacity: 1;
  transform: translateY(-100%);
  -webkit-transform:translateY(-100%);
  -moz-transform:translateY(-100%);
  -ms-transform:translateY(-100%);
  -o-transform:translateY(-100%);
}
.justified-gallery.sgg-style-3 .sgg-caption span {
  top: auto;
  -webkit-transform: none;
  -ms-transform: none;
  transform: none;
}

/* Style 4 - Caption slide from bottom full height */

.justified-gallery.sgg-style-4 .sgg-caption {
  opacity: 1;
  top: 100%;
  -webkit-transition:all 0.25s ease-in-out;
  -moz-transition:all 0.25s ease-in-out;
  -o-transition:all 0.25s ease-in-out;
  -ms-transition:all 0.25s ease-in-out;
  transition:all 0.25s ease-in-out;
}
.justified-gallery.sgg-style-4 a:hover .sgg-caption, 
.justified-gallery.sgg-style-4 div:hover .sgg-caption {
  transform: translateY(-100%);
  -webkit-transform:translateY(-100%);
  -moz-transform:translateY(-100%);
  -ms-transform:translateY(-100%);
  -o-transform:translateY(-100%);
}

/* Style 5 - Caption slide from top full height */

.justified-gallery.sgg-style-5 .sgg-caption {
  opacity: 1;
  bottom: 100%;
  -webkit-transition:all 0.25s ease-in-out;
  -moz-transition:all 0.25s ease-in-out;
  -o-transition:all 0.25s ease-in-out;
  -ms-transition:all 0.25s ease-in-out;
  transition:all 0.25s ease-in-out;
}
.justified-gallery.sgg-style-5 a:hover .sgg-caption,
.justified-gallery.sgg-style-5 div:hover .sgg-caption {
  transform: translateY(100%);
  -webkit-transform:translateY(100%);
  -moz-transform:translateY(100%);
  -ms-transform:translateY(100%);
  -o-transform:translateY(100%);
}

/* Style 6 - Caption slide from left full width */

.justified-gallery.sgg-style-6 .sgg-caption {
  opacity: 1;
  right: 100%;
  -webkit-transition:all 0.25s ease-in-out;
  -moz-transition:all 0.25s ease-in-out;
  -o-transition:all 0.25s ease-in-out;
  -ms-transition:all 0.25s ease-in-out;
  transition:all 0.25s ease-in-out;
}
.justified-gallery.sgg-style-6 a:hover .sgg-caption, 
.justified-gallery.sgg-style-6 div:hover .sgg-caption {
  transform: translateX(100%);
  -webkit-transform:translateX(100%);
  -moz-transform:translateX(100%);
  -ms-transform:translateX(100%);
  -o-transform:translateX(100%);
}

/* Style 7 - Caption slide from right full width */

.justified-gallery.sgg-style-7 .sgg-caption {
  opacity: 1;
  left: 100%;
  -webkit-transition:all 0.25s ease-in-out;
  -moz-transition:all 0.25s ease-in-out;
  -o-transition:all 0.25s ease-in-out;
  -ms-transition:all 0.25s ease-in-out;
  transition:all 0.25s ease-in-out;
}
.justified-gallery.sgg-style-7 a:hover .sgg-caption,
.justified-gallery.sgg-style-7 div:hover .sgg-caption {
  transform: translateX(-100%);
  -webkit-transform:translateX(-100%);
  -moz-transform:translateX(-100%);
  -ms-transform:translateX(-100%);
  -o-transform:translateX(-100%);
}

/* Style 8 - Caption slide from hover direction */

.justified-gallery.sgg-style-8 .sgg-caption {
  display: none;
  opacity: 1;
  -webkit-transition:none;
  -moz-transition:none;
  -o-transition:none;
  -ms-transition:none;
  transition:none;
}
.justified-gallery.sgg-style-8 .in-right .sgg-caption {
  display: block;
  right: 0;
  left: auto;
  -webkit-animation: in-right 300ms;
  animation: in-right 300ms;
}
.justified-gallery.sgg-style-8 .out-right .sgg-caption {
  display: block;
  right: -100%;
  left: auto;
  -webkit-animation: out-right 300ms;
  animation: out-right 300ms ease;
}
.justified-gallery.sgg-style-8 .in-left .sgg-caption {
  display: block;
  left: 0;
  right: auto;
  -webkit-animation: in-left 300ms;
  animation: in-left 300ms;
}
.justified-gallery.sgg-style-8 .out-left .sgg-caption {
  display: block;
  left: -100%;
  right: auto;
  -webkit-animation: out-left 300ms;
  animation: out-left 300ms;
}
.justified-gallery.sgg-style-8 .in-top .sgg-caption {
  display: block;
  top: 0;
  bottom: auto;
  -webkit-animation: in-top 300ms;
  animation: in-top 300ms;
}
.justified-gallery.sgg-style-8 .out-top .sgg-caption {
  display: block;
  top: -100%;
  bottom: auto;
  -webkit-animation: out-top 300ms;
  animation: out-top 300ms ease;
}
.justified-gallery.sgg-style-8 .in-bottom .sgg-caption {
  display: block;
  bottom: 0;
  top: auto;
  -webkit-animation: in-bottom 300ms;
  animation: in-bottom 300ms;
}
.justified-gallery.sgg-style-8 .out-bottom .sgg-caption {
  display: block;
  bottom: -100%;
  top: auto;
  -webkit-animation: out-bottom 300ms;
  animation: out-bottom 300ms;
}

@keyframes in-right {
  from {right: -100%;}
  to   {right: 0px;}
}
@keyframes in-left {
  from {left: -100%;}
  to   {left: 0px;}
}
@keyframes out-right {
  from {right: 0px;}
  to   {right: -100%;}
}
@keyframes out-left {
  from {left: 0px;}
  to   {left: -100%;}
}

@keyframes in-top {
  from {top: -100%;}
  to   {top: 0px;}
}
@keyframes in-bottom {
  from {bottom: -100%;}
  to   {bottom: 0px;}
}
@keyframes out-top {
  from {top: 0px;}
  to   {top: -100%;}
}
@keyframes out-bottom {
  from {bottom: 0px;}
  to   {bottom: -100%;}
}

@-webkit-keyframes in-right {
  from {right: -100%;}
  to   {right: 0px;}
}
@-webkit-keyframes in-left {
  from {left: -100%;}
  to   {left: 0px;}
}
@-webkit-keyframes out-right {
  from {right: 0px;}
  to   {right: -100%;}
}
@-webkit-keyframes out-left {
  from {left: 0px;}
  to   {left: -100%;}
}

@-webkit-keyframes in-top {
  from {top: -100%;}
  to   {top: 0px;}
}
@-webkit-keyframes in-bottom {
  from {bottom: -100%;}
  to   {bottom: 0px;}
}
@-webkit-keyframes out-top {
  from {top: 0px;}
  to   {top: -100%;}
}
@-webkit-keyframes out-bottom {
  from {bottom: 0px;}
  to   {bottom: -100%;}
}


/* Style 9 - Caption slide from bottom full height pull image out */

.justified-gallery.sgg-style-9 .sgg-caption {
  opacity: 1;
  top: 100%;
  -webkit-transition:all 0.35s ease-in-out;
  -moz-transition:all 0.35s ease-in-out;
  -o-transition:all 0.35s ease-in-out;
  -ms-transition:all 0.35s ease-in-out;
  transition:all 0.35s ease-in-out;
}
.justified-gallery.sgg-style-9 a:hover .sgg-caption, 
.justified-gallery.sgg-style-9 div:hover .sgg-caption {
  transform: translateY(-100%);
  -webkit-transform:translateY(-100%);
  -moz-transform:translateY(-100%);
  -ms-transform:translateY(-100%);
  -o-transform:translateY(-100%);
}
.justified-gallery.sgg-style-9 img {
  -webkit-transition:-webkit-transform 0.35s ease-in-out;
  -moz-transition:-moz-transform 0.35s ease-in-out;
  -o-transition:-o-transform 0.35s ease-in-out;
  -ms-transition:-ms-transform 0.35s ease-in-out;
  transition:transform 0.35s ease-in-out;
}
.justified-gallery.sgg-style-9 a:hover img,
.justified-gallery.sgg-style-9 div:hover img {
  transform: translateY(-100%);
  -webkit-transform:translateY(-100%);
  -moz-transform:translateY(-100%);
  -ms-transform:translateY(-100%);
  -o-transform:translateY(-100%);
}

/* Style 10 - Caption slide from top full height pull image out */

.justified-gallery.sgg-style-10 .sgg-caption {
  opacity: 1;
  bottom: 100%;
  -webkit-transition:all 0.35s ease-in-out;
  -moz-transition:all 0.35s ease-in-out;
  -o-transition:all 0.35s ease-in-out;
  -ms-transition:all 0.35s ease-in-out;
  transition:all 0.35s ease-in-out;
}
.justified-gallery.sgg-style-10 a:hover .sgg-caption,
.justified-gallery.sgg-style-10 div:hover .sgg-caption {
  transform: translateY(100%);
  -webkit-transform:translateY(100%);
  -moz-transform:translateY(100%);
  -ms-transform:translateY(100%);
  -o-transform:translateY(100%);
}
.justified-gallery.sgg-style-10 img {
  -webkit-transition:-webkit-transform 0.35s ease-in-out;
  -moz-transition:-moz-transform 0.35s ease-in-out;
  -o-transition:-o-transform 0.35s ease-in-out;
  -ms-transition:-ms-transform 0.35s ease-in-out;
  transition:transform 0.35s ease-in-out;
}
.justified-gallery.sgg-style-10 a:hover img, 
.justified-gallery.sgg-style-10 div:hover img {
  transform: translateY(100%);
  -webkit-transform:translateY(100%);
  -moz-transform:translateY(100%);
  -ms-transform:translateY(100%);
  -o-transform:translateY(100%);
}

/* Style 11 - Caption hide on hover */

.justified-gallery.sgg-style-11 a .sgg-caption,
.justified-gallery.sgg-style-11 div .sgg-caption {
  opacity: 1;
}
.justified-gallery.sgg-style-11 a:hover .sgg-caption,
.justified-gallery.sgg-style-11 div:hover .sgg-caption {
  opacity: 0;
}

/* Style 12 - Caption always bottom */

.justified-gallery.sgg-style-12 .sgg-caption {
  opacity: 1;
  height: auto;
  bottom: 0;
}
.justified-gallery.sgg-style-12 .sgg-caption span {
  top: auto;
  -webkit-transform: none;
  -ms-transform: none;
  transform: none;
}

/* Load more button */
.sgg-load-more {
  margin: 20px auto;
  display: block;
  outline: none;
}

/* Size */
.sgg-button-small {
  padding: .6em .8em;
  font-size: .8em;
}
.sgg-button-medium {
  padding: .8em 1em;
  font-size: 1em;
}
.sgg-button-big {
  padding: .9em 1.4em;
  font-size: 1.5em;
}

/* Style */
.sgg-button-square {
  border-radius: 0px;
}
.sgg-button-round {
  border-radius: .5em;
}
.sgg-button-circle {
  border-radius: 9em;
}