#adgallery-sgallery {
  font-size: 20px;
  margin: auto;
  position: relative;
  max-width: 50em;
  overflow: hidden;
  padding-top: 1em
}

#adgallery-sgallery:full-screen {
  max-width: 100% !important;
  width: 100%;
  height: 100% !important;
  background-color: #111
}

#adgallery-sgallery:-webkit-full-screen {
  max-width: 100% !important;
  width: 100%;
  height: 100% !important;
  background-color: #111
}

#adgallery-sgallery:-moz-full-screen {
  max-width: 100% !important;
  width: 100%;
  height: 100% !important;
  background-color: #111
}
#adgallery-sgallery .pinterest img, #adgallery-sgallery .item-large img.pinterest {
	width:auto;
}
#adgallery-sgallery .item-large.pinterest-large {
	width:auto;
	right:inherit;
}
#adgallery-sgallery .controls {
  text-align: center;
  font-size: 1em;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: opacity .3s ease;
  transition: opacity .3s ease;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0
}

#adgallery-sgallery .control,
#adgallery-sgallery .grid,
#adgallery-sgallery .fs-toggle {
  width: .66em;
  height: .66em;
  text-align: center;
  line-height: .5em;
  cursor: pointer;
  display: inline-block;
  margin-right: 10px
}

#adgallery-sgallery .showControls {
  opacity: 1;
  pointer-events: auto;
  -webkit-transition: opacity .6s 1s ease;
  transition: opacity .6s 1s ease
}

#adgallery-sgallery .hideControls {
  opacity: 0;
  pointer-events: none
}

#adgallery-sgallery .icon-grid,
#adgallery-sgallery .icon-arrow-left,
#adgallery-sgallery .icon-arrow-right,
#adgallery-sgallery .icon-fullscreen-exit,
#adgallery-sgallery .icon-fullscreen {
  display:inline-block;
  width: 20px;
  height: 20px;
  background-image: url(../img/controls-light2.png);
  background-repeat: no-repeat
}

#adgallery-sgallery .icon-grid {
  background-position: 0 0
}

#adgallery-sgallery .icon-arrow-left {
  background-position: -40px 0
}

#adgallery-sgallery .icon-arrow-right {
  background-position: -80px 0
}

#adgallery-sgallery .icon-fullscreen-exit {
  background-position: -120px 0
}

#adgallery-sgallery .icon-fullscreen {
  background-position: -160px 0
}
#adgallery-sgallery .fs-toggle {
  display: none;
}

#adgallery-sgallery .items-thumbs .item {
	width:auto;
}

#adgallery-sgallery .item {
  display: inline-block;
  cursor: pointer;
  width: 24%;
  height: auto;
}

#adgallery-sgallery .item img,
#adgallery-sgallery .item-large img {
  width: 100%;
  display:block;
  height:auto;
}

#adgallery-sgallery .items-large {
  position: absolute;
  top: 0;
  left: 0
  right:0;
  width: 100%;
  height: 100%;
  pointer-events: none
}

#adgallery-sgallery .item-large {
  position: absolute;
  width: 80%;
  height: auto;
  left: 10%;
  right: 10%;
  top: 3em;
  opacity: 0;
  -webkit-transform: scale(.8);
  transform: scale(.8);
  list-style:none;
}
#adgallery-sgallery .item-large .img-caption{
  position:absolute;
  width:100%;
  bottom:0;
  left:0;
  right:0;
  background-color: rgba(0,0,0,0.6);
  color:white;
  padding:10px;
  font-size:.8em;
  text-align:center;
  -moz-box-sizing: border-box;
  box-sizing:border-box;
  font-size:14px;
}
#adgallery-sgallery .fadeInScaleUp {
  -webkit-animation: fadeInScaleUp .5s ease-out .6s forwards;
  animation: fadeInScaleUp .5s ease-out .6s forwards;
  z-index: 3
}

#adgallery-sgallery .fadeOut {
  -webkit-animation: fadeOut .4s ease-out forwards;
  animation: fadeOut .4s ease-out forwards;
  z-index: 1
}
/************* STYLE 1 *******************/
.sgallery.style1 li.item:hover .item-overlay  {
    background: none repeat scroll 0 0 rgba(255, 255, 255, 0.5);
	transition:all 0.4s ease-in-out 0s;
	transform:translate(0%,0%);
    opacity: 1;
}
.sgallery.style1 .item-overlay {
	transition:all 0.4s ease-in-out 0s;
	transform:translate(0%,100%);
    display: block;
    height: 100%;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
}
.sgallery.style1 .items-thumbs li {
	overflow:hidden;
	position:relative;
}
/************* STYLE 2 *******************/
.sgallery.style2 li.item:hover .item-overlay  {
    background: none repeat scroll 0 0 rgba(255, 255, 255, 0.5);
	transition:all 0.5s ease-in-out 0s;
	transform:translate(0%,0%);
    opacity: 1;
}
.sgallery.style2 .item-overlay {
	transition:all 0.5s ease-in-out 0s;
	transform:translate(100%,0%);
    display: block;
    height: 100%;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
}
.sgallery.style2 .items-thumbs li {
	overflow:hidden;
	position:relative;
}
/************* STYLE 3 *******************/
.sgallery.style3 li.item:hover .item-overlay  {
    background: none repeat scroll 0 0 rgba(0, 0, 0, 0.3);
	transition:all 0.5s ease-in-out 0s;
    opacity: 1;
}
.sgallery.style3 .item-overlay {
	transition:all 0.5s ease-in-out 0s;
    display: block;
    height: 100%;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
}
.sgallery.style3 .items-thumbs li {
	overflow:hidden;
	position:relative;
}
/************* STYLE 4 *******************/
.sgallery.style4 li.item:hover .item-overlay  {
    background: none repeat scroll 0 0 rgba(232, 198, 61, 0.5);
	transition:all 0.5s ease-in-out 0s;
	transform:translate(0%,0%);
    opacity: 1;
}
.sgallery.style4 .item-overlay {
	transition:all 0.5s ease-in-out 0s;
	transform:translate(0%,-100%);
    display: block;
    height: 100%;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
}
.sgallery.style4 .items-thumbs li {
	overflow:hidden;
	position:relative;
}
/************* STYLE 5 *******************/
.sgallery.style5 li.item:hover .item-overlay  {
    background: none repeat scroll 0 0 rgba(192, 12, 0, 0.5);
	transition:all 0.5s ease-in-out 0s;
	transform:translate(0%,0%);
    opacity: 1;
}
.sgallery.style5 .item-overlay {
	transition:all 0.5s ease-in-out 0s;
	transform:translate(-100%,0%);
    display: block;
    height: 100%;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
}
.sgallery.style5 .items-thumbs li {
	overflow:hidden;
	position:relative;
}
/************* STYLE 6 *******************/
.sgallery.style6 li.item:hover .item-overlay  {
    background: none repeat scroll 0 0 rgba(255, 255, 255, 0.8);
	transition:all 0.5s ease-in-out 0s;
	transform:translate(0%,0%);
    opacity: 1;
}
.sgallery.style6 .item-overlay {
	transition:all 0.5s ease-in-out 0s;
	transform:translate(-100%,-100%);
    display: block;
    height: 100%;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
}
.sgallery.style6 .items-thumbs li {
	overflow:hidden;
	position:relative;
}
/************* STYLE 7 *******************/
.sgallery.style7 li.item:hover .item-overlay  {
	background:rgba(255, 255, 255, 0.3);
	transition:all 0.4s ease-in-out 0s;
    opacity: 1;
	border:5px solid rgba(192, 12, 0, 0.8);	
	box-sizing:border-box;
	-moz-box-sizing:border-box;
}
.sgallery.style7 .item-overlay {
	transition:all 0.4s ease-in-out 0s;
    display: block;
    height: 100%;
    opacity: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
}
.sgallery.style7 .items-thumbs li {
	overflow:hidden;
	position:relative;
}
@keyframes fadeOut {
  from {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1)
  }

  to {
    opacity: 0;
    -webkit-transform: scale(1);
    transform: scale(1)
  }
}

@-webkit-keyframes fadeOut {
  from {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1)
  }

  to {
    opacity: 0;
    -webkit-transform: scale(1);
    transform: scale(1)
  }
}

@keyframes fadeInScaleUp {
  from {
    opacity: 0;
    -webkit-transform: scale(.8);
    transform: scale(.8)
  }

  to {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1)
  }
}

@-webkit-keyframes fadeInScaleUp {
  from {
    opacity: 0;
    -webkit-transform: scale(.8);
    transform: scale(.8)
  }

  to {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1)
  }
}

.scaleDownFadeOut {
  -webkit-animation: scaleDownFadeOut .4s ease-in forwards;
  animation: scaleDownFadeOut .4s ease-in forwards;
  pointer-events: none
}

@keyframes scaleDownFadeOut {
  0% {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1)
  }

  99% {
    opacity: 0;
    -webkit-transform: scale(.5);
    transform: scale(.5)
  }

  100% {
    opacity: 0;
    -webkit-transform: scale(1);
    transform: scale(1)
  }
}

@-webkit-keyframes scaleDownFadeOut {
  0% {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1)
  }

  99% {
    opacity: 0;
    -webkit-transform: scale(.5);
    transform: scale(.5)
  }

  100% {
    opacity: 0;
    -webkit-transform: scale(1);
    transform: scale(1)
  }
}

.scaleUpFadeIn {
  opacity: 0;
  -webkit-transform: scale(1);
  transform: scale(1);
  -webkit-animation: scaleUpFadeIn ease-in-out .4s forwards;
  animation: scaleUpFadeIn ease-in-out .4s forwards;
  -webkit-animation-duration: .4s;
  animation-duration: .4s
}

@keyframes scaleUpFadeIn {
  0% {
    opacity: 0;
    -webkit-transform: scale(1);
    transform: scale(1)
  }

  1% {
    opacity: 0;
    -webkit-transform: scale(.5);
    transform: scale(.5)
  }

  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1)
  }
}

@-webkit-keyframes scaleUpFadeIn {
  0% {
    opacity: 0;
    -webkit-transform: scale(1);
    transform: scale(1)
  }

  1% {
    opacity: 0;
    -webkit-transform: scale(.5);
    transform: scale(.5)
  }

  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1)
  }
}

.showLastSecond {
  opacity: 0;
  -webkit-transform: scale(1);
  transform: scale(1);
  -webkit-animation: showLastSecond ease-in-out .4s forwards;
  animation: showLastSecond ease-in-out .4s forwards;
  -webkit-animation-duration: .4s;
  animation-duration: .4s
}

@keyframes showLastSecond {
  0% {
    opacity: 0;
    -webkit-transform: scale(1);
    transform: scale(1)
  }

  1% {
    opacity: 0;
    -webkit-transform: scale(.5);
    transform: scale(.5)
  }

  99% {
    opacity: 0;
    -webkit-transform: scale(1);
    transform: scale(1)
  }

  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1)
  }
}

@-webkit-keyframes showLastSecond {
  0% {
    opacity: 0;
    -webkit-transform: scale(1);
    transform: scale(1)
  }

  1% {
    opacity: 0;
    -webkit-transform: scale(.5);
    transform: scale(.5)
  }

  99% {
    opacity: 0;
    -webkit-transform: scale(1);
    transform: scale(1)
  }

  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1)
  }
}

@media screen and (max-width: 30em) {
  .item-large {
    width: 80%;
    right: 10%;
    left: 10%
  }
}