.custom-gallery {
	position: relative;
	height: 70vh;
	width: 70vw;
  	margin: 8rem 0;
  	transform: translateX(-50%);
  	left: 50%;
}

@media only screen and (max-width: 1680px){
	.custom-gallery {
		width: 100%;
		left: 0;
		transform: none;
	}
}

.custom-gallery .active {
	opacity: 1;
	-webkit-transition: opacity 0.65s;
  	transition: opacity 0.65s;
}

.custom-gallery__images {
	list-style: none;
	padding: 0;
	margin: 0;
}

.custom-gallery__images li {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center;
	z-index: 1;
	opacity: 0;
	-webkit-transition: opacity 1.20s;
  	transition: opacity 1.20s;
}

.custom-gallery__header {
	position: absolute;
	top: 0;
	left: 0;
	width: 24%;
	height: 80px;
	z-index: 20;
}

.custom-gallery__controls {
	width: 100%;
	display: block;
	position: relative;
}

.custom-gallery__controls a {
	position: absolute;
	top: 0;
	z-index: 10;
	width: 36px;
  	height: 36px;
}

.custom-gallery__controls a svg {
	width: 100%;
	height: 100%;
}

.custom-gallery__controls a svg * {
	-webkit-transition: all 0.40s;
  	transition: all 0.40s;
}

.custom-gallery__controls a:hover svg rect {
	fill: #3e3e3e;
	stroke: #3e3e3e;
}

.custom-gallery__controls a:hover svg path {
	fill: white;
}

.custom-gallery__controls__prev {
	left: 0;
}

.custom-gallery__controls__next {
	right: 0;
	transform: rotate(180deg);
}

.custom-gallery__controls__page {
	width: 100%;
	text-align: center;
	padding-top: 0.4rem;
	font-size: 1.4rem;
}

.custom-gallery__progress {
	width: 100%;
	height: 40px;
	position: relative;
}

.custom-gallery__progress__indicator {
	position: absolute;
	width: 10%;
	height: 8px;
	left: 0;
	top: calc(50% - 4px);
	background-color: #30aeef;
	z-index: 10;
	-webkit-transition: left 0.65s;
  transition: left 0.65s;
}

.custom-gallery__progress__line {
	position: absolute;
	width: 100%;
	height: 1px;
	border-top: 1px solid #979797;
	z-index: 1;
	top: 50%;
}

.custom-gallery__caption {
	position: absolute;
	width: 100%;
	background-color: white;
	overflow-x: hidden;
	overflow-y: auto;
	z-index: 12;
}

.custom-gallery__caption__item {
	opacity: 0;
	position: absolute;
	top: 0;
	left: 0;
	z-index: 10;
	padding: 4rem 4rem 4rem 0;
	-webkit-transition: opacity 0.40s;
	transition: opacity 0.40s;
}

.custom-gallery__caption__item h2 {
	font-weight: 600;
}

/********** default **********/
.custom-gallery.default .custom-gallery__images {
	position: absolute;
	width: 80%;
	height: 100%;
	right: 0;
	top: 0;
}

.custom-gallery.default .custom-gallery__content {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 25%;
	z-index: 10;
}

.custom-gallery.default .custom-gallery__caption {
	position: absolute;
	width: 100%;
	background-color: white;
	overflow-x: hidden;
	overflow-y: auto;
	z-index: 12;
	height: calc(100% - 55px);
	top: 55px;
}

.custom-gallery.default .custom-gallery__caption__item {
	height: auto;
}

/********* default, with sidebar **********/
.vw-page-wrapper:not(.vw-sidebar-position-none) .custom-gallery {
	width: 100%;
}

.vw-page-wrapper:not(.vw-sidebar-position-none) .custom-gallery.default .custom-gallery__content {
	width: 40%;
}

.vw-page-wrapper:not(.vw-sidebar-position-none) .custom-gallery.default .custom-gallery__header {
	width: 35%;
}

.vw-page-wrapper:not(.vw-sidebar-position-none) .custom-gallery.default.no-captions .custom-gallery__header {
	width: 100%;
}

.vw-page-wrapper:not(.vw-sidebar-position-none) .custom-gallery.default .custom-gallery__caption__item {
	height: auto;
}

/********** default, no captions **********/
.custom-gallery.default.no-captions {
	margin-bottom: 0;
	height: auto;
}

.custom-gallery.default.no-captions .custom-gallery__images {
	width: 100%;
	height: 90vh;
	position: relative;
}

.custom-gallery.default.no-captions .custom-gallery__caption__item {
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.custom-gallery.default.no-captions .custom-gallery__caption {
	top: 0;
}

.custom-gallery.default.no-captions .custom-gallery__controls__prev {
	left: 1rem;
}

.custom-gallery.default.no-captions .custom-gallery__controls__next {
	right: 1rem;
}

.custom-gallery.default.no-captions .custom-gallery__content {
	width: 100%;
}

/********* portrait **********/
.custom-gallery.portrait {
	width: 100%;
	height: auto;
	margin-bottom: 2rem;
}

.custom-gallery.portrait .custom-gallery__images {
	position: relative;
	right: initial;
	top: initial;
	width: 100%;
	height: 1300px;
	max-height: 70vh;
}

.custom-gallery__header.bottom {
	position: relative;
  margin-top: -50px;
  width: 100%;
  left: 0;
  height: 40px;
}

.custom-gallery__header.bottom .custom-gallery__controls {
	height: 30px;
}

.custom-gallery__header.bottom .custom-gallery__controls__page {
 	color: white;
	font-size: 1.25rem;
	top: 5px;
	right: 50%;
	transform: translateX(50%);
	width: auto;
  position: absolute;
  border-radius: 999rem;
  -moz-border-radius: 999rem;
  background-color: rgba(0,0,0,.8);
  padding: 0 1.5rem;
  line-height: 2em;
}

.custom-gallery__header.bottom .custom-gallery__progress {
	height: 60px;
}

.custom-gallery.portrait .custom-gallery__content,
.custom-gallery.default.no-captions .custom-gallery__content {
 	position: relative;
  height: 800px;
  overflow: hidden;
  margin-top: 1rem;
}

.custom-gallery.portrait .custom-gallery__images {
 	left: 50%;
  transform: translateX(-50%);
}

/********** tablet **********/
@media only screen and (max-width: 1024px){
	.custom-gallery.default .active {
		-webkit-transition: opacity 0.125s;
	  transition: opacity 0.125s;
	}

	.custom-gallery.default .custom-gallery__images li {
		-webkit-transition: opacity 0.30s;
	  transition: opacity 0.30s;
	}

	.custom-gallery.default.has-captions {
		height: 90vh;
		margin: 3rem 0;
	}

	.custom-gallery.default.has-captions .custom-gallery__images {
		width: 100%;
		height: 94%;
	}

	.custom-gallery.default.has-captions .custom-gallery__content {
		height: 30% !important;
		width: 100% !important;
		top: initial;
		bottom: 0;
	}

	.custom-gallery.default.has-captions .custom-gallery__header {
		width: 100% !important;
		height: 94%;
	}

	.custom-gallery.default.has-captions .custom-gallery__progress {
		width: 90%;
		left: 5%;
		top: 74%;
	}

	.custom-gallery.default.has-captions .custom-gallery__controls {
		position: absolute;
		top: 25vh;
	}

	.custom-gallery.default.has-captions .custom-gallery__controls a {
		top: 85px;
		width: 54px;
		height: 54px;
	}

	.custom-gallery.default.has-captions .custom-gallery__controls__page {
		color: white;
		font-size: 2rem;
		position: relative;
  	top: -24vh;
	}

	.custom-gallery.default.has-captions .custom-gallery__controls__prev {
		left: calc(5% - 18px);
	}

	.custom-gallery.default.has-captions .custom-gallery__controls__next {
		right: calc(5% - 18px);
	}

	.custom-gallery.default.has-captions .custom-gallery__caption {
		width: 90%;
		left: 5%;
		top: 35px;
	}

	.custom-gallery.default.has-captions .custom-gallery__caption__item {
		padding: 1rem 4rem;
		-webkit-transition: opacity 0.125s;
	  transition: opacity 0.125s;
	}
}

/********** mobile **********/
@media only screen and (max-width: 650px){
	.custom-gallery.default.has-captions {
		height: auto;
	}

	.custom-gallery.default.has-captions .custom-gallery__images {
		height: 50vh;
		position: relative;
	}

	.custom-gallery.default.has-captions .custom-gallery__header {
    	height: 50vh;
	}

	.custom-gallery.default.has-captions .custom-gallery__controls {
		top: 0;
	}

	.custom-gallery.default.has-captions .custom-gallery__controls a {
		display: none;
	}

	.custom-gallery.default.has-captions .custom-gallery__controls__page {
		font-size: 1.25rem;
		top: 10px;
		right: 10px;
		width: auto;
    position: absolute;
    border-radius: 999rem;
    -moz-border-radius: 999rem;
    background-color: rgba(0,0,0,.8);
    padding: 0 1.5rem;
    line-height: 2em;
	}

	.custom-gallery.default.has-captions .custom-gallery__progress {
		position: absolute;
    	bottom: 0;
    	height: 24px;
    	top: initial;
	}

	.custom-gallery.default.has-captions .custom-gallery__caption__item h2 {
		font-size: 2rem;
		line-height: 1em;
	}

	.custom-gallery.default.has-captions .custom-gallery__caption__item {
		padding: 1rem 0.5rem 1rem 0;
		display: none;
		height: auto;
	}

	.custom-gallery.default.has-captions .custom-gallery__caption__item.active {
		display: block;
	}

	.custom-gallery.default.has-captions .custom-gallery__caption__item p {
		font-size: 1.5rem;
		line-height: 1.5em;
	}

	.custom-gallery.default.has-captions .custom-gallery__content {
		position: relative;
    	height: 50vh;
	}

	.custom-gallery.default.has-captions .custom-gallery__caption {
		left: 0;
		top: 0;
		width: 100%;
	}

	body, html {
		overflow-x: hidden;
	}
}