/* Joomla 6 compatibility fixes for bposstyle — keep original look */

/* Desktop dropdowns only — do NOT target SlickNav clones (.slicknav_nav .parent > .nav-child) */
.navigation .nav > li > .nav-child,
#menu_bp_wl > .menu > li > .nav-child,
.header #menu_bp_wl > .menu > li > .nav-child {
	display: none !important;
	position: absolute !important;
	top: 100% !important;
	left: 0 !important;
	z-index: 1000 !important;
	min-width: 220px;
	float: none !important;
}

.navigation .nav > li:hover > .nav-child,
.navigation .nav > li:focus-within > .nav-child,
.navigation .nav > li.open > .nav-child,
#menu_bp_wl > .menu > li:hover > .nav-child,
#menu_bp_wl > .menu > li:focus-within > .nav-child,
#menu_bp_wl > .menu > li.open > .nav-child,
.header #menu_bp_wl > .menu > li:hover > .nav-child,
.header #menu_bp_wl > .menu > li:focus-within > .nav-child,
.header #menu_bp_wl > .menu > li.open > .nav-child {
	display: block !important;
}

/* Mobile SlickNav: allow accordion submenus to open */
.header #menu_bp_wl .slicknav_nav .nav-child,
.header #menu_bp_wl .slicknav_nav ul {
	position: static !important;
	float: none !important;
	min-width: 0 !important;
	top: auto !important;
	left: auto !important;
	background: transparent;
	border: none;
	padding: 0;
	margin: 0;
}

.header #menu_bp_wl .slicknav_nav .slicknav_collapsed > ul,
.header #menu_bp_wl .slicknav_nav .slicknav_collapsed > .nav-child {
	display: none !important;
}

.header #menu_bp_wl .slicknav_nav .slicknav_open > ul,
.header #menu_bp_wl .slicknav_nav .slicknav_open > .nav-child {
	display: block !important;
}

/* Mobile submenu look (override desktop white dropdown styles) */
.header #menu_bp_wl .slicknav_nav .parent > ul,
.header #menu_bp_wl .slicknav_nav .parent > .nav-child,
.header #menu_bp_wl .slicknav_nav .parent > ul > li {
	background: #424242 !important;
	border: none !important;
	border-radius: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.header #menu_bp_wl .slicknav_nav .parent > ul > li > a,
.header #menu_bp_wl .slicknav_nav .nav-child > li > a {
	background: #424242 !important;
	color: #fff !important;
	padding-left: 30px !important;
}

.header #menu_bp_wl .slicknav_nav .parent > ul > li > a:hover,
.header #menu_bp_wl .slicknav_nav .nav-child > li > a:hover {
	background: #555 !important;
	color: #fff !important;
}

/* Top-level items positioning for absolute dropdowns */
#menu_bp_wl .menu > li,
.header #menu_bp_wl .menu > li {
	position: relative;
}

/* Slideshow captions (module CSS for captions was J3-only) */
#slider_bp .camera_wrap .camera_caption {
	display: block;
	position: absolute;
}

#slider_bp .camera_wrap .camera_caption > div {
	display: block;
}

/* Hide Joomla 6 default menu assets if somehow loaded */
.mod-menu__toggle-sub,
.visually-hidden:not(:focus):not(:active) {
	/* keep accessibility helpers */
}

/* Prevent Joomla mod_menu CSS from forcing vertical layout */
#menu_bp_wl ul.menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* FB widget container */
#facebook_slider_widget {
	display: block !important;
}

/* J6 article intro images: figure.right/left instead of J3 pull-right/pull-left */
figure.right.item-image,
.com-content-article figure.right.item-image,
.item-page figure.right.item-image {
	float: right;
	margin: 0 0 18px 20px;
	padding: 0;
	max-width: 100%;
}

figure.left.item-image,
.com-content-article figure.left.item-image,
.item-page figure.left.item-image {
	float: left;
	margin: 0 20px 18px 0;
	padding: 0;
	max-width: 100%;
}

figure.item-image {
	display: block;
}

figure.item-image img {
	display: block;
}

.com-content-article.item-page::after,
.item-page::after {
	content: "";
	display: table;
	clear: both;
}

/* Mobile: keep SlickNav as sole nav */
@media (max-width: 800px) {
	html, body {
		max-width: 100%;
		overflow-x: hidden;
	}

	.wyrowanien_bp,
	#glowny_cbiornik_bp.container,
	.container {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box;
	}

	.header #menu_bp_wl .menu {
		display: none !important;
	}

	.header #menu_bp_wl .slicknav_menu {
		display: block !important;
		width: 100% !important;
	}

	#menu_naglowek .wyrowanien_bp {
		flex-wrap: wrap;
	}

	#gora .wyrowanien_bp,
	#gora {
		overflow-x: auto;
	}

	#facebook_slider_widget,
	#facebook_slider_widget iframe {
		display: none !important;
	}

	#slider_bp .camera_wrap .camera_caption {
		font-size: 0.8em;
	}

	#slider_bp .camera_wrap .camera_caption > div {
		margin-right: 10px !important;
		margin-left: 10px !important;
		padding: 12px !important;
		max-width: calc(100% - 20px);
	}
}

@media (max-width: 480px) {
	figure.right.item-image,
	figure.left.item-image,
	.com-content-article figure.right.item-image,
	.com-content-article figure.left.item-image {
		float: none;
		margin: 0 0 30px 0;
	}
}

@media (min-width: 801px) {
	.header #menu_bp_wl .slicknav_menu {
		display: none !important;
	}

	.header #menu_bp_wl .menu {
		display: flex !important;
		justify-content: space-between;
	}
}
