/*
 * Artikkelikuvasta muodostuva yläkuva Kotisivuratkaisut-teemalle.
 * Kuva on koristeellinen tausta; artikkelin varsinainen H1-otsikko säilyy tekstinä.
 */

body.ks-featured-hero-active .page-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: flex;
	align-items: flex-end;
	min-height: clamp(420px, 44vw, 590px);
	background: #0a0c12 !important;
}

body.ks-featured-hero-active .page-hero::before,
body.ks-featured-hero-active .page-hero::after {
	position: absolute;
	inset: 0;
	content: "";
	pointer-events: none;
}

body.ks-featured-hero-active .page-hero::before {
	left: 52%;
	z-index: -2;
	background-image: var(--ks-featured-hero-image);
	background-repeat: no-repeat;
	background-position: 62% center;
	background-size: cover;
	transform: scale(1.002);
}

body.ks-featured-hero-active .page-hero::after {
	z-index: -1;
	background:
		linear-gradient(90deg, rgba(7, 9, 14, 0.72) 0%, rgba(7, 9, 14, 0.42) 50%, rgba(7, 9, 14, 0.18) 100%),
		linear-gradient(0deg, rgba(7, 9, 14, 0.40) 0%, rgba(7, 9, 14, 0.04) 72%);
}

body.ks-featured-hero-active .page-hero > * {
	position: relative;
	z-index: 1;
}

body.ks-featured-hero-active .page-hero h1 {
	max-width: 650px;
	color: #fff;
	text-wrap: balance;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.58);
}

body.ks-featured-hero-active .page-hero .eyebrow {
	color: #ffd84a;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7);
}

@media (max-width: 1100px) {
	body.ks-featured-hero-active .page-hero::before {
		left: 0;
		background-position: 65% center;
	}

	body.ks-featured-hero-active .page-hero h1 {
		max-width: 720px;
	}
}

@media (max-width: 720px) {
	body.ks-featured-hero-active .page-hero {
		min-height: clamp(350px, 92vw, 470px);
	}

	body.ks-featured-hero-active .page-hero::before {
		background-position: 66% center;
	}

	body.ks-featured-hero-active .page-hero::after {
		background:
			linear-gradient(90deg, rgba(7, 9, 14, 0.78) 0%, rgba(7, 9, 14, 0.48) 100%),
			linear-gradient(0deg, rgba(7, 9, 14, 0.48) 0%, rgba(7, 9, 14, 0.10) 72%);
	}
}

@media (prefers-reduced-motion: reduce) {
	body.ks-featured-hero-active .page-hero::before {
		transform: none;
	}
}
