.gallery
{
	position: relative;
	display: block;
	overflow: hidden;
	margin: 1rem auto 1rem auto;
	padding: 0;
	text-align: left;
	max-width: 42rem;
}

.gallery a
{
	position: relative;
	display: block;
	float: left;
	border: 0;
	text-decoration: none;
	width: 20%;
	box-sizing: border-box;
	padding: 0.625rem;
}

.gallery a:hover
{
	border: 0;
	text-decoration: none;
}

.gallery img
{
	position: relative;
	display: block;
	float: left;
	width: 100%;
	border: 0;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.gallery .active > img
{
	box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5);
	-webkit-transform: translateY(-5px);
	-moz-transform: translateY(-5px);
	-ms-transform: translateY(-5px);
	transform: translateY(-5px);
}


/* go gallery */
.go-gallery
{
	position: fixed;
	display: block;
	overflow: visible;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.75);
	opacity: 0;
	visibility: hidden;
	transition: opacity .5s ease, visibility .5s ease;
	/* enable gpu acceleration */
   -webkit-transform: translate3d(0, 0, 0);
   -moz-transform: translate3d(0, 0, 0);
   -ms-transform: translate3d(0, 0, 0);
   transform: translate3d(0, 0, 0);
   z-index: 2;
}
.go-gallery.open
{
	visibility: visible;
	opacity: 1;
}



/* go gallery stage */
.go-gallery .stage
{
	position: absolute;
	display: block;
	overflow: visible;
	width: 0;
	height: 0;
	left: 0;
	top: 0;
	border: 0;
	margin: 0;
	padding: 0;
	opacity: 0;
	background-color: rgba(0, 0, 0, 0.5);
	box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.5);
	transition: opacity 0.3s ease, left 0s ease 0.3s, top 0s ease 0.3s, width 0.3s ease, height 0.3s ease, margin 0.3s ease;
}
.go-gallery.open .stage
{
	opacity: 1;
	transition: opacity 0.25s ease, left 0.5s ease, top 0.5s ease, width 0.5s ease, height 0.5s ease, margin 0.5s ease;
}
.go-gallery .stage.no-transition
{
	transition: none;
}

.go-gallery .stage .image
{
	position: relative;
	display: block;
	float: left;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
}

/* loading */
.go-gallery .loading
{
	position: absolute;
	display: block;
	border-radius: 10px;
	left: 50%;
	top: 50%;
	width: 60px;
	height: 60px;
	margin: -30px 0 0 -30px;
	opacity: 1;
	transition: opacity 0.1s ease;
}

.go-gallery .loading:before,
.go-gallery .loading:after
{
	content: '';
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background-color: #FFFFFF;
	opacity: 0.6;
	position: absolute;
	top: 0;
	left: 0;
	-webkit-animation: gallery-loading-bounce 2.0s infinite ease-in-out;
	animation: gallery-loading-bounce 2.0s infinite ease-in-out;
}

.go-gallery .loading:after
{
	-webkit-animation-delay: -1.0s;
	animation-delay: -1.0s;
	background-color: #000000;
}

@-webkit-keyframes gallery-loading-bounce
{
	0%,
	100%
	{
		-webkit-transform: scale(0.0);
	}
	50%
	{
		-webkit-transform: scale(1.0);
	}
}

@keyframes gallery-loading-bounce
{
	0%,
	100%
	{
		transform: scale(0.0);
		-webkit-transform: scale(0.0);
	}
	50% { 
		transform: scale(1.0);
		-webkit-transform: scale(1.0);
	}
}

/* buttons */
.go-gallery .previous-button,
.go-gallery .next-button,
.go-gallery .close-button
{
	position: absolute;
	display: block;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.75);
	color: #FFFFFF;
	transition: opacity 0.3s ease, transform 0.3s ease;
	opacity: 0.5;
	cursor: pointer;
}
.go-gallery .previous-button:hover,
.go-gallery .next-button:hover,
.go-gallery .close-button:hover
{
	opacity: 1;
	transform: scale(1.25);
}

.go-gallery .previous-button
{
	top: 50%;
	margin-top: -16px;
	left: 10px;
}
.go-gallery .previous-button:before,
.go-gallery .previous-button:after
{
	content: '';
	position: absolute;
	display: block;
	width: 35%;
	height: 10%;
	top: 50%;
	left: 0%;
	margin-top: -5%;
	margin-left: 28%;
	border-radius: 1px;
	background: #FFFFFF;
}
.go-gallery .previous-button:before
{
	transform: rotate(45deg);
	top: 60%;
}
.go-gallery .previous-button:after
{
	transform: rotate(-45deg);
	top: 40%;
}

.go-gallery .next-button
{
	top: 50%;
	margin-top: -16px;
	right: 10px;
}
.go-gallery .next-button:before,
.go-gallery .next-button:after
{
	content: '';
	position: absolute;
	display: block;
	width: 35%;
	height: 10%;
	top: 50%;
	left: 0%;
	margin-top: -5%;
	margin-left: 38%;
	border-radius: 1px;
	background: #FFFFFF;
}
.go-gallery .next-button:before
{
	transform: rotate(-45deg);
	top: 60%;
}
.go-gallery .next-button:after
{
	transform: rotate(45deg);
	top: 40%;
}

.go-gallery .close-button
{
	top: 10px;
	right: 10px;
}
.go-gallery .close-button:before,
.go-gallery .close-button:after
{
	content: '';
	position: absolute;
	display: block;
	width: 50%;
	height: 10%;
	top: 50%;
	left: 0%;
	margin-top: -5%;
	margin-left: 25%;
	border-radius: 1px;
	background: #FFFFFF;
}
.go-gallery .close-button:before
{
	transform: rotate(45deg);
}
.go-gallery .close-button:after
{
	transform: rotate(-45deg);
}

.go-gallery .previous-wrapper,
.go-gallery .next-wrapper
{
	position: absolute;
	display: block;
	width: 33%;
	height: 100%;
	top: 0;
	opacity: 0;
	color: #FFFFFF;
	transition: opacity 0.3s ease;
	cursor: pointer;
}
.go-gallery .previous-wrapper
{
	left: 0;
}
.go-gallery .next-wrapper
{
	right: 0;
}
.go-gallery .previous-wrapper:hover,
.go-gallery .next-wrapper:hover
{
	opacity: 1;
}