/**
 * Service Hero – frontend styles
 */

.oc-service-hero {
	--oc-sh-accent: #c5a46e;
	--oc-sh-content-bg: #6b7a67;
	--oc-sh-site-width: 1240px;
	--oc-sh-site-gutter: 80px;
	position: relative;
	isolation: isolate;
	width: 100%;
	box-sizing: border-box;
	overflow: hidden;
	background-color: var(--oc-sh-content-bg);
}

.oc-service-hero *,
.oc-service-hero *::before,
.oc-service-hero *::after {
	box-sizing: border-box;
}

/*
 * Break out of Elementor boxed containers to true viewport width.
 * calc(50% - 50vw) is more reliable than left:50% + -50vw inside nested containers.
 */
.oc-service-hero.is-full-bleed {
	position: relative;
	left: auto;
	right: auto;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.elementor-widget-ouryclark-service-hero,
.elementor-widget-ouryclark-service-hero > .elementor-widget-container {
	overflow: visible !important;
	max-width: none !important;
	width: 100% !important;
}

.e-con:has(> .e-con-inner .oc-service-hero.is-full-bleed),
.e-con:has(> .e-con-inner .oc-service-hero.is-full-bleed) > .e-con-inner,
.e-con:has(> .elementor-widget .oc-service-hero.is-full-bleed),
.elementor-section:has(.oc-service-hero.is-full-bleed),
.elementor-container:has(.oc-service-hero.is-full-bleed) {
	overflow: visible !important;
	max-width: none;
}

.oc-service-hero__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	width: 100%;
	min-height: 560px;
	align-items: stretch;
}

.oc-service-hero__layout > * {
	min-height: 0;
	height: 100%;
}

.oc-service-hero.is-reversed .oc-service-hero__layout {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.oc-service-hero.is-reversed .oc-service-hero__content {
	order: 2;
}

.oc-service-hero.is-reversed .oc-service-hero__media {
	order: 1;
}

.oc-service-hero__content {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	background-color: var(--oc-sh-content-bg);
	color: #fff;
	z-index: 1;
	overflow: visible;
	padding: 64px 0;
	min-width: 0;
}

.oc-service-hero__pattern {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.oc-service-hero__pattern.is-lines {
	background-image: repeating-linear-gradient(
		to bottom,
		transparent 0,
		transparent calc(var(--oc-sh-line-gap, 10px) - 1px),
		var(--oc-sh-line-color, rgba(255, 255, 255, 0.14)) calc(var(--oc-sh-line-gap, 10px) - 1px),
		var(--oc-sh-line-color, rgba(255, 255, 255, 0.14)) var(--oc-sh-line-gap, 10px)
	);
	opacity: var(--oc-sh-pattern-opacity, 1);
}

.oc-service-hero__pattern.is-image {
	background-repeat: repeat;
	background-size: auto;
	background-position: top left;
	opacity: var(--oc-sh-pattern-opacity, 0.35);
}

/*
 * Match header logo left edge: centered site width (1240) with a
 * minimum gutter on smaller viewports.
 */
.oc-service-hero__content-inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 560px;
	margin-left: max(
		var(--oc-sh-site-gutter),
		calc((100vw - var(--oc-sh-site-width)) / 2)
	);
	margin-right: clamp(16px, 2.5vw, 48px);
}

/* Centered on the seam between content + media columns */
.oc-service-hero__stamp-wrap {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	transform: translate(
		calc(-50% + var(--oc-sh-stamp-x, 0px)),
		calc(-50% + var(--oc-sh-stamp-y, 0px))
	);
	pointer-events: none;
}

/* Fully on the right edge; Offset X/Y still apply */
.oc-service-hero.is-stamp-right .oc-service-hero__stamp-wrap {
	left: auto;
	right: 0;
	transform: translate(
		var(--oc-sh-stamp-x, 0px),
		calc(-50% + var(--oc-sh-stamp-y, 0px))
	);
}

.oc-service-hero__stamp {
	display: block;
	width: 160px;
	height: 160px;
	object-fit: contain;
	border-radius: 50%;
	mix-blend-mode: screen;
	opacity: 1;
	filter: brightness(1.15) contrast(1.05);
	will-change: transform;
}

.oc-service-hero__stamp.is-spinning {
	animation: oc-service-hero-stamp-spin var(--oc-sh-stamp-duration, 28s) linear infinite;
}

@keyframes oc-service-hero-stamp-spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.oc-service-hero__stamp.is-spinning {
		animation: none;
	}
}

.oc-service-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	margin: 0 0 18px;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	line-height: 1.4;
}

.oc-service-hero__type {
	margin: 0 0 16px;
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.04em;
	line-height: 1.4;
}

.oc-service-hero__diamond {
	display: inline-block;
	color: var(--oc-sh-accent);
	font-size: 12px;
	line-height: 1;
	transform: translateY(-0.05em);
}

.oc-service-hero__heading {
	margin: 0 0 22px;
	color: #fff;
	font-size: clamp(2.1rem, 3.6vw, 3.25rem);
	font-weight: 500;
	line-height: 1.12;
	letter-spacing: -0.015em;
}

.oc-service-hero__description {
	margin: 0 0 36px;
	color: rgba(255, 255, 255, 0.92);
	font-size: 15px;
	line-height: 1.65;
	max-width: 36em;
}

.oc-service-hero__ctas {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.oc-service-hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	text-decoration: none;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.3;
	border-radius: 0;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.oc-service-hero__btn-primary {
	background-color: #c5a46e;
	color: #1a1a1a;
	border: 0;
	box-shadow: 3px 3px 0 #1a1a1a;
	padding: 15px 24px;
}

.oc-service-hero__btn-primary:hover,
.oc-service-hero__btn-primary:focus {
	background-color: #b08f55;
	color: #1a1a1a;
	text-decoration: none;
	transform: translate(1px, 1px);
	box-shadow: 2px 2px 0 #1a1a1a;
}

.oc-service-hero__btn-secondary {
	background-color: transparent;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.95);
	box-shadow: none;
	padding: 14px 24px;
}

.oc-service-hero__btn-secondary:hover,
.oc-service-hero__btn-secondary:focus {
	background-color: rgba(255, 255, 255, 0.1);
	color: #fff;
	text-decoration: none;
}

.oc-service-hero__media {
	position: relative;
	align-self: stretch;
	height: auto;
	min-height: 100%;
	overflow: hidden;
	background-color: var(--oc-sh-content-bg);
	min-width: 0;
}

/* Soft blend from green content into the illustration (matches design) */
.oc-service-hero__media::before {
	content: '';
	position: absolute;
	inset: 0 auto 0 0;
	width: min(22%, 160px);
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(
		to right,
		var(--oc-sh-content-bg) 0%,
		rgba(107, 122, 103, 0.55) 42%,
		transparent 100%
	);
}

.oc-service-hero.is-reversed .oc-service-hero__media::before {
	inset: 0 0 0 auto;
	background: linear-gradient(
		to left,
		var(--oc-sh-content-bg) 0%,
		rgba(107, 122, 103, 0.55) 42%,
		transparent 100%
	);
}

.oc-service-hero.no-media-blend .oc-service-hero__media::before {
	display: none;
}

/*
 * Theme/Elementor often set img { max-width:100%; height:auto }, which
 * collapses absolute cover images and leaves a gap under the art.
 */
.oc-service-hero__media-img {
	position: absolute !important;
	inset: 0 !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center center;
}

@media (max-width: 1024px) {
	.oc-service-hero.is-full-bleed {
		width: 100%;
		max-width: 100%;
		margin-left: 0;
		margin-right: 0;
	}

	.oc-service-hero__layout,
	.oc-service-hero.is-reversed .oc-service-hero__layout {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.oc-service-hero__content,
	.oc-service-hero.is-reversed .oc-service-hero__content,
	.oc-service-hero__media,
	.oc-service-hero.is-reversed .oc-service-hero__media {
		order: initial;
	}

	.oc-service-hero__media {
		min-height: 380px;
		aspect-ratio: 16 / 11;
		height: auto;
	}

	.oc-service-hero__media::before {
		width: 100%;
		height: min(28%, 120px);
		inset: 0 0 auto 0;
		background: linear-gradient(
			to bottom,
			var(--oc-sh-content-bg) 0%,
			rgba(107, 122, 103, 0.45) 45%,
			transparent 100%
		);
	}

	.oc-service-hero.is-reversed .oc-service-hero__media::before {
		inset: 0 0 auto 0;
		background: linear-gradient(
			to bottom,
			var(--oc-sh-content-bg) 0%,
			rgba(107, 122, 103, 0.45) 45%,
			transparent 100%
		);
	}

	.oc-service-hero__content {
		padding: 48px 0;
	}

	.oc-service-hero__content-inner {
		max-width: none;
		margin-left: var(--oc-sh-site-gutter, 28px);
		margin-right: var(--oc-sh-site-gutter, 28px);
	}

	.oc-service-hero__stamp-wrap {
		/* Sit on the join between stacked content + image */
		top: auto;
		bottom: auto;
		left: 50%;
		/* Approximate: place near media top via sticky to media mid after stack */
		top: calc(100% - min(42%, 280px));
	}

	.oc-service-hero.is-stamp-right .oc-service-hero__stamp-wrap {
		left: auto;
		right: 16px;
		top: calc(100% - min(42%, 280px));
		transform: translate(
			var(--oc-sh-stamp-x, 0px),
			var(--oc-sh-stamp-y, 0px)
		);
	}
}

@media (max-width: 640px) {
	.oc-service-hero__ctas {
		flex-direction: column;
		align-items: stretch;
	}

	.oc-service-hero__btn {
		width: 100%;
	}

	.oc-service-hero__media {
		min-height: 280px;
	}

	.oc-service-hero__stamp {
		width: 110px;
		height: 110px;
	}

	.oc-service-hero__content {
		padding: 40px 0;
	}

	.oc-service-hero__content-inner {
		margin-left: 22px;
		margin-right: 22px;
	}

	.oc-service-hero__stamp-wrap {
		top: calc(100% - min(38%, 220px));
	}

	.oc-service-hero.is-stamp-right .oc-service-hero__stamp-wrap {
		right: 12px;
		top: calc(100% - min(38%, 220px));
	}
}
