header .middle > .gwrap {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto auto;
	grid-template-areas: "logo messenger phone menu";
	align-items: center;
}

header .middle > .gwrap > .logo {
	grid-area: logo;
}

header .middle > .gwrap > .phone {
	grid-area: phone;
	margin-top: 11px;
}

header .middle > .gwrap > .menu-button {
	grid-area: menu;
	margin-top: 11px;
	justify-self: end;
}

header .middle:not(.active) > .gwrap > .bg {
	display: none;
}

header .middle > .gwrap > .top-menu {
	align-self: start;
}

header .middle .messenger-contact {
	grid-area: messenger;
	justify-self: center;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 11px;
	font-family: "GothicA1", sans-serif;
	font-size: 13px;
	line-height: 1.3;
	color: #0451a5;
}

.messenger-contact strong {
	display: block;
	font-size: 17px;
	white-space: nowrap;
}

.messenger-contact img {
	flex: none;
	object-fit: contain;
}

.messenger-contact:hover strong {
	text-decoration: underline;
}

.messenger-contact:focus-visible {
	outline: 2px solid #0451a5;
	outline-offset: 3px;
}

@media (max-width: 800px) {
	header .middle > .gwrap {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: "logo menu" "messenger phone";
		gap: 10px;
		box-sizing: border-box;
		padding: 0 15px 4px;
	}

	header .middle > .gwrap > .logo {
		grid-column: 1 / -1;
		justify-self: start;
		max-width: calc(100% - 39px);
		margin-left: 0;
	}

	header .middle > .gwrap > .menu-button {
		margin-right: 0;
	}

	header .middle > .gwrap > .phone,
	header .middle .messenger-contact {
		margin: 0;
	}

	header .middle .messenger-contact {
		justify-self: start;
	}
}

@media (max-width: 480px) {
	header .middle .messenger-contact {
		gap: 6px;
		font-size: 12px;
	}

	.messenger-contact strong {
		font-size: 15px;
	}

	.messenger-contact img {
		width: 28px;
		height: 28px;
	}

	header .middle .phone {
		font-size: 14px;
		white-space: nowrap;
	}

	header .middle .phone span {
		font-size: 17px;
	}

	header .middle .phone::before {
		content: "";
		width: 20px;
		height: 20px;
		margin-right: 5px;
		background: url("../img/phone.png") center / contain no-repeat;
	}
}

@media (max-width: 350px) {
	header .middle > .gwrap {
		grid-template-areas: "logo menu" "messenger messenger" "phone phone";
	}

	header .middle > .gwrap > .phone {
		justify-self: start;
	}
}
