
nav.nav *,
.menu-layer *,
.mobile-drawer * { box-sizing: border-box; }

nav.nav .nav-link,
.menu-layer .category { font-family: inherit; }

nav.nav .nav-link,
.menu-layer .links a,
.menu-layer .menu-foot a,
.mobile-drawer a { text-decoration: none; }

nav.nav button,
.menu-layer button { cursor: pointer; }

/* ------------------------------------------------------------------ */
/* Десктоп                                                             */
/* ------------------------------------------------------------------ */

nav.nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
nav.nav .nav-link { border: 0; background: none; display: flex; align-items: center; gap: 8px; padding: 15px 13px; color: #203747; font-weight: 700; font-size: 14px; border-radius: 7px; }
nav.nav .nav-link:hover,
nav.nav .nav-link:focus-visible { background: #edf6fa; color: #08678f; }
nav.nav .nav-link.is-active { color: #096c95; background: #e8f5fa; }
nav.nav .chevron { font-size: 12px; display: inline-block; transition: transform .2s; }
nav.nav .nav-link.is-active .chevron { transform: rotate(180deg); }

.menu-layer { display: none; position: absolute; top: 125px; left: 0; right: 0; z-index: 30; background: white; border-top: 1px solid var(--line, #e7e9ec);  }
.menu-layer.open { display: block; }
.menu-layer .wrap { max-width: 1320px; margin: auto; padding: 0 28px; }
.menu-layer .mega { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 480px; max-height: min(75vh, 690px); overflow: hidden; }
.menu-layer .mega-sidebar { padding: 25px 15px 25px 0; border-right: 1px solid var(--line, #e7e9ec); background: #f7fafb; }
.menu-layer .sidebar-label { font-size: 11px; letter-spacing: 1.4px; font-weight: 800; color: #77909d; text-transform: uppercase; margin: 4px 12px 15px; }
.menu-layer .category { width: 100%; text-align: left; background: none; border: 0; padding: 15px 16px; margin: 3px 0; display: flex; justify-content: space-between; align-items: center; border-radius: 7px; font-weight: 700; font-size: 14px; line-height: 1.4; color: #354e60; }
.menu-layer .category .arr { color: #9bb0ba; }
.menu-layer .category:hover { background: #e9f2f6; }
.menu-layer .category.active { background: #e1f2f9; color: #0877a4; }
.menu-layer .category.active .arr { color: #0877a4; }
.menu-layer .mega-content { padding: 26px 30px 32px; overflow: auto;     max-height: min(75vh, 690px);}
.menu-layer .panel { display: none; }
.menu-layer .panel.active { display: block; }
.menu-layer .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; padding-bottom: 19px; border-bottom: 1px solid var(--line, #e7e9ec); }
.menu-layer .panel h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.5px; }
.menu-layer .panel-desc { margin: 6px 0 0; color: #728591; font-size: 13px; }
.menu-layer .group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 27px 30px; }
.menu-layer .service-group { min-width: 0; }
.menu-layer .service-group h3{ font-size: 16px; font-weight: 700; line-height: 1.3; margin: 0 0 12px; color: #17374c; display: flex; align-items: center; gap: 8px; }
.menu-layer .service-group h3 a{ font-size: 16px; font-weight: 700; line-height: 1.3; color: #17374c; display: flex; align-items: center; gap: 8px; }
.menu-layer .service-group h3::before { content: ''; width: 4px; height: 19px; background: #21a1c7; border-radius: 3px; flex-shrink: 0; }
.menu-layer .group-link:hover { color: #1677a8; }
.menu-layer .links { margin: 0; padding: 0; list-style: none; }
.menu-layer .links li { margin: 0; }
.menu-layer .links a,
.menu-layer .links .unlinked { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; line-height: 1.45; color: #3a5364; padding: 7px 0; border-bottom: 1px solid #eef3f5; }
.menu-layer .links a:hover { color: #0c80ae; }
.menu-layer .links a::before,
.menu-layer .links .unlinked::before { content: '›'; font-size: 17px; color: #8ba9b6; line-height: 15px; }
.menu-layer .links .unlinked { color: #647c88; }
.menu-layer .pending { font-size: 10px; line-height: 1.3; white-space: nowrap; color: #8a6a1c; background: #fff5db; padding: 3px 6px; border-radius: 3px; margin-top: 0; }
.menu-layer .link-title { flex: 0 1 auto; }
.menu-layer .menu-foot { margin-top: 25px; padding: 16px 18px; background: #f0f7fa; border-radius: 7px; color: #537385; font-size: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.menu-layer .menu-foot a { color: #096d96; font-weight: 700; }

#overlay { display: none; position: fixed; inset: 125px 0 0; background: #0b263852; z-index: 10; }
#overlay.open { display: block; }

.mobile-drawer { display: none !important; }

@media (max-width: 1150px) {
	nav.nav .nav-link { padding: 13px 9px; }
	.menu-layer .mega { grid-template-columns: 220px minmax(0, 1fr); }
	.menu-layer .mega-content { padding: 22px 20px 28px; }
	.menu-layer .group-grid { gap: 22px 20px; }
}

/* ------------------------------------------------------------------ */
/* Мобильный drawer по макету (как у шапки eskiz: ≤1200px)             */
/* ------------------------------------------------------------------ */

@media (max-width: 1200px) {
	nav.nav { display: none; }
	.menu-layer { display: none !important; }
	#overlay { display: none !important; }

	.mega-main-menu {
		position: static;
		width: 0;
		height: 0;
		margin: 0;
		padding: 0;
		overflow: visible;
		flex: 0 0 0;
	}

	/* Как на preview: absolute под header (у header — position:relative). */
	.mobile-drawer {
		display: none !important;
		position: absolute;
		top:0;
		left: 0;
		right: 0;
		z-index: 200;
		background: #fff;
		border-top: 1px solid var(--line, #e7e9ec);
		max-height: calc(100vh - 110px);
		overflow: auto;
		-webkit-overflow-scrolling: touch;
		padding: 14px 22px 26px;
	}
	.mobile-drawer.open,
	body.mega-menu-open .mobile-drawer {
		display: block !important;
		position: relative;
	}

	.mobile-drawer details { border-bottom: 1px solid #e7eef2; }
	.mobile-drawer summary {
		cursor: pointer;
		list-style: none;
		padding: 16px 2px;
		font-weight: 700;
		font-size: 15px;
		color: #252930;
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 10px;
	}
	.mobile-drawer summary::-webkit-details-marker { display: none; }
	.mobile-drawer summary::after {
		content: '+';
		flex: 0 0 auto;
		font-size: 20px;
		line-height: 1;
		font-weight: 400;
		color: #e1a316;
	}
	.mobile-drawer details[open] > summary::after { content: '−'; }
	.mobile-drawer summary a { display: inline; padding: 0; font: inherit; color: inherit; }

	.mobile-drawer .inner { padding: 0 0 12px 15px; }
	.mobile-drawer .inner details { border: 0; }
	.mobile-drawer .inner summary {
		font-size: 14px;
		font-weight: 400;
		color: #333;
		padding: 11px 0;
	}
	.mobile-drawer .inner summary::after { font-size: 18px; }

	.mobile-drawer a,
	.mobile-drawer .unlinked {
		display: block;
		font-size: 13px;
		font-weight: 400;
		padding: 9px 8px;
		color: #365467;
		line-height: 1.45;
		text-decoration: none;
	}
	.mobile-drawer > a,
	.mobile-drawer > .unlinked {
		font-size: 15px;
		font-weight: 700;
		padding: 16px 2px;
		color: #252930;
		border-bottom: 1px solid #e7eef2;
	}
	.mobile-drawer .pending {
		display: inline-block;
		margin-left: 5px;
		font-size: 10px;
		line-height: 1.3;
		white-space: nowrap;
		color: #906513;
		background: #fff3d7;
		padding: 3px 6px;
		border-radius: 3px;
	}
}

@media (max-width: 460px) {
	.mobile-drawer { padding: 12px 16px 22px; }
}

/* ------------------------------------------------------------------ */
/* Фирменный знак                                                      */
/* ------------------------------------------------------------------ */

nav.nav .nav-link { font-size: 15px; color: #252930; font-weight: 600; border-radius: 3px; }
nav.nav .nav-link:hover,
nav.nav .nav-link:focus-visible { background: #fff7e6; color: #a67100; }
nav.nav .nav-link.is-active { background: #fff5dc; color: #9c6c00; }

.menu-layer { border-top: 2px solid #f4af18; background: #fff; }
.menu-layer .mega-sidebar { background: #f8f8f8; }
.menu-layer .sidebar-label { color: #a87918; }
.menu-layer .category { color: #45494d; border-radius: 4px; }
.menu-layer .category:hover { background: #f3f1eb; }
.menu-layer .category.active { background: #fff1d1; color: #8c6200; border-left: 3px solid #f3aa00; }
.menu-layer .category.active .arr { color: #b47b00; }
.menu-layer .panel h2 { color: #262b31; }
.menu-layer .panel-desc { color: #83878b; }
.menu-layer .service-group h3 { color: #292e34; }
.menu-layer .service-group h3::before { background: #f1aa0b; border-radius: 0; }
.menu-layer .group-link:hover,
.menu-layer .group-link:focus-visible,
.menu-layer .links a:hover,
.menu-layer .menu-foot a { color: #b47b00; }
.menu-layer .group-link { display: inline-flex; align-items: center; gap: 7px; text-decoration: underline; text-decoration-color: #e9be65; text-underline-offset: 4px; }
.menu-layer .group-link::after { content: "↗"; font-size: 13px; color: #c58b0a; }
.menu-layer .group-link:hover { text-decoration-color: currentColor; }
.menu-layer .links a,
.menu-layer .links .unlinked { color: #414950; border-bottom-color: #f0f0f0; }
.menu-layer .links a::before,
.menu-layer .links .unlinked::before { color: #e1a316; }
.menu-layer .pending { color: #906513; background: #fff3d7; }
.menu-layer .menu-foot { background: #fff8e9; color: #7a6a4b; border-radius: 3px; }

#overlay { background: rgba(13, 17, 22, .49); }


@media(max-width: 578px){
	.mega-menu-open .mobile-menu-block{
		-webkit-transform: translate3d(0, 0, 0);
		top: 110px;
		z-index: 99;
		background: #fff;
		width: 100%;
	}
	.mobile-menu-block-open .mobmenucover{display: none;}
	.mobile-menu-block-open div.full-content {-webkit-transform: translate3d(0px, 0, 0);}
}