/* One compact header and drawer shared by the home, service, and blog pages. */
.ag-mobile-site-header { display: none; }

@media screen and (max-width: 959px) {
	.ag-mobile-site-header {
		position: fixed;
		z-index: 100000;
		top: 0;
		right: 0;
		left: 0;
		display: block;
		color: #fff;
		font-family: 'TTFirsNeue', Arial, sans-serif;
		-webkit-font-smoothing: antialiased;
	}

	.ag-mobile-site-header__bar {
		display: flex;
		width: 100%;
		height: 64px;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		box-sizing: border-box;
		margin: 0 auto;
		padding: 0 max(20px, calc((100vw - 1180px) / 2));
		border-bottom: 1px solid rgba(255,255,255,.1);
		background: #1e4d45;
		box-shadow: 0 5px 18px rgba(12,54,44,.12);
	}

	.ag-mobile-site-header__brand {
		display: inline-flex;
		min-width: 0;
		align-items: center;
		gap: 0;
		color: #fff;
		text-decoration: none;
	}

	.ag-mobile-site-header__brand img {
		display: block;
		width: 108px;
		height: auto;
		flex: 0 0 auto;
	}

	.ag-mobile-site-header__brand span { display: none; }

	.ag-mobile-site-header__actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
	.ag-mobile-site-header__telegram,
	.ag-mobile-site-header__toggle {
		display: grid;
		width: 44px;
		height: 44px;
		flex: 0 0 44px;
		place-items: center;
		box-sizing: border-box;
		border: 1px solid rgba(255,255,255,.34);
		border-radius: 11px;
	}
	.ag-mobile-site-header__telegram { background: #c9eb67; }
	.ag-mobile-site-header__telegram img { display: block; width: 22px; height: 20px; }
	.ag-mobile-site-header__toggle { padding: 0; background: rgba(255,255,255,.06); cursor: pointer; }
	.ag-mobile-site-header__toggle { position: relative; }
	.ag-mobile-site-header__toggle span { position: absolute; left: 12px; display: block; width: 18px; height: 2px; border-radius: 2px; background: #fff; transition: transform .18s ease, opacity .18s ease; }
	.ag-mobile-site-header__toggle span:first-child { top: 15px; }
	.ag-mobile-site-header__toggle span:nth-child(2) { top: 20px; }
	.ag-mobile-site-header__toggle span:last-child { top: 25px; }
	.ag-mobile-site-header.is-open .ag-mobile-site-header__toggle span:first-child { top: 20px; transform: rotate(45deg); }
	.ag-mobile-site-header.is-open .ag-mobile-site-header__toggle span:nth-child(2) { opacity: 0; }
	.ag-mobile-site-header.is-open .ag-mobile-site-header__toggle span:last-child { top: 20px; transform: rotate(-45deg); }

	.ag-mobile-site-header__backdrop[hidden],
	.ag-mobile-site-header__drawer[hidden] { display: none !important; }
	.ag-mobile-site-header__backdrop {
		position: fixed;
		z-index: 100000;
		inset: 0;
		width: 100%;
		height: 100%;
		padding: 0;
		border: 0;
		background: rgba(8,27,24,.62);
		-webkit-backdrop-filter: blur(3px);
		backdrop-filter: blur(3px);
		cursor: pointer;
	}

	.ag-mobile-site-header__drawer {
		position: fixed;
		z-index: 100001;
		top: 0;
		right: 0;
		bottom: 0;
		display: flex;
		width: min(380px, calc(100vw - 32px));
		min-height: 100vh;
		min-height: 100dvh;
		flex-direction: column;
		box-sizing: border-box;
		overflow-x: hidden;
		overflow-y: auto;
		padding: calc(24px + env(safe-area-inset-top, 0px)) 24px calc(22px + env(safe-area-inset-bottom, 0px));
		border-left: 1px solid rgba(255,255,255,.12);
		background: linear-gradient(155deg, #1e4d45 0%, #17483f 100%);
		box-shadow: -18px 0 50px rgba(0,0,0,.22);
		color: #fff;
	}

	.ag-mobile-site-header__drawer-head { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.16); }
	.ag-mobile-site-header__drawer-head > a { display: block; min-width: 0; flex: 1 1 auto; }
	.ag-mobile-site-header .ag-mobile-site-header__drawer-head img { display: block; width: min(160px, 100%); height: auto; }
	.ag-mobile-site-header__close {
		position: relative;
		display: grid;
		width: 44px;
		height: 44px;
		flex: 0 0 44px;
		place-items: center;
		padding: 0;
		border: 1px solid rgba(255,255,255,.34);
		border-radius: 50%;
		background: rgba(255,255,255,.07);
		cursor: pointer;
	}
	.ag-mobile-site-header__close span { position: absolute; width: 18px; height: 2px; border-radius: 2px; background: #fff; transform: rotate(45deg); }
	.ag-mobile-site-header__close span + span { transform: rotate(-45deg); }

	.ag-mobile-site-header__section-label { margin: 28px 0 10px; color: rgba(255,255,255,.56); font-size: 11px; font-weight: 500; letter-spacing: .1em; line-height: 1.2; text-transform: uppercase; }
	.ag-mobile-site-header__nav { display: grid; gap: 5px; }
	.ag-mobile-site-header__nav a {
		display: flex;
		min-height: 54px;
		align-items: center;
		padding: 0 15px;
		border: 1px solid transparent;
		border-radius: 10px;
		color: #fff;
		font-size: 17px;
		line-height: 1.25;
		text-decoration: none;
		transition: background-color .16s ease, color .16s ease;
	}
	.ag-mobile-site-header__nav a:hover { background: rgba(255,255,255,.07); }
	.ag-mobile-site-header__nav a[aria-current="page"] { border-color: rgba(201,235,103,.24); background: rgba(201,235,103,.11); color: #d8f397; }
	.ag-mobile-site-header__drawer-bottom { display: grid; gap: 16px; margin-top: auto; padding-top: 32px; }
	.ag-mobile-site-header__whatsapp { display: inline-flex; min-height: 44px; align-items: center; justify-self: start; gap: 10px; color: rgba(255,255,255,.92); font-size: 14px; text-decoration: none; }
	.ag-mobile-site-header__whatsapp img { display: block; width: 32px; height: 32px; border-radius: 7px; }
	.ag-mobile-site-header__buttons { display: grid; grid-template-columns: minmax(0,1fr) minmax(110px,.72fr); gap: 10px; }
	.ag-mobile-site-header__buttons a,
	.ag-mobile-site-header__buttons button {
		display: flex;
		min-height: 50px;
		align-items: center;
		justify-content: center;
		box-sizing: border-box;
		padding: 0 14px;
		border: 1px solid transparent;
		border-radius: 9px;
		font: 500 14px/1.2 'TTFirsNeue', Arial, sans-serif;
		text-align: center;
		text-decoration: none;
		cursor: pointer;
	}
	.ag-mobile-site-header__request { background: #c9eb67; color: #173f38; }
	.ag-mobile-site-header__buttons .ag-mobile-site-header__contacts { background: #fff; color: #173f38; }
	.ag-mobile-site-header a:focus-visible,
	.ag-mobile-site-header button:focus-visible { outline: 2px solid #c9eb67; outline-offset: 3px; }

	/* Replace the separate exported mobile headers and the blog's small popover
	 * with the same navigation drawer on every custom page. Desktop headers stay intact. */
	body #ag-header,
	body #ag-page > .ag-blog-header,
	body #ag-page > .ag-blog-native-spacer { display: none !important; }
	body #ag-page.ag-blog-page .ag-blog-main { padding-top: 88px; }

	html.ag-mobile-menu-locked,
	body.ag-mobile-menu-locked { overflow: hidden !important; }
}

@media screen and (max-width: 379px) {
	.ag-mobile-site-header__bar { padding-right: 16px; padding-left: 16px; }
	.ag-mobile-site-header__brand img { width: 100px; }
	.ag-mobile-site-header__actions { gap: 6px; }
	.ag-mobile-site-header__telegram,
	.ag-mobile-site-header__toggle { width: 44px; height: 44px; flex-basis: 44px; }
	.ag-mobile-site-header__telegram { width: 44px; height: 44px; flex-basis: 44px; }
	.ag-mobile-site-header__drawer { padding-right: 18px; padding-left: 18px; }
	.ag-mobile-site-header .ag-mobile-site-header__drawer-head img { width: min(150px, 100%); }
}

@media screen and (max-width: 359px) {
	.ag-mobile-site-header__drawer { width: calc(100vw - 24px); }
	.ag-mobile-site-header__buttons { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

@media screen and (max-height: 600px) and (max-width: 959px) {
	.ag-mobile-site-header__drawer { padding-top: calc(14px + env(safe-area-inset-top, 0px)); padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
	.ag-mobile-site-header__drawer-head { min-height: 58px; padding-bottom: 10px; }
	.ag-mobile-site-header__section-label { margin-top: 17px; margin-bottom: 7px; }
	.ag-mobile-site-header__nav { gap: 3px; }
	.ag-mobile-site-header__nav a { min-height: 46px; }
	.ag-mobile-site-header__drawer-bottom { gap: 10px; padding-top: 18px; }
	.ag-mobile-site-header__whatsapp img { width: 28px; height: 28px; }
	.ag-mobile-site-header__buttons a,
	.ag-mobile-site-header__buttons button { min-height: 46px; }
}

@media screen and (max-height: 450px) and (max-width: 959px) {
	.ag-mobile-site-header__drawer { padding-top: calc(8px + env(safe-area-inset-top, 0px)); padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
	.ag-mobile-site-header__drawer-head { min-height: 38px; padding-bottom: 6px; }
	.ag-mobile-site-header .ag-mobile-site-header__drawer-head img { width: min(130px, 100%); }
	.ag-mobile-site-header__section-label { display: none; }
	.ag-mobile-site-header__nav { gap: 2px; }
	.ag-mobile-site-header__nav a { min-height: 38px; }
	.ag-mobile-site-header__drawer-bottom { gap: 7px; padding-top: 10px; }
	.ag-mobile-site-header__whatsapp img { width: 26px; height: 26px; }
	.ag-mobile-site-header__buttons a,
	.ag-mobile-site-header__buttons button { min-height: 44px; font-size: 13px; }
}

@media screen and (min-width: 960px) {
	.ag-mobile-site-header { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.ag-mobile-site-header *,
	.ag-mobile-site-header *::before,
	.ag-mobile-site-header *::after { transition-duration: .01ms !important; }
}
