/* Arkebuz – Nawigacja mobilna. Pasek od progu, przy którym Astra przełącza nagłówek na mobilny (921px). */

:root {
	--ark-mnav-h: 62px;
}

.ark-mnav {
	display: none;
}

/* ---------- Dolny pasek ---------- */

@media ( max-width: 921px ) {
	.ark-mnav {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 9990;
		display: block;
		padding-bottom: env( safe-area-inset-bottom );
		border-top: 1px solid #e8e8e8;
		background: rgba( 255, 255, 255, 0.96 );
		box-shadow: 0 -4px 18px rgba( 0, 0, 0, 0.06 );
		-webkit-backdrop-filter: blur( 12px );
		backdrop-filter: blur( 12px );
		transition: transform 0.3s ease;
	}

	.ark-mnav[data-hidden="1"] {
		transform: translateY( 110% );
	}

	/* Stopka sięga pod pasek – nic nie zostaje zasłonięte, a tło stopki wypełnia miejsce za nim. */
	.site-footer {
		padding-bottom: calc( var( --ark-mnav-h ) + env( safe-area-inset-bottom ) );
	}
}

.ark-mnav .ark-mnav__list {
	display: flex;
	max-width: 560px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.ark-mnav .ark-mnav__item {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.ark-mnav .ark-mnav__link {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	height: var( --ark-mnav-h );
	padding: 6px 2px 4px;
	color: #555555;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
	transition: color 0.2s ease;
}

.ark-mnav .ark-mnav__link:hover,
.ark-mnav .ark-mnav__link:focus {
	color: #dd133c;
}

.ark-mnav .ark-mnav__link:focus {
	outline: none;
}

.ark-mnav .ark-mnav__link:focus-visible {
	outline: 2px solid #dd133c;
	outline-offset: -4px;
	border-radius: 8px;
}

/* Aktywna pozycja: czerwona belka u góry, kolor i pogrubienie. */
.ark-mnav .ark-mnav__link.is-active {
	color: #dd133c;
	font-weight: 700;
}

.ark-mnav .ark-mnav__link.is-active::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 50%;
	width: 34px;
	height: 3px;
	margin-left: -17px;
	border-radius: 0 0 3px 3px;
	background: #dd133c;
}

.ark-mnav .ark-mnav__icon {
	width: 24px;
	height: 24px;
	flex: 0 0 auto;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ark-mnav .ark-mnav__label {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------- Przycisk „do góry” ---------- */

/* Pełny reset – motyw nadaje każdemu <button> padding, obramowanie i wielkie litery. */
html .ark-totop {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 9991;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #dd133c;
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.25 );
	color: #ffffff;
	font-size: 0;
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY( 12px ) scale( 0.9 );
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s, background-color 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

html .ark-totop[data-show="1"] {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s, background-color 0.2s ease;
}

html .ark-totop:hover,
html .ark-totop:focus {
	background: #b80023;
	color: #ffffff;
}

html .ark-totop:focus {
	outline: none;
}

html .ark-totop:focus-visible {
	outline: 2px solid #dd133c;
	outline-offset: 3px;
}

.ark-totop svg {
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.1;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Na telefonie przycisk staje w miejscu schowanego paska, w prawym dolnym rogu. */
@media ( max-width: 921px ) {
	html .ark-totop {
		right: 14px;
		bottom: calc( 14px + env( safe-area-inset-bottom ) );
	}
}

/* ---------- Ciemny motyw (wtyczka Arkebuz – Jasny i ciemny motyw) ---------- */

@media ( max-width: 921px ) {
	html[data-ark-theme="dark"] .ark-mnav {
		border-top-color: #2a2a2a;
		background: rgba( 28, 28, 28, 0.96 );
		box-shadow: 0 -4px 18px rgba( 0, 0, 0, 0.45 );
	}
}

html[data-ark-theme="dark"] .ark-mnav .ark-mnav__link {
	color: #a6a6a6;
}

html[data-ark-theme="dark"] .ark-mnav .ark-mnav__link:hover,
html[data-ark-theme="dark"] .ark-mnav .ark-mnav__link:focus,
html[data-ark-theme="dark"] .ark-mnav .ark-mnav__link.is-active {
	color: #ff8fa6;
}

html[data-ark-theme="dark"] .ark-mnav .ark-mnav__link.is-active::before {
	background: #ff8fa6;
}

html[data-ark-theme="dark"] .ark-mnav .ark-mnav__link:focus-visible {
	outline-color: #ff8fa6;
}

html[data-ark-theme="dark"] .ark-totop {
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.6 );
}

/* ---------- Ruch, druk ---------- */

@media ( prefers-reduced-motion: reduce ) {
	.ark-mnav,
	html .ark-totop {
		transition: none;
	}
}

@media print {
	.ark-mnav,
	.ark-totop {
		display: none !important;
	}
}
