/*
 * Simple Menu (Additional menu) elm
 * Category Navigation elm
 */

.w-menu {
	--level-indent: 1.2em; /* offset to indicate separate levels */
	}
.w-menu .menu {
	margin: 0;
	}
	.w-menu ul,
	.w-menu li {
		list-style: none;
		margin: 0;
		}
	.w-menu li:last-child {
		margin: 0 !important;
		}
	.w-menu .sub-menu,
	.w-menu .children {
		padding-top: var(--sub-gap, 0);
		margin-inline-start: var(--level-indent);
		}
		.w-menu .sub-menu li,
		.w-menu .children li {
			margin-bottom: var(--sub-gap, 0);
			}
	.w-menu .sub-menu .current-menu-item > a,
	.w-menu .current-cat > a {
		font-weight: bold;
		color: inherit;
		}

/* Colors */
.w-menu.style_blocks.for_simple_menu[style*=--main-bg-color] .menu > li > a,
.w-menu.style_blocks.for_category_nav[style*=--main-bg-color] a {
	background: var(--main-bg-color);
	}
.w-menu.for_simple_menu[style*=--main-color] .menu > li > a:not(:hover),
.w-menu.for_category_nav[style*=--main-color] a:not(:hover) {
	color: var(--main-color);
	}
.w-menu.style_blocks.for_simple_menu[style*=--main-active-bg-color] .menu > li.expanded > a,
.w-menu.style_blocks.for_simple_menu[style*=--main-active-bg-color] .menu > li.is-active > a,
.w-menu.style_blocks.for_simple_menu[style*=--main-active-bg-color] .menu > li.current-menu-item > a,
.w-menu.style_blocks.for_category_nav[style*=--main-active-bg-color] li.current-cat > a {
	background: var(--main-active-bg-color);
	}
.w-menu.for_simple_menu[style*=--main-active-color] .menu > li.expanded > a,
.w-menu.for_simple_menu[style*=--main-active-color] .menu > li.is-active > a,
.w-menu.for_simple_menu[style*=--main-active-color] .menu > li.current-menu-item > a,
.w-menu.for_category_nav[style*=--main-active-color] li.current-cat > a {
	color: var(--main-active-color);
	}
.no-touch .w-menu.style_blocks.for_simple_menu[style*=--main-hover-bg-color] .menu > li:not(.current-menu-item) > a:hover,
.no-touch .w-menu.style_blocks.for_category_nav[style*=--main-hover-bg-color] a:hover {
	background: var(--main-hover-bg-color);
	}
.no-touch .w-menu.for_simple_menu[style*=--main-hover-color] .menu > li:not(.current-menu-item) > a:hover,
.no-touch .w-menu.for_category_nav[style*=--main-hover-color] a:hover {
	color: var(--main-hover-color);
	}

/* LAYOUT: vertical */
.w-menu.layout_ver,
.w-menu.for_category_nav {
	line-height: 1.25;
	}
	.w-menu.layout_ver .menu > li,
	.w-menu.for_category_nav li {
		margin-bottom: var(--main-gap, 0);
		}
		.w-menu.for_category_nav li ul {
			margin-top: var(--main-gap, 0);
			}

/* LAYOUT: horizontal */
.w-menu.layout_hor .menu {
	display: inline-flex;
	flex-wrap: wrap;
	}
	.w-menu.layout_hor .menu > li:not(:last-of-type) {
		margin-inline-end: var(--main-gap, 0);
		}
.w-menu.layout_hor.not_responsive .menu {
	flex-wrap: nowrap;
	white-space: nowrap;
	overflow-x: auto;
	overflow-y: hidden;
	max-width: 100%;
	}
	.w-menu.layout_hor.with_children .menu > .menu-item-has-children > a {
		font-weight: bold;
		}
	.w-menu.layout_hor .menu > li > .sub-menu {
		margin: 1em 0 0;
		}

/* SPREAD */
.w-menu.layout_hor.spread {
	width: 100%;
	margin: 0;
	}
	.w-menu.layout_hor.spread .menu {
		justify-content: space-between;
		width: 100%;
		}
		.w-menu.layout_hor.spread.with_children .menu > .menu-item-has-children {
			flex: 1 1 100px;
			}

/* STYLE: Blocks */
.w-menu.style_blocks .menu > li > a,
.w-menu.style_blocks.for_category_nav a {
	display: block;
	padding: var(--main-ver-indent, 0) var(--main-hor-indent, 0);
	text-decoration: none !important;
	}
.w-menu.style_blocks.for_category_nav a {
	border-radius: var(--site-border-radius, 0);
	}
.w-menu.style_blocks .sub-menu {
	margin-inline-start: 0;
	padding: var(--main-ver-indent, 0) var(--main-hor-indent, 0);
	}

/* Fallback for menu in header */
.header_hor .l-header .w-menu {
	line-height: 2;
	}
.header_ver .l-header .w-menu {
	line-height: 1;
	}
.header_ver .l-header .w-menu .menu {
	display: block;
	}

/* Accordion Type */
.w-menu.type_accordion {
	width: 100%;
	}
	.w-menu.type_accordion .sub-menu,
	.w-menu.type_accordion .children {
		display: none;
		visibility: hidden; /* required to disable tab navigation without JS */
		}
	.w-menu.type_accordion .current_page_ancestor > .sub-menu,
	.w-menu.type_accordion .menu-item-has-children.expanded > .sub-menu,
	.w-menu.type_accordion .current_cat_ancestor > .children,
	.w-menu.type_accordion .cat-item.expanded > .children {
		display: block;
		visibility: visible;
		}
	.w-menu.type_accordion .menu-item-has-children > a,
	.w-menu.type_accordion .cat-item > a {
		display: flex !important;
		align-items: center;
		}
		.w-menu.type_accordion b {
			display: none;
			font-weight: inherit;
			width: var(--level-indent);
			transition: transform .3s;
			}
		.w-menu.type_accordion .menu-item-has-children > a > b,
		.w-menu.type_accordion .cat-item:has(>.children) > a > b {
			display: block;
			}
			.w-menu.type_accordion b::before {
				display: inline-block;
				vertical-align: top;
				font-family: fontawesome;
				transition: transform .3s;
				}
			.w-menu.type_accordion .menu-item-has-children.expanded > a > b::before,
			.w-menu.type_accordion .cat-item.expanded > a > b::before {
				transform: rotate(180deg);
				}
			.w-menu.type_accordion.icontype_chevron b::before {
				content: '\f107';
				font-weight: 400;
				}
			.w-menu.type_accordion.icontype_plus b::before {
				content: '\f067';
				font-weight: 400;
				}
			.w-menu.type_accordion.icontype_triangle b::before {
				content: '\f0d7';
				font-weight: 700;
				}
		.w-menu.type_accordion.iconpos_before b {
			order: -1;
			}
		.w-menu.type_accordion.iconpos_after b {
			text-align: end;
			margin-inline-start: auto;
			}
		.w-menu.type_accordion.iconpos_after .menu-item > a > span,
		.w-menu.type_accordion.iconpos_after:not(.show_count) .cat-item > a > span,
		.w-menu.type_accordion.iconpos_after.show_count .cat-item > a > c {
			margin-inline-end: .4em;
			}

/* For Category Navigation */
.w-menu.for_category_nav a > c {
	font-weight: normal;
	margin-inline-start: .4em;
	opacity: .5;
	}
.w-menu.for_category_nav .main-parent {
	margin-bottom: var(--main-gap, 0);
	}
	.w-menu.for_category_nav .main-parent > a::before {
		content: '\f104';
		font-family: fontawesome;
		font-weight: 400;
		display: inline-block;
		vertical-align: top;
		width: var(--level-indent);
		}
	body.rtl .w-menu.for_category_nav .main-parent > a::before {
		display: inline-block;
		content: '\f105';
		}
.w-menu.for_category_nav .main-parent + ul {
	margin-inline-start: var(--level-indent);
	}
