/* Main navigation — separators + larger hit areas */

.menu_header {
	font-family: "Nunito", "ProximaNova", sans-serif;
	background: #fff;
	box-shadow: 0 2px 10px rgba(28, 36, 24, 0.06);
	border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.menu_header .wr {
	max-width: 1223px;
}

.menu_header .wr > ul.menu {
	display: flex;
	align-items: stretch;
	justify-content: center;
	flex-wrap: nowrap;
	width: 100%;
	max-width: 100%;
	height: auto;
	min-height: 52px;
	margin: 0;
	padding: 0;
	gap: 0;
	list-style: none;
	position: relative;
}

.menu_header .wr > ul.menu > li {
	display: flex;
	align-items: center;
	position: relative;
	flex: 1 1 auto;
	justify-content: center;
	margin: 0;
	padding: 0;
}

/* Mega-menu: dropdown spans full nav, not the narrow parent item */
.menu_header .wr > ul.menu > li.menu-item-has-children {
	position: static;
}

/* Vertical separators between items (on the link — parent may be position:static) */
.menu_header .wr > ul.menu > li:not(:last-child) > a {
	box-shadow: inset -1px 0 0 #d8ddd4;
}

.menu_header .wr > ul.menu > li:not(:last-child)::after {
	display: none;
}

.menu_header .wr > ul.menu > li > a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	box-sizing: border-box;
	min-height: 52px;
	padding: 12px 10px 14px;
	font-family: "Nunito", "ProximaNova", sans-serif !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	color: #2a3228 !important;
	position: relative;
	transition: color 0.2s ease, background-color 0.2s ease;
	white-space: normal;
}

.menu_header .wr > ul.menu > li > a:hover,
.menu_header .wr > ul.menu > li:hover > a {
	color: #319030 !important;
	background: rgba(49, 144, 48, 0.05);
}

/* Active / current underline */
.menu_header .wr > ul.menu > li.current-menu-item > a,
.menu_header .wr > ul.menu > li.current-menu-parent > a,
.menu_header .wr > ul.menu > li.current-menu-ancestor > a,
.menu_header .wr > ul.menu > li.current_page_item > a {
	color: #319030 !important;
}

.menu_header .wr > ul.menu > li.current-menu-item > a::before,
.menu_header .wr > ul.menu > li.current-menu-parent > a::before,
.menu_header .wr > ul.menu > li.current-menu-ancestor > a::before,
.menu_header .wr > ul.menu > li.current_page_item > a::before {
	content: "";
	display: block;
	width: calc(100% - 16px);
	max-width: 100%;
	height: 3px;
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	border-radius: 3px 3px 0 0;
	background: #319030;
}

/* Dropdown caret — keep clear of label */
.menu_header .wr > ul.menu > li.menu-item-has-children > a {
	padding-right: 18px;
}

.menu_header .wr > ul.menu > li.menu-item-has-children > a::after {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	position: absolute;
	right: 6px;
	top: 50%;
	margin-top: -2px;
	background: url(../i/arrow.svg) 0 0 no-repeat;
	opacity: 0.55;
	transform: none;
}

.menu_header .wr > ul.menu > li.menu-item-has-children:hover > a::after {
	opacity: 1;
}

/* Submenu — full-width panel under the whole menu bar */
.menu_header .wr > ul.menu > li .sub-menu {
	left: 0;
	right: 0;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin-top: 0;
	padding: 32px 0 36px;
	border-radius: 0 0 10px 10px;
	z-index: 200;
	overflow: hidden;
}

.menu_header .wr > ul.menu > li .sub-menu > .wr {
	max-width: 1223px;
	margin: 0 auto;
	box-sizing: border-box;
}

.menu_header .wr > ul.menu > li .sub-menu .sub_menu_box {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 4px 32px;
	max-width: 100% !important;
	width: 100%;
	flex-wrap: unset;
	align-items: start;
}

.menu_header .wr > ul.menu > li .sub-menu .sub_menu_box > li {
	width: auto !important;
	max-width: 100%;
	float: none;
	position: relative;
	display: block;
	padding: 4px 0;
	margin: 0;
	min-width: 0;
}

.menu_header .wr > ul.menu > li .sub-menu .sub_menu_box li a {
	font-family: "Nunito", "ProximaNova", sans-serif !important;
	font-size: 15px !important;
	line-height: 1.4 !important;
	font-weight: 700 !important;
	padding: 6px 10px;
	border-radius: 6px;
	display: block;
	position: relative;
	white-space: normal;
	overflow-wrap: anywhere;
	box-sizing: border-box;
}

.menu_header .wr > ul.menu > li .sub-menu .sub_menu_box li a span,
.menu_header .wr > ul.menu > li .sub-menu .sub_menu_box li a span.sub {
	position: static !important;
	display: block;
	margin-top: 2px;
	line-height: 1.35;
}

.menu_header .wr > ul.menu > li .sub-menu .sub_menu_box li a:hover {
	background: rgba(49, 144, 48, 0.06);
}

/* Short dropdowns (e.g. «О компании») — compact list, not a 3-col grid */
.menu_header .wr > ul.menu > li.menu-item-200 .sub-menu {
	left: auto;
	right: auto;
	width: max-content;
	min-width: 220px;
	max-width: min(360px, 90vw);
	padding: 12px 0;
	border-radius: 10px;
	overflow: visible;
}

.menu_header .wr > ul.menu > li.menu-item-200 {
	position: relative;
}

.menu_header .wr > ul.menu > li.menu-item-200 .sub-menu .sub_menu_box {
	display: flex !important;
	flex-direction: column;
	gap: 0;
	grid-template-columns: none;
}

.menu_header .wr > ul.menu > li.menu-item-200 .sub-menu .sub_menu_box > li {
	padding: 0;
}

.menu_header .wr > ul.menu > li.menu-item-200 .sub-menu .sub_menu_box li a {
	padding: 10px 18px;
}

/* Contacts — slightly stronger CTA feel */
.menu_header .wr > ul.menu > li a[href*="kontakty"] {
	color: #1f2a1c;
}

/* Wider desktop: a bit more air */
@media screen and (min-width: 1200px) {
	.menu_header .wr > ul.menu > li > a {
		font-size: 14px !important;
		padding-left: 12px;
		padding-right: 12px;
	}

	.menu_header .wr > ul.menu > li.menu-item-has-children > a {
		padding-right: 20px;
	}
}

/* Compact desktop / large tablet */
@media screen and (max-width: 1100px) and (min-width: 1001px) {
	.menu_header .wr > ul.menu > li > a {
		font-size: 11px !important;
		padding-left: 6px;
		padding-right: 6px;
		letter-spacing: 0.01em;
	}

	.menu_header .wr > ul.menu > li:not(:last-child)::after {
		height: 14px;
	}
}

/* Mobile open menu */
.menu_header.open {
	font-family: "Nunito", "ProximaNova", sans-serif;
}

.menu_header.open > .wr > ul.menu {
	display: block;
	height: auto;
}

.menu_header.open > .wr > ul.menu > li {
	display: block;
	padding: 0;
	border-top: 1px solid #e8e8e8;
	flex: none;
	justify-content: flex-start;
}

.menu_header.open > .wr > ul.menu > li:not(:last-child)::after {
	display: none;
}

.menu_header.open > .wr > ul.menu > li:not(:last-child) > a {
	box-shadow: none;
}

.menu_header.open > .wr > ul.menu > li.menu-item-has-children,
.menu_header.open > .wr > ul.menu > li.menu-item-200 {
	position: relative;
}

.menu_header.open > .wr > ul.menu > li .sub-menu {
	position: static !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	box-shadow: none;
	padding: 12px 0 0;
	border-radius: 0;
	overflow: visible;
}

.menu_header.open > .wr > ul.menu > li .sub-menu .sub_menu_box {
	display: block !important;
	grid-template-columns: none;
}

.menu_header.open > .wr > ul.menu > li > a {
	display: block;
	width: auto;
	min-height: 0;
	padding: 16px 30px;
	font-size: 17px !important;
	text-align: left;
	text-transform: none;
	letter-spacing: 0;
	line-height: 1.35 !important;
	background: transparent !important;
}

.menu_header.open > .wr > ul.menu > li.current-menu-item > a::before,
.menu_header.open > .wr > ul.menu > li.current-menu-parent > a::before,
.menu_header.open > .wr > ul.menu > li.current-menu-ancestor > a::before,
.menu_header.open > .wr > ul.menu > li.current_page_item > a::before {
	display: none;
}

.menu_header.open > .wr > ul.menu > li.current-menu-item > a,
.menu_header.open > .wr > ul.menu > li.current-menu-parent > a,
.menu_header.open > .wr > ul.menu > li.current_page_item > a {
	color: #319030 !important;
	background: rgba(49, 144, 48, 0.06) !important;
}

.menu_header.open > .wr > ul.menu > li.menu-item-has-children > a {
	padding-right: 48px;
}

.menu_header.open > .wr > ul.menu > li.menu-item-has-children > a::after {
	right: 28px;
	top: 22px;
	margin-top: 0;
	width: 8px;
	height: 5px;
	background: url(../i/carret.svg) 0 0 no-repeat;
	opacity: 1;
}
