/**
 * #Header project
 */

body {
	--header-logo-w: 200px;
	--header-logo-h: 150px;
	--header-logo-img-w: 134px;
	--header-logo-img-h: 120px;
	--header-logo-rd: 0 0 30px 0;

	@media (max-width: 768px) {
		--header-logo-w: 120px;
		--header-logo-h: 90px;
		--header-logo-img-w: 88px;
		--header-logo-img-h: 79px;
		--header-logo-rd: 0 0 18px 0;
	}

	&:has(.p-header.is-scrolled) {
		@media (max-width: 768px) {
			--header-logo-w: 90px;
			--header-logo-h: 68px;
			--header-logo-img-w: 66px;
			--header-logo-img-h: 59px;
			--header-logo-rd: 0 0 14px 0;
		}
	}
}

.p-header {
	.p-header__logo {
		flex-shrink: 0;
		margin: 0;
		width: var(--header-logo-w);
		height: var(--header-logo-h);
		background-color: var(--color-accent);
		border-radius: var(--header-logo-rd);
		transition: width 0.35s ease, height 0.35s ease, border-radius 0.35s ease;

		a {
			display: flex;
			align-items: center;
			justify-content: center;
			height: 100%;
			color: var(--color-text);
			text-decoration: none;
		}

		img {
			width: var(--header-logo-img-w);
			height: var(--header-logo-img-h);
			object-fit: contain;
			transition: width 0.35s ease, height 0.35s ease;
		}
	}

	.p-header__utils {
		display: flex;
		flex-shrink: 0;
		align-items: center;
		gap: 20px;
		padding-top: 20px;

		@media (max-width: 1024px) {
			gap: 12px;
		}

		@media (max-width: 768px) {
			padding-top: 10px;
			gap: 8px;
		}
	}

	.p-header__util {
		display: flex;
		flex-shrink: 0;
		align-items: center;
		gap: 6px;
		color: var(--white);
		text-decoration: none;
		font-weight: 700;
		white-space: nowrap;
		img {
			filter: brightness(0) invert(1);
			width: 24px;
			height: 24px;
		}

		@media (max-width: 768px) {
			display: none;
		}
	}

	.p-header__hub-link {
		display: flex;
		flex-shrink: 0;
		align-items: center;
		justify-content: center;
		gap: 5px;
		margin-inline: 4px -6px;
		padding: 8px 14px;
		border-radius: 999px;
		background-image: var(--neon-grd);
		color: var(--white);
		font-size: 14px;
		font-weight: 700;
		line-height: 1.2;
		text-decoration: none;
		white-space: nowrap;

		span {
			width: 75px;
			text-align: center;
		}

		img {
			flex-shrink: 0;
		}

		@media (max-width: 1024px) {
			display: none;
		}
	}

	.p-header__menu-btn {
		display: flex;
		flex-shrink: 0;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 10px;
		width: 66px;
		height: 66px;
		min-width: 66px;
		min-height: 66px;
		aspect-ratio: 1;
		padding: 0;
		border: 0;
		border-radius: 999px;
		background-color: var(--color-accent);
		color: var(--white);
		cursor: pointer;

		@media (max-width: 768px) {
			gap: 7px;
			width: 48px;
			height: 48px;
			min-width: 48px;
			min-height: 48px;
		}
	}

	.p-header__menu-bars {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		width: 30px;

		span {
			display: block;
			height: 3px;
			background-color: var(--white);

			&:nth-child(1) { width: 30px; }
			&:nth-child(2) { width: 24px; }
			&:nth-child(3) { width: 18px; }
		}

		@media (max-width: 768px) {
			gap: 3px;
			width: 22px;

			span {
				height: 2px;

				&:nth-child(1) { width: 22px; }
				&:nth-child(2) { width: 17px; }
				&:nth-child(3) { width: 13px; }
			}
		}
	}

	.p-header__menu-label {
		font-family: var(--ff-menu);
		font-size: 12px;
		font-weight: 800;
		letter-spacing: 0.01em;
		line-height: 0;
		white-space: nowrap;

		@media (max-width: 768px) {
			margin-top: 2px;
			font-size: 10px;
		}
	}
}

.p-header__branding {
	display: flex;
	align-items: center;
	min-width: 0;
	flex: 1 1 auto;
}

.p-header__brand {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding-inline: 30px;
	font-weight: 700;
	line-height: 1.5;
	white-space: nowrap;

	@media (max-width: 1024px) {
		padding-inline: 9px;
	}
}

.p-header__academy {
	margin: 0;
	font-size: 14px;
	color: #111;

	@media (max-width: 1024px) {
		font-size: 10px;
	}
}

.p-header__program {
	margin: 0;
	font-size: 24px;
	color: var(--color-accent);

	@media (max-width: 1024px) {
		font-size: 16px;
	}
}

body:not(.home):not(.theme-edance-hub) {
	.p-header__logo {
		flex-shrink: 1;
		min-width: 0;
		width: 288px;
		max-width: 288px;
		height: 100px;
		border-radius: 0;

		a {
			justify-content: flex-start;
			width: 100%;
			min-width: 0;
			padding: 13px 18px;
		}

		picture {
			display: block;
			width: 100%;
			max-width: 237px;
			min-width: 0;
			line-height: 0;
		}

		img {
			display: block;
			width: 100%;
			height: auto;
			max-width: 237px;
			max-height: 72px;
			object-fit: contain;
			object-position: left center;
		}

		@media (max-width: 1024px) {
			flex-shrink: 0;
			width: 70px;
			height: 62px;
			border-radius: 0;
			transition: width 0.35s ease, height 0.35s ease;

			a {
				padding: 0;
				justify-content: center;
			}

			picture {
				width: 54px;
				transition: width 0.35s ease;
			}

			img {
				width: 54px;
				height: 48px;
				max-height: none;
				transition: width 0.35s ease, height 0.35s ease;
			}
		}
	}

	.p-header__utils {
		padding-top: 0;
	}

	.p-header__menu-btn {
		@media (max-width: 1024px) {
			gap: 7px;
			width: 48px;
			height: 48px;
			min-width: 48px;
			min-height: 48px;
		}
	}

	.p-header__menu-bars {
		@media (max-width: 1024px) {
			gap: 3px;
			width: 22px;

			span {
				height: 2px;

				&:nth-child(1) { width: 22px; }
				&:nth-child(2) { width: 17px; }
				&:nth-child(3) { width: 13px; }
			}
		}
	}

	.p-header__menu-label {
		@media (max-width: 1024px) {
			margin-top: 2px;
			font-size: 10px;
		}
	}

	.p-header__util {
		color: #111;

		img {
			filter: none;
			width: 16px;
			height: 20px;
		}

		&:nth-of-type(2) img {
			width: 20px;
			height: 20px;
		}

		&:hover {
			color: #111;
		}
	}
}
