/*
 * Slider na stronie głównej (inc/hero-slider.php).
 *
 * Odtwarza układ Revolution Slidera, który miał cztery siatki: 1240×1000, 1024×600, 778×650 i 480×600.
 * Poniżej 778 px i 480 px RevSlider skalował całą siatkę proporcjonalnie do szerokości ekranu,
 * dlatego wszystkie wymiary liczymy w jednostce --u: 1px albo ułamek szerokości ekranu.
 */

.hero-slider {
	--u: calc(100vw / 480);
	position: relative;
	isolation: isolate;
	overflow: hidden;
	height: calc(600 * var(--u));
	/* RevSlider dawał kolumnie -2 px, przez co następna sekcja zachodziła na slider. */
	margin-bottom: -2px;
	color: #fff;
	background-color: #141d28;
}

.hero-slider__slides,
.hero-slider__slide {
	position: absolute;
	inset: 0;
}

.hero-slider__slide {
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0s 0.3s;
}

.hero-slider__slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.3s;
}

.hero-slider__slide::after {
	content: "";
	position: absolute;
	inset: -2px 0 0;
	background-color: rgba(18, 27, 38, 0.73);
}

/* Jak w RevSliderze: od 778 px przy lewej krawędzi zostaje 1 px bez przyciemnienia. */
@media (min-width: 778px) {
	.hero-slider__slide::after {
		inset: -2px -1px 0 1px;
	}
}

.hero-slider__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
}

.hero-slider__grid {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	z-index: 1;
	width: calc(480 * var(--u));
	transform: translateX(-50%);
}

.hero-slider__group {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(50% - 155 * var(--u) + 90 * var(--u));
	height: calc(310 * var(--u));
}

.hero-slider__slide.is-active .hero-slider__group {
	animation: hero-slider-in 0.8s ease-out both;
}

.hero-slider__number,
.hero-slider__title-line,
.hero-slider__text {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	margin: 0;
	color: #fff;
}

.hero-slider__number {
	top: 0;
	font-family: "Poppins", sans-serif;
	font-weight: 500;
	font-size: calc(80 * var(--u));
	line-height: calc(80 * var(--u));
	color: rgba(255, 255, 255, 0.1);
	white-space: nowrap;
}

.hero-slider__line {
	display: none;
	position: absolute;
	max-width: none;
}

.hero-slider__title {
	margin: 0;
}

.hero-slider__title-line {
	top: calc(75 * var(--u));
	font-family: "Montserrat", sans-serif;
	font-weight: 400;
	font-size: calc(40 * var(--u));
	line-height: calc(50 * var(--u));
	white-space: nowrap;
}

.hero-slider__title-line--accent {
	top: calc(130 * var(--u));
	font-weight: 600;
	line-height: calc(40 * var(--u));
	color: #ff6104;
}

.hero-slider__text {
	top: calc(200 * var(--u));
	width: calc(300 * var(--u));
	font-family: "Poppins", sans-serif;
	font-weight: 400;
	font-size: calc(16 * var(--u));
	line-height: calc(25 * var(--u));
	text-align: center;
}

.hero-slider__button {
	--button-top: auto;
	display: none;
	position: absolute;
	bottom: 0;
	margin: 0;
	padding: calc(15 * var(--u)) calc(35 * var(--u));
	line-height: calc(25 * var(--u));
	transform: translateX(-50%);
}

/*
 * main.css motywu ma "a.btn:active, button:active { position: relative; top: 1px !important }".
 * Wciśnięty przycisk lub strzałka wypadały wtedy z pozycji absolutnej, puszczenie myszy trafiało
 * w inny element i przeglądarka nie zgłaszała kliknięcia. Trzymamy je w miejscu także w :active.
 */
.hero-slider__button:active {
	position: absolute;
	top: var(--button-top) !important;
}

.hero-slider__arrow:active {
	position: absolute;
	top: auto !important;
}

.hero-slider__button--primary {
	left: calc(50% - 100 * var(--u));
	border-width: 0;
}

.hero-slider__button--secondary {
	left: calc(50% + 100 * var(--u));
	border: 2px solid #ff6104;
}

.hero-slider__arrow {
	display: none;
	position: absolute;
	bottom: 220px;
	z-index: 3;
	align-items: center;
	height: 25px;
	padding: 0;
	border: 0;
	background: none;
	font-family: "Montserrat", Helvetica, sans-serif;
	font-weight: 500;
	font-size: 14px;
	letter-spacing: 5px;
	color: #fff;
	cursor: pointer;
	transition: opacity 0.3s linear, color 0.3s linear;
}

.hero-slider__arrow:hover {
	opacity: 0.6;
	color: #ff6104;
}

.hero-slider__arrow:focus-visible {
	outline: 2px solid #ff6104;
	outline-offset: 4px;
}

/* Ikona strzałki to maska wypełniana kolorem tekstu, więc po najechaniu zmienia kolor razem z napisem. */
.hero-slider__arrow--prev::before,
.hero-slider__arrow--next::after {
	content: "";
	flex-shrink: 0;
	width: 40px;
	height: 14px;
	background-color: currentColor;
}

.hero-slider__arrow--prev {
	left: calc(50% - 212.5px);
}

.hero-slider__arrow--prev::before {
	margin-right: 20px;
	-webkit-mask: url(../img/hero-arrow-left.svg) no-repeat;
	mask: url(../img/hero-arrow-left.svg) no-repeat;
}

.hero-slider__arrow--next {
	left: calc(50% + 77.5px);
}

.hero-slider__arrow--next::after {
	margin-left: 20px;
	-webkit-mask: url(../img/hero-arrow-right.svg) no-repeat;
	mask: url(../img/hero-arrow-right.svg) no-repeat;
}

.hero-slider__mask {
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 2;
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	/* Proporcje i rozciąganie w pionie przy wąskim ekranie jak w obrazie mask01.png, który ten skos zastąpił. */
	aspect-ratio: 1600 / 83;
	min-height: 24px;
	fill: #fff;
	pointer-events: none;
}

@media (min-width: 481px) {
	.hero-slider {
		--u: calc(100vw / 778);
		height: calc(650 * var(--u));
	}

	.hero-slider__grid {
		width: calc(778 * var(--u));
	}

	.hero-slider__group {
		top: calc(50% - 180 * var(--u) + 50 * var(--u));
		height: calc(360 * var(--u));
	}

	.hero-slider__title-line {
		font-size: calc(50 * var(--u));
		line-height: calc(60 * var(--u));
	}

	.hero-slider__title-line--accent {
		line-height: calc(50 * var(--u));
	}

	.hero-slider__text {
		width: calc(400 * var(--u));
	}

	.hero-slider__button {
		display: inline-block;
	}
}

@media (min-width: 778px) {
	.hero-slider {
		--u: 1px;
	}
}

@media (min-width: 1024px) {
	.hero-slider {
		height: 600px;
	}

	.hero-slider__grid {
		width: 1024px;
	}

	.hero-slider__group {
		left: 40px;
		top: calc(50% - 155px + 50px);
		height: 310px;
	}

	.hero-slider__number,
	.hero-slider__title-line,
	.hero-slider__text,
	.hero-slider__button {
		transform: none;
	}

	.hero-slider__number {
		left: 0;
		font-size: 150px;
		line-height: 150px;
	}

	.hero-slider__line {
		display: block;
		left: 160px;
		top: 15px;
		width: 3px;
		height: 120px;
	}

	.hero-slider__title-line {
		left: 200px;
		top: 1px;
		font-size: 70px;
		line-height: 80px;
	}

	.hero-slider__title-line--accent {
		top: 65px;
		line-height: 70px;
	}

	.hero-slider__text {
		left: 0;
		top: 180px;
		width: 640px;
		text-align: left;
	}

	.hero-slider__button {
		--button-top: 280px;
		top: 280px;
		bottom: auto;
	}

	.hero-slider__button--primary {
		left: 0;
	}

	.hero-slider__button--secondary {
		left: 170px;
	}
}

@media (min-width: 1200px) {
	.hero-slider__arrow {
		display: flex;
	}
}

@media (min-width: 1240px) {
	.hero-slider {
		height: 1000px;
	}

	.hero-slider__grid {
		width: 1240px;
	}

	.hero-slider__group {
		left: 32px;
		top: calc(50% - 180px);
		height: 360px;
	}

	.hero-slider__number {
		font-size: 180px;
		line-height: 180px;
	}

	.hero-slider__line {
		left: 200px;
		top: 20px;
		height: 140px;
	}

	.hero-slider__title-line {
		left: 240px;
		top: -10px;
		font-size: 90px;
		line-height: 110px;
	}

	.hero-slider__title-line--accent {
		top: 93px;
		line-height: 90px;
	}

	.hero-slider__text {
		top: 210px;
	}

	.hero-slider__button {
		--button-top: 320px;
		top: 320px;
	}
}

/* RevSlider zaokrąglał przeskalowane wymiary do pełnych pikseli; bez tego tekst wychodzi o pół piksela inny. */
@supports (width: round(1.5px, 1px)) {
	.hero-slider {
		height: round(600 * var(--u), 1px);
	}

	.hero-slider__number {
		font-size: round(80 * var(--u), 1px);
		line-height: round(80 * var(--u), 1px);
	}

	.hero-slider__title-line {
		font-size: round(40 * var(--u), 1px);
		line-height: round(50 * var(--u), 1px);
	}

	.hero-slider__title-line--accent {
		line-height: round(40 * var(--u), 1px);
	}

	.hero-slider__text {
		font-size: round(16 * var(--u), 1px);
		line-height: round(25 * var(--u), 1px);
	}

	@media (min-width: 481px) {
		.hero-slider {
			height: round(650 * var(--u), 1px);
		}

		.hero-slider__title-line {
			font-size: round(50 * var(--u), 1px);
			line-height: round(60 * var(--u), 1px);
		}

		.hero-slider__title-line--accent {
			line-height: round(50 * var(--u), 1px);
		}

		.hero-slider__button {
			padding: round(15 * var(--u), 1px) round(35 * var(--u), 1px);
			line-height: round(25 * var(--u), 1px);
		}
	}

	@media (min-width: 1024px) {
		.hero-slider {
			height: 600px;
		}

		.hero-slider__number {
			font-size: 150px;
			line-height: 150px;
		}

		.hero-slider__title-line {
			font-size: 70px;
			line-height: 80px;
		}

		.hero-slider__title-line--accent {
			line-height: 70px;
		}
	}

	@media (min-width: 1240px) {
		.hero-slider {
			height: 1000px;
		}

		.hero-slider__number {
			font-size: 180px;
			line-height: 180px;
		}

		.hero-slider__title-line {
			font-size: 90px;
			line-height: 110px;
		}

		.hero-slider__title-line--accent {
			line-height: 90px;
		}
	}
}

@keyframes hero-slider-in {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero-slider__slide,
	.hero-slider__slide.is-active {
		transition: none;
	}

	.hero-slider__slide.is-active .hero-slider__group {
		animation: none;
	}
}
