/**
 * Project single (single-project.php; old Elementor doc 647, EN + AR).
 *
 * Hero (featured image, inline) > brief > cards grid (3 per row) > videos
 * (3 per row, lightbox) > image sliders > call-to-action.
 * Headings keep the base h1/h2 font sizes unless set here.
 */

.gloorst-single-project {
	--gloorst-p-font: "Helvetica Neue", sans-serif;
	--gloorst-p-color: #fff;
	--gloorst-p-dark: #0c1b33;
	--gloorst-p-accent: #edb230;
	--gloorst-p-primary: #00acb1;
	--gloorst-p-width: 1140px;
}

.gloorst-single-project *,
.gloorst-single-project *::before,
.gloorst-single-project *::after {
	box-sizing: border-box;
}

.gloorst-single-project img {
	max-width: 100%;
	height: auto;
	border: none;
	border-radius: 0;
	box-shadow: none;
}

.gloorst-single-project a {
	box-shadow: none;
	text-decoration: none;
}

.gloorst-single-project hr {
	margin: 0;
	background-color: transparent;
}

.gloorst-single-project .gloorst-single-project__title,
.gloorst-single-project .gloorst-single-project__brief-title,
.gloorst-single-project .gloorst-single-project__brief-text,
.gloorst-single-project .gloorst-single-project__card-title,
.gloorst-single-project .gloorst-single-project__card-text,
.gloorst-single-project .gloorst-single-project__videos-title,
.gloorst-single-project .gloorst-single-project__slide-title,
.gloorst-single-project .gloorst-single-project__slide-text,
.gloorst-single-project .gloorst-single-project__cta-title {
	margin: 0;
	padding: 0;
	font-family: var(--gloorst-p-font);
	font-weight: 600;
	line-height: 1.3em;
	color: var(--gloorst-p-color);
}

/* Hero */
.gloorst-single-project .gloorst-single-project__hero {
	background-position: center center;
	background-size: cover;
}

.gloorst-single-project .gloorst-single-project__hero-inner {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	max-width: var(--gloorst-p-width);
	min-height: 100vh;
	margin: 0 auto;
	padding-bottom: 100px;
}

.gloorst-single-project .gloorst-single-project__title {
	margin-bottom: 20px;
	line-height: 1.4em;
}

.gloorst-single-project .gloorst-single-project__intro {
	width: 390px;
	max-width: 100%;
	margin-top: -15px;
	font-family: var(--gloorst-p-font);
	font-size: 15px;
	font-weight: 500;
	color: var(--gloorst-p-color);
}

/* Brief */
.gloorst-single-project .gloorst-single-project__brief {
	padding-top: 20px;
}

.gloorst-single-project .gloorst-single-project__brief-inner {
	display: flex;
	flex-direction: column;
	justify-content: space-evenly;
	max-width: var(--gloorst-p-width);
	min-height: 200px;
	margin: 0 auto;
	padding: 10px;
}

.gloorst-single-project .gloorst-single-project__brief-inner > :not(:last-child) {
	margin-bottom: 20px;
}

.gloorst-single-project .gloorst-single-project__brief-title,
.gloorst-single-project .gloorst-single-project__card-title {
	font-size: 20px;
}

.gloorst-single-project .gloorst-single-project__brief-text {
	padding-right: 50px;
	font-size: 16px;
	font-weight: 400;
	line-height: 18px;
}

/* Cards */
.gloorst-single-project .gloorst-single-project__cards {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	width: min(100% - 20px, var(--gloorst-p-width));
	margin: 0 auto;
	padding: 10px 0;
}

.gloorst-single-project .gloorst-single-project__card {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 32%;
	padding: 10px;
}

.gloorst-single-project .gloorst-single-project__media {
	text-align: center;
}

.gloorst-single-project .gloorst-single-project__media-link {
	display: inline-block;
}

.gloorst-single-project .gloorst-single-project__card-img {
	display: inline-block;
	vertical-align: middle;
	border-radius: 25px;
}

.gloorst-single-project .gloorst-single-project__card-text {
	margin-top: -15px;
	padding-right: 100px;
	font-size: 12px;
	font-weight: 400;
	line-height: 18px;
}

/* Videos */
.gloorst-single-project .gloorst-single-project__videos-title {
	max-width: var(--gloorst-p-width);
	margin: 0 auto;
	padding: 10px;
	font-size: 40px;
	text-align: center;
	text-transform: uppercase;
}

.gloorst-single-project .gloorst-single-project__video-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	padding: 35px 60px 60px;
}

.gloorst-single-project .gloorst-single-project__video-cell {
	display: flex;
	flex-wrap: wrap;
	align-content: center;
	align-items: center;
	padding: 10px;
}

.gloorst-single-project .gloorst-single-project__video-cell:nth-child(-n+3) {
	margin-bottom: 50px;
}

.gloorst-single-project .gloorst-single-project__video {
	position: relative;
	width: 100%;
	aspect-ratio: 1.77777;
}

.gloorst-single-project .gloorst-single-project__video-open {
	display: block;
	position: relative;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	cursor: pointer;
}

.gloorst-single-project .gloorst-single-project__video-img {
	display: block;
	width: 100%;
	aspect-ratio: 1.77777;
	object-fit: cover;
}

.gloorst-single-project .gloorst-single-project__video-frame {
	display: flex;
	width: 100%;
	height: 100%;
	border: none;
	background-color: #000;
}

.gloorst-single-project .gloorst-single-project__video-play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100px;
	height: 100px;
	transform: translate(calc(-50% - 0.5px), calc(-50% - 1px));
}

.gloorst-single-project .gloorst-single-project__video-play svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: #fff;
	filter: drop-shadow(1px 0 6px rgba(0, 0, 0, 0.3));
	opacity: 0.8;
	transition: opacity 0.5s;
}

.gloorst-single-project .gloorst-single-project__video-open:hover svg,
.gloorst-single-project .gloorst-single-project__video-open:focus-visible svg {
	opacity: 1;
}

/* Sliders (slider_*_#N / slider_*__#N; no project fills them at the moment) */
.gloorst-single-project .gloorst-single-project__slider {
	display: flex;
	min-height: 100vh;
}

.gloorst-single-project .gloorst-single-project__slide {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	padding: 300px 0 0 100px;
	background-size: cover;
}

.gloorst-single-project .gloorst-single-project__slide::before {
	content: "";
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.25);
}

.gloorst-single-project .gloorst-single-project__slide > * {
	position: relative;
}

.gloorst-single-project .gloorst-single-project__slide-title {
	margin-bottom: 20px;
	font-size: 40px;
}

.gloorst-single-project .gloorst-single-project__slide-text {
	margin-top: -15px;
	font-size: 15px;
	font-weight: 400;
	line-height: 18px;
}

/* Call to action */
.gloorst-single-project .gloorst-single-project__cta {
	background-color: var(--gloorst-p-primary);
}

.gloorst-single-project .gloorst-single-project__cta-inner {
	display: flex;
	flex-direction: column;
	justify-content: center;
	max-width: var(--gloorst-p-width);
	min-height: 370px;
	margin: 0 auto;
	padding: 10px;
	text-align: center;
}

.gloorst-single-project .gloorst-single-project__cta-title {
	margin-bottom: 20px;
	color: var(--gloorst-p-dark);
}

.gloorst-single-project .gloorst-single-project__cta-button,
.gloorst-single-project .gloorst-single-project__cta-button:hover,
.gloorst-single-project .gloorst-single-project__cta-button:focus {
	display: inline-block;
	align-self: center;
	padding: 12px 20px 6px;
	border-radius: 3px;
	background-color: var(--gloorst-p-accent);
	font-family: var(--gloorst-p-font);
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	color: var(--gloorst-p-dark);
	text-decoration: none;
	transition: all 0.3s;
}

@media (max-width: 1024px) {
	.gloorst-single-project {
		--gloorst-p-width: 1024px;
	}

	.gloorst-single-project .gloorst-single-project__cards {
		gap: 0;
	}
}

@media (max-width: 767px) {
	.gloorst-single-project {
		--gloorst-p-width: 767px;
	}

	.gloorst-single-project .gloorst-single-project__hero {
		padding: 0 20px;
	}

	.gloorst-single-project .gloorst-single-project__title {
		font-size: 23px;
	}

	.gloorst-single-project .gloorst-single-project__intro {
		margin-top: 0;
	}

	.gloorst-single-project .gloorst-single-project__card {
		width: 100%;
	}

	.gloorst-single-project .gloorst-single-project__video-grid {
		grid-template-columns: 100%;
	}

	.gloorst-single-project .gloorst-single-project__video-cell:nth-child(-n+3) {
		margin-bottom: 0;
	}

	.gloorst-single-project .gloorst-single-project__video-cell:nth-child(3) {
		margin-bottom: 50px;
	}

	.gloorst-single-project .gloorst-single-project__slider {
		flex-direction: column;
	}
}

/* Lightbox (assets/js/project-video.js) */
.gloorst-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(0, 0, 0, 0.87);
}

.gloorst-lightbox[hidden] {
	display: none;
}

.gloorst-lightbox-open,
.gloorst-lightbox-open body {
	overflow: hidden;
}

.gloorst-lightbox__stage {
	max-width: 90vw;
	max-height: 90vh;
}

.gloorst-lightbox__stage img {
	display: block;
	max-width: 90vw;
	max-height: 90vh;
	width: auto;
	height: auto;
}

.gloorst-lightbox__stage--video {
	width: min(80vw, 160vh);
	aspect-ratio: 16 / 9;
}

.gloorst-lightbox__stage--video iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background-color: #000;
}

.gloorst-lightbox .gloorst-lightbox__close,
.gloorst-lightbox .gloorst-lightbox__close:hover,
.gloorst-lightbox .gloorst-lightbox__close:focus {
	position: absolute;
	top: 15px;
	right: 15px;
	padding: 0 10px;
	border: 0;
	background: none;
	font-size: 40px;
	line-height: 1;
	color: #eee;
	cursor: pointer;
}
