/**
 * Kovka-specific header presentation.
 *
 * This stylesheet extends the reusable Theme Zero header without replacing
 * its semantic markup, responsive navigation JavaScript or accessibility
 * behaviour.
 */

.site-header {
	position: relative;
	z-index: 30;
	width: min(calc(100% - 1rem), 96rem);
	margin: 0.5rem auto 0;
	border: 0.0625rem solid rgb(217 225 234 / 85%);
	border-radius: 1rem;
	box-shadow: 0 0.5rem 1.5rem rgb(20 36 59 / 6%);
}

.t0-header-inner {
	width: 100%;
	min-height: 5.5rem;
	justify-content: flex-start;
	gap: clamp(1rem, 2vw, 2rem);
	padding: 0.625rem clamp(1rem, 3vw, 2rem);
}

.primary-navigation {
	order: 1;
	min-width: 0;
	flex: 1 1 auto;
}

.site-branding {
	order: 2;
	flex: 0 0 auto;
	align-items: flex-end;
	margin-inline-start: auto;
	text-align: end;
}

.site-branding .site-description {
	display: none;
}

.custom-logo-link {
	justify-content: flex-end;
}

.custom-logo {
	width: auto;
	max-width: min(13rem, 28vw);
	max-height: 4rem;
}

.site-title {
	font-size: clamp(1.125rem, 2vw, 1.5rem);
	letter-spacing: -0.02em;
}

.primary-menu {
	justify-content: flex-start;
	gap: 0.25rem clamp(0.25rem, 0.8vw, 0.75rem);
}

.primary-menu a {
	min-height: 2.75rem;
	padding-inline: clamp(0.4rem, 0.8vw, 0.7rem);
	border-radius: var(--wp--custom--radius--small, 0.5rem);
	font-size: clamp(0.75rem, 0.85vw, 0.875rem);
	font-weight: 600;
	letter-spacing: 0.015em;
	text-transform: uppercase;
}

.primary-menu a:hover {
	background: var(--wp--preset--color--background, #f4f7fb);
}

.primary-menu .current-menu-item > a,
.primary-menu .current-menu-ancestor > a {
	background: rgb(36 89 179 / 7%);
}

@media (max-width: 47.9375rem) {
	.site-header {
		width: min(calc(100% - 0.75rem), 96rem);
		margin-block-start: 0.375rem;
		border-radius: 0.875rem;
	}

	.t0-header-inner {
		min-height: 4.5rem;
		padding: 0.75rem 1rem;
	}

	.site-branding {
		order: 1;
		flex: 1 1 auto;
		align-items: flex-start;
		margin-inline-start: 0;
		text-align: start;
	}

	.menu-toggle {
		order: 2;
	}

	.primary-navigation {
		order: 3;
	}

	.custom-logo-link {
		justify-content: flex-start;
	}

	.custom-logo {
		max-width: min(10rem, 48vw);
		max-height: 3.25rem;
	}

	.primary-menu a {
		font-size: 0.875rem;
		text-transform: none;
	}
}

@media (forced-colors: active) {
	.site-header {
		border-color: CanvasText;
		box-shadow: none;
	}
}

/* Egenkontroll entry actions in the primary navigation. */
.primary-menu .t0k-menu-action > a {
	min-height: 2.75rem;
	padding-inline: clamp(0.8rem, 1.4vw, 1.25rem);
	border: 0.0625rem solid #cbd6e5;
	border-radius: 0.65rem;
	text-transform: none;
	font-size: clamp(0.78rem, 0.88vw, 0.9rem);
	font-weight: 700;
	white-space: nowrap;
}

.primary-menu .t0k-menu-action--primary > a {
	border-color: #255fc8;
	background: #255fc8;
	color: #fff;
	box-shadow: 0 0.35rem 0.8rem rgb(37 95 200 / 16%);
}

.primary-menu .t0k-menu-action--primary > a:hover,
.primary-menu .t0k-menu-action--primary > a:focus-visible {
	background: #1f55b8;
	color: #fff;
}

.primary-menu .t0k-menu-action--secondary > a {
	background: #fff;
	color: #1f2937;
}

.primary-menu .t0k-menu-action--secondary > a:hover,
.primary-menu .t0k-menu-action--secondary > a:focus-visible {
	background: #f6f8fb;
}

@media (max-width: 47.9375rem) {
	.primary-menu .t0k-menu-action > a {
		width: 100%;
		justify-content: center;
		text-align: center;
	}
}
