/* -----------------------------------------
	Hero Area
----------------------------------------- */

/* Basic Styles
=================================== */
.page-hero {
	position: relative;
	display: flex;
	align-items: center;
	padding: $section-padding-lg 0;
	background-repeat: no-repeat;
	background-size: cover;
	background-position: top center;
	color: $white;
	height: $hero-height-default-lg;
	overflow: hidden;
	z-index: 1;

	@include media-breakpoint-down(md) {
		height: $hero-height-default-md;
		padding: $section-padding-md 0;
	}

	@include media-breakpoint-down(sm) {
		height: $hero-height-default-sm;
		padding: $section-padding-sm 0;
	}

	// Overlay color, apply background color here
	&::before {
		content: "";
		position: absolute;
		top: 0;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 12;
	}

  	.slick-initialized.convert-slick-slider &,
	.slick-initialized & {
		display: flex;
	}

	.btn {
		margin-top: 25px;
	}
}

.page-hero-background-layer {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	background-color: $accent-color;
	background-repeat: no-repeat;
	background-size: cover;
	background-position: top center;
	z-index: -1;
}

.page-hero-lg {
	height: $hero-home-height-lg;
	overflow: hidden;

	.page-hero-slideshow & {
		height: 100%;
	}

	@include media-breakpoint-down(md) {
		height: $hero-home-height-md;
	}

	@include media-breakpoint-down(sm) {
		height: $hero-home-height-sm;
	}

	.btn {
		margin-top: 35px;
	}
}

.page-hero-align-center {
	text-align: center;

	.page-hero-content {
		margin: 0 auto;
	}
}

.page-hero-align-left {
	text-align: left;
}

.page-hero-align-right {
	text-align: right;

	.page-hero-content {
		margin-left: auto;
	}
}

.page-hero-align-top {
	align-items: flex-start;

	@include media-breakpoint-down(md) {
		align-items: center;
	}
}

.page-hero-align-middle {
	align-items: center;
}

.page-hero-align-bottom {
	align-items: flex-end;

	@include media-breakpoint-down(md) {
		align-items: center;
	}
}

.page-hero-content {
	position: relative;
	z-index: 15;

	@include media-breakpoint-up(md) {
		width: 50%;
	}

	@include media-breakpoint-down(sm) {
		.btn {
			@include button-sm;
		}
	}
}

.page-hero-title {
	color: inherit;
	margin: 0;
	font-size: 36px;
	line-height: normal;

	.page-hero-lg & {
		font-size: 58px;
	}

	@include media-breakpoint-down(md) {
		font-size: 36px;

		.page-hero-lg & {
			font-size: 46px;
		}
	}

	@include media-breakpoint-down(sm) {
		font-size: 32px;

		.page-hero-lg & {
			font-size: 38px;
		}
	}
}

.page-hero-subtitle {
	margin: 0;
	font-size: 14px;
	text-transform: uppercase;
	line-height: normal;

	.page-hero-lg & {
		@include media-breakpoint-up(lg) {
			text-transform: none;
			font-size: 22px;
			line-height: 1.2em;
		}
	}
}

/* Video Backgrounds
=================================== */
.page-hero-video-wrap {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;

	&.visible {
		.page-hero-video-background {
			opacity: 1;
		}

		&::before {
			display: none;
		}
	}

	&::before {
		@include spinner;
		content: "";
		position: absolute;
		z-index: 1000;
		bottom: 20px;
		left: 50%;
		margin-left: -20px;
	}

	@media (max-width: 1080px) {
		display: none;
	}
}

.page-hero-video-background {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	opacity: 0;
	transition: opacity 1s ease;

	iframe {
		position: absolute;
		top: 50%;
		left: 50%;
		width: 100%;
		height: 100%;
		pointer-events: none;
		transform: translate(-50%, -50%);
		max-width: none;
	}

	video {
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
		margin: 0;
		padding: 0;
	}
}

/* Slideshow
=================================== */
.page-hero-slideshow {
	position: relative;
	height: $hero-home-height-lg;
	overflow: hidden;

	@include media-breakpoint-down(md) {
		height: $hero-home-height-md;
	}

	@include media-breakpoint-down(sm) {
		height: $hero-home-height-sm;
	}

	&:not(.slick-initialized) {
		> div:not(:first-child) {
			display: none;
		}
	}

	.slick-list,
	.slick-track {
		height: 100%;
	}

	.slick-slide {
		&::before {
			content: "";
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			z-index: 5;
		}
	}
}

.page-hero-image-slideshow {
	height: auto;

	@include media-breakpoint-down(md) {
		height: auto;
	}

	@include media-breakpoint-down(sm) {
		height: auto;
	}

	.slick-list,
	.slick-track {
		height: auto;
	}

	img {
		width: 100%;
	}
}

.convert-slick-slider {
	.slick-arrow {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		z-index: 25;
		border-radius: 50%;
		width: 58px;
		height: 58px;
		font-size: 54px;
		padding: 0;
		text-align: center;
		line-height: normal;
		background: none;
		cursor: pointer;
		color: $white;
		border: 0;

		@include media-breakpoint-down(sm) {
			display: none !important;
			visibility: hidden;
		}
	}

	.slick-next {
		right: 15px;

		[class^="fa"] {
			position: relative;
			left: 2px;
		}
	}

	.slick-prev {
		left: 15px;

		[class^="fa"] {
			position: relative;
			right: 1px;
		}
	}

	.slick-dots {
		@include clearfix;
		position: absolute;
		margin: 0;
		padding: 15px 15px 5px;
		background-color: rgba($black, .5);
		list-style-type: none;
		text-align: center;
		width: auto;
		left: 50%;
		bottom: 40px;
		transform: translateX(-50%);

		@include media-breakpoint-down(sm) {
			bottom: 0;
		}

		li {
			float: left;
			display: inline-block;
			margin: 0 5px;
			line-height: 0;

			&.slick-active,
			&:hover {
				button {
					height: 5px;
					opacity: 1;
				}
			}

			@include media-breakpoint-down(sm) {
				margin: 3px;
			}
		}

		button {
			position: relative;
			text-indent: -999em;
			padding: 0;
			margin: 0;
			width: 65px;
			height: 2px;
			background-color: $white;
			border: 0;
			box-shadow: none;
			cursor: pointer;
			opacity: .6;
			transition: height .18s ease;

			@include media-breakpoint-down(sm) {
				width: 25px;
			}

			&:focus {
				outline: 0;
				box-shadow: none;
			}
		}

		.slick-active {
			button {
				opacity: 1;
			}
		}
	}
}

.slick-arrow,
.slick-dots button {
	&:focus,
	&:active {
		outline: 0;
	}
}
