/* TK HEADER
 * Phase 1: desktop + mobile header.
 * All selectors are namespaced tk-header.
 */
 
.tk-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--tk-white);
    isolation: isolate;
}

.tk-header__top {
	background: var(--tk-green-950);
	color: rgba(255,255,255,.88);
	font-size: 13px;
	line-height: 1;
}

.tk-header__top-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 36px;
	min-height: 36px;
	gap: 20px;
}

.tk-header__top-note {
	margin: 0;
}

.tk-header__top-contact {
	display: flex;
	align-items: center;
	gap: 10px;
	white-space: nowrap;
}

.tk-header__top a {
	color: inherit;
	text-decoration: none;
	transition: color .2s ease;
}

.tk-header__top a:hover {
	color: var(--tk-white);
}

.tk-header__main {
	background: var(--tk-white);
	border-bottom: 1px solid var(--tk-border);
}

.tk-header__main-inner {
	display: flex;
	align-items: center;
	height: 82px;
	min-height: 82px;
	padding-block: 0;
	gap: 28px;
}

.tk-header__brand {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	color: var(--tk-green-900);
	text-decoration: none;
}

.tk-header__brand .custom-logo-link {
	display: inline-flex;
	align-items: center;
}

.tk-header__brand .custom-logo {
    display: block;
    width: auto;
    max-width: 160px;
    max-height: 48px !important;
    height: auto !important;
    object-fit: contain;
}

.tk-header__brand-text {
	display: inline-flex;
	align-items: baseline;
	gap: 7px;
	white-space: nowrap;
}

.tk-header__brand-name {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -.03em;
}

.tk-header__brand-sub {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .18em;
	color: var(--tk-green-700);
}

.tk-header__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 auto;
	gap: 4px;
}

.tk-header__link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 42px;
	padding: 0 10px;
	border: 0;
	background: transparent;
	color: var(--tk-charcoal);
	font: inherit;
	font-size: 14px;
	font-weight: 650;
	text-decoration: none;
	cursor: pointer;
	border-radius: var(--tk-radius-sm);
	transition: color .2s ease, background-color .2s ease;
}

.tk-header__link:hover,
.tk-header__link:focus-visible {
	color: var(--tk-green-800);
	background: var(--tk-green-50);
}

.tk-header__link svg {
	width: 11px;
	height: 8px;
	transition: transform .2s ease;
}

.tk-header__dropdown {
	position: static;
}

.tk-header__dropdown.is-open .tk-header__link--dropdown {
	color: var(--tk-green-800);
	background: var(--tk-green-50);
}

.tk-header__dropdown.is-open .tk-header__link--dropdown svg {
	transform: rotate(180deg);
}

.tk-header__mega {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	display: none;
	padding: 0 0 22px;
	background: var(--tk-white);
	border-bottom: 1px solid var(--tk-border);
	box-shadow: var(--tk-shadow-md);
}

.tk-header__dropdown.is-open .tk-header__mega {
	display: block;
}

.tk-header__mega-inner {
	display: grid;
	grid-template-columns: minmax(250px, .85fr) minmax(420px, 1.5fr);
	gap: 48px;
	width: min(var(--tk-container), calc(100% - (var(--tk-gutter) * 2)));
	margin-inline: auto;
	padding: 28px 0 8px;
}

.tk-header__mega-intro {
	max-width: 350px;
	padding-right: 24px;
	border-right: 1px solid var(--tk-border);
}

.tk-header__mega-intro strong {
	display: block;
	margin-top: 2px;
	color: var(--tk-charcoal);
	font-size: 20px;
	line-height: 1.3;
}

.tk-header__mega-intro p {
	margin: 9px 0 0;
	color: var(--tk-muted);
	font-size: 14px;
	line-height: 1.65;
}

.tk-header__mega-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px 12px;
	align-content: start;
}

.tk-header__mega-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 48px;
	padding: 0 13px;
	border-radius: var(--tk-radius-sm);
	color: var(--tk-charcoal);
	font-size: 14px;
	font-weight: 650;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}

.tk-header__mega-list a:hover {
	background: var(--tk-green-50);
	color: var(--tk-green-800);
}

.tk-header__mega-list svg {
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
	color: var(--tk-green-700);
}

.tk-header__actions {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	gap: 12px;
}

.tk-header__phone {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--tk-green-800);
	font-size: 14px;
	font-weight: 750;
	text-decoration: none;
	white-space: nowrap;
}

.tk-header__phone svg {
	width: 18px;
	height: 18px;
}

.tk-header__quote {
	min-height: 42px;
	padding-inline: 17px;
	font-size: 13px;
}

.tk-header__toggle,
.tk-header__mobile {
	display: none;
}

/* Prevent Astra's default header spacing from affecting the replacement. */
.tk-header + .site-content {
	/* Intentionally empty: keeps Astra content flow intact. */
}

@media (max-width: 1199px) {
	.tk-header__main-inner {
		gap: 16px;
	}

	.tk-header__nav {
		gap: 0;
	}

	.tk-header__link {
		padding-inline: 7px;
		font-size: 13px;
	}

	.tk-header__phone span {
		display: none;
	}
}

@media (max-width: 991px) {
	.tk-header__top-note {
		font-size: 12px;
	}

	.tk-header__main-inner {
		height: 72px;
		min-height: 72px;
	}

	.tk-header__nav,
	.tk-header__actions {
		display: none;
	}

	.tk-header__toggle {
		display: inline-flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 5px;
		width: 44px;
		height: 44px;
		margin-left: auto;
		padding: 0;
		border: 0;
		border-radius: var(--tk-radius-sm);
		background: transparent;
		cursor: pointer;
	}

	.tk-header__toggle span {
		display: block;
		width: 23px;
		height: 2px;
		border-radius: 99px;
		background: var(--tk-green-900);
		transition: transform .2s ease, opacity .2s ease;
	}

	.tk-header__toggle.is-open span:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}

	.tk-header__toggle.is-open span:nth-child(2) {
		opacity: 0;
	}

	.tk-header__toggle.is-open span:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}

	.tk-header__mobile {
		display: block;
		max-height: 0;
		overflow: hidden;
		background: var(--tk-white);
		border-bottom: 1px solid transparent;
		transition: max-height .28s ease, border-color .28s ease;
	}

	.tk-header__mobile.is-open {
		max-height: calc(100vh - 108px);
		overflow-y: auto;
		border-bottom-color: var(--tk-border);
		box-shadow: var(--tk-shadow-md);
	}

	.tk-header__mobile-inner {
		padding-block: 8px 22px;
	}

	.tk-header__mobile-inner > a,
	.tk-header__mobile-group > button {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		min-height: 50px;
		padding: 0;
		border: 0;
		border-bottom: 1px solid var(--tk-border);
		background: transparent;
		color: var(--tk-charcoal);
		font-size: 15px;
		font-weight: 700;
		text-decoration: none;
		text-align: left;
		cursor: pointer;
	}

	.tk-header__mobile-group > button svg {
		width: 12px;
		height: 8px;
		transition: transform .2s ease;
	}

	.tk-header__mobile-group.is-open > button {
		color: var(--tk-green-800);
	}

	.tk-header__mobile-group.is-open > button svg {
		transform: rotate(180deg);
	}

	.tk-header__mobile-products {
		display: grid;
		grid-template-rows: 0fr;
		transition: grid-template-rows .2s ease;
	}

	.tk-header__mobile-products::before {
		content: "";
		display: block;
		grid-row: 1 / span 1;
		grid-column: 1;
		min-height: 0;
	}

	.tk-header__mobile-group.is-open .tk-header__mobile-products {
		grid-template-rows: 1fr;
	}

	.tk-header__mobile-products > * {
		min-height: 0;
		overflow: hidden;
	}

	.tk-header__mobile-products a {
		display: block;
		padding: 11px 12px;
		border-bottom: 1px solid var(--tk-border);
		color: var(--tk-muted);
		font-size: 14px;
		font-weight: 600;
		text-decoration: none;
	}

	.tk-header__mobile-products a:hover {
		color: var(--tk-green-800);
		background: var(--tk-green-50);
	}

	.tk-header__mobile-quote {
		width: 100%;
		margin-top: 18px;
	}

	.tk-header__mobile-phone {
		display: flex;
		justify-content: center;
		gap: 18px;
		padding-top: 18px;
	}

	.tk-header__mobile-phone a {
		color: var(--tk-green-800);
		font-size: 14px;
		font-weight: 750;
		text-decoration: none;
	}
}

@media (max-width: 575px) {
	.tk-header__top-inner {
		justify-content: center;
		height: 34px;
		min-height: 34px;
	}

	.tk-header__top-note {
		display: none;
	}

	.tk-header__top-contact {
		font-size: 12px;
	}

	.tk-header__brand .custom-logo {
        max-width: 135px;
        max-height: 42px !important;
    }

	.tk-header__brand-name {
		font-size: 19px;
	}

	.tk-header__brand-sub {
		font-size: 10px;
	}

	.tk-header__mobile-phone {
		flex-direction: column;
		align-items: center;
		gap: 8px;
	}
}
