/**
 *
 * Hero Accordion
 *
 */
.hero-accordion {
	color: $white;
	display: flex;
	flex-wrap: wrap;
	max-width: 100%;
	overflow: hidden;
	width: 100%;

	@media (min-width: 1024px) {
		flex-wrap: nowrap;
	}

	.hero-panel {
		background-position: center;
		background-repeat: no-repeat;
		background-size: cover;
		height: auto;
		max-height: 160px;
		padding: 3.125rem 0;
		position: relative;
		transition:	max-height 500ms $accordion-transition;
		width: 100%;
		z-index: 1;

		/* adjust padding for transparent header */
		.header--transparent & {
			padding-top: 5rem;
		}

		@media (min-width: 1024px) {
			max-height: none;
			height: auto;
			max-width: 180px;
			padding: 1rem 0 2.75rem;
			transition:	max-width 500ms $accordion-transition;

			&:first-of-type {
				border-radius: 0 0 0 135px;
			}

			&:last-of-type {
				border-radius: 0 0 135px 0;
			}

			&:only-of-type {
				border-radius: 0 0 135px 135px !important;
			}
		}

		&__toggle {
			align-items: center;
			display: flex;
			height: 100%;
			justify-content: center;
			left: 0;
			opacity: 1;
			transition:
				opacity 500ms $accordion-transition,
				visibility 500ms $accordion-transition;
			position: absolute;
			top: 0;
			visibility: visible;
			width: 100%;
			z-index: 3;

			@media (min-width: 1024px) {
				width: 180px;
			}

			.toggle-link {
				align-items: center;
				backface-visibility: hidden;
				background-color: rgba(0, 0, 0, 0.25);
				border: 2px solid $white;
				border-radius: 50%;
				color: $white !important;
				display: flex;
				font-size: 2.5rem;
				justify-content: center;
				line-height: 80px;
				height: 80px;
				position: relative;
				transition: transform $transition-timing $transition;
				width: 80px;

				@media (min-width: 1024px) {
					font-size: 2.5rem;
					line-height: 100px;
					height: 100px;
					width: 100px;
				}

				span {
					backface-visibility: hidden;
					display: inline-block;
					height: 80px;
					line-height: 80px;

					@media (min-width: 1024px) {
						height: 100px;
						line-height: 100px;
					}
				}

				&:hover {
					backface-visibility: hidden;
					transform: scale(1.1);
				}
			}
		}

		&__main-wrap {
			align-items: center;
			opacity: 0;
			transition: opacity 500ms $accordion-transition;
			display: flex;

			@media (min-width: 1024px) {
				height: 675px;
			}
		}

		&__copy {
			opacity: 0;
			position: relative;
			transition: opacity 500ms $accordion-transition;
			width: 100%;
		}

		&__text {
			max-width: 250px;

			@media (min-width: 768px) {
				max-width: 350px;
			}

			@media (min-width: 1024px) {
				max-width: none;
			}

			h1 {
				max-width: 500px;
				margin-bottom: 1.09375rem;

				@media (min-width: 1024px) {
					min-width: 580px;
				}
			}

			p {
				max-width: 220px;
				margin-bottom: 0;

				@media (min-width: 768px) {
					max-width: 350px;
				}

				@media (min-width: 1024px) {
					max-width: 500px;
				}
			}

			.button-primary {
				margin-top: 1.875rem;
			}
		}

		&__quote {
			display: flex;
			justify-content: flex-end;
			margin-top: 1.875rem;
			opacity: 0;
			transition: opacity 500ms $accordion-transition;
			z-index: 1;

			@media (min-width: 1400px) {
				bottom: 0;
				margin-top: 0;
				position: absolute;
				right: 0;
				z-index: 1;
			}
		}

		&__pill {
			background-color: rgba(0, 0, 0, 0.4);
			border: 1px solid $gray-185;
			border-radius: 75px;
			display: inline-block;
			max-width: 350px;
			padding: 1.25rem 1.5625rem;
			text-align: center;

			@media (min-width: 1024px) {
				border-radius: 100px;
				max-width: 465px;
				padding: 1.25rem 4.0625rem;
			}
		}

		&__wrap {
			margin: 0 auto;
			max-width: 330px;

			.quote {
				font-size: 0.8125rem;
				font-weight: 700;
				line-height: 1.2;
				margin-bottom: 0;

				@media (min-width: 768px) {
					font-size: 0.875rem;
				}

				@media (min-width: 1024px) {
					font-size: 1rem;
				}
			}

			.citation {
				font-size: 0.875rem;
				font-style: italic;
				font-weight: 400;
			}

			.arrow-link {
				margin-top: 1.406rem;
			}

			.arrow-link__text {
				color: $white;
			}

			.arrow-link__icon {
				height: 20px;

				svg {
					fill: $white !important;
				}
			}
		}

		/* Active */
		&.active {
			height: auto;
			max-height: 850px;
			z-index: 2;

			@media (min-width: 768px) {
				max-height: 700px;
			}

			@media (min-width: 1024px) {
				max-height: none;
				max-width: 100%;
			}

			.hero-panel__toggle {
				opacity: 0;
				visibility: hidden;
			}

			.hero-panel__main-wrap {
				opacity: 1;
				transition: opacity 500ms $accordion-transition;
			}

			.hero-panel__copy {
				opacity: 1;
			}

			.hero-panel__quote {
				opacity: 1;
				right: 0;
			}
		}
	}

	//overlay
	&.image--hasoverlay {
		.hero-panel {
			position: relative;

			&:before {
				content: '';
				position: absolute;
				top: 0;
				left: 0;
				height: 100%;
				width: 100%;
				z-index: 1;
				background: linear-gradient(to right, rgba(0,0,0, 0.8), rgba(0, 0, 0, 0.4) 60%, rgba(0,0,0,0) 100%);
			}
			@media (min-width: 1024px) {
				&:first-of-type:before {
					border-radius: 0 0 0 135px;
				}
				&:last-of-type:before {
					border-radius: 0 0 135px 0;
				}
			}

		}
		.hero-panel__inner {
			position: relative;
			z-index: 2;
		}
	}
}
