/*
 * Hero strony głównej — [antalex_hero] (inc/hero.php), 12.2026.
 * Przyciski: klasy .hero-cta z css/dobor-belki.css. Tło (zdjęcie zakładu) zostaje z style.css (body.home #page, od 768 px).
 * Selektory z .hero-images, bo style.css ma tam własne h1 / p (wielkość, przezroczystość, margines pod zdjęcie na telefonie).
 */

.hero-images .ax-hero {
	max-width: 1000px;
	padding-top: 3rem; /* +14 px oddechu pod menu */
}

.hero-images .ax-hero__tytul {
	width: max-content;
	max-width: 100%;
	margin: 0 0 1.6rem;
	font-size: clamp(2.7rem, calc(1.6rem + 2vw), 4.4rem);
	font-weight: 400;
	line-height: 1.12;
	letter-spacing: -0.01em;
	color: #232426;
	text-align: left;
	text-shadow: 0 0 12px #fff, 0 0 3px #fff;
}

.hero-images .ax-hero__tytul strong {
	display: block;
	font-weight: 700;
}

.hero-images .ax-hero__lead {
	max-width: 58rem;
	margin: 0 0 2.4rem;
	font-size: 1.8rem;
	line-height: 1.55;
	color: #3a414c;
	opacity: 1;
	text-shadow: 0 0 8px #fff, 0 0 2px #fff;
}

.hero-images .ax-hero__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin-bottom: 2.6rem;
}

/* Pasek zaufania — jedyne miejsce z liczbami firmy (szary pasek pod hero usunięty): półprzezroczysta karta, żeby tekst
   nie ginął na tle dachów hali; 3 kolumny × 2 wiersze (w jednym wierszu się nie mieści, a zawinięta linia zaczynała się
   od kropki), na telefonie 2 kolumny. Liczba pogrubiona, kropka przed każdą pozycją. */
.hero-images .ax-hero__pasek {
	display: grid;
	grid-template-columns: repeat(3, auto);
	gap: 8px 28px;
	width: fit-content;
	max-width: 100%;
	margin: 0 0 2.8rem;
	padding: 12px 20px;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.82);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	box-shadow: 0 2px 10px rgba(21, 38, 55, 0.06);
	list-style: none;
	font-size: 1.6rem;
	line-height: 1.3;
	color: #2f353e;
}

.hero-images .ax-hero__pasek li {
	margin: 0;
	white-space: nowrap;
}

.hero-images .ax-hero__pasek li::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin: 0 9px 2px 0;
	border-radius: 50%;
	background: #fa7305;
	vertical-align: middle;
}

.hero-images .ax-hero__pasek strong {
	color: #1b1d20;
	font-weight: 800;
}

/* Oddech pod logotypami (do katalogu) — padding wiersza 4rem z style.css + 14 px; scena sięga do dołu wiersza. */
@media (min-width: 768px) {
	.hero-images {
		padding-bottom: 5rem;
	}
}

/* Od 1200 px etykieta „Tylne belki do aut” w jednej linii z logotypami — po karcie zaufania w dwóch wierszach wyszukiwarka
   katalogu wypadała z pierwszego ekranu 1920×1080. */
@media (min-width: 1200px) {
	.hero-images .ax-hero__marki {
		flex-wrap: nowrap;
	}

	.hero-images .ax-hero__marki .ax-hero__marki-h { /* wyższa szczegółowość — reguła bazowa (width: 100%) jest niżej */
		width: auto;
		line-height: 1.35;
		white-space: nowrap;
	}

	.hero-images .ax-hero__marki-h > span {
		display: block;
	}
}

/* Logotypy marek: szare, ciemnieją po najechaniu; pigułka „+N marek” jak w konfiguratorze. */
.hero-images .ax-hero__marki {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
}

.hero-images .ax-hero__marki-h {
	width: 100%;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #7a818c;
}

.hero-images .ax-hero__marki ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hero-images .ax-hero__marki li {
	margin: 0;
}

.hero-images .ax-hero__marka {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 1px 3px rgba(21, 38, 55, 0.14);
	color: #6f7681;
	transition: color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.hero-images .ax-hero__marka svg {
	width: 28px;
	height: 28px;
}

.hero-images .ax-hero__marka:hover,
.hero-images .ax-hero__marka:focus-visible {
	color: #232426;
	box-shadow: 0 4px 10px rgba(21, 38, 55, 0.18);
	transform: translateY(-1px);
}

.hero-images .ax-hero__wiecej-tel {
	display: none;
}

.hero-images .ax-hero__wiecej {
	display: inline-flex;
	align-items: center;
	height: 44px;
	padding: 0 14px;
	border: 1px solid #fa7305;
	border-radius: 10px;
	background: #fff;
	font-size: 1.4rem;
	font-weight: 700;
	color: #c85a00;
	text-decoration: none;
	white-space: nowrap;
}

.hero-images .ax-hero__wiecej:hover,
.hero-images .ax-hero__wiecej:focus-visible {
	background: #fff4ea;
	color: #a34900;
}

/* Telefon: bez zdjęcia zakładu (style.css zdejmuje tło #page), jedna kolumna, 5 logotypów i własna pigułka „+N marek”. */
@media (max-width: 767px) {
	.hero-images .ax-hero {
		padding-top: 0.4rem;
	}

	.hero-images .ax-hero__tytul {
		margin-bottom: 1.2rem;
	}

	.hero-images .ax-hero__lead {
		margin-bottom: 1.8rem;
		font-size: 1.6rem;
	}

	.hero-images .ax-hero__cta {
		margin-bottom: 1.8rem;
	}

	/* Przyciski jeden pod drugim na całą szerokość (w połowie „Dobierz belkę w 30 s” łamał się w dwie linie), film pod nimi. */
	.hero-images .ax-hero__cta .net-button {
		grid-column: 1 / -1;
	}

	.hero-images .ax-hero__cta .hero-cta__film {
		grid-column: 1 / -1;
		justify-self: center;
		margin: 2px 0 0;
	}

	/* Pasek w dwóch kolumnach. */
	.hero-images .ax-hero__pasek {
		grid-template-columns: auto auto;
		gap: 6px 14px;
		width: 100%;
		margin-bottom: 2rem;
		padding: 10px 12px;
		font-size: 1.45rem;
	}

	.hero-images .ax-hero__dalsza,
	.hero-images .ax-hero__wiecej-komp {
		display: none;
	}

	.hero-images .ax-hero__wiecej-tel {
		display: list-item;
	}

	.hero-images .ax-hero__marki ul {
		gap: 6px;
	}

	.hero-images .ax-hero__marka {
		width: 38px;
		height: 38px;
	}

	.hero-images .ax-hero__marka svg {
		width: 24px;
		height: 24px;
	}

	.hero-images .ax-hero__wiecej {
		height: 38px;
		padding: 0 10px;
		font-size: 1.35rem;
	}
}

/* Pasek „Kupisz też w sieci Mekonomen i Inter-Team” ([antalex_sieci]) pod sekcją sprzedaży — karta jak w katalogu. */
.ax-sieci {
	padding-top: 3.2rem;
	padding-bottom: 3.2rem;
}

.ax-sieci .vc_column_container > .vc_column-inner {
	padding-top: 0;
}

.ax-sieci .wpb_content_element {
	margin-bottom: 0;
}

.ax-sieci__karta {
	display: flex;
	align-items: center;
	gap: 28px;
	max-width: 1100px;
	margin: 0 auto;
	padding: 20px 28px;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 2px 12px rgba(21, 38, 55, 0.08);
}

.ax-sieci__loga {
	display: flex;
	flex: none;
	flex-direction: column;
	gap: 8px;
	padding-right: 28px;
	border-right: 1px solid #e6e8eb;
}

.ax-sieci__loga img {
	display: block;
	width: 150px;
	height: auto;
	margin: 0;
}

.ax-sieci__tekst {
	flex: 1 1 auto;
	min-width: 0;
}

.ax-sieci .ax-sieci__tytul {
	margin: 0 0 4px;
	font-size: 1.8rem;
	font-weight: 700;
	line-height: 1.3;
	color: #232426;
}

.ax-sieci .ax-sieci__opis {
	margin: 0;
	font-size: 1.5rem;
	line-height: 1.5;
	color: #4a515c;
}

.ax-sieci__link {
	flex: none;
	padding: 10px 16px;
	border: 1px solid #fa7305;
	border-radius: 5px;
	font-size: 1.5rem;
	font-weight: 700;
	color: #c85a00;
	text-decoration: none;
	white-space: nowrap;
}

.ax-sieci__link:hover,
.ax-sieci__link:focus-visible {
	background: #fff4ea;
	color: #a34900;
}

@media (max-width: 767px) {
	.ax-sieci {
		padding-top: 2.4rem;
		padding-bottom: 2.4rem;
	}

	.ax-sieci__karta {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
		padding: 18px;
	}

	.ax-sieci__loga {
		flex-direction: row;
		align-items: center;
		gap: 14px;
		padding: 0 0 14px;
		border-right: 0;
		border-bottom: 1px solid #e6e8eb;
		width: 100%;
	}

	.ax-sieci__loga img {
		width: 130px;
	}
}

/*
 * Scena hero: hala z lotu ptaka (warstwa zamiast tła #page ze style.css — trochę większa, auta ucięte dołem) i belka 206
 * w zbliżeniu z cieniem. Wjazd belki przy załadowaniu; --mx/--my (mysz, −1…1) i --sy (przewinięcie, 0…1) ustawia js/hero.js.
 * Od 992 px scena leży na prawo, pod tekstem (tekst ma z-index 1); niżej — cała belka pod tytułem, bez hali.
 */
body.home #page {
	background-image: none;
	overflow-x: clip; /* scena sięga do prawej krawędzi okna (100vw z paskiem przewijania) */
}

.hero-images {
	position: relative;
}

.hero-images .ax-hero > * {
	position: relative;
	z-index: 1;
}

.hero-images .ax-hero__scena {
	z-index: 0;
	pointer-events: none;
}

.ax-hero__ruch picture {
	display: block;
}

.ax-hero__belka {
	display: block;
	width: 100%;
	height: auto;
	animation: ax-hero-wjazd 1.1s cubic-bezier(0.16, 0.84, 0.3, 1) 0.1s both;
}

@keyframes ax-hero-wjazd {
	from {
		opacity: 0;
		transform: translate3d(80px, 30px, 0) rotate(7deg) scale(0.96);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes ax-hero-hala {
	from {
		opacity: 0;
	}
}

@media (min-width: 992px) {
	/* Scenę pozycjonuje kolumna WPBakery (.wpb_column ma position: relative), wyśrodkowana w oknie. */
	.hero-images {
		--ax-hero-gora: 115px; /* od góry strony do kolumny hero (nagłówek) — hala zaczyna się przy górnej krawędzi okna */
	}

	.hero-images .ax-hero__scena {
		position: absolute;
		top: calc(-1 * var(--ax-hero-gora));
		right: calc(50% - 50vw);
		bottom: -5rem; /* do dołu wiersza (padding-bottom .hero-images) */
		width: 66vw;
		overflow: hidden;
	}

	.ax-hero__hala {
		position: absolute;
		inset: 0;
		background: url("https://www.antalex.pl/wp-content/uploads/2018/10/bg.jpg.webp") top right / 100% auto no-repeat;
		transform: translate3d(calc(var(--mx, 0) * 8px), calc(var(--my, 0) * 5px - var(--sy, 0) * 30px), 0) scale(1.03);
		transform-origin: top right;
		will-change: transform;
		/* zanika w lewo (pod tekstem) i w dół (auta na parkingu nie muszą być całe) */
		-webkit-mask-image: linear-gradient(to right, transparent 0, #000 42%), linear-gradient(to bottom, #000 72%, transparent);
		-webkit-mask-composite: source-in;
		mask-image: linear-gradient(to right, transparent 0, #000 42%), linear-gradient(to bottom, #000 72%, transparent);
		mask-composite: intersect;
		opacity: 0.9;
		animation: ax-hero-hala 0.8s ease-out both;
	}

	.ax-hero__ruch {
		position: absolute;
		right: -32px; /* ucięty koniec rury zawsze za krawędzią okna, także przy ruchu za myszą */
		bottom: 26px; /* zapas na ruch za myszą i cień */
		height: min(clamp(420px, 43vw, 640px), calc(100% - var(--ax-hero-gora) - 10px));
		aspect-ratio: 797 / 1000;
		transform: translate3d(calc(var(--mx, 0) * -18px), calc(var(--my, 0) * -12px + var(--sy, 0) * 70px), 0) rotate(calc(var(--mx, 0) * 1.2deg - var(--sy, 0) * 5deg));
		transform-origin: 100% 45%;
		will-change: transform;
	}

	.ax-hero__ruch picture,
	.ax-hero__belka {
		height: 100%;
	}

	.ax-hero__belka {
		width: auto;
		margin-left: auto;
		filter: drop-shadow(0 34px 30px rgba(20, 24, 30, 0.3)) drop-shadow(0 8px 10px rgba(20, 24, 30, 0.18));
		transform-origin: 100% 45%;
	}
}

/* Od 1500 px belka o ok. 8% niższa i bliżej tekstu; ucięty koniec rury nie sięga już za krawędź okna, więc wygaszamy go
   maską (tylko górna część zdjęcia — dolna tuleja po prawej zostaje pełna). */
@media (min-width: 1500px) {
	.ax-hero__ruch {
		right: 1.5vw;
		height: calc(min(clamp(420px, 43vw, 640px), calc(100% - var(--ax-hero-gora) - 10px)) * 0.92);
	}

	.ax-hero__belka {
		-webkit-mask-image: linear-gradient(to right, #000 74%, transparent 98%), linear-gradient(to bottom, transparent 42%, #000 52%);
		-webkit-mask-composite: source-over;
		mask-image: linear-gradient(to right, #000 74%, transparent 98%), linear-gradient(to bottom, transparent 42%, #000 52%);
		mask-composite: add;
	}
}

/* 992–1199 px: tekst zajmuje więcej szerokości — mniejsza belka, bliżej krawędzi. */
@media (min-width: 992px) and (max-width: 1199px) {
	.ax-hero__ruch {
		height: min(36vw, calc(100% - var(--ax-hero-gora) - 10px));
		right: calc(-32px - 3vw);
	}
}

@media (max-width: 991px) {
	.hero-images .ax-hero {
		display: flex;
		flex-direction: column;
	}

	.hero-images .ax-hero > * {
		order: 3;
	}

	.hero-images .ax-hero__tytul {
		order: 1;
	}

	.hero-images .ax-hero__scena {
		order: 2;
		margin: 0 0 1.6rem;
	}

	.ax-hero__hala {
		display: none;
	}

	.ax-hero__belka {
		max-width: 520px;
		margin: 0 auto;
		filter: drop-shadow(0 16px 14px rgba(20, 24, 30, 0.25)) drop-shadow(0 4px 5px rgba(20, 24, 30, 0.15));
	}
}

@media (prefers-reduced-motion: reduce) {
	.ax-hero__belka,
	.ax-hero__hala {
		animation: none;
	}

	.ax-hero__ruch,
	.ax-hero__hala {
		transform: none;
	}
}
