@keyframes theme-header-menu-slide-in {
	from {
		clip-path: inset(0 0 100% 0);
	}

	to {
		clip-path: inset(0 0 0 0);
	}
}

@keyframes theme-header-menu-slide-out {
	from {
		clip-path: inset(0 0 0 0);
	}

	to {
		clip-path: inset(0 0 100% 0);
	}
}

@media screen and (min-width: 992px) {
	.theme-header__nav.wp-block-navigation .wp-block-navigation__responsive-container-open,
	.theme-header__nav.wp-block-navigation .wp-block-navigation__responsive-container-close {
		display: none !important;
	}

	.theme-header__nav.wp-block-navigation .wp-block-navigation__responsive-container {
		display: block !important;
		position: static !important;
		width: auto !important;
		height: auto !important;
		padding: 0 !important;
		inset: auto !important;
		visibility: visible !important;
		opacity: 1 !important;
		overflow: visible !important;
		background-color: transparent !important;
		transform: none !important;
	}

	.theme-header__nav.wp-block-navigation .wp-block-navigation__responsive-container .wp-block-navigation__container {
		display: flex !important;
	}

	/* Desktop uses the header icon; keep Facebook out of the horizontal nav. */
	.theme-header__nav .theme-header__nav-facebook {
		display: none !important;
	}
}

@media screen and (min-width: 600px) and (max-width: 991px) {
	.theme-header__nav.wp-block-navigation .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex !important;
	}

	.theme-header__nav.wp-block-navigation:not(.is-mobile-menu-open):not(.is-mobile-menu-closing) .wp-block-navigation__responsive-container {
		display: none !important;
	}
}

@media screen and (max-width: 991px) {
	:root {
		--theme-admin-bar-height: 0px;
	}

	html.admin-bar {
		--theme-admin-bar-height: var(--wp-admin--admin-bar--height, 32px);
	}

	@media screen and (max-width: 782px) {
		html.admin-bar {
			--theme-admin-bar-height: var(--wp-admin--admin-bar--height, 46px);
		}
	}

	/* Fixed header: template shell takes no flow space; main offset lives in layout.css. */
	.wp-site-blocks {
		gap: 0 !important;
	}

	.wp-site-blocks > .wp-block-template-part:has( .theme-header ),
	.wp-site-blocks > header.wp-block-template-part {
		height: 0 !important;
		min-height: 0 !important;
		overflow: visible !important;
		margin: 0 !important;
		padding: 0 !important;
		pointer-events: none;
	}

	.wp-site-blocks > .wp-block-template-part:has( .theme-header ) .theme-header,
	.wp-site-blocks > header.wp-block-template-part .theme-header {
		pointer-events: auto;
	}

	html.is-mobile-nav-open {
		overflow: hidden;
	}

	.theme-header {
		position: fixed;
		top: var(--theme-admin-bar-height, 0px);
		right: 0;
		left: 0;
		width: 100%;
		z-index: 99990;
		overflow: visible;
		background: var(--wp--preset--color--white, #fff);
		isolation: isolate;
	}

	.theme-header__inner {
		position: relative;
		z-index: 2;
		overflow: visible;
		background: var(--wp--preset--color--white, #fff);
	}

	body:has( .startsida-hero ) .theme-header,
	body:has( .undersida-hero--has-image ) .theme-header {
		background: transparent;
		isolation: auto;
	}

	body:has( .startsida-hero ) .theme-header__inner,
	body:has( .undersida-hero--has-image ) .theme-header__inner {
		background: transparent;
		padding-block: 1.15rem 0.7rem;
		transition: padding-block var(--theme-duration, 0.2s) var(--theme-ease, ease);
	}

	html.is-header-solid body:has( .startsida-hero ) .theme-header__inner,
	html.is-header-solid body:has( .undersida-hero--has-image ) .theme-header__inner {
		background: var(--wp--preset--color--white, #fff);
		padding-block: 0.7rem;
	}

	body:has( .startsida-hero ) .theme-header__nav.wp-block-navigation .wp-block-navigation__responsive-container-open,
	body:has( .undersida-hero--has-image ) .theme-header__nav.wp-block-navigation .wp-block-navigation__responsive-container-open {
		color: var(--wp--preset--color--white, #fff);
	}

	html.is-header-solid body:has( .startsida-hero ) .theme-header__nav.wp-block-navigation .wp-block-navigation__responsive-container-open,
	html.is-header-solid body:has( .undersida-hero--has-image ) .theme-header__nav.wp-block-navigation .wp-block-navigation__responsive-container-open {
		color: var(--wp--preset--color--blue-900, #0c2033);
	}

	/*
	 * Menu open: solid white header so the slide panel grows from a white bar,
	 * not out of the hero image. Keep through close animation too.
	 */
	html.is-mobile-nav-open body:has( .startsida-hero ) .theme-header,
	html.is-mobile-nav-open body:has( .undersida-hero--has-image ) .theme-header,
	body:has( .startsida-hero ) .theme-header:has( .is-mobile-menu-closing ),
	body:has( .undersida-hero--has-image ) .theme-header:has( .is-mobile-menu-closing ) {
		background: var(--wp--preset--color--white, #fff);
		color: var(--wp--preset--color--blue-900, #0c2033);
		isolation: isolate;
	}

	html.is-mobile-nav-open body:has( .startsida-hero ) .theme-header__inner,
	html.is-mobile-nav-open body:has( .undersida-hero--has-image ) .theme-header__inner,
	body:has( .startsida-hero ) .theme-header:has( .is-mobile-menu-closing ) .theme-header__inner,
	body:has( .undersida-hero--has-image ) .theme-header:has( .is-mobile-menu-closing ) .theme-header__inner {
		background: var(--wp--preset--color--white, #fff);
		padding-block: 0.7rem;
	}

	html.is-mobile-nav-open body:has( .startsida-hero ) .theme-header__nav.wp-block-navigation .wp-block-navigation__responsive-container-open,
	html.is-mobile-nav-open body:has( .undersida-hero--has-image ) .theme-header__nav.wp-block-navigation .wp-block-navigation__responsive-container-open,
	body:has( .startsida-hero ) .theme-header:has( .is-mobile-menu-closing ) .wp-block-navigation__responsive-container-open,
	body:has( .undersida-hero--has-image ) .theme-header:has( .is-mobile-menu-closing ) .wp-block-navigation__responsive-container-open {
		color: var(--wp--preset--color--blue-900, #0c2033);
	}

	.theme-header__logo {
		position: relative;
		z-index: 5;
	}

	.theme-header__nav.wp-block-navigation {
		display: flex !important;
		flex-flow: row nowrap !important;
		align-items: center !important;
		align-self: center !important;
		justify-content: flex-end !important;
		position: relative !important;
		z-index: 3 !important;
		width: auto !important;
		height: auto !important;
		min-height: 0 !important;
		gap: 0 !important;
		overflow: visible;
	}

	.theme-header__nav.wp-block-navigation .wp-block-navigation__responsive-container-open {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		position: relative !important;
		z-index: 4 !important;
		flex-shrink: 0;
		width: 2.75rem;
		height: 2.75rem;
		margin: 0 !important;
		padding: 0 !important;
		border: 0;
		background: transparent;
		color: var(--wp--preset--color--blue-900, #0c2033);
		cursor: pointer;
	}

	.theme-header__nav.wp-block-navigation .wp-block-navigation__responsive-container-open svg {
		display: none !important;
	}

	.theme-header__nav.wp-block-navigation .theme-menu-icon {
		display: block;
		position: relative;
		width: 1.35rem;
		height: 0.625rem;
	}

	.theme-header__nav.wp-block-navigation .theme-menu-icon span {
		position: absolute;
		left: 0;
		width: 100%;
		height: 2px;
		border-radius: 1px;
		background: currentColor;
		transition:
			transform 200ms var(--theme-ease),
			top 200ms var(--theme-ease),
			bottom 200ms var(--theme-ease),
			width 200ms var(--theme-ease),
			height 200ms var(--theme-ease);
	}

	.theme-header__nav.wp-block-navigation .theme-menu-icon span:first-child {
		top: 0;
	}

	.theme-header__nav.wp-block-navigation .theme-menu-icon span:last-child {
		bottom: 0;
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .theme-menu-icon {
		width: 1.5rem;
		height: 1.5rem;
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .theme-menu-icon span {
		width: 100%;
		height: 1.5px;
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .theme-menu-icon span:first-child {
		top: 50%;
		transform: translateY(-50%) rotate(45deg);
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .theme-menu-icon span:last-child {
		bottom: auto;
		top: 50%;
		transform: translateY(-50%) rotate(-45deg);
	}

	.theme-header__nav.wp-block-navigation:not(.is-mobile-menu-open):not(.is-mobile-menu-closing) .wp-block-navigation__responsive-container {
		display: none !important;
	}

	.theme-header__nav.wp-block-navigation .wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-close {
		display: none !important;
	}

	.theme-header__nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open {
		z-index: 1 !important;
		overflow: visible !important;
		max-height: none !important;
		height: auto !important;
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container {
		display: flex !important;
		position: fixed !important;
		inset: unset !important;
		/* Start under admin bar so white runs continuously behind the header — no hero gap. */
		top: var(--theme-admin-bar-height, 0px) !important;
		right: 0 !important;
		left: 0 !important;
		bottom: auto !important;
		z-index: 1 !important;
		flex-direction: column !important;
		justify-content: flex-start !important;
		width: 100% !important;
		height: auto !important;
		max-height: none !important;
		margin: 0 !important;
		padding: var(--theme-mobile-header-height, 4.5rem) 0 0 !important;
		overflow: visible !important;
		background-color: var(--wp--preset--color--white, #fff) !important;
		color: var(--wp--preset--color--blue-900, #0c2033) !important;
		border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--blue-900, #0c2033) 14%, transparent);
		box-shadow: 0 0.5rem 1.5rem rgb(12 32 51 / 8%);
		transform: none !important;
		clip-path: inset(0 0 0 0);
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container {
		animation: theme-header-menu-slide-in var(--theme-duration-slow) var(--theme-ease);
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container {
		animation: theme-header-menu-slide-out var(--theme-duration-slow) var(--theme-ease) forwards;
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container .wp-block-navigation__responsive-dialog,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container .wp-block-navigation__responsive-close-dialog,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container .wp-block-navigation__responsive-dialog,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container .wp-block-navigation__responsive-close-dialog,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		width: 100% !important;
		height: auto !important;
		max-height: none !important;
		margin: 0 !important;
		padding: 0.5rem var(--theme-page-gutter) 2rem !important;
		box-sizing: border-box;
		overflow: visible !important;
		background-color: var(--wp--preset--color--white, #fff) !important;
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container .wp-block-navigation__container,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container .wp-block-navigation__container {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 0 !important;
		width: 100% !important;
		height: auto !important;
		max-height: none !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: visible !important;
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container .wp-block-navigation-item,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container .wp-block-navigation-item {
		width: 100%;
		margin: 0;
		border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--blue-900, #0c2033) 12%, transparent);
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container .wp-block-navigation-item:last-child,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container .wp-block-navigation-item:last-child {
		border-bottom: 0;
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container .wp-block-navigation-item__content,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container .wp-block-navigation-item__content {
		position: relative;
		display: flex;
		align-items: center;
		width: 100%;
		padding-block: 1rem;
		color: var(--wp--preset--color--blue-900, #0c2033);
		font-size: var(--wp--preset--font-size--subheading, 1.25rem);
		font-weight: 300;
		line-height: 1.35;
		text-align: left;
		text-decoration: none;
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container .wp-block-navigation-item__content::before,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container .wp-block-navigation-item__content::before {
		display: none;
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container .current-menu-item > .wp-block-navigation-item__content,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container .wp-block-navigation-item__content[aria-current="page"],
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container .current-menu-item > .wp-block-navigation-item__content,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container .wp-block-navigation-item__content[aria-current="page"] {
		color: var(--wp--preset--color--blue-900, #0c2033);
		font-weight: 500;
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container .current-menu-item > .wp-block-navigation-item__content::before,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container .wp-block-navigation-item__content[aria-current="page"]::before,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container .current-menu-item > .wp-block-navigation-item__content::before,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container .wp-block-navigation-item__content[aria-current="page"]::before {
		display: none;
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container .wp-block-navigation-item__content:focus-visible,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container .wp-block-navigation-item__content:focus-visible {
		outline: none;
		color: var(--wp--preset--color--blue-900, #0c2033);
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container .wp-block-navigation-item__content:focus-visible::before,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container .wp-block-navigation-item__content:focus-visible::before {
		display: none;
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .theme-header__nav-facebook,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .theme-header__nav-facebook {
		display: block !important;
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .theme-header__nav-facebook .wp-block-navigation-item__content,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .theme-header__nav-facebook .wp-block-navigation-item__content {
		font-size: 0;
		line-height: 0;
	}

	.theme-header__nav.wp-block-navigation.is-mobile-menu-open .theme-header__nav-facebook .wp-block-navigation-item__content::after,
	.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .theme-header__nav-facebook .wp-block-navigation-item__content::after {
		content: "";
		display: block;
		width: 1.75rem;
		height: 1.75rem;
		flex-shrink: 0;
		background-color: currentColor;
		mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M22.06 11.987C22.0597 10.0644 21.5085 8.18206 20.4717 6.56294C19.4348 4.94383 17.9558 3.6557 16.2096 2.85105C14.4635 2.04641 12.5233 1.75894 10.6188 2.02269C8.71437 2.28643 6.92535 3.09035 5.46358 4.33926C4.00181 5.58817 2.92849 7.22977 2.37071 9.06972C1.81292 10.9097 1.79401 12.8709 2.31623 14.7213C2.83845 16.5717 3.87992 18.2336 5.31735 19.5105C6.75478 20.7873 8.52797 21.6256 10.427 21.926V14.9H7.872V11.987H10.427V9.771C10.3721 9.25334 10.4318 8.72994 10.6017 8.23788C10.7716 7.74581 11.0476 7.29713 11.4101 6.92358C11.7727 6.55004 12.213 6.26079 12.6998 6.0763C13.1865 5.89181 13.7079 5.8166 14.227 5.856C14.9815 5.8675 15.7342 5.93435 16.479 6.056V8.529H15.211C14.9948 8.50024 14.7749 8.52047 14.5676 8.58821C14.3603 8.65594 14.1709 8.76945 14.0134 8.92031C13.8559 9.07118 13.7344 9.25555 13.6578 9.45975C13.5812 9.66396 13.5515 9.88278 13.571 10.1V11.987H16.362L15.915 14.9H13.571V21.93C15.9381 21.5549 18.0937 20.3474 19.6499 18.5247C21.2061 16.7019 22.0607 14.3837 22.06 11.987Z'/%3E%3C/svg%3E") center / contain no-repeat;
		-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M22.06 11.987C22.0597 10.0644 21.5085 8.18206 20.4717 6.56294C19.4348 4.94383 17.9558 3.6557 16.2096 2.85105C14.4635 2.04641 12.5233 1.75894 10.6188 2.02269C8.71437 2.28643 6.92535 3.09035 5.46358 4.33926C4.00181 5.58817 2.92849 7.22977 2.37071 9.06972C1.81292 10.9097 1.79401 12.8709 2.31623 14.7213C2.83845 16.5717 3.87992 18.2336 5.31735 19.5105C6.75478 20.7873 8.52797 21.6256 10.427 21.926V14.9H7.872V11.987H10.427V9.771C10.3721 9.25334 10.4318 8.72994 10.6017 8.23788C10.7716 7.74581 11.0476 7.29713 11.4101 6.92358C11.7727 6.55004 12.213 6.26079 12.6998 6.0763C13.1865 5.89181 13.7079 5.8166 14.227 5.856C14.9815 5.8675 15.7342 5.93435 16.479 6.056V8.529H15.211C14.9948 8.50024 14.7749 8.52047 14.5676 8.58821C14.3603 8.65594 14.1709 8.76945 14.0134 8.92031C13.8559 9.07118 13.7344 9.25555 13.6578 9.45975C13.5812 9.66396 13.5515 9.88278 13.571 10.1V11.987H16.362L15.915 14.9H13.571V21.93C15.9381 21.5549 18.0937 20.3474 19.6499 18.5247C21.2061 16.7019 22.0607 14.3837 22.06 11.987Z'/%3E%3C/svg%3E") center / contain no-repeat;
	}
}

@media (prefers-reduced-motion: reduce) {
	@media screen and (max-width: 991px) {
		.theme-header__nav.wp-block-navigation.is-mobile-menu-open .wp-block-navigation__responsive-container,
		.theme-header__nav.wp-block-navigation.is-mobile-menu-closing .wp-block-navigation__responsive-container {
			animation: none;
		}

		.theme-header__nav.wp-block-navigation .theme-menu-icon span {
			transition: none;
		}
	}
}
