/* ==========================================================================
   RBM - STOPKA (KOLORYSTYKA MAŁOPOLSKI + OBSŁUGA TRYBU CIEMNEGO)
   ========================================================================== */
.rbm-ftr,
.rbm-ftr * {
	box-sizing: border-box;
}

.rbm-ftr {
	--rbm-ftr-surface: #ffffff;
	--rbm-ftr-heading: #0b2545;
	--rbm-ftr-text: #334155;
	--rbm-ftr-muted: #475569;
	--rbm-ftr-accent: #E5007E;
	--rbm-ftr-blue: #009FE3;
	--rbm-ftr-divider: rgba(11, 37, 69, 0.14);
	--rbm-ftr-bar-bg: #3E434F;
	--rbm-ftr-bar-text: #E2E8F0;
	--rbm-ftr-page-bg: var(--rbm-bg, #ffffff);
	--rbm-ftr-container: 1320px;

	position: relative;
	width: 100%;
	font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--rbm-ftr-text);
	background: var(--rbm-ftr-surface);
	overflow: hidden;
}

/* Automatyczne dopasowanie do przełącznika trybu ciemnego z RBM - Nagłówek */
html.rbm-dark-mode .rbm-ftr.rbm-ftr--auto-dark {
	--rbm-ftr-surface: #0f1a2e;
	--rbm-ftr-heading: #f1f5f9;
	--rbm-ftr-text: #cbd5e1;
	--rbm-ftr-muted: #94a3b8;
	--rbm-ftr-divider: rgba(255, 255, 255, 0.14);
	--rbm-ftr-bar-bg: #070d1a;
	--rbm-ftr-bar-text: #cbd5e1;
	--rbm-ftr-page-bg: #0b1324;
}

.rbm-ftr-container {
	width: 100%;
	max-width: var(--rbm-ftr-container);
	margin: 0 auto;
	padding: 0 28px;
}

/* ==========================================================================
   1. GÓRNA SCENA (WYMIENNE TŁO + KOLOROWE WSTĘGI I BIAŁA FALA SVG)
   ========================================================================== */
.rbm-ftr-scene {
	position: relative;
	width: 100%;
	height: 165px;
	overflow: hidden;
	background: var(--rbm-ftr-page-bg);
}

.rbm-ftr-bg {
	position: absolute;
	inset: 0 0 -2px 0;
	background-size: cover;
	background-repeat: no-repeat;
	background-position: right top;
	z-index: 1;
}

.rbm-ftr-bg-fallback {
	width: 100%;
	height: 100%;
	display: block;
}

/* Delikatne wtopienie górnej krawędzi panoramy w tło strony */
.rbm-ftr-scene-topfade {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 36px;
	background: linear-gradient(to bottom, var(--rbm-ftr-page-bg) 0%, rgba(255, 255, 255, 0) 100%);
	z-index: 2;
	pointer-events: none;
}

html.rbm-dark-mode .rbm-ftr.rbm-ftr--auto-dark .rbm-ftr-scene-topfade {
	background: linear-gradient(to bottom, #0b1324 0%, rgba(11, 19, 36, 0) 100%);
}

.rbm-ftr-top-wave {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	width: 100%;
	height: calc(100% + 2px);
	display: block;
	z-index: 3;
	pointer-events: none;
}

.rbm-ftr-wave-surface {
	fill: var(--rbm-ftr-surface);
}

/* ==========================================================================
   2. BIAŁA CZĘŚĆ Z TREŚCIĄ I DOLNO-PRAWYMI WSTĘGAMI
   ========================================================================== */
.rbm-ftr-body {
	position: relative;
	background: var(--rbm-ftr-surface);
	padding: 4px 0 34px;
	margin-top: -1px;
	z-index: 4;
}

/* Wstęgi w prawym dolnym rogu białej strefy */
.rbm-ftr-corner-ribbons {
	position: absolute;
	right: 0;
	bottom: 0;
	width: clamp(220px, 26vw, 370px);
	height: clamp(115px, 12vw, 175px);
	display: block;
	pointer-events: none;
	z-index: 1;
}

.rbm-ftr-body .rbm-ftr-container {
	position: relative;
	z-index: 3;
}

/* 5-kolumnowy układ z pionowymi separatorami (jak na grafice) */
.rbm-ftr-grid {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 0;
}

.rbm-ftr-col {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	padding: 6px 26px;
	min-width: 0;
}

.rbm-ftr-col:first-child {
	padding-left: 0;
}

.rbm-ftr-col:last-child {
	padding-right: 0;
}

/* Cienki pionowy separator między aktywnymi kolumnami */
.rbm-ftr-col + .rbm-ftr-col::before {
	content: '';
	position: absolute;
	left: 0;
	top: 4px;
	bottom: 4px;
	width: 1px;
	background: var(--rbm-ftr-divider);
}

.rbm-ftr-col--logo {
	flex: 0 0 auto;
	justify-content: center;
}

.rbm-ftr-col--brand {
	flex: 1.35 1 240px;
	justify-content: center;
}

.rbm-ftr-col--links {
	flex: 1 1 165px;
}

.rbm-ftr-col--social {
	flex: 1.15 1 210px;
}

/* Logo */
.rbm-ftr-logo {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.rbm-ftr-logo img {
	max-height: 58px;
	width: auto;
	max-width: 195px;
	display: block;
	object-fit: contain;
}

.rbm-ftr-logo-text {
	display: flex;
	flex-direction: column;
	line-height: 1;
}

.rbm-ftr-logo-main {
	font-size: 30px;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--rbm-ftr-accent);
}

.rbm-ftr-logo-sub {
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.2em;
	color: var(--rbm-ftr-blue);
	margin-top: 2px;
}

/* Nagłówki kolumn — pogrubiona kursywa w kolorze granatowym jak na grafice */
.rbm-ftr-col-title {
	margin: 0 0 11px !important;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	font-style: italic;
	line-height: 1.3;
	color: var(--rbm-ftr-heading);
}

.rbm-ftr-brand-sub {
	margin: 0 !important;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.48;
	color: var(--rbm-ftr-muted);
}

/* Listy linków */
.rbm-ftr-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.rbm-ftr-list li {
	margin: 0 !important;
	padding: 0 !important;
}

.rbm-ftr-list a {
	display: inline-block;
	color: var(--rbm-ftr-text);
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	transition: color 0.2s ease, transform 0.2s ease;
}

.rbm-ftr-list a:hover {
	color: var(--rbm-ftr-accent);
	transform: translateX(3px);
}

/* Kontakt i społeczność (Facebook + kolejne dodawalne pozycje) */
.rbm-ftr-socials {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 2px;
}

.rbm-ftr-social-item {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--rbm-ftr-heading);
	text-decoration: none;
	align-self: flex-start;
	transition: color 0.2s ease, transform 0.2s ease;
}

.rbm-ftr-social-item:hover {
	color: var(--rbm-ftr-accent);
	transform: translateX(2px);
}

.rbm-ftr-social-circle {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	flex-shrink: 0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
	transition: transform 0.2s ease;
}

.rbm-ftr-social-item:hover .rbm-ftr-social-circle {
	transform: scale(1.07);
}

.rbm-ftr-social-circle svg,
.rbm-ftr-social-circle i {
	width: 20px;
	height: 20px;
	font-size: 18px;
	display: block;
}

.rbm-ftr-social-label {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.25;
}

.rbm-ftr-extra-text {
	margin: 10px 0 0 !important;
	font-size: 13px;
	line-height: 1.45;
	color: var(--rbm-ftr-muted);
}

/* ==========================================================================
   3. DOLNY CIEMNY PASEK PRAWNY
   ========================================================================== */
.rbm-ftr-bottom {
	background: var(--rbm-ftr-bar-bg);
	color: var(--rbm-ftr-bar-text);
	padding: 13px 0;
}

.rbm-ftr-bottom-inner {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 14px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
}

.rbm-ftr-copy {
	color: var(--rbm-ftr-bar-text);
}

.rbm-ftr-sep {
	opacity: 0.45;
	user-select: none;
}

.rbm-ftr-bottom-link {
	color: var(--rbm-ftr-bar-text);
	text-decoration: none;
	transition: color 0.2s ease;
}

.rbm-ftr-bottom-link:hover {
	color: #ffffff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ==========================================================================
   RESPONSYWNOŚĆ: TABLET (<= 1080px)
   ========================================================================== */
@media (max-width: 1080px) {
	.rbm-ftr-container {
		padding: 0 20px;
	}

	.rbm-ftr-grid {
		flex-wrap: wrap;
		row-gap: 24px;
	}

	.rbm-ftr-col--logo {
		flex: 0 0 auto;
		padding: 0 22px 18px 0;
		border-bottom: 1px solid var(--rbm-ftr-divider);
	}

	.rbm-ftr-col--brand {
		flex: 1 1 60%;
		padding: 0 0 18px 22px;
		border-bottom: 1px solid var(--rbm-ftr-divider);
	}

	.rbm-ftr-col--brand::before {
		top: 2px;
		bottom: 18px;
	}

	.rbm-ftr-col--links,
	.rbm-ftr-col--social {
		flex: 1 1 30%;
		padding: 4px 18px;
	}

	/* Usunięcie lewego separatora na początku drugiego wiersza */
	.rbm-ftr-col--brand + .rbm-ftr-col--links,
	.rbm-ftr-col--logo + .rbm-ftr-col--links {
		padding-left: 0;
	}

	.rbm-ftr-col--brand + .rbm-ftr-col--links::before,
	.rbm-ftr-col--logo + .rbm-ftr-col--links::before {
		display: none;
	}
}

/* ==========================================================================
   RESPONSYWNOŚĆ: MOBILE (<= 767px)
   ========================================================================== */
@media (max-width: 767px) {
	.rbm-ftr-container {
		padding: 0 16px;
	}

	.rbm-ftr-bg {
		background-position: right center;
	}

	.rbm-ftr-body {
		padding: 10px 0 30px;
	}

	.rbm-ftr-corner-ribbons {
		width: 185px;
		height: 95px;
		opacity: 0.78;
	}

	.rbm-ftr-grid {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px 16px;
	}

	.rbm-ftr-col,
	.rbm-ftr-col:first-child,
	.rbm-ftr-col:last-child {
		padding: 0;
		border-bottom: none;
	}

	.rbm-ftr-col + .rbm-ftr-col::before {
		display: none !important;
	}

	/* Logo i hasło wyśrodkowane na całą szerokość u góry */
	.rbm-ftr-col--logo {
		grid-column: 1 / -1;
		align-items: center;
		text-align: center;
		padding-bottom: 4px;
	}

	.rbm-ftr-logo img {
		max-height: 50px;
	}

	.rbm-ftr-col--brand {
		grid-column: 1 / -1;
		align-items: center;
		text-align: center;
		padding-bottom: 18px;
		border-bottom: 1px solid var(--rbm-ftr-divider);
	}

	/* Kolumny linków wygodnie obok siebie (2 kolumny) */
	.rbm-ftr-col--links {
		grid-column: span 1;
	}

	.rbm-ftr-col-title {
		font-size: 15px;
		margin-bottom: 9px !important;
	}

	.rbm-ftr-list {
		gap: 8px;
	}

	.rbm-ftr-list a {
		font-size: 14px;
		padding: 2px 0;
	}

	/* Kontakt i społeczność jako wyraźny pasek na dole */
	.rbm-ftr-col--social {
		grid-column: 1 / -1;
		padding-top: 16px;
		border-top: 1px solid var(--rbm-ftr-divider);
	}

	.rbm-ftr-socials {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 12px 18px;
	}

	.rbm-ftr-social-circle {
		width: 36px;
		height: 36px;
	}

	/* Dolny pasek prawny na telefonach */
	.rbm-ftr-bottom {
		padding: 15px 0;
	}

	.rbm-ftr-bottom-inner {
		justify-content: center;
		text-align: center;
		gap: 6px 10px;
		font-size: 12.5px;
	}

	.rbm-ftr-copy {
		width: 100%;
		margin-bottom: 2px;
	}

	/* Ukrycie pierwszej kreski po pełnoszerokościowym tekście copyright */
	.rbm-ftr-copy + .rbm-ftr-sep {
		display: none;
	}
}

/* Bardzo wąskie telefony (<= 380px): 1 kolumna dla maksymalnej czytelności */
@media (max-width: 380px) {
	.rbm-ftr-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}
}