/* =========================================================
   PREZENTACJA PIERWSZEGO ZESPOŁU
========================================================= */

.team-showcase {
	position: relative;
	overflow: hidden;

	min-height: 720px;

	color: #fff;

	background:
		radial-gradient(
			circle at 50% 76%,
			rgba(32, 119, 255, 0.38) 0%,
			rgba(13, 70, 166, 0.18) 32%,
			transparent 58%
		),
		linear-gradient(
			135deg,
			rgba(2, 13, 32, 0.97) 0%,
			rgba(5, 39, 95, 0.95) 45%,
			rgba(7, 100, 217, 0.93) 100%
		),
		url("../img/menu-bg.jpg") center 45% / cover no-repeat;

	background-blend-mode: normal, normal, luminosity;

	isolation: isolate;
}

/* =========================================================
   BRANDING
========================================================= */

.team-showcase::before {
	content: "2026/2027";

	position: absolute;

	left: 2%;
	top: 52%;

	transform: translateY(-50%);

	font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;

	font-size: clamp(220px, 12vw, 620px);

	font-weight: 900;
	line-height: 0.75;

	letter-spacing: 0.05em;

	color: rgba(255, 255, 255, 0.025);

	pointer-events: none;

	z-index: 0;
}

/* =========================================================
   POŚWIATA
========================================================= */

.team-showcase::after {
	content: "";

	position: absolute;

	left: 50%;
	bottom: -220px;

	width: 900px;
	height: 450px;

	transform: translateX(-50%);

	border-radius: 50%;

	background: radial-gradient(
		ellipse at center,
		rgba(64, 145, 255, 0.22) 0%,
		rgba(12, 74, 170, 0.08) 42%,
		transparent 70%
	);

	filter: blur(16px);

	pointer-events: none;

	z-index: 0;
}

/* =========================================================
   CONTAINER
========================================================= */

.team-showcase .container {
	position: relative;

	z-index: 2;
}

/* =========================================================
   TOP
========================================================= */

.team-showcase__top {
	display: flex;

	align-items: center;
	justify-content: space-between;

	flex-wrap: wrap;

	gap: 20px;

	padding-top: 28px;

	margin: 0 30px 10px;
}

/* =========================================================
   POZYCJE
========================================================= */

.team-showcase__positions {
	display: flex;

	flex-wrap: wrap;

	gap: 10px;
}

.team-pos-btn {
	display: inline-flex;

	align-items: center;
	justify-content: center;

	min-height: 42px;

	padding: 0 18px;

	border: 1px solid rgba(255, 255, 255, 0.22);

	border-radius: 2px;

	background: rgba(255, 255, 255, 0.025);

	color: #fff;

	font-size: 0.78rem;

	font-weight: 800;

	letter-spacing: 0.08em;

	text-transform: uppercase;

	cursor: pointer;

	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);

	transition:
		background-color 0.22s ease,
		color 0.22s ease,
		border-color 0.22s ease,
		transform 0.22s ease;
}

.team-pos-btn:hover {
	border-color: rgba(255, 255, 255, 0.55);

	background: rgba(255, 255, 255, 0.08);

	transform: translateY(-1px);
}

.team-pos-btn.active {
	background: #fff;

	border-color: #fff;

	color: #04142d;

	transform: none;
}

/* =========================================================
   STAGE
========================================================= */

.team-stage {
	--team-info-center: 58%;

	position: relative;
}

/* =========================================================
   GROUP
========================================================= */

.team-group {
	position: relative;

	display: none;

	min-height: 650px;
}

.team-group.active {
	display: block;
}

/* =========================================================
   NAV
========================================================= */

.team-nav-btn {
	position: absolute;

	top: 125px;

	z-index: 30;

	display: flex;

	align-items: center;
	justify-content: center;

	width: 46px;
	height: 46px;

	padding: 0;

	border: 1px solid rgba(255, 255, 255, 0.24);

	border-radius: 2px;

	background: rgba(6, 28, 66, 0.25);

	color: #fff;

	cursor: pointer;

	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);

	transition:
		background-color 0.2s ease,
		color 0.2s ease,
		border-color 0.2s ease,
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

.team-nav-btn svg {
	display: block;

	width: 20px;
	height: 20px;

	fill: none;

	stroke: currentColor;

	stroke-width: 2;

	stroke-linecap: round;
	stroke-linejoin: round;

	pointer-events: none;
}

.team-nav-btn--prev {
	left: calc(var(--team-info-center) - 150px);
}

.team-nav-btn--next {
	left: calc(var(--team-info-center) + 520px);
}

.team-nav-btn:hover {
	border-color: #fff;

	background: #fff;

	color: #06142d;

	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.team-nav-btn--prev:hover {
	transform: translateX(-3px);
}

.team-nav-btn--next:hover {
	transform: translateX(3px);
}

.team-nav-btn:active {
	transform: scale(0.96);
}

.team-nav-btn:focus-visible {
	outline: 3px solid rgba(255, 241, 1, 0.45);

	outline-offset: 3px;
}

/* =========================================================
   INFO
========================================================= */

.team-stage__info {
	position: absolute;

	top: 20px;
	left: var(--team-info-center);

	z-index: 10;

	display: flex;

	align-items: flex-start;

	gap: 18px;

	margin: 40px 0;

	transform: translateX(-10%);

	opacity: 1;

	transition:
		opacity 0.18s ease,
		transform 0.28s ease;
}

.team-stage__info.is-changing {
	opacity: 0;

	transform: translateX(-10%) translateY(8px);
}

/* =========================================================
   NUMER
========================================================= */

.team-stage__number {
	font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;

	font-size: clamp(100px, 12vw, 170px);

	font-weight: 900;

	line-height: 0.82;

	color: #fff101;

	text-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}

/* =========================================================
   CONTENT
========================================================= */

.team-stage__content {
	padding-top: 12px;
}

/* =========================================================
   NAZWA
========================================================= */

.team-stage__name {
	margin: 0 0 10px;

	font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;

	font-size: clamp(30px, 4vw, 54px);

	font-weight: 900;

	line-height: 0.94;

	letter-spacing: 0.18rem;

	text-transform: uppercase;

	color: #fff;

	text-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

/* =========================================================
   POZYCJA
========================================================= */

.team-stage__role {
	margin: 0 0 20px;

	font-size: 1.5rem;

	font-weight: 400;

	color: rgba(255, 255, 255, 0.88);
}

/* =========================================================
   PROFIL
========================================================= */

.team-stage__btn {
	display: inline-flex;

	align-items: center;
	justify-content: center;

	min-width: 116px;
	min-height: 44px;

	padding: 0 18px;

	border-radius: 2px;

	background: #fff;

	color: #06142d;

	text-decoration: none;

	font-size: 16px;

	font-weight: 800;

	text-transform: uppercase;

	transition:
		background-color 0.22s ease,
		color 0.22s ease,
		transform 0.22s ease;
}

.team-stage__btn:hover {
	background: #fff101;

	color: #04142d;

	transform: translateY(-2px);
}

/* =========================================================
   LINEUP
========================================================= */

.team-lineup {
	position: relative;

	display: block;

	min-height: 650px;
	touch-action: pan-y;
	overflow: hidden;
}

/* =========================================================
   PLAYER
========================================================= */

.team-player-card {
	position: absolute;

	left: 50%;
	bottom: 0;

	z-index: 1;

	width: min(29vw, 430px);

	margin: 0;

	opacity: 0;

	pointer-events: none;

	transform: translate3d(-50%, 0, 0) scale(0.88);

	transform-origin: center bottom;

	will-change: auto;

	transition:
		transform 0.62s cubic-bezier(0.22, 0.61, 0.36, 1),
		opacity 0.42s ease;
}

/* tylko 3 faktycznie animowane */

.team-player-card.active,
.team-player-card.is-prev,
.team-player-card.is-next {
	will-change: transform, opacity;
}

/* =========================================================
   ACTIVE
========================================================= */

.team-player-card.active {
	z-index: 5;

	opacity: 1;

	pointer-events: auto;

	transform: translate3d(-50%, 0, 0) scale(1);
}

/* =========================================================
   PREV
========================================================= */

.team-player-card.is-prev {
	z-index: 2;

	opacity: 0.14;

	pointer-events: auto;

	transform: translate3d(-118%, 38px, 0) scale(0.72);
}

/* =========================================================
   NEXT
========================================================= */

.team-player-card.is-next {
	z-index: 2;

	opacity: 0.14;

	pointer-events: auto;

	transform: translate3d(18%, 38px, 0) scale(0.72);
}

/* =========================================================
   SIDE HOVER
========================================================= */

.team-player-card.is-prev,
.team-player-card.is-next {
	cursor: pointer;
}

.team-player-card.is-prev:hover,
.team-player-card.is-next:hover {
	opacity: 0.27;
}

/* =========================================================
   PLAYER IMAGE
========================================================= */

.team-player-card img {
	display: block;

	width: 100%;
	height: auto;

	margin: 0;

	object-fit: contain;

	filter: drop-shadow(0 24px 38px rgba(0, 0, 0, 0.32));

	user-select: none;

	-webkit-user-drag: none;

	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;

	transform: translateZ(0);
}

/* =========================================================
   <= 1199
========================================================= */

@media (max-width: 1199.98px) {
	.team-stage {
		--team-info-center: 52%;
	}

	.team-stage__info {
		left: var(--team-info-center);

		transform: translateX(-20%);
	}

	.team-stage__info.is-changing {
		transform: translateX(-20%) translateY(8px);
	}

	.team-nav-btn--prev {
		left: calc(var(--team-info-center) - 135px);
	}

	.team-nav-btn--next {
		left: auto;

		right: 40px;
	}

	.team-player-card {
		width: min(34vw, 410px);
	}

	.team-player-card.is-prev {
		transform: translate3d(-112%, 38px, 0) scale(0.7);
	}

	.team-player-card.is-next {
		transform: translate3d(12%, 38px, 0) scale(0.7);
	}
}

/* =========================================================
   TABLET / MOBILE <= 991
========================================================= */

@media (max-width: 991.98px) {
	.team-showcase {
		min-height: auto;

		padding-top: 30px;
	}

	/* lżejsze tło */

	.team-showcase::after {
		filter: none;

		opacity: 0.55;
	}

	.team-showcase::before {
		right: -12%;

		top: 60%;

		font-size: clamp(42px, 12vw, 430px);
	}

	/* =====================================================
	   TOP
	===================================================== */

	.team-showcase__top {
		margin: 0 0 24px;

		padding-top: 0;
	}

	.team-showcase__positions {
		width: 100%;

		flex-wrap: nowrap;

		gap: 8px;

		padding: 0 0 5px;

		overflow-x: auto;
		overflow-y: hidden;

		scrollbar-width: none;

		-webkit-overflow-scrolling: touch;
	}

	.team-showcase__positions::-webkit-scrollbar {
		display: none;
	}

	.team-pos-btn {
		flex: 0 0 auto;

		min-height: 40px;

		padding: 0 14px;

		font-size: 0.72rem;

		white-space: nowrap;

		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}

	/* =====================================================
	   STAGE
	===================================================== */

	.team-stage {
		--team-info-center: 50%;
	}

	.team-group {
		min-height: auto;
	}

	/* =====================================================
	   INFO - STABILNA WYSOKOŚĆ
	===================================================== */

	.team-stage__info {
		position: relative;

		top: auto;
		left: auto;

		display: flex;

		flex-direction: column;

		align-items: center;

		justify-content: flex-start;

		gap: 5px;

		min-height: 205px;

		margin: 0 0 12px;

		text-align: center;

		transform: none;
	}

	.team-stage__info.is-changing {
		opacity: 0;

		transform: translateY(8px);
	}

	.team-stage__number {
		flex: 0 0 auto;

		font-size: clamp(64px, 15vw, 100px);

		line-height: 0.84;
	}

	.team-stage__content {
		display: flex;

		flex-direction: column;

		align-items: center;

		justify-content: flex-start;

		min-height: 110px;

		padding-top: 0;
	}

	.team-stage__name {
		display: flex;

		align-items: center;
		justify-content: center;

		min-height: 1.9em;

		margin-bottom: 7px;

		font-size: clamp(27px, 7vw, 40px);

		line-height: 0.92;

		letter-spacing: 0.1rem;

		text-align: center;
	}

	.team-stage__role {
		margin-bottom: 14px;

		font-size: 1.05rem;
	}

	.team-stage__btn {
		min-width: 110px;
		min-height: 42px;

		font-size: 0.78rem;
	}

	/* =====================================================
	   LINEUP - STAŁY VIEWPORT
	===================================================== */

	.team-lineup {
		height: 390px;
		min-height: 390px;

		overflow: hidden;
	}

	.team-player-card {
		width: min(62vw, 330px);

		max-width: 330px;

		height: 390px;
	}

	.team-player-card img {
		width: 100%;
		height: 100%;

		object-fit: contain;

		object-position: center bottom;

		/* duży zysk wydajności na mobile */
		filter: none;
	}

	.team-player-card.active {
		transform: translate3d(-50%, 0, 0) scale(1);
	}

	.team-player-card.is-prev {
		opacity: 0.1;

		transform: translate3d(-128%, 30px, 0) scale(0.72);
	}

	.team-player-card.is-next {
		opacity: 0.1;

		transform: translate3d(28%, 30px, 0) scale(0.72);
	}

	/* =====================================================
	   NAV
	===================================================== */

	.team-nav-btn {
		top: auto;

		bottom: 155px;

		width: 44px;
		height: 44px;

		border-radius: 50%;

		background: rgba(255, 255, 255, 0.92);

		border-color: rgba(255, 255, 255, 0.5);

		color: #06142d;

		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}

	.team-nav-btn--prev {
		left: 18px;
	}

	.team-nav-btn--next {
		left: auto;

		right: 18px;
	}

	.team-nav-btn:hover {
		background: #fff101;

		border-color: #fff101;

		color: #003c99;
	}
}

/* =========================================================
   MOBILE <= 575
========================================================= */

@media (max-width: 575.98px) {
	.team-showcase .container {
		padding-left: 12px;
		padding-right: 12px;
	}

	.team-showcase::after {
		display: none;
	}

	.team-showcase__top {
		align-items: stretch;

		margin-bottom: 18px;
	}

	/* =====================================================
	   INFO
	===================================================== */

	.team-stage__info {
		min-height: 195px;
	}

	.team-stage__number {
		font-size: 70px;
	}

	.team-stage__name {
		min-height: 58px;

		font-size: 30px;

		line-height: 0.96;
	}

	.team-stage__role {
		font-size: 1rem;
	}

	/* =====================================================
	   LINEUP
	===================================================== */

	.team-lineup {
		height: 350px;
		min-height: 350px;
	}

	.team-player-card {
		width: 310px;

		max-width: 78vw;

		height: 350px;
	}

	.team-player-card img {
		width: 100%;
		height: 100%;

		object-fit: contain;

		object-position: center bottom;
	}

	.team-player-card.is-prev {
		transform: translate3d(-132%, 26px, 0) scale(0.68);
	}

	.team-player-card.is-next {
		transform: translate3d(32%, 26px, 0) scale(0.68);
	}

	/* =====================================================
	   NAV
	===================================================== */

	.team-nav-btn {
		bottom: 132px;

		width: 42px;
		height: 42px;
	}

	.team-nav-btn--prev {
		left: 7px;
	}

	.team-nav-btn--next {
		right: 7px;
	}
}

/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 420px) {
	.team-stage__info {
		min-height: 188px;
	}

	.team-stage__name {
		min-height: 56px;

		font-size: 27px;
	}

	.team-lineup {
		height: 330px;
		min-height: 330px;
	}

	.team-player-card {
		width: 290px;

		max-width: 80vw;

		height: 330px;
	}

	.team-nav-btn {
		bottom: 122px;
	}
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
	.team-player-card,
	.team-stage__info,
	.team-nav-btn,
	.team-pos-btn,
	.team-stage__btn {
		transition: none;
	}
}
