/* Header "Направления" mega menu. Works without JS (hover / focus), with JS it adds hover-intent, keyboard and touch support. */
@media only screen and (min-width: 1001px) {
	#header .main_menu li.ways { position: static; }
	#header .main_menu li.ways > a.mm-toggle { position: relative; padding-right: 17px; cursor: pointer; pointer-events: auto; }
	#header .main_menu li.ways > a.mm-toggle:after {
		content: ""; position: absolute; right: 1px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
		border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; opacity: .55;
		transform: rotate(45deg); transition: transform .2s ease, opacity .2s ease;
	}
	#header .main_menu li.ways.open > a.mm-toggle { color: #2f7ece; }
	#header .main_menu li.ways.open > a.mm-toggle:after { transform: translateY(5px) rotate(-135deg); opacity: 1; }

	/* the panel; its top padding is an invisible bridge so the pointer can travel from the link to the panel */
	#header .main_menu .mm-panel {
		display: none; position: absolute; z-index: 960; top: var(--mm-top, 100%); left: var(--mm-left, -185px); width: var(--mm-w, 1000px);
		padding-top: 16px; pointer-events: auto; box-sizing: border-box;
	}
	html:not(.mm-js) #header .main_menu li.ways:hover > .mm-panel,
	html:not(.mm-js) #header .main_menu li.ways:focus-within > .mm-panel,
	#header .main_menu li.ways.open > .mm-panel { display: block; animation: mm-in .16s ease-out; }
	@keyframes mm-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

	#header .main_menu .mm-inner {
		display: grid; grid-template-columns: 236px minmax(0, 1fr); background: #fff; border: 1px solid #e3eaf4; border-radius: 20px;
		box-shadow: 0 26px 64px rgba(25, 45, 85, .20), 0 2px 6px rgba(25, 45, 85, .06); overflow: hidden; text-align: left; font-family: inherit;
	}
	#header .main_menu .mm-side { background: linear-gradient(180deg, #f3f8ff, #eaf2fc); padding: 26px 22px 22px; }
	#header .main_menu .mm-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 26px 30px; padding: 26px 30px 28px; align-content: start; }
	#header .main_menu .mm-title { margin: 0 0 10px; font-size: 11px; line-height: 1.2; letter-spacing: .9px; text-transform: uppercase; color: #8a97a8; font-weight: 700; }
	#header .main_menu .mm-panel a.mm-link {
		display: block; margin: 0; padding: 5px 0; font-size: 14px; line-height: 1.35; font-weight: 500; color: #2a3a52; text-decoration: none; transition: color .12s ease, transform .12s ease;
	}
	#header .main_menu .mm-panel a.mm-link:hover, #header .main_menu .mm-panel a.mm-link:focus-visible { color: #2f7ece; transform: translateX(2px); outline: none; }
	#header .main_menu .mm-panel a.mm-hot { font-weight: 700; color: #1f4f96; }
	#header .main_menu .mm-panel a.mm-fmt { margin: 0 -10px; padding: 8px 10px; border-radius: 10px; font-weight: 600; }
	#header .main_menu .mm-panel a.mm-fmt:hover, #header .main_menu .mm-panel a.mm-fmt:focus-visible { background: #fff; box-shadow: 0 2px 8px rgba(30, 60, 110, .08); transform: none; }
	#header .main_menu .mm-panel a.mm-all { display: block; margin-top: 16px; padding: 10px 0 0; border-top: 1px solid #d9e5f3; font-size: 13.5px; font-weight: 700; color: #2f7ece; text-decoration: none; }
	#header .main_menu .mm-panel a.mm-all:hover { text-decoration: underline; }
	#header.fixing .main_menu .mm-panel { padding-top: 12px; }
}
@media only screen and (max-width: 1000px) {
	#header .main_menu .mm-panel { display: none !important; }
	#header .main_menu li.ways > a.mm-toggle:after { display: none; }
}
@media (prefers-reduced-motion: reduce) { #header .main_menu .mm-panel { animation: none !important; } #header .main_menu li.ways > a.mm-toggle:after, #header .main_menu .mm-panel a.mm-link { transition: none; } }
