/* =============================================
   Menu mobile — drawer z lewej strony
   Zastępuje jQuery MultiLevelPushMenu
   ============================================= */

/* Przycisk hamburger */
#mobile_menu_btn {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	margin-left: auto;
	color: #333;
	flex-shrink: 0;
}

@media (max-width: 767.98px) {
	#mobile_menu_btn {
		display: flex;
		flex-direction: column;
	}
}

#mobile_menu_btn .icon-bar {
	display: block;
	width: 22px;
	height: 2px;
	background: currentColor;
	transition: transform 0.25s ease, opacity 0.2s ease;
}

#mobile_menu_btn .icon-bar + .icon-bar {
	margin-top: 5px;
}

/* Stan otwarty — animacja X */
#mobile_menu_btn[aria-expanded="true"] .bar1 { transform: translateY(7px) rotate(45deg); }
#mobile_menu_btn[aria-expanded="true"] .bar2 { opacity: 0; transform: scaleX(0); }
#mobile_menu_btn[aria-expanded="true"] .bar3 { transform: translateY(-7px) rotate(-45deg); }

/* Overlay (przyciemnienie tła) */
#mobile_menu_overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 1040;
	opacity: 0;
	transition: opacity 0.3s ease;
}

#mobile_menu_overlay.is-visible {
	display: block;
}

#mobile_menu_overlay.is-open {
	opacity: 1;
}

/* Drawer (panel boczny) */
#mobile_menu_drawer {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: min(320px, 88vw);
	background: #fff;
	z-index: 1050;
	overflow-y: auto;
	transform: translateX(-100%);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
	box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

#mobile_menu_drawer.is-open {
	transform: translateX(0);
}

/* Nagłówek drawera */
.mm-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-bottom: 1px solid #eee;
	min-height: 56px;
	flex-shrink: 0;
}

.mm-header a img {
	height: 32px;
	width: auto;
}

.mm-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: none;
	border: none;
	cursor: pointer;
	color: #555;
	border-radius: 4px;
	padding: 0;
	font-size: 1.2rem;
	line-height: 1;
}

.mm-close:hover {
	background: #f0f0f0;
	color: #111;
}

/* Lista nawigacyjna */
.mm-nav {
	list-style: none;
	margin: 0;
	padding: 8px 0;
	flex: 1;
}

.mm-nav li {
	margin: 0;
}

/* Elementy pierwszego poziomu */
.mm-item {
	display: flex;
	align-items: stretch;
}

.mm-item > a {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 13px 16px;
	color: #222;
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.3;
	border-left: 3px solid transparent;
	transition: background 0.15s, border-color 0.15s;
}

.mm-item > a:hover,
.mm-item > a:focus {
	background: #f5f8fc;
	border-left-color: #007bff;
	color: #007bff;
	text-decoration: none;
}

.mm-item > a i.fa,
.mm-item > a i.fas,
.mm-item > a i.far {
	width: 18px;
	text-align: center;
	color: #6c757d;
	flex-shrink: 0;
}

/* Przycisk rozwijania subpozycji */
.mm-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	flex-shrink: 0;
	background: none;
	border: none;
	border-left: 1px solid #eee;
	cursor: pointer;
	color: #6c757d;
	font-size: 0.8rem;
	transition: background 0.15s, color 0.15s, transform 0.25s ease;
}

.mm-toggle:hover {
	background: #f0f4f8;
	color: #333;
}

.mm-toggle[aria-expanded="true"] {
	color: #007bff;
}

.mm-toggle[aria-expanded="true"] .mm-chevron {
	transform: rotate(180deg);
}

.mm-chevron {
	display: inline-block;
	transition: transform 0.25s ease;
}

/* Podmenu poziom 2 */
.mm-sub {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	max-height: 0;
	transition: max-height 0.3s ease;
	background: #f8f9fa;
}

.mm-sub.is-open {
	/* max-height ustawiane przez JS na podstawie scrollHeight */
}

.mm-sub li {
	margin: 0;
}

.mm-sub-item {
	display: flex;
	align-items: stretch;
}

.mm-sub-item > a {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 11px 16px 11px 36px;
	color: #444;
	text-decoration: none;
	font-size: 0.875rem;
	line-height: 1.3;
	border-left: 3px solid transparent;
	transition: background 0.15s, border-color 0.15s;
}

.mm-sub-item > a::before {
	content: '–';
	color: #aaa;
	flex-shrink: 0;
}

.mm-sub-item > a:hover,
.mm-sub-item > a:focus {
	background: #e9eef5;
	border-left-color: #007bff;
	color: #007bff;
	text-decoration: none;
}

/* Przycisk rozwijania podmenu poziomu 2 */
.mm-sub-item > .mm-toggle {
	border-left: 1px solid #dde0e5;
}

/* Podmenu poziom 3 */
.mm-subsub {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	max-height: 0;
	transition: max-height 0.3s ease;
	background: #eef1f5;
}

.mm-subsub li a {
	display: block;
	padding: 9px 16px 9px 52px;
	color: #555;
	text-decoration: none;
	font-size: 0.84rem;
	line-height: 1.3;
	border-left: 3px solid transparent;
	transition: background 0.15s, border-color 0.15s;
}

.mm-subsub li a::before {
	content: '·';
	margin-right: 6px;
	color: #bbb;
}

.mm-subsub li a:hover,
.mm-subsub li a:focus {
	background: #dfe5ed;
	border-left-color: #007bff;
	color: #007bff;
	text-decoration: none;
}

/* Separator przed Realizacje/Wiedza/Kontakt */
.mm-nav > li.mm-separator {
	height: 1px;
	background: #eee;
	margin: 8px 16px;
	pointer-events: none;
}

/* Blokowanie scrolla body kiedy menu otwarte */
body.mm-open {
	overflow: hidden;
}
