.sbs-card {
    background: var(--wp--preset--color--surface);
    border: var(--sbs-border);
    border-radius: var(--sbs-radius-xl);
    box-shadow: var(--sbs-shadow-sm);
  }
  
  .sbs-card--hover:hover {
    box-shadow: var(--sbs-shadow-md);
  }
  
  .sbs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 14px;
    padding: 0.9rem 1.2rem;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
  }
  
  .sbs-btn--primary {
    background: var(--wp--preset--color--brand-red);
    color: var(--wp--preset--color--surface);
  }
  
  .sbs-btn--primary:hover {
    background: var(--wp--preset--color--brand-red-dark);
  }

  .sbs-btn--secondary {
    background: var(--sbs-secondary);
    color: var(--wp--preset--color--surface);
  }

  .sbs-btn--secondary:hover {
    background: var(--sbs-secondary-dark);
  }
  
  .sbs-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(17, 24, 39, 0.86);
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
  }
  
  /* Modal base */
  .sbs-modal[hidden] { display: none !important; }
  
  .sbs-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
  }
  
  .sbs-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.72);
  }
  
  .sbs-modal__dialog {
    position: relative;
    width: min(980px, calc(100% - 2rem));
    margin: 6vh auto;
    background: var(--wp--preset--color--surface);
    border-radius: var(--sbs-radius-xl);
    box-shadow: var(--sbs-shadow-md);
    overflow: hidden;
  }
  
  .sbs-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
  }

/* Lightbox */
.sbs-modal__closeBtn {
	width: 40px;
	height: 40px;
	border-radius: 999px;
	border: 0;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	background: var(--sbs-secondary);
}

.sbs-modal__closeBtn:hover {
	background: var(--sbs-primary);
}

/* Lightbox – dialog mieści się w viewport, przewijanie treści */
.sbs-lightbox__dialog {
	display: flex;
	flex-direction: column;
	width: min(980px, calc(100% - 2rem));
	max-height: calc(100vh - 1rem);
	max-height: calc(100dvh - 1rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
	overflow: hidden;
}

body.admin-bar .sbs-lightbox__dialog {
	max-height: calc(100vh - 1rem - var(--wp-admin--admin-bar--height, 0px));
	max-height: calc(100dvh - 1rem - var(--wp-admin--admin-bar--height, 0px));
}

.sbs-lightbox .sbs-modal__close {
	z-index: 2;
}

.sbs-lightbox__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 48px 14px 14px;
}

.sbs-lightbox__stage {
	padding: 0;
}

.sbs-lightbox__img {
	width: 100%;
	max-width: 100%;
	height: auto;
	display: block;
	border-radius: 14px;
}

/* Gallery modal – scroll wewnątrz, strzałki względem zdjęcia (.sbs-gallery__media) */
.sbs-gallery__dialog {
	display: flex;
	flex-direction: column;
	width: min(980px, calc(100% - 2rem));
	max-height: calc(100vh - 1rem);
	max-height: calc(100dvh - 1rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
	overflow: hidden;
}

body.admin-bar .sbs-gallery__dialog {
	max-height: calc(100vh - 1rem - var(--wp-admin--admin-bar--height, 0px));
	max-height: calc(100dvh - 1rem - var(--wp-admin--admin-bar--height, 0px));
}

.sbs-gallery .sbs-modal__close {
	z-index: 2;
}

.sbs-gallery__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 48px 0 0;
}

.sbs-gallery__frame {
	padding: 0 18px 18px;
}

/* Wrapper bez position – nie rozciąga kontekstu dla strzałek */
.sbs-gallery__media {
	display: block;
	width: 100%;
}

/* Stage = dokładna wysokość zdjęcia; strzałki absolute względem TYLKO tego boxa (nie całego modala / ramki z tekstem) */
.sbs-gallery__stage {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.08);
}

.sbs-gallery__img {
	width: 100%;
	max-width: 100%;
	height: auto;
	display: block;
	max-height: 60vh;
	object-fit: contain;
}

.sbs-gallery__meta {
	padding: 14px 2px 2px;
	text-align: center;
}

.sbs-gallery__kicker {
	margin: 0;
	font-size: 0.9rem;
	color: var(--wp--preset--color--muted);
}

.sbs-gallery__title {
	margin: 6px 0 0;
	font-size: 1.35rem;
	line-height: 1.25;
}

.sbs-gallery__text {
	margin: 10px auto 0;
	max-width: 62ch;
	color: var(--wp--preset--color--text);
}

.sbs-gallery__actions {
	margin-top: 14px;
	display: flex;
	justify-content: center;
	display: none;
}

.sbs-gallery__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 999px;
	border: 0;
	cursor: pointer;
	background: rgba(255, 255, 255, 0.92);
	font-size: 26px;
	line-height: 1;
	display: grid;
	place-items: center;
	box-shadow: var(--sbs-shadow-sm);
	z-index: 2;
	touch-action: manipulation;
}

.sbs-gallery__nav:hover {
	background: rgba(255, 255, 255, 1);
}

.sbs-gallery__nav--prev {
	left: 8px;
}

.sbs-gallery__nav--next {
	right: 8px;
}

/* Telefon: większe zdjęcie (mniej paddingu), modal prawie na pełną szerokość */
@media (max-width: 640px) {
	.sbs-gallery.sbs-modal,
	.sbs-lightbox.sbs-modal {
		padding: max(0.35rem, env(safe-area-inset-top, 0px)) max(0.25rem, env(safe-area-inset-right, 0px))
			max(0.35rem, env(safe-area-inset-bottom, 0px)) max(0.25rem, env(safe-area-inset-left, 0px));
	}

	.sbs-gallery__dialog,
	.sbs-lightbox__dialog {
		width: min(980px, calc(100% - 6px));
		max-height: calc(100vh - 0.75rem);
		max-height: calc(100dvh - 0.75rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
		border-radius: 14px;
	}

	body.admin-bar .sbs-gallery__dialog,
	body.admin-bar .sbs-lightbox__dialog {
		max-height: calc(100vh - 0.75rem - var(--wp-admin--admin-bar--height, 0px));
		max-height: calc(100dvh - 0.75rem - var(--wp-admin--admin-bar--height, 0px));
	}

	.sbs-gallery__body {
		padding-top: 44px;
	}

	.sbs-gallery__frame {
		padding: 0 6px 10px;
	}

	.sbs-gallery__meta {
		padding: 10px 4px 4px;
	}

	.sbs-gallery__nav--prev {
		left: 2px;
	}

	.sbs-gallery__nav--next {
		right: 2px;
	}

	.sbs-lightbox__body {
		padding: 44px 6px 10px;
	}

	.sbs-lightbox__img {
		border-radius: 10px;
	}
}

/* ========== Header & Nav ========== */
#wpadminbar {
	background: #1a1a2e !important;
}

.sbs-header {
	background: #1a1a2e;
	box-shadow: none;
	transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}


.wp-block-template-part:has(#sbs-header),
header.wp-block-template-part:has(#sbs-header) {
	position: sticky !important;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 1000;
}

.sbs-header--scrolled {
	background: rgba(26, 26, 46, 0.92);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

@media (max-width: 900px) {
	body.sbs-nav-open .wp-block-template-part:has(#sbs-header),
	body.sbs-nav-open header.wp-block-template-part:has(#sbs-header) {
		z-index: 10001;
	}
}

@media (min-width: 901px) {

	.sbs-header {
		position: relative;
		transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease,
			border-radius 0.35s ease, transform 0.35s ease;
	}

	.sbs-header--scrolled {
		background: rgba(26, 26, 46, 0.88);
		backdrop-filter: blur(16px);
		-webkit-backdrop-filter: blur(16px);
		box-shadow:
			0 1px 0 rgba(255, 255, 255, 0.06),
			0 4px 24px rgba(0, 0, 0, 0.2),
			0 12px 48px rgba(0, 0, 0, 0.12);
		border-radius: 0 0 20px 20px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.06);
		transform: translateY(0);
	}
}

.sbs-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 64px;
	width: min(1120px, calc(100% - 32px));
	margin-left: auto;
	margin-right: auto;
}

@media (min-width: 901px) {
	.sbs-header__inner {
		justify-content: center;
	}
}

.sbs-header__logo {
	margin: 0;
	display: block;
}

@media (min-width: 901px) {
	.sbs-header__logo {
		display: none;
	}
}

.sbs-header__logo a {
	text-decoration: none;
	display: block;
}

.sbs-header__logo img {
	display: block;
	height: auto;
	max-height: 100px;
	width: auto;
}

.sbs-nav {
	display: flex;
	align-items: center;
	gap: 12px;
	position: relative;
}

/* Przycisk hamburgera (mobile) */
.sbs-nav__hamburger {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	border-radius: 12px;
	transition: background 0.2s ease, color 0.2s ease;
	position: relative;
	z-index: 10001;
}

.sbs-nav__hamburger:hover {
	background: rgba(255, 255, 255, 0.1);
}

/* Ikona × (widoczna gdy menu otwarte) */
.sbs-nav__close-text {
	display: none;
	font-size: 28px;
	line-height: 1;
	font-weight: 300;
	color: #fff;
}

.sbs-nav.is-open .sbs-nav__close-text {
	display: block;
}

.sbs-nav.is-open .sbs-nav__hamburger-box {
	display: none;
}

/* Przycisk = X gdy otwarte: ciemne tło, biała ikona */
.sbs-nav.is-open .sbs-nav__hamburger {
	background: #1a1a2e;
}

.sbs-nav.is-open .sbs-nav__hamburger:hover {
	background: #252540;
}

/* Pudełko 3 linii (hamburger) */
.sbs-nav__hamburger-box {
	width: 22px;
	height: 18px;
	position: relative;
	display: block;
}

/* Ikona hamburgera – jasna na ciemnym tle nagłówka */
.sbs-nav__hamburger-inner,
.sbs-nav__hamburger-inner::before,
.sbs-nav__hamburger-inner::after {
	position: absolute;
	width: 22px;
	height: 2px;
	left: 0;
	background: #e8e8ec;
	border-radius: 1px;
	transition: transform 0.25s ease, opacity 0.2s ease, background 0.2s ease;
}

.sbs-nav__hamburger-inner::before,
.sbs-nav__hamburger-inner::after {
	content: "";
	display: block;
	top: 0;
}

.sbs-nav__hamburger-inner {
	top: 8px;
}

.sbs-nav__hamburger-inner::before {
	top: -6px;
}

.sbs-nav__hamburger-inner::after {
	top: 6px;
}

/* Gdy otwarte: 3 linie → X (białe) */
.sbs-nav.is-open .sbs-nav__hamburger-inner {
	background: transparent;
}

.sbs-nav.is-open .sbs-nav__hamburger-inner::before,
.sbs-nav.is-open .sbs-nav__hamburger-inner::after {
	background: #fff;
}

.sbs-nav.is-open .sbs-nav__hamburger-inner::before {
	top: 0;
	transform: rotate(45deg);
}

.sbs-nav.is-open .sbs-nav__hamburger-inner::after {
	top: 0;
	transform: rotate(-45deg);
}

/* Mobile: overlay menu – jedno miejsce, bez display:none */
.sbs-nav__menu {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 80px 24px 24px;
	background: #1a1a2e;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sbs-nav.is-open .sbs-nav__menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Menu przeniesione do body (mobile) – widoczne gdy otwarte, pełny ekran */
body.sbs-nav-open .sbs-nav__menu--portaled {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Linki w overlay (mobile) – jasne na ciemnym */
.sbs-nav__link {
	display: block;
	padding: 12px 16px;
	font-size: 1.1rem;
	font-weight: 600;
	text-decoration: none;
	color: #e8e8ec;
	border-radius: 12px;
	transition: background 0.2s ease, color 0.2s ease;
}

.sbs-nav__link:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.sbs-nav__link--cta {
	background: var(--wp--preset--color--brand-red);
	color: #fff;
	margin-top: 8px;
}

.sbs-nav__link--cta:hover {
	background: var(--wp--preset--color--brand-red-dark);
	color: #fff;
}

/* Desktop: menu w linii, hamburger ukryty, linki w kolorze tekstu */
@media (min-width: 901px) {
	.sbs-nav__hamburger {
		display: none;
	}

	.sbs-nav__menu {
		position: static;
		inset: auto;
		padding: 0;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		background: transparent;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: flex-end;
		gap: 4px;
	}

	.sbs-nav__link {
		padding: 8px 14px;
		font-size: 0.95rem;
		font-weight: 500;
		color: #e8e8ec;
	}

	.sbs-nav__link:hover {
		background: rgba(255, 255, 255, 0.1);
		color: #fff;
	}

	.sbs-nav__link--cta {
		margin-top: 0;
		padding: 10px 18px;
		color: var(--wp--preset--color--surface);
	}

	.sbs-nav__link--cta:hover {
		color: var(--wp--preset--color--surface);
	}
}

body.sbs-nav-open {
	overflow: hidden;
}

/* ========== Footer ========== */
.sbs-footer {
	color: #e8e8ec;
  padding: 2rem 0 !important;
}

.sbs-footer__grid {
	width: min(1120px, calc(100% - 32px));
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 0;
	gap: 32px;
}

.sbs-footer__col {
	min-width: 0;
}

.sbs-footer__col--brand {
	flex: 1 1 220px;
}

.sbs-footer__logo {
	margin: 0 0 12px;
}

.sbs-footer__logo a {
	display: inline-block;
}

.sbs-footer__logo img {
	max-width: 160px;
	height: auto;
}

.sbs-footer__lead {
	margin: 0 0 8px;
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
}

.sbs-footer__muted {
	margin: 0 0 14px;
	font-size: 0.9rem;
	line-height: 1.5;
	color: #a0a0b0;
}

.sbs-footer__muted a {
	color: #c8c8d8;
	text-decoration: none;
}

.sbs-footer__muted a:hover {
	color: #fff;
}

.sbs-footer__h {
	margin: 0 0 12px;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
	color: #b0b0c0;
}

.sbs-footer__links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sbs-footer__links li {
	margin: 0 0 6px;
}

.sbs-footer__links a {
	color: #b0b0c0;
	text-decoration: none;
	font-size: 0.95rem;
	transition: color 0.2s ease;
}

.sbs-footer__links a:hover {
	color: #fff;
}

.sbs-footer__social {
	margin: 0 0 14px;
}

.sbs-footer__social .wp-block-social-links__link {
	color: #e8e8ec;
}

.sbs-footer__cta {
	margin: 0;
}

.sbs-footer__cta .sbs-btn {
	margin: 0;
}

.sbs-footer__bottom {
	width: min(1120px, calc(100% - 32px));
	margin: 32px auto 0;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	gap: 12px;
}

.sbs-footer__copyright {
	margin: 0;
	font-size: 0.85rem;
	color: #6b6b80;
}

.sbs-footer__fineprint {
	margin: 0;
	font-size: 0.85rem;
}

.sbs-footer__fineprint a {
	color: #6b6b80;
	text-decoration: none;
}

.sbs-footer__fineprint a:hover {
	color: #a0a0b0;
}

@media (min-width: 641px) {
	.sbs-footer__col {
		flex: 1 1 200px;
	}
}

/* ========== Sticky contact (mobile) ========== */
.sbs-sticky {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 9990;
}

.sbs-sticky__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 20px;
	background: var(--sbs-secondary);
	color: #fff;
	border: 0;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.95rem;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sbs-sticky__btn:hover {
	transform: translateY(-2px);
	color: #fff;
}

.sbs-sticky__icon {
	font-size: 1.2rem;
}

.sbs-sticky__panel {
	position: absolute;
	bottom: 100%;
	right: 0;
	margin-bottom: 10px;
	padding: 8px;
	background: var(--wp--preset--color--surface);
	border-radius: 14px;
	box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
	min-width: 160px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.sbs-sticky__panel[aria-hidden="false"],
.sbs-sticky.is-open .sbs-sticky__panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.sbs-sticky__panel[hidden] {
	display: none !important;
}

.sbs-sticky__item {
	display: block;
	padding: 12px 16px;
	color: var(--wp--preset--color--text);
	text-decoration: none;
	font-weight: 600;
	border-radius: 10px;
	transition: background 0.2s ease;
}

.sbs-sticky__item:hover {
	background: rgba(0, 0, 0, 0.06);
	color: var(--wp--preset--color--text);
}

.sbs-sticky__item + .sbs-sticky__item {
	margin-top: 4px;
}
