/* Повноекранне меню (template-parts/esf-nav.php, lib/js/esf-nav.js) */

/* поки меню відкрите, сторінка не прокручується */
html.esf-nav-open,
html.esf-nav-open body { overflow: hidden !important; }

/* старе меню не потрібне, кнопка "Меню" в сайдбарі лишається */
.esf-has-nav .hidden-menu { display: none !important; }

/* z-index як у старої кнопки меню (максимальний); оверлей стоїть пізніше в DOM і перекриває її */
.esf-nav {
	position: fixed;
	inset: 0;
	z-index: 2147483647;
	display: flex;
	flex-direction: column;
	color: #fff;
	visibility: hidden;
	pointer-events: none;
	transition: visibility 0s linear .7s;
}
.esf-nav.is-open {
	visibility: visible;
	pointer-events: auto;
	transition: none;
}

/* фон: панель виїжджає згори (лише transform), м'яке зелене світло йде за курсором */
.esf-nav-bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	background:
		radial-gradient(ellipse 60% 50% at 85% 100%, rgba(0, 206, 125, .12), rgba(0, 206, 125, 0) 70%),
		#0b1210;
	transform: translateY(-100%);
	transition: transform .7s cubic-bezier(.76, 0, .24, 1);
}
.esf-nav.is-open .esf-nav-bg { transform: none; }
.esf-nav-bg:before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
	background-size: 28px 28px;
}
.esf-nav-glow {
	position: absolute;
	left: 0;
	top: 0;
	width: 640px;
	height: 640px;
	margin: -320px 0 0 -320px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(0, 206, 125, .16), rgba(0, 206, 125, 0) 65%);
	transform: translate3d(70vw, 40vh, 0);
	transition: transform .9s cubic-bezier(.2, .7, .2, 1);
	will-change: transform;
}
.esf-nav-glyph {
	position: absolute;
	right: -2vw;
	bottom: -6vh;
	font-family: 'Montserrat', sans-serif;
	font-size: 22vw;
	font-weight: 900;
	line-height: 1;
	text-transform: uppercase;
	color: transparent;
	-webkit-text-stroke: 1px rgba(255, 255, 255, .05);
	white-space: nowrap;
	pointer-events: none;
}

/* --- верх: лого, мови, закрити --- */
.esf-nav-top {
	display: flex;
	align-items: center;
	gap: 28px;
	padding: 26px 56px;
	opacity: 0;
	transition: opacity .3s ease;
}
.esf-nav.is-open .esf-nav-top { opacity: 1; transition: opacity .5s ease .35s; }
.esf-nav-logo img { display: block; width: 170px; height: auto; }
.esf-nav-lang { display: flex; gap: 16px; margin-left: auto; }
html body .esf-nav .esf-nav-lang a {
	color: rgba(255, 255, 255, .55) !important;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .08em;
	text-decoration: none !important;
	transition: color .2s ease;
}
html body .esf-nav .esf-nav-lang a:hover,
html body .esf-nav .esf-nav-lang .current-language { color: #00CE7D !important; }
.esf-nav-close {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: 10px 18px 10px 20px;
	border: 1px solid rgba(255, 255, 255, .2);
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font: 600 14px/1 'Montserrat', sans-serif;
	cursor: pointer;
	transition: border-color .25s ease, background .25s ease;
}
.esf-nav-close:hover { border-color: #00CE7D; background: rgba(0, 206, 125, .1); }
.esf-nav-close-x { position: relative; width: 16px; height: 16px; }
.esf-nav-close-x:before,
.esf-nav-close-x:after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 18px;
	height: 2px;
	margin: -1px 0 0 -9px;
	background: currentColor;
	transform: rotate(45deg);
	transition: transform .3s ease;
}
.esf-nav-close-x:after { transform: rotate(-45deg); }
.esf-nav-close:hover .esf-nav-close-x:before { transform: rotate(135deg); }
.esf-nav-close:hover .esf-nav-close-x:after { transform: rotate(45deg); }

/* --- тіло: 3 колонки --- */
.esf-nav-body {
	flex: 1;
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, .7fr);
	gap: 48px;
	align-items: center;
	min-height: 0;
	padding: 0 56px 40px 104px;
	overflow-y: auto;
}

.esf-nav-main ol { margin: 0; padding: 0; list-style: none; counter-reset: none; }
.esf-nav-item { margin: 0; padding: 0; list-style: none; }
.esf-nav-item:before { display: none !important; }
html body .esf-nav .esf-nav-link {
	display: flex;
	align-items: baseline;
	gap: 22px;
	padding: .12em 0;
	color: #fff !important;
	font-family: 'Montserrat', sans-serif;
	font-size: clamp(30px, min(6.4vh, 4.6vw), 68px);
	font-weight: 900;
	line-height: 1.08;
	letter-spacing: -.01em;
	text-decoration: none !important;
	transition: opacity .3s ease, color .3s ease;
}
.esf-nav-num {
	flex: 0 0 auto;
	width: 2.2em;
	color: rgba(255, 255, 255, .35);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .1em;
	transform: translateY(-1.6em);
	transition: color .3s ease;
}
/* текст піднімається з-під маски при відкритті */
.esf-nav-txt { display: block; overflow: hidden; padding: 0 .1em .08em 0; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.esf-nav-txt > span {
	display: inline-block;
	transform: translateY(110%);
	transition: transform .35s cubic-bezier(.55, 0, .7, .2);
}
.esf-nav.is-open .esf-nav-txt > span {
	transform: none;
	transition: transform .8s cubic-bezier(.2, .8, .2, 1);
	transition-delay: calc(.32s + var(--i, 0) * .055s);
}
/* наведення: решта пунктів тьмяніє, активний зсувається і стає зеленим */
.esf-nav-main ol:hover .esf-nav-link { opacity: .32; }
html body .esf-nav .esf-nav-main ol .esf-nav-link:hover,
html body .esf-nav .esf-nav-main ol .esf-nav-link:focus-visible { opacity: 1; color: #00CE7D !important; }
.esf-nav-link:hover .esf-nav-num,
.esf-nav-item.is-current .esf-nav-num { color: #00CE7D; }
/* зсув при наведенні - у маски цілком, щоб текст не обрізався її краєм */
.esf-nav.is-open .esf-nav-link:hover .esf-nav-txt { transform: translateX(14px); }
html body .esf-nav .esf-nav-item.is-current > .esf-nav-link { color: #00CE7D !important; }
.esf-nav-sub { display: none; }

/* --- колонки послуг і контактів --- */
.esf-nav-col {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity .25s ease, transform .25s ease;
}
.esf-nav.is-open .esf-nav-col {
	opacity: 1;
	transform: none;
	transition: opacity .7s ease .55s, transform .8s cubic-bezier(.2, .8, .2, 1) .55s;
}
.esf-nav.is-open .esf-nav-contact { transition-delay: .65s; }
.esf-nav-h {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 22px;
	color: rgba(255, 255, 255, .5);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
}
.esf-nav-h:before { content: ''; width: 28px; height: 2px; background: #00CE7D; }
.esf-nav-services ul { margin: 0; padding: 0; list-style: none; }
.esf-nav-services li { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, .09); }
.esf-nav-services li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .09); }
.esf-nav-services li:before { display: none !important; }
html body .esf-nav .esf-nav-services a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 16px 0;
	color: rgba(255, 255, 255, .85) !important;
	font-size: 17px;
	font-weight: 600;
	text-decoration: none !important;
	transition: color .25s ease, padding .3s ease;
}
.esf-nav-services a span { color: #00CE7D; opacity: 0; transform: translateX(-8px); transition: opacity .25s ease, transform .25s ease; }
html body .esf-nav .esf-nav-services a:hover,
html body .esf-nav .esf-nav-services a.is-current { color: #00CE7D !important; }
.esf-nav-services a:hover span { opacity: 1; transform: none; }
/* "Послуги" в головному меню під курсором - підсвічуємо колонку послуг */
.esf-nav.is-serv .esf-nav-services .esf-nav-h { color: #00CE7D; }
.esf-nav.is-serv .esf-nav-services li { border-color: rgba(0, 206, 125, .35); }

.esf-nav-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
html body .esf-nav .esf-nav-tel {
	color: #fff !important;
	font-size: 24px;
	font-weight: 800;
	text-decoration: none !important;
	transition: color .25s ease;
}
html body .esf-nav .esf-nav-mail {
	color: rgba(255, 255, 255, .65) !important;
	font-size: 15px;
	text-decoration: none !important;
	transition: color .25s ease;
}
html body .esf-nav .esf-nav-tel:hover,
html body .esf-nav .esf-nav-mail:hover { color: #00CE7D !important; }
.esf-nav-msg { display: flex; gap: 12px; margin: 6px 0 10px; }
html body .esf-nav .esf-nav-msg a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 50%;
	transition: border-color .25s ease, background .25s ease;
}
html body .esf-nav .esf-nav-msg a:hover { border-color: #00CE7D; background: rgba(0, 206, 125, .12); }
html body .esf-nav .esf-nav-msg svg { width: 18px; height: 18px; fill: #fff; }
html body .esf-nav .esf-nav-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 16px 26px;
	border-radius: 12px;
	background: #00CE7D;
	color: #fff !important;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none !important;
	transition: background .25s ease;
}
html body .esf-nav .esf-nav-cta:hover { background: #00b56e; }

/* --- планшет і телефон: одна колонка, послуги акордеоном під пунктом --- */
@media (max-width: 991px) {
	.esf-nav-top { padding: 18px 20px; gap: 16px; }
	.esf-nav-logo img { width: 128px; }
	.esf-nav-close { padding: 9px 14px; }
	.esf-nav-close-word { display: none; }
	.esf-nav-body {
		display: block;
		padding: 10px 20px 40px;
		-webkit-overflow-scrolling: touch;
	}
	html body .esf-nav .esf-nav-link { font-size: clamp(28px, 8.4vw, 44px); gap: 14px; padding: .16em 0; }
	.esf-nav-num { width: 1.8em; font-size: 11px; transform: translateY(-1.3em); }
	.esf-nav-main ol:hover .esf-nav-link { opacity: 1; }
	.esf-nav.is-open .esf-nav-link:hover .esf-nav-txt { transform: none; }
	.esf-nav-services { display: none; }
	.esf-nav-item.has-sub > .esf-nav-link:after {
		content: '';
		align-self: center;
		width: 10px;
		height: 10px;
		margin-left: auto;
		border-right: 2px solid #00CE7D;
		border-bottom: 2px solid #00CE7D;
		transform: rotate(45deg);
		transition: transform .3s ease;
	}
	.esf-nav-item.has-sub.is-expanded > .esf-nav-link:after { transform: rotate(-135deg); }
	.esf-nav-sub {
		display: grid;
		grid-template-rows: 0fr;
		margin: 0;
		padding: 0 0 0 calc(1.8em + 14px);
		list-style: none;
		transition: grid-template-rows .35s ease;
	}
	.esf-nav-sub > ul { min-height: 0; overflow: hidden; margin: 0; padding: 0; list-style: none; }
	.esf-nav-item.is-expanded .esf-nav-sub { grid-template-rows: 1fr; }
	.esf-nav-sub li { margin: 0; padding: 0; list-style: none; }
	.esf-nav-sub li:before { display: none !important; }
	html body .esf-nav .esf-nav-sub a {
		display: block;
		padding: 9px 0;
		color: rgba(255, 255, 255, .8) !important;
		font-size: 17px;
		font-weight: 600;
		text-decoration: none !important;
	}
	.esf-nav-contact { margin-top: 34px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .1); }
	html body .esf-nav .esf-nav-cta { width: 100%; }
	.esf-nav-glyph { font-size: 34vw; bottom: -2vh; }
	.esf-nav-glow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.esf-nav-bg, .esf-nav-txt > span, .esf-nav-col, .esf-nav-top, .esf-nav-glow { transition: none !important; }
	.esf-nav-bg { transform: none; opacity: 0; }
	.esf-nav.is-open .esf-nav-bg { opacity: 1; }
}

/* фокус: рамка лише з клавіатури, зелена */
.esf-nav a:focus,
.esf-nav button:focus { outline: none; }
.esf-nav a:focus-visible,
.esf-nav button:focus-visible { outline: 2px solid #00CE7D; outline-offset: 4px; border-radius: 6px; }
