/*╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗*/
/*║ HEADER I                                                                                                                                                                                                                                              ║*/
/*╚════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝*/
/***-------------------------------------------*** Space for Header ***-------------------------------------------***/
#cmsgrid > div:first-of-type { padding-top: 140px; }

/***-------------------------------------------*** Header ***-------------------------------------------***/
header { position: fixed; z-index: 1000; inset: 0 0 auto 0; height: 140px; background: var(--white); transition: var(--transition); }
body.scrolled header { box-shadow: 0 0 100px 0 rgba(0,0,0,0.1); }
header:before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: var(--primary); }
header .cms_container_wide { position: relative; display: flex; justify-content: center; align-items: center; height: 140px; padding: 0 30px; }

/***-------------------------------------------*** Hamburger ***-------------------------------------------***/
header #hHamburger { cursor: pointer; position: absolute; top: 50%; right: 30px; transform: translateY(-50%); }
#hHamburgerIcon { position: relative; cursor: pointer; width: 40px; height: 14px; }
#hHamburgerIcon span { position: absolute; left: 0; display: block; width: 100%; height: 2px; background: var(--primary); transform: rotate(0deg); transition: var(--transition); }
#hHamburgerIcon span:nth-child(1),
#hHamburgerIcon span:nth-child(2) { transform-origin: left center; }
#hHamburgerIcon span:nth-child(1) { top: 0px; }
#hHamburgerIcon span:nth-child(2) { top: 12px; }
body.navi #hHamburgerIcon span:nth-child(1) { top: -8px; left: 6px; transform: rotate(45deg); }
body.navi #hHamburgerIcon span:nth-child(2) { top: 20px; left: 6px; transform: rotate(-45deg); }

/***-------------------------------------------*** Close ***-------------------------------------------***/
header #hClose { cursor: pointer; position: absolute; z-index: 1; top: 30px; right: 30px; width: 39px; height: 39px; }
header #hClose > span { position: absolute; z-index: 1; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(45deg); background: var(--white); transition: var(--transition); }
header #hClose:hover > span { background: var(--tertiary); }
header #hClose > span:first-of-type { width: 100%; height: 2px; }
header #hClose > span:last-of-type { width: 2px; height: 100%; }

/***-------------------------------------------*** Logo ***-------------------------------------------***/
body #logo_container { position: absolute; z-index: 1; top: 50%; left: 30px; transform: translateY(-50%); width: 180px; height: 85px; }
body #logo_container > a { position: absolute; z-index: 1; inset: 0; background: center left / contain no-repeat url("/pages/img/logo.svg"); }

/***-------------------------------------------*** Service Navigation ***-------------------------------------------***/
header #hService { position: absolute; top: 50%; right: 30px; transform: translateY(-50%); }
header #hService > ul { display: flex; align-items: center; gap: 20px; }
header #hService > ul > li { display: block; }
@media screen and (max-width: 1200px) { header #hService { display: none; } }

/***-------------------------------------------*** Service Navigation Mobile ***-------------------------------------------***/
header #hServiceMobile { display: flex; justify-content: flex-end; margin: 30px 0 0 0; }
header #hServiceMobile > ul { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
header #hServiceMobile > ul > li { display: block; }

/***-------------------------------------------*** Logout ***-------------------------------------------***/
header .hLogout > a { display: flex; }
header .hLogout > a > i { font-size: 20px; line-height: 20px; color: var(--black); transition: var(--transition); }
header .hLogout > a:hover > i { color: var(--primary); }

/***-------------------------------------------*** Mobile ***-------------------------------------------***/
header .hLogoutMobile > a { display: flex; }
header .hLogoutMobile > a > i { font-size: 20px; line-height: 20px; color: var(--white); transition: var(--transition); }
header .hLogoutMobile > a:hover > i { color: var(--tertiary); }

/***-------------------------------------------*** Datenschutz und Impressum ***-------------------------------------------***/
header #hDataImp { display: flex; justify-content: flex-end; width: 100%; padding: 30px 0 0 0; margin: auto 0 0 0; }
header #hDataImp strong { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 37px; width: 100%; }
header #hDataImp a { color: var(--white); transition: var(--transition); }
header #hDataImp a:hover { text-decoration: underline; }

/***-------------------------------------------*** Hide on Desktop ***-------------------------------------------***/
@media screen and (min-width: 1201px) {
	header #hServiceMobile { display: none; }
	header #hHamburger { display: none; }
	header #hClose { display: none; }
	header #hDataImp { display: none; }
}

/***-------------------------------------------*** Desktop ***-------------------------------------------***/
@media screen and (min-width: 1201px) {
	/* Start: First-Level */
	header #hNavigation > ul { display: flex; align-items: center; gap: 50px; width: 100%; }
	header #hNavigation > ul > li { display: block; }
	header #hNavigation > ul > li > a { display: block; font-weight: 600; font-size: 16px; line-height: 20px; color: var(--black); white-space: nowrap; transition: var(--transition); }
	header #hNavigation > ul > li.current > a,
	header #hNavigation > ul > li:hover > a { color: var(--primary); }
	/* End: First-Level */

	/* Start: Scrolled */
	header,
	header .cms_container_wide,
	body #logo_container { transition: var(--transition); }

	body.scrolled header { height: 100px; }
	body.scrolled header .cms_container_wide { height: 100px; }
	body.scrolled #logo_container { width: 127px; height: 60px; }
	/* End: Scrolled */
}

/***-------------------------------------------*** Tablet ***-------------------------------------------***/
@media screen and (min-width: 641px) and (max-width: 1200px) {
	/* Start: Header */
	#cmsgrid > div:first-of-type { padding-top: 120px; }
	header { height: 120px; }
	header .cms_container_wide { height: 120px; }
	body #logo_container { width: 161px; height: 76px; }
	/* End: Header */

	/* Start: Navigation */
	header #hNavigation { position: fixed; z-index: 1; top: 0; right: -100%; bottom: 0; display: flex; flex-direction: column; min-width: 393px; padding: 108px 30px 15px 30px; background: var(--bg-verlauf); overflow-y: auto; transition: var(--transition); }
	body.navi header #hNavigation { right: 0; }
	/* End: Navigation */

	/* Start: First-Level */
	header #hNavigation > ul { display: flex; flex-direction: column; gap: 21px; }
	header #hNavigation > ul > li { display: block; padding: 0 0 21px 0; border-bottom: 1px solid rgba(255,255,255,0.3); }
	header #hNavigation > ul > li > a { display: block; font-weight: 600; font-size: 24px; line-height: 29px; color: var(--white); white-space: nowrap; transition: var(--transition); }
	header #hNavigation > ul > li.current > a,
	header #hNavigation > ul > li:hover > a { color: var(--tertiary); }
	/* End: First-Level */

	/* Start: Scrolled */
	header,
	header .cms_container_wide,
	body #logo_container { transition: var(--transition); }

	body.scrolled header { height: 70px; }
	body.scrolled header .cms_container_wide { height: 70px; }
	body.scrolled #logo_container { width: 95px; height: 45px; }
	/* End: Scrolled */
}

/***-------------------------------------------*** Smartphone ***-------------------------------------------***/
@media screen and (max-width: 640px) {
	/* Start: Header */
	#cmsgrid > div:first-of-type { padding-top: 100px; }
	header { height: 100px; }
	header .cms_container_wide { height: 100px; }
	body #logo_container { width: 140px; height: 66px; }
	/* End: Header */

	/* Start: Navigation */
	header #hNavigation { position: fixed; z-index: 1; top: 0; right: -100vW; bottom: 0; display: flex; flex-direction: column; width: 100vW; padding: 108px 30px 15px 30px; background: var(--bg-verlauf); overflow-y: auto; transition: var(--transition); }
	body.navi header #hNavigation { right: 0; }
	/* End: Navigation */

	/* Start: First-Level */
	header #hNavigation > ul { display: flex; flex-direction: column; gap: 21px; }
	header #hNavigation > ul > li { display: block; padding: 0 0 21px 0; border-bottom: 1px solid rgba(255,255,255,0.3); }
	header #hNavigation > ul > li > a { display: block; font-weight: 600; font-size: 24px; line-height: 29px; color: var(--white); white-space: nowrap; transition: var(--transition); }
	header #hNavigation > ul > li.current > a,
	header #hNavigation > ul > li:hover > a { color: var(--tertiary); }
	/* End: First-Level */

	/* Start: Scrolled */
	header,
	header .cms_container_wide,
	body #logo_container { transition: var(--transition); }

	body.scrolled header { height: 70px; }
	body.scrolled header .cms_container_wide { height: 70px; }
	body.scrolled #logo_container { width: 95px; height: 45px; }
	/* End: Scrolled */
}