/*
 * ST Popup — wymiary wg projektu Figma (desktop 1920, mobile 393).
 * Fonty: itc-avant-garde-gothic-pro (Typekit motywu, 300 = Book, 500 = Medium), Poppins (motyw).
 */

.stp-overlay {
	--stp-blue: var(--blue, #4C8FE0);
	--stp-orange: var(--orange, #D8561D);
	--stp-white: #fff;
	--stp-font-head: "itc-avant-garde-gothic-pro", "Poppins", sans-serif;
	--stp-font-body: "Poppins", sans-serif;

	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 40px 20px;
	background: rgba(0, 0, 0, .4);
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	opacity: 0;
	transition: opacity .3s ease;
}

.stp-overlay[hidden] {
	display: none;
}

.stp-overlay.is-open {
	opacity: 1;
}

html.stp-lock,
html.stp-lock body {
	overflow: hidden;
}

/* Reset stylów motywu wewnątrz popupu.
   :where() trzyma specyficzność na poziomie jednej klasy, żeby reguły komponentów niżej wygrywały. */
.stp-overlay *,
.stp-overlay *::before,
.stp-overlay *::after {
	box-sizing: border-box;
}

.stp-overlay :where(h2, p) {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	text-transform: none;
	letter-spacing: 0;
}

.stp-overlay :where(button) {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	line-height: inherit;
	text-transform: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.stp-overlay :where(img) {
	display: block;
	max-width: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.stp-overlay :where(svg) {
	display: block;
}

.stp-overlay :focus-visible {
	outline: 2px solid var(--stp-white);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------ Rama */

.stp-dialog {
	position: relative;
	width: 900px;
	max-width: 100%;
	margin: auto;
	transform: translateY(12px);
	transition: transform .3s ease;
}

.stp-overlay.is-open .stp-dialog {
	transform: none;
}

.stp-frame {
	position: relative;
}

.stp-viewport {
	position: relative;
	overflow: hidden;
	background: var(--stp-blue);
	touch-action: pan-y;
}

.stp-track {
	display: flex;
	align-items: stretch;
	transition: transform .45s cubic-bezier(.4, 0, .2, 1);
	will-change: transform;
}

.stp-track.is-dragging {
	transition: none;
}

.stp-slide {
	position: relative;
	display: flex;
	flex: 0 0 100%;
	flex-direction: column;
	min-width: 0;
	min-height: 457px;
	color: var(--stp-white);
	text-align: center;
	-webkit-user-select: none;
	user-select: none;
}

.stp-slide a {
	color: inherit;
	text-decoration: underline;
}

/* Typografia */
.stp-title,
.stp-sub,
.stp-btn {
	font-family: var(--stp-font-head);
	font-weight: 500;
	font-style: normal;
	font-feature-settings: "liga" 0;
}

.stp-title {
	font-size: 36px;
	line-height: 1.2;
}

.stp-line {
	display: block;
}

.stp-line--light {
	font-weight: 300;
}

.stp-sub {
	max-width: 760px;
	font-size: 22px;
	line-height: 1.2;
}

.stp-body {
	max-width: 760px;
	font-family: var(--stp-font-body);
	font-size: 16px;
	font-weight: 300;
	line-height: 1.4;
}

.stp-body strong,
.stp-body b,
.stp-sub strong,
.stp-sub b {
	font-weight: 500;
}

/* Zamknięcie: kółko 33,6 px, wystaje poza prawy górny róg */
.stp-close {
	position: absolute;
	top: -15px;
	right: -14px;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 33.6px;
	height: 33.6px;
	border: 1.6px solid var(--stp-blue) !important;
	border-radius: 50% !important;
	background: var(--stp-white) !important;
	color: var(--stp-blue) !important;
	transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

.stp-close svg {
	width: 32px;
	height: 32px;
	flex: none;
}

.stp-dialog.is-intro .stp-close {
	border-color: var(--stp-white) !important;
	background: var(--stp-close-bg, var(--stp-orange)) !important;
	color: var(--stp-white) !important;
}

/* Przyciski „więcej / dalej / wróć” */
.stp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 4px 4px 4px 8px !important;
	border: 1px solid var(--stp-white) !important;
	font-size: 14px;
	line-height: 1.2;
	letter-spacing: .7px;
	text-transform: lowercase;
	text-decoration: none !important;
	white-space: nowrap;
}

.stp-btn svg {
	width: 12px;
	height: 12px;
	flex: none;
}

.stp-btn--solid {
	background: var(--stp-white) !important;
	color: var(--stp-blue) !important;
}

.stp-btn--outline {
	background: transparent !important;
	color: var(--stp-white) !important;
}

.stp-btn--back {
	padding: 4px 8px 4px 4px !important;
}

.stp-btn--back svg {
	transform: scaleX(-1);
}

/* Strzałki boczne (desktop) — 80 × 80 px, ikona 41,6 px */
.stp-arrow {
	position: absolute;
	top: 178.7px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	color: var(--stp-white) !important;
	transition: opacity .3s ease;
}

.stp-arrow svg {
	width: 41.6px;
	height: 41.6px;
}

.stp-arrow--prev {
	left: 0;
}

.stp-arrow--prev svg {
	transform: scaleX(-1);
}

.stp-arrow--next {
	right: 0;
}

.stp-arrow[hidden],
.stp-dialog.is-intro .stp-arrow {
	display: none;
}

/* Kropki — 12 px, obrys 3 px, odstęp 16 px, 28 px pod popupem */
.stp-dots {
	display: flex;
	justify-content: center;
	gap: 16px;
	margin-top: 28px;
}

.stp-dot {
	width: 12px;
	height: 12px;
	border: 3px solid var(--stp-white) !important;
	border-radius: 50% !important;
	background: transparent !important;
	transition: background-color .3s ease;
}

.stp-dot.is-active {
	background: var(--stp-white) !important;
}

/* ------------------------------------------------------------ Szablon Intro */

.stp-head {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 70px;
	padding: 8px 24px;
	background: var(--stp-orange);
}

.stp-media {
	position: relative;
}

.stp-photo {
	display: block;
	width: 100%;
	aspect-ratio: 900 / 195;
	overflow: hidden;
}

.stp-photo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.stp-pos-top .stp-photo-img {
	object-position: center top;
}

.stp-pos-bottom .stp-photo-img {
	object-position: center bottom;
}

.stp-media-graphic {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.stp-media--no-photo .stp-media-graphic {
	position: static;
	padding-top: 24px;
}

.stp-media-graphic-img {
	width: 408px;
	max-width: 100%;
	height: 98px;
	object-fit: contain;
}

.stp-intro-content {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	padding: 17px 40px 16px;
}

.stp-slide--intro .stp-body {
	margin-top: 42px;
	font-size: 20px;
}

.stp-slide--intro .stp-btn {
	margin-top: 36px;
}

.stp-intro-content > :first-child {
	margin-top: 0;
}

.stp-decor img {
	width: 200px;
	height: 155px;
	object-fit: contain;
}

.stp-decor--inline {
	display: none;
}

/* Desktop: grafika wystaje z lewego dolnego rogu (-87 px, -60 px) */
.stp-decors {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.stp-decor--outside {
	position: absolute;
	left: -87px;
	bottom: -60px;
	z-index: 4;
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s ease, visibility .35s;
}

.stp-decor--outside.is-active {
	opacity: 1;
	visibility: visible;
}

/* --------------------------------------------------------- Szablon Standard */

.stp-slide--standard {
	padding-top: 41.5px;
}

.stp-slide--standard .stp-title {
	padding: 0 70px;
}

.stp-mid {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 24px 70px 36px;
}

.stp-mid > * + * {
	margin-top: 28px;
}

.stp-mid > .stp-logo + * {
	margin-top: 40px;
}

.stp-logo img {
	width: 80px;
	height: 58.3px;
	object-fit: contain;
}

.stp-band {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 52px;
	margin-bottom: 21px;
	background: var(--stp-white);
}

.stp-band img {
	width: auto;
	height: 28px;
}

.stp-band-spacer {
	height: 21px;
}

.stp-mnav {
	display: none;
}

/* --------------------------------------------------------------- Mobile */

@media (max-width: 767px) {
	.stp-overlay {
		padding: 40px;
	}

	.stp-dialog {
		width: 100%;
		max-width: 400px;
	}

	.stp-close {
		top: -12px;
		right: -11px;
	}

	.stp-slide {
		min-height: 620px;
	}

	.stp-title {
		font-size: 20px;
	}

	.stp-sub {
		font-size: 16px;
		letter-spacing: .32px;
	}

	.stp-body,
	.stp-slide--intro .stp-body {
		font-size: 14px;
	}

	.stp-arrow,
	.stp-decors {
		display: none;
	}

	/* Kropki — 8 px, odstęp 10 px, 8 px pod popupem */
	.stp-dots {
		gap: 10px;
		margin-top: 8px;
	}

	.stp-dot {
		width: 8px;
		height: 8px;
		border-width: 2px !important;
	}

	/* Intro */
	.stp-head {
		min-height: 67px;
		padding: 8px 16px;
	}

	.stp-photo {
		width: auto;
		margin: 0 30px;
		aspect-ratio: 252.7 / 132.8;
	}

	.stp-media-graphic {
		position: static;
		margin-top: 27.8px;
	}

	.stp-media--no-photo .stp-media-graphic {
		padding-top: 0;
	}

	.stp-media-graphic-img {
		width: 204px;
		height: 49px;
	}

	.stp-intro-content {
		padding: 30px 27px 28px;
	}

	.stp-decor--inline {
		display: block;
		margin-top: 39px;
	}

	.stp-decor--inline img {
		width: 110px;
		height: 85.5px;
	}

	.stp-slide--intro .stp-body {
		margin-top: 42px;
	}

	.stp-slide--intro .stp-btn {
		margin-top: 53px;
	}

	/* Standard */
	.stp-slide--standard {
		padding-top: 39.8px;
	}

	.stp-slide--standard .stp-title {
		padding: 0 14px;
	}

	.stp-slide--standard .stp-line {
		display: inline;
	}

	.stp-mid {
		padding: 24px 27px 0;
	}

	.stp-mid > .stp-logo + * {
		margin-top: 36px;
	}

	.stp-logo img {
		width: 70px;
		height: 51px;
	}

	.stp-band {
		margin-top: 28px;
		margin-bottom: 0;
	}

	.stp-band-spacer {
		height: 28px;
	}

	.stp-mnav {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-top: 40px;
		padding: 0 20px 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.stp-overlay,
	.stp-dialog,
	.stp-track,
	.stp-decor--outside {
		transition: none;
	}
}
