/* ==========================================================================
   Slider promocji w nagłówku strony (inc/promo-slider.php)
   Slajdy nałożone w jednej komórce siatki – wysokość = najwyższy slajd,
   więc nic nie skacze przy zmianie. Przejście: przenikanie.
   ========================================================================== */
.et-hs { position: relative; display: block; margin: 0; overflow: hidden; background: #0c2238; }
.et-hs__track { display: grid; }
.et-hs__track > .et-hs__slide {
	grid-area: 1 / 1;
	margin: 0 !important;
	width: 100%;
	opacity: 0;
	visibility: hidden;
	z-index: 0;
	transition: opacity .8s ease, visibility 0s linear .8s;
}
.et-hs__track > .et-hs__slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
	transition: opacity .8s ease, visibility 0s;
}
.et-hs__track > .et-hs__slide.is-leaving { visibility: visible; }

/* Animacje nagłówka (Ken Burns, wjazd treści) startują od nowa przy każdym pokazaniu slajdu */
.et-hs__slide:not(.is-active):not(.is-leaving) .wp-block-cover__image-background,
.et-hs__slide:not(.is-active):not(.is-leaving) .wp-block-cover__inner-container > *,
.et-hs__slide:not(.is-active):not(.is-leaving) mark.et-scribble::after { animation: none; }

/* Slajd promocji */
.et-promo.is-plain { background: #0c2238; }
.et-promo .wp-block-cover__inner-container { max-width: 900px; }
.et-hero.et-promo h2 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.1; margin-bottom: 24px; position: relative; z-index: 0; }
.et-hero.et-promo p.has-text-align-center { margin-bottom: 36px; }
.et-hero .et-promo__label {
	display: inline-block;
	margin: 0 auto 20px;
	padding: 5px 14px;
	max-width: none;
	border-radius: 4px;
	background: var(--et-blue);
	color: #fff;
	font-size: 13px;
	line-height: 20px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}

/* Nawigacja: strzałki, paski, pauza */
.et-hs__nav {
	position: absolute;
	left: 50%;
	bottom: calc(22px + var(--et-hs-lift, 0px));
	visibility: hidden;
	z-index: 3;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 10px;
}
.et-hs__arrow, .et-hs__pause {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .55);
	border-radius: 50%;
	background: rgba(12, 34, 56, .35);
	color: #fff;
	cursor: pointer;
	transition: background .2s, border-color .2s;
}
.et-hs__pause { width: 32px; height: 32px; border-color: rgba(255, 255, 255, .35); }
.et-hs__arrow:hover, .et-hs__pause:hover { background: var(--et-blue); border-color: var(--et-blue); }
.et-hs__arrow:focus-visible, .et-hs__pause:focus-visible, .et-hs__dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.et-hs__arrow svg { width: 18px; height: 18px; }
.et-hs__pause svg { fill: currentColor; }
.et-hs__pause .i-play, .et-hs.is-paused .et-hs__pause .i-pause { display: none; }
.et-hs.is-paused .et-hs__pause .i-play { display: inline; }

.et-hs__dots { display: flex; align-items: center; gap: 6px; }
.et-hs__dot {
	display: inline-flex;
	align-items: center;
	width: 40px;
	height: 24px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}
.et-hs__dot span {
	position: relative;
	display: block;
	width: 100%;
	height: 4px;
	border-radius: 2px;
	background: rgba(255, 255, 255, .35);
	overflow: hidden;
}
.et-hs__dot:hover span { background: rgba(255, 255, 255, .6); }
.et-hs__dot span::after {
	content: "";
	position: absolute;
	inset: 0;
	background: #fff;
	transform: scaleX(0);
	transform-origin: left center;
}
.et-hs__dot.is-active span::after { transform: scaleX(1); }
.et-hs.is-playing .et-hs__dot.is-active span::after { animation: et-hs-progress var(--et-hs-time, 7000ms) linear both; }
.et-hs.is-paused .et-hs__dot.is-active span::after,
.et-hs.is-hold .et-hs__dot.is-active span::after { animation-play-state: paused; }
@keyframes et-hs-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Nawigacja pokazuje się, gdy skrypt ustali jej miejsce (bez JS – tylko pierwszy slajd) */
.et-hs.is-ready .et-hs__nav { visibility: visible; }

/* Dół nagłówka zostawia miejsce na nawigację */
.et-hs .et-hero--page { padding-bottom: 110px !important; }
/* pasek statystyk zachodzi na nagłówek o 70 px */
.et-hs:has(+ .et-tpl-stats) .et-hero--page { padding-bottom: 150px !important; }

@media (max-width: 767px) {
	.et-hs__nav { bottom: calc(14px + var(--et-hs-lift, 0px)); gap: 6px; }
	.et-hs__arrow { width: 36px; height: 36px; }
	.et-hs__dot { width: 28px; }
	.et-hero .et-promo__label { font-size: 12px; margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.et-hs__track > .et-hs__slide, .et-hs__track > .et-hs__slide.is-active { transition: none; }
	.et-hs.is-playing .et-hs__dot.is-active span::after { animation: none; }
}
