/* ── CTA (HERO) — mirrors HERO block visuals ── */
.block-cta-hero {
	position: relative;
	width: 100%;
	min-height: 110vh;
	min-height: 110dvh;
	display: flex;
	align-items: stretch;
	overflow: clip;
	--cta-hero-overlay-opacity: 0;
	/*
	 * Maska alfa zamiast nakładki koloru:
	 *  - dolne 50px sekcji to statyczny fade do 0 alfa (sklejka między sekcjami),
	 *  - cała sekcja dodatkowo ma alfa = (1 - var(--cta-hero-overlay-opacity)),
	 *    więc gdy JS animuje tę zmienną 0 → 1, sekcja gasnie do 0 (zamiast być
	 *    przykrywana kolorem `--page-bg` przez ::before).
	 *  Dzięki temu nie ma "koloru" w gradiencie — tylko alfa, która zawsze
	 *  pasuje do tła strony niezależnie od jego wartości.
	 */
	-webkit-mask-image: linear-gradient(
		to bottom,
		rgba(255, 255, 255, calc(1 - var(--cta-hero-overlay-opacity, 0))) 0%,
		rgba(255, 255, 255, calc(1 - var(--cta-hero-overlay-opacity, 0))) calc(100% - 50px),
		rgba(255, 255, 255, 0) 100%
	);
	mask-image: linear-gradient(
		to bottom,
		rgba(255, 255, 255, calc(1 - var(--cta-hero-overlay-opacity, 0))) 0%,
		rgba(255, 255, 255, calc(1 - var(--cta-hero-overlay-opacity, 0))) calc(100% - 50px),
		rgba(255, 255, 255, 0) 100%
	);
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-mode: alpha;
	mask-mode: alpha;
}

/*
 * ::before celowo bez koloru tła — overlay przejęła maska alfa sekcji.
 * Pseudoelement zostawiamy pusty, żeby zachować z-index stack innych
 * warstw bez przeskoków. (Brak `background` = brak repaintu.)
 */
.block-cta-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 4;
	pointer-events: none;
}

/* ── Layers ── */
.block-cta-hero__layers {
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	width: 100vw;
	max-width: none;
	pointer-events: none;
	z-index: 0;
	--layers-fade: 10;
}

/* Bottom fade warstw przeniesiony na alpha mask całej sekcji (.block-cta-hero). */

.block-cta-hero__layer {
	width: 100%;
}

.block-cta-hero__layer:first-child {
	position: relative;
}

.block-cta-hero__layer:not(:first-child) {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
}

.block-cta-hero__layer--1 { z-index: 3; }
.block-cta-hero__layer--2 { z-index: 2; }
.block-cta-hero__layer--3 { z-index: 1; }

.block-cta-hero__layer img {
	width: 100%;
	height: auto;
	display: block;
}

/* ── Container ── */
.block-cta-hero__container {
	position: relative;
	z-index: 6;
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
	padding: var(--verti-padding-big) var(--calc-padding);
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

.block-cta-hero__inner {
	width: 100%;
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: start;
	padding-top: 10vh;
	justify-content: center;
}

/* ── Content ── */
.block-cta-hero__content {
	width: 100%;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 24px;
}

.block-cta-hero__kicker {
	margin: 0;
	color: var(--color);
	font-size: var(--font-size-h1);
	font-weight: 400;
	line-height: 1.18;
	letter-spacing: -0.015em;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
}

.block-cta-hero__kicker::before,
.block-cta-hero__kicker::after {
	content: '';
	display: block;
	flex: 0 1 400px;
	height: 1px;
	background: var(--color);
}

.block-cta-hero__title {
	margin: 0;
	color: #fff;
	font-size: calc(1.2 * var(--font-size-h1));
	font-weight: 500;
}

.block-cta-hero__title p { margin: 0; }

.block-cta-hero__text {
	width: 100%;
	font-size: var(--font-size-h3);
	color: rgba(255, 255, 255, 0.92);
	line-height: 1.55;
}

.block-cta-hero__text p { margin: 0 0 12px; }
.block-cta-hero__text p:last-child { margin-bottom: 0; }

.block-cta-hero__text strong {
	position: relative;
	display: inline-block;
	font-weight: 700;
}

.block-cta-hero__text strong::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10%;
	height: 0.5em;
	background-image: url("/wp-content/themes/weblance/assets/images/hero-strong-underline.svg");
	background-repeat: no-repeat;
	background-size: 100% 100%;
	background-position: center;
	pointer-events: none;
	z-index: -1;
}

.block-cta-hero__text strong > *,
.block-cta-hero__text strong { position: relative; z-index: 1; }

.block-cta-hero__buttons {
	justify-content: center;
}

.block-cta-hero__videos {
	width: 100%;
	max-width: 980px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin-top: 8px;
}

.block-cta-hero__video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 15px;
	background: rgba(255, 255, 255, 0.04);
	overflow: hidden;
}

.block-cta-hero__videos > .block-cta-hero__video:last-child:nth-child(odd) {
	grid-column: 1 / -1;
	width: 100%;
	max-width: calc((100% - 18px) / 2);
	justify-self: center;
}

.block-cta-hero__video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 15px;
}

.block-cta-hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border-radius: 100px;
	text-decoration: none;
	font-size: var(--font-size-normal);
	font-weight: 400;
}

.block-cta-hero__btn--secondary {
	border: 2px solid #ffffff33;
	border-radius: 100px;
	background: rgba(255, 255, 255, 0.04);
	box-shadow: 4px 4px 12.9px 0 rgba(0, 0, 0, 0.25);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}

/* ── Responsive ── */
@media (max-width: 767px) {
	.block-cta-hero {
		/* Mobile: wysokość sekcji zależna od treści — bez wymuszonego 100vh.
		   Padding góra/dół na kontencie daje oddech; warstwy graficzne siedzą
		   absolutnie przy dolnej krawędzi sekcji (bottom: 0), więc automatycznie
		   dopasują się do nowej wysokości. */
		min-height: 0;
	}

	.block-cta-hero__layers {
		width: 200vw;
		left: 50%;
		transform: translateX(-50%);
	}

	.block-cta-hero__inner {
		width: 100%;
		flex: 1;
		min-height: 0;
		display: flex;
		align-items: start;
		padding-top: 15vh;
		padding-bottom: 15vh;
		justify-content: center;
	}

	.block-cta-hero__content {
		gap: 18px;
	}

	.block-cta-hero__buttons {
		width: 100%;
		padding-left: 0;
		padding-right: 0;
	}

	.block-cta-hero__btn {
		width: 100%;
		max-width: 80%;
		margin-left: auto;
		margin-right: auto;
	}

	.block-cta-hero__videos {
		grid-template-columns: 1fr;
		max-width: 100%;
		gap: 12px;
	}

	.block-cta-hero__videos > .block-cta-hero__video:last-child:nth-child(odd) {
		grid-column: auto;
		max-width: 100%;
		justify-self: stretch;
	}
}
