/*
 * Kotły Grzewcze – Własny nagłówek Astra
 * Version 2.0.0
 */

/* Replaces the Astra header so the new component always stays in control. */
.kg-astra-force-header-active .site-header,
.kg-astra-force-header-active .ast-primary-header-bar,
.kg-astra-force-header-active .main-header-bar,
.kg-astra-force-header-active .ast-mobile-header-wrap {
	display: none !important;
}

.kg-ah-header,
.kg-ah-header *,
.kg-ah-header *::before,
.kg-ah-header *::after {
	box-sizing: border-box;
}

.kg-ah-header {
	position: relative;
	z-index: 99;
	width: 100%;
	background: #ffffff;
	border-bottom: 1px solid #dce5ed;
	color: #0b3b5a;
	font-family: Arial, Helvetica, sans-serif;
	box-shadow: 0 2px 12px rgba(11, 59, 90, .05);
}

.kg-ah-brand {
	width: min(1180px, calc(100% - 40px));
	margin: 0 auto;
	padding: 24px 0 16px;
	text-align: center;
}

.kg-ah-logo-link {
	display: inline-flex;
	max-width: min(820px, 90vw);
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

.kg-ah-logo-image {
	display: block;
	width: clamp(520px, 55vw, 820px);
	max-width: 100%;
	height: auto;
	max-height: 220px;
	object-fit: contain;
}

.kg-ah-text-logo {
	display: inline-block;
	color: #0b3b5a;
	font-size: clamp(34px, 4vw, 62px);
	font-weight: 800;
	letter-spacing: -.035em;
	line-height: 1.05;
	text-decoration: none;
}

.kg-ah-tagline {
	margin: 10px 0 0;
	color: #0b3b5a;
	font-size: clamp(24px, 2.25vw, 38px);
	font-weight: 500;
	line-height: 1.2;
}

.kg-ah-desktop-nav {
	width: 100%;
	border-top: 1px solid #edf1f4;
}

.kg-ah-desktop-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0;
	width: min(1180px, calc(100% - 40px));
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.kg-ah-desktop-item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.kg-ah-desktop-item a {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 64px;
	padding: 12px 24px;
	color: #0b3b5a;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: color .18s ease, background .18s ease;
}

.kg-ah-desktop-item a::after {
	position: absolute;
	right: 22px;
	bottom: 0;
	left: 22px;
	height: 3px;
	background: #ff7a00;
	content: "";
	transform: scaleX(0);
	transition: transform .18s ease;
}

.kg-ah-desktop-item a:hover,
.kg-ah-desktop-item a:focus {
	color: #ff7a00;
	background: #fbfdff;
}

.kg-ah-desktop-item a:hover::after,
.kg-ah-desktop-item a:focus::after {
	transform: scaleX(1);
}

.kg-ah-mobile-control,
.kg-ah-mobile-nav {
	display: none;
}

@media (max-width: 921px) {
	.kg-ah-brand {
		width: min(100% - 26px, 520px);
		padding: 16px 0 13px;
	}

	.kg-ah-logo-link {
		max-width: 92vw;
	}

	.kg-ah-logo-image {
		width: min(410px, 88vw);
		max-height: 155px;
	}

	.kg-ah-text-logo {
		font-size: clamp(28px, 8vw, 42px);
	}

	.kg-ah-tagline {
		margin-top: 8px;
		font-size: clamp(17px, 4.5vw, 22px);
	}

	.kg-ah-desktop-nav {
		display: none;
	}

	.kg-ah-mobile-control {
		display: flex;
		justify-content: center;
		padding: 12px 0 14px;
		border-top: 1px solid #edf1f4;
	}

	.kg-ah-toggle {
		display: inline-flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 5px;
		width: 50px;
		height: 46px;
		padding: 0;
		cursor: pointer;
		border: 0;
		border-radius: 8px;
		background: #ffffff;
		color: #0b3b5a;
	}

	.kg-ah-toggle:hover,
	.kg-ah-toggle:focus {
		background: #f3f8fb;
		outline: 2px solid #ff7a00;
		outline-offset: 2px;
	}

	.kg-ah-toggle-line {
		display: block;
		width: 28px;
		height: 3px;
		border-radius: 4px;
		background: #0b3b5a;
		transition: transform .2s ease, opacity .2s ease;
	}

	.kg-ah-toggle[aria-expanded="true"] .kg-ah-toggle-line:nth-child(1) {
		transform: translateY(8px) rotate(45deg);
	}

	.kg-ah-toggle[aria-expanded="true"] .kg-ah-toggle-line:nth-child(2) {
		opacity: 0;
	}

	.kg-ah-toggle[aria-expanded="true"] .kg-ah-toggle-line:nth-child(3) {
		transform: translateY(-8px) rotate(-45deg);
	}

	.kg-ah-mobile-nav {
		display: block;
		width: 100%;
		border-top: 1px solid #dce5ed;
		background: #ffffff;
	}

	.kg-ah-mobile-nav[hidden] {
		display: none !important;
	}

	.kg-ah-mobile-list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		width: 100%;
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.kg-ah-mobile-item {
		display: flex;
		min-width: 0;
		margin: 0;
		padding: 0;
		border-right: 1px solid #dce5ed;
		border-bottom: 1px solid #dce5ed;
		list-style: none;
	}

	.kg-ah-mobile-item:nth-child(2n) {
		border-right: 0;
	}

	.kg-ah-mobile-item a {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 10px;
		width: 100%;
		min-height: 132px;
		padding: 17px 10px;
		color: #0b3b5a;
		font-size: 14px;
		font-weight: 800;
		line-height: 1.22;
		text-align: center;
		text-decoration: none;
		letter-spacing: .015em;
		background: #ffffff;
		transition: background .18s ease, color .18s ease;
	}

	.kg-ah-mobile-item a:hover,
	.kg-ah-mobile-item a:focus {
		color: #ff7a00;
		background: #f5f9fc;
		outline: none;
	}

	.kg-ah-mobile-item .dashicons {
		width: auto;
		height: auto;
		font-size: 33px;
		line-height: 1;
		color: #ff7a00;
	}

	.kg-ah-mobile-label {
		display: block;
		max-width: 145px;
		overflow-wrap: anywhere;
	}
}
