/* Świąteczny akcent sporttrend.pl */

/* --- Czapka Mikołaja na sygnecie „ST” --- */
.st-xmas-hat {
	position: relative;
}
.st-xmas-hat::after {
	content: "";
	position: absolute;
	left: 21.5%;
	top: -12%;
	width: 17%;
	aspect-ratio: 124 / 100;
	background: url("czapka.svg") no-repeat center / contain;
	transform-origin: 40% 85%;
	transform: rotate(var(--st-hat-rot, 14deg));
	animation: st-xmas-hat 5s ease-in-out infinite;
	filter: drop-shadow(0 1px 1px rgba(41, 50, 65, .25));
	pointer-events: none;
	z-index: 2;
}
@keyframes st-xmas-hat {
	0%, 100% { transform: rotate(var(--st-hat-rot, 14deg)); }
	50%      { transform: rotate(calc(var(--st-hat-rot, 14deg) + 5deg)); }
}

/* --- Padający śnieg --- */
.st-xmas-snow {
	position: fixed;
	inset: 0;
	z-index: 50;
	overflow: hidden;
	pointer-events: none;
}
.st-flake {
	position: absolute;
	top: -24px;
	animation-name: st-xmas-fall;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
	will-change: transform;
}
.st-flake i {
	display: block;
	width: 100%;
	height: 100%;
	background: no-repeat center / contain;
	animation-name: st-xmas-sway;
	animation-timing-function: ease-in-out;
	animation-iteration-count: infinite;
	animation-direction: alternate;
}
@keyframes st-xmas-fall {
	from { transform: translateY(0); }
	to   { transform: translateY(calc(100vh + 48px)); }
}
@keyframes st-xmas-sway {
	from { transform: translateX(-14px) rotate(0deg); }
	to   { transform: translateX(14px) rotate(70deg); }
}

/* --- Pościg (w pętli, przez całą szerokość ekranu): pływacy gonią sanie Mikołaja --- */
/* pas na wysokości pod logo; szerokość i położenie ustawia skrypt */
.st-xmas-chase {
	position: absolute;
	left: 0;
	top: 100%;
	z-index: 1;
	width: 100%;
	/* !important: motyw Blocksy daje każdemu elementowi w wierszu nagłówka
	   min. wysokość całego wiersza (#header [data-row]>div{min-height:…}),
	   przez co scenka rosła do 120 px */
	height: 21px !important;
	min-height: 0 !important;
	max-height: none !important;
	padding: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
	overflow: hidden;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
	        mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
	transition: opacity .25s ease;
}
/* tablet i telefon: w żółtym pasku pod logo, pod ikonami */
.st-xmas-chase--bar {
	z-index: -1;
	top: 50%;
	height: 24px !important;
	margin-top: -12px;
}
.st-xmas-chase__scene {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	aspect-ratio: 620 / 66;
	transform: translateX(var(--st-from, -100%));
	animation: st-xmas-loop 20s linear infinite;
	will-change: transform;
}
.st-xmas-chase svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}
/* komputer: po przewinięciu (nagłówek przyklejony i zmniejszony) pas pod logo się chowa */
#header [data-sticky*="yes"] .st-xmas-chase--logo {
	opacity: 0;
}
.st-xmas-chase .st-bob {
	animation: st-xmas-bob 1.1s ease-in-out infinite;
}
.st-xmas-chase .st-fly {
	animation: st-xmas-fly .7s ease-in-out infinite alternate;
}
.st-xmas-chase .st-wave {
	animation: st-xmas-wave 1.1s linear infinite;
}
@keyframes st-xmas-loop {
	from { transform: translateX(var(--st-from, -100%)); }
	to   { transform: translateX(var(--st-to, 200px)); }
}
@keyframes st-xmas-bob {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(1.5px); }
}
@keyframes st-xmas-fly {
	from { transform: translateY(0); }
	to   { transform: translateY(-2.5px); }
}
@keyframes st-xmas-wave {
	from { transform: translateX(0); }
	to   { transform: translateX(-16px); }
}

@media (prefers-reduced-motion: reduce) {
	.st-xmas-snow, .st-xmas-chase { display: none; }
	.st-xmas-hat::after { animation: none !important; }
}
@media print {
	.st-xmas-snow, .st-xmas-chase { display: none !important; }
	.st-xmas-hat::after { display: none !important; }
}
