/**
 * Service single (single-service.php): featured image hero, title, content
 * and rows of flip boxes (CSS-only flip on hover / keyboard focus).
 *
 * Two-class selectors win over the kit / base element rules.
 */

.gloorst-single-service {
	--gloorst-service-font: "Helvetica Neue", sans-serif;
	--gloorst-service-global-font: "Roboto", sans-serif;
	--gloorst-service-color: #fff;
	--gloorst-service-gold: #edb230;
}

.gloorst-single-service .gloorst-single-service__hero {
	min-height: 100vh;
	background-position: center center;
	background-size: cover;
}

.gloorst-single-service .gloorst-single-service__main {
	padding-top: 100px;
}

.gloorst-single-service .gloorst-single-service__main-inner {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	min-height: 100vh;
	padding: 0 100px;
}

.gloorst-single-service .gloorst-single-service__main-inner > * {
	width: 100%;
}

.gloorst-single-service .gloorst-single-service__title {
	margin: 0 0 20px;
	padding: 0;
	font-family: var(--gloorst-service-font);
	font-size: 35px;
	font-weight: 600;
	line-height: 1.4em;
	color: var(--gloorst-service-color);
}

.gloorst-single-service .gloorst-single-service__content {
	width: 500px;
	max-width: 100%;
	font-family: var(--gloorst-service-font);
	font-weight: 400;
	color: var(--gloorst-service-color);
}

/* Rows of three boxes. */
.gloorst-single-service .gloorst-single-service__row {
	position: relative;
	display: flex;
	margin-block: 20px;
}

.gloorst-single-service .gloorst-single-service__row--1 {
	margin-top: 50px;
	margin-bottom: 10px;
}

.gloorst-single-service .gloorst-single-service__col {
	position: relative;
	width: 100%;
	min-height: 1px;
}

.gloorst-single-service .gloorst-single-service__col--1 {
	padding: 0 20px 0 0;
}

.gloorst-single-service .gloorst-single-service__col--2 {
	padding: 0 20px;
}

.gloorst-single-service .gloorst-single-service__col--3 {
	padding: 0 0 0 20px;
}

/* Flip box. */
.gloorst-flip-box {
	position: relative;
	height: 350px;
	perspective: 1000px;
	transform-style: preserve-3d;
}

.gloorst-flip-box .gloorst-flip-box__layer {
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: 20px;
	background-color: transparent;
	transition: all 0.6s ease-in-out;
	backface-visibility: hidden;
	transform-style: preserve-3d;
}

.gloorst-flip-box .gloorst-flip-box__front {
	z-index: 1;
	transform: none;
}

.gloorst-flip-box .gloorst-flip-box__back {
	display: block;
	transform: rotateX(0) rotateY(-180deg);
}

.gloorst-flip-box:hover .gloorst-flip-box__front,
.gloorst-flip-box:focus-visible .gloorst-flip-box__front {
	transform: rotateX(0) rotateY(180deg);
}

.gloorst-flip-box:hover .gloorst-flip-box__back,
.gloorst-flip-box:focus-visible .gloorst-flip-box__back {
	transform: none;
}

.gloorst-flip-box .gloorst-flip-box__overlay {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 20px;
	color: var(--gloorst-service-color);
	text-align: start;
}

.gloorst-flip-box .gloorst-flip-box__front .gloorst-flip-box__overlay {
	padding: 225px 100px 0 20px;
}

.gloorst-flip-box .gloorst-flip-box__back .gloorst-flip-box__overlay {
	justify-content: flex-end;
	padding: 0 0 0 20px;
}

.gloorst-flip-box .gloorst-flip-box__title {
	font-family: var(--gloorst-service-global-font);
	font-size: 21px;
	font-weight: 600;
	line-height: 1;
	color: var(--gloorst-service-gold);
}

.gloorst-flip-box .gloorst-flip-box__description {
	font-family: var(--gloorst-service-global-font);
	font-size: 14px;
	font-weight: 400;
}

.gloorst-flip-box .gloorst-flip-box__title:not(:last-child),
.gloorst-flip-box .gloorst-flip-box__description:not(:last-child) {
	margin: 0 0 20px;
	padding: 0;
}

.gloorst-flip-box--featured .gloorst-flip-box__layer {
	background-position: center center;
	background-size: cover;
}

.gloorst-flip-box--featured .gloorst-flip-box__back .gloorst-flip-box__overlay {
	background-color: rgba(0, 0, 0, 0.4);
}

.gloorst-flip-box--featured .gloorst-flip-box__title {
	font-family: var(--gloorst-service-font);
	color: inherit;
}

.gloorst-flip-box--featured .gloorst-flip-box__back .gloorst-flip-box__description {
	font-family: var(--gloorst-service-font);
	font-size: 19px;
	line-height: 7px;
}

.gloorst-flip-box--end .gloorst-flip-box__overlay {
	text-align: end;
}

@media (min-width: 768px) {
	.gloorst-single-service .gloorst-single-service__col {
		width: 33.333%;
	}
}

@media (max-width: 1024px) {
	.gloorst-single-service .gloorst-single-service__row {
		flex-wrap: wrap;
	}

	.gloorst-flip-box {
		cursor: pointer;
	}
}

@media (max-width: 767px) {
	.gloorst-single-service .gloorst-single-service__main-inner {
		padding: 0 20px;
	}

	.gloorst-single-service .gloorst-single-service__row--2 {
		margin-top: -9px;
		margin-bottom: 0;
	}

	.gloorst-single-service .gloorst-single-service__col {
		padding: 0 0 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gloorst-flip-box .gloorst-flip-box__layer {
		transition-duration: 0s;
	}
}
