/**
 * Custom Header Widget styles
 */

/* ==========================================================================
   Header shell
   ========================================================================== */
{{WRAPPER}} .jutso-custom-header {
	position: relative;
	width: 100%;
	overflow: visible;
}

{{WRAPPER}} .jutso-header-container {
	position: relative;
	z-index: 1002;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 136px;
	padding: 48px;
	background-color: var(--purple500);
	overflow: visible;
}

{{WRAPPER}} .jutso-header-logo {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	min-width: 170px;
	min-height: 40px;
}

{{WRAPPER}} .jutso-header-logo img {
	display: block;
	max-width: 100%;
	height: 34px;
}

{{WRAPPER}} .jutso-header-actions {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
	min-width: 170px;
}

/* ==========================================================================
   Main navigation
   ========================================================================== */
{{WRAPPER}} .jutso-header-main-menu {
	flex: 1;
	display: flex;
	justify-content: center;
	color: var(--white);
	position: relative;
	overflow: visible;
	opacity: 1;
	visibility: visible;
	transition: opacity 0.2s ease, visibility 0s linear;
}

{{WRAPPER}} .jutso-header-main-menu ul {
	display: flex;
	align-items: center;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow: visible;
}

{{WRAPPER}} .jutso-header-main-menu li,
{{WRAPPER}} .jutso-header-main-menu .menu-item-has-children {
	position: relative;
}

{{WRAPPER}} .jutso-header-main-menu .jutso-top-level-link > a {
	display: flex;
	align-items: center;
	height: 40px;
	padding: 2px 8px;
	border-radius: 8px;
	color: var(--white);
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	text-rendering: optimizeLegibility;
	backface-visibility: hidden;
	-webkit-font-smoothing: antialiased;
	-webkit-backface-visibility: hidden;
	-webkit-transform-origin: 50% 51%;
	transform-origin: 50% 51%;
	transition: transform 0.2s ease;
}

{{WRAPPER}} .jutso-header-main-menu .jutso-top-level-link > a:hover {
	transform: rotate(2deg) translateZ(0);
}

{{WRAPPER}} .jutso-header-main-menu li.current-menu-item.jutso-top-level-link > a,
{{WRAPPER}} .jutso-header-main-menu li.current-menu-ancestor.jutso-top-level-link > a {
	background-color: var(--green500);
	color: var(--blue500);
}

{{WRAPPER}} .jutso-header-main-menu .menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	width: 20px;
	height: 20px;
	margin-left: 4px;
	vertical-align: middle;
	background-image: url('https://jut-so.de/wp-content/uploads/keyboard_arrow_down.svg');
	transition: transform 0.2s ease;
}

{{WRAPPER}} .jutso-header-main-menu .menu-item-has-children.current-menu-item > a::after,
{{WRAPPER}} .jutso-header-main-menu .menu-item-has-children.current-menu-ancestor > a::after {
	filter: invert(1);
}

{{WRAPPER}} .jutso-header-main-menu .menu-item-has-children:hover > a::after {
	transform: rotate(180deg);
}

/* ==========================================================================
   Dropdowns + submenu panel
   ========================================================================== */
{{WRAPPER}} .jutso-header-main-menu .sub-menu {
	position: absolute;
	top: calc(100% - 1px);
	left: 0;
	z-index: 1001;
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 8px 0 0;
	list-style: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

{{WRAPPER}} .jutso-header-main-menu .menu-item-has-children > .sub-menu::before,
{{WRAPPER}} .jutso-header-main-menu .menu-item-has-children > .jutso-submenu-panel::before {
	content: '';
	position: absolute;
	top: -8px;
	right: 0;
	left: 0;
	height: 8px;
}

{{WRAPPER}} .jutso-header-main-menu li:hover > .sub-menu,
{{WRAPPER}} .jutso-header-main-menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
}

{{WRAPPER}} .jutso-header-main-menu .sub-menu .sub-menu {
	top: 0;
	left: 100%;
}

{{WRAPPER}} .jutso-header-main-menu .menu-item-has-children > .jutso-submenu-panel {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 1003;
	display: grid;
	grid-template-columns: auto auto;
	column-gap: 48px;
	min-width: 520px;
	padding: 32px;
	margin-top: 12px;
	border-radius: 12px;
	background-color: var(--blue500);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-20px);
	transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}

{{WRAPPER}} .jutso-header-main-menu li.is-submenu-open > .jutso-submenu-panel,
{{WRAPPER}} .jutso-header-main-menu .jutso-submenu-panel:hover {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
	transition-delay: 0s;
}



{{WRAPPER}} .jutso-submenu-panel__links li.jut-so-sticker-label {
	background-color: var( --e-global-color-00a898e );
	border-color: var( --e-global-color-00a898e );
	padding: 12px 16px;
	border-radius: 8px;
}
{{WRAPPER}} .jutso-submenu-panel__links li.jut-so-sticker-label:hover {
	transform: rotate(0deg) translateZ(0) !important;
}
{{WRAPPER}} .jutso-submenu-panel__links li.jut-so-sticker-label a {
	
}

{{WRAPPER}} .jutso-submenu-panel__meta {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	row-gap: 24px;
}

{{WRAPPER}} .jutso-submenu-panel__description {
	margin: 0;
	color: var( --e-global-color-00a898e );
	font-size: 20px;
	font-weight: 425;
	line-height: 140%;
	letter-spacing: 0.25px;
}

{{WRAPPER}} .jutso-submenu-panel__cta {
	display: inline-flex;
	align-items: center;
	color: var(--green500);
	text-decoration: underline !important;
	transition: color 0.2s ease;
}
{{WRAPPER}} .jutso-submenu-panel__cta:hover {
	color: var(--green700) !important;
}

{{WRAPPER}} .jutso-submenu-panel__links > .sub-menu {
	position: static;
	display: flex;
	flex-direction: column;
	row-gap: 12px;
	margin: 0;
	padding: 0;
	opacity: 1;
	visibility: inherit;
	pointer-events: inherit;
	align-items: flex-start;
}

{{WRAPPER}} .jutso-submenu-panel__links li.jut-so-sticker-label.current-menu-item {
	background-color: var(--green500) !important;
	border-color: var(--green500) !important;
}
/* ==========================================================================
   Fixed actions (CTA + hamburger)
   ========================================================================== */
{{WRAPPER}} .jutso-header-cta-button {
	position: fixed;
	top: 48px;
	right: 112px;
	z-index: 1002;
	display: flex;
	align-items: center;
	height: 40px;
	padding: 12px 16px;
	border-radius: 8px;
	background-color: var(--blue500);
	color: var(--white) !important;
	font-family: var(--otherbuttontext-font-family) !important;
	font-size: var(--paragraphpsm-font-size) !important;
	font-weight: 700 !important;
	line-height: var(--otherbuttontext-line-height) !important;
	letter-spacing: var(--otherbuttontext-spacing) !important;
	word-spacing: var(--paragraph-p-sm-word-spacing) !important;
	text-decoration: none;
	text-transform: var(--otherbuttontext-text-transform) !important;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.2s ease, visibility 0s linear;
}

{{WRAPPER}} .jutso-header-hamburger {
	position: fixed;
	top: 48px;
	right: 48px;
	z-index: 1002;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 40px;
	padding: 0 !important;
	border: none !important;
	border-radius: 8px !important;
	background: var(--blue500) !important;
	cursor: pointer;
}

{{WRAPPER}} .jutso-header-hamburger--overlay {
	position: static;
	top: auto;
	right: auto;
}

{{WRAPPER}} .jutso-header-hamburger__icon {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 18px;
	height: 18px;
}

{{WRAPPER}} .jutso-header-hamburger__line {
	position: absolute;
	left: 0;
	width: 18px;
	height: 2px;
	border-radius: 999px;
	background-color: var(--white);
	transform-origin: center center;
	transition: transform 0.22s ease, opacity 0.2s ease;
}

{{WRAPPER}} .jutso-header-hamburger__line:nth-child(1) {
	transform: translateY(-5px) rotate(0deg);
}

{{WRAPPER}} .jutso-header-hamburger__line:nth-child(2) {
	transform: translateY(0) rotate(0deg);
}

{{WRAPPER}} .jutso-header-hamburger__line:nth-child(3) {
	transform: translateY(5px) rotate(0deg);
}

.jutso-custom-header.is-mega-menu-open .jutso-header-hamburger__line:nth-child(1) {
	transform: translateY(0) rotate(45deg);
}

.jutso-custom-header.is-mega-menu-open .jutso-header-hamburger__line:nth-child(2) {
	opacity: 0;
	transform: translateY(0) rotate(0deg);
}

.jutso-custom-header.is-mega-menu-open .jutso-header-hamburger__line:nth-child(3) {
	transform: translateY(0) rotate(-45deg);
}

.jutso-custom-header.is-mega-menu-open .jutso-header-main-menu,
.jutso-custom-header.is-mega-menu-open .jutso-header-cta-button {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.jutso-custom-header.is-mega-menu-open .jutso-header-cta-button,
.jutso-custom-header.is-mega-menu-open .jutso-header-hamburger {
	z-index: 1000;
}

/* ==========================================================================
   Mega menu overlay
   ========================================================================== */
{{WRAPPER}} .jutso-mega-menu-overlay {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1001;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	width: 100%;
	height: 100vh;
	padding-top: 32px;
	box-sizing: border-box;
	overflow-y: auto;
	background-color: var(--purple500);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.22s ease, visibility 0s linear 0.22s;
}

{{WRAPPER}} .jutso-mega-menu-overlay .jutso-header-container--overlay {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1002;
}

{{WRAPPER}} .jutso-mega-menu-overlay.active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition-delay: 0s;
}

{{WRAPPER}} .jutso-mega-menu-container {
	display: flex;
	justify-content: center;
	column-gap: 64px;
	width: 100%;
	height: 100%;
	margin-top: 136px;
	padding: 55px 20px 0;
	background-image: url('https://jut-so.de/wp-content/uploads/pattern-grid.svg');
	background-repeat: no-repeat;
	background-position: center top;
	background-size: auto 90%;
	transform: translateY(-20px);
	transition: transform 0.22s ease;
}

{{WRAPPER}} .jutso-mega-menu-overlay.active .jutso-mega-menu-container {
	transform: translateY(0);
}

{{WRAPPER}} .jutso-mega-menu-column {
	min-width: 0;
	width: min-content;
	display:flex;
	gap:48px;
	flex-direction: column;
}

{{WRAPPER}} .mega-menu-title {
	margin: 0 0 1.5rem;
	color: var(--white);
	padding: 0;
	border: none;
	background: transparent;
	font-size: var(--font-size-paragraph-p-xl);
	text-align: left;
}

{{WRAPPER}} .jutso-mega-menu-column ul {
	display: flex;
	flex-direction: column;
	row-gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

{{WRAPPER}} .jutso-mega-menu-column li {
	padding: 0px 0px;
}

{{WRAPPER}} .jutso-mega-menu-column li a {
	padding: 20px 32px;
}

{{WRAPPER}} .jutso-mega-menu-column li:hover {
	transform: rotate(0deg) translateZ(0) !important;
}

{{WRAPPER}} .jutso-mega-menu-column a {
	display: block;
	font-family: var(--othermenu-font-family);
	font-size: var(--othermenu-font-size);
	font-weight: 425;
	line-height: var(--othermenu-line-height);
	letter-spacing: var(--othermenu-letter-spacing);
	word-spacing: var(--othermenu-word-spacing);
	text-decoration: none;
}

{{WRAPPER}} .jutso-mega-menu-column .sub-menu {
	margin-top: 0.5rem;
	margin-left: 1rem;
	padding-left: 1rem;
}

/* ==========================================================================
   Admin bar adjustments
   ========================================================================== */
body.admin-bar .jutso-custom-header .jutso-header-hamburger,
body.admin-bar .jutso-custom-header .jutso-header-cta-button {
	top: calc(48px + 32px);
}

body.admin-bar .jutso-custom-header .jutso-mega-menu-overlay {
	top: 0;
	height: 100vh;
}

body.admin-bar .jutso-custom-header .jutso-mega-menu-overlay .jutso-header-container--overlay {
	top: 32px;
}

body.admin-bar .jutso-custom-header .jutso-mega-menu-container {
	margin-top: 168px;
}

.jutso-mega-menu-container .jutso-mega-menu-column button.mega-menu-title {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	width: 100%;
	margin: 0;
	padding: 0px;
	cursor: default;
	border: none !important;
	border-radius: 0 !important;
	color: var(--Text-text-secondary, #F5F7FA);

	font-size: var(--paragraphpxl-font-size);
	line-height: var(--paragraphpxl-line-height);
	font-family: var(--paragraphpxl-font-family);
	font-weight: var(--paragraphpxl-font-weight);
	letter-spacing: var(--paragraphpxl-letter-spacing);
	word-spacing: var(--paragraphpxl-word-spacing);
	text-transform:none;
}

.jutso-mega-menu-container .jutso-mega-menu-column button.mega-menu-title:hover,
.jutso-mega-menu-container .jutso-mega-menu-column button.mega-menu-title:focus,
.jutso-mega-menu-container .jutso-mega-menu-column button.mega-menu-title:active {
	background-color: transparent;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media screen and (max-width: 1024px) {
	{{WRAPPER}} .jutso-header-hamburger {
		width: 38px;
		height: 32px;
		top:24px;
		right:24px;
	}

	{{WRAPPER}} .jutso-header-hamburger--overlay {
		top: auto;
		right: auto;
	}

	{{WRAPPER}} .jutso-mega-menu-container {
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		row-gap: 0px;
		column-gap: 0;
		width: 100%;
		height: auto;
		margin-top: 80px;
		padding: 0;
		background-image: none;
	}

	{{WRAPPER}} .jutso-mega-menu-column {
		width: 100%;
		display: grid;
		grid-template-rows: min-content 0fr;
		gap: 0;
		transition: grid-template-rows 0.28s ease;
	}

	{{WRAPPER}} .jutso-mega-menu-column.is-open {
		grid-template-rows: min-content 1fr;
	}

	.jutso-mega-menu-container .jutso-mega-menu-column button.mega-menu-title {
		display: flex;
		align-items: center;
		justify-content: flex-start;
		width: 100%;
		margin: 0;
		padding: 24px;
		border: none !important;
		border-top: 1px solid #400CBF !important;
		cursor: pointer;
		border-radius: 0 !important;
		color: var(--Text-text-secondary, #F5F7FA);
	}

	.jutso-mega-menu-container .jutso-mega-menu-column .menu {
		gap:12px;
		padding: 0 24px;
	}

	.jutso-mega-menu-container .jutso-mega-menu-column.is-open .menu {
		padding-bottom: 18px;
	}

	.jutso-mega-menu-container .jutso-mega-menu-column .menu li a {
		font-size:20px;
	}

	{{WRAPPER}} .mega-menu-title::after {
		content: '';
		width: 18px;
		height: 18px;
		margin-left: 16px;
		flex-shrink: 0;
		background-image: url('https://jut-so.de/wp-content/uploads/keyboard_arrow_down.svg');
		background-repeat: no-repeat;
		background-position: center;
		background-size: contain;
		transition: transform 0.2s ease;
	}

	{{WRAPPER}} .jutso-mega-menu-column.is-open .mega-menu-title::after {
		transform: rotate(180deg);
	}

	{{WRAPPER}} .jutso-mega-menu-column > ul {
		display: flex;
		min-height: 0;
		overflow: hidden;
		padding-bottom: 0;
		opacity: 0;
		transition: opacity 0.2s ease, padding-bottom 0.28s ease;
	}

	{{WRAPPER}} .jutso-mega-menu-column.is-open > ul {
		padding-bottom: 16px;
		opacity: 1;
	}

	.jutso-mega-menu-overlay {
		padding-top:0;
	}

	body.admin-bar .jutso-custom-header .jutso-mega-menu-overlay.active {
		top: calc(80px + 32px);
		height: calc(100vh + 80px + 32px);
		padding:0;
	}

	.jutso-header-actions .jutso-header-cta-button,
	.jutso-header-main-menu {
		display:none !important;
	}
	.jutso-header-container {
		min-height: 80px;
		padding:24px;
	}
	.jutso-header-logo {
		min-height: 29px;
	}
	.jutso-header-logo img {
		height: 29px !important;
	}
	body.admin-bar .jutso-custom-header .jutso-header-hamburger,
	body.admin-bar .jutso-custom-header .jutso-header-cta-button {
		top: calc(24px + 32px);
	}
	body.admin-bar .jutso-custom-header .jutso-mega-menu-container {
		margin-top: 0px;
	}

}

@media screen and (max-width: 768px) {
	{{WRAPPER}} .jutso-mega-menu-container {
		width: 100%;
	}
	body.admin-bar .jutso-custom-header .jutso-header-hamburger,
	body.admin-bar .jutso-custom-header .jutso-header-cta-button {
		top: calc(24px + 46px);
	}

	body.admin-bar .jutso-custom-header .jutso-mega-menu-overlay .jutso-header-container--overlay {
		top: 46px;
	}

	body.admin-bar .jutso-custom-header .jutso-mega-menu-container {
		margin-top: 126px;
	}
	body.admin-bar .jutso-custom-header .jutso-mega-menu-overlay {
		top: 0;
		height: 100vh;
	}
	body.admin-bar .jutso-custom-header .jutso-mega-menu-overlay.active {
		top: 0;
	}
}


