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

/***-------------------------------------------*** Header ***-------------------------------------------***/
header { position: fixed; z-index: 1000; inset: 0 0 auto 0; height: 184px; background: var(--white); transition: var(--transition); }
body.scrolled header { box-shadow: 0 4px 4px 0 rgba(0,0,0,0.2); }
header .cms_container_wide { position: relative; height: 184px; padding: 0 30px; }

/***-------------------------------------------*** Hamburger ***-------------------------------------------***/
header #hHamburger { cursor: pointer; position: absolute; top: 50%; right: 30px; transform: translateY(-50%); display: none; }
#hHamburgerIcon { position: relative; width: 73px; height: 26px; transition: var(--transition); }
#hHamburgerIcon span { position: absolute; left: 0; display: block; width: 100%; height: 2px; background: var(--primary); transform: rotate(0deg); transition: var(--transition); will-change: transform; }
#hHamburgerIcon span:first-child,
#hHamburgerIcon span:nth-child(2),
#hHamburgerIcon span:last-child { transform-origin: left center; }
#hHamburgerIcon span:first-child { top: 0px; }
#hHamburgerIcon span:nth-child(2) { top: 12px; }
#hHamburgerIcon span:last-child { top: 24px; }
body.navi #hHamburgerIcon span:first-child { top: -13.5px; left: 10px; transform: rotate(45deg); }
body.navi #hHamburgerIcon span:nth-child(2) { width: 0%; opacity: 0; }
body.navi #hHamburgerIcon span:last-child { top: 37.5px; left: 10px; transform: rotate(-45deg); }

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

/***-------------------------------------------*** Logo Small ***-------------------------------------------***/
body #logo_container_small { position: absolute; z-index: 1; top: 50%; left: 30px; transform: translateY(-50%); width: 94px; height: 62px; opacity: 0; visibility: hidden; transition: var(--transition); }
body #logo_container_small > a { position: absolute; z-index: 2; inset: 0; background: center left / contain no-repeat url("/pages/img/logo_small.svg"); }

/***-------------------------------------------*** Desktop ***-------------------------------------------***/
@media screen and (min-width: 1201px) {
	/* Start: First-Level */
	header #hNavigation > ul { display: flex; justify-content: flex-end; align-items: center; gap: 45px; width: 100%; padding: 79px 0 0 299px; }
	header #hNavigation > ul > li { position: relative; display: block; padding: 0 0 21px 0; }
	header #hNavigation > ul > li > a { display: flex; align-items: center; gap: 9px; }
	header #hNavigation > ul > li > a:not([href]) { cursor: auto; }
	header #hNavigation > ul > li > a > span { position: relative; display: block; font-size: 18px; line-height: 22px; white-space: nowrap; padding: 0 0 4px 0; }
	header #hNavigation > ul > li > a > span:before { content: ""; position: absolute; z-index: 1; bottom: 0; left: -12px; width: 0px; height: 3px; background: var(--tertiary); transition: var(--transition); }
	header #hNavigation > ul > li.current > a > span:before,
	header #hNavigation > ul > li:hover > a > span:before { width: calc(100% + 12px); }
	/* End: First-Level */

	/* Start: Toggler */
	header #hNavigation > ul > li > a > .toggler { display: block; width: 12px; height: 7px; }
	header #hNavigation > ul > li > a > .toggler > svg { display: block; width: 12px; height: 7px; will-change: transform; }
	header #hNavigation > ul > li > a > .toggler > svg > path { stroke: var(--primary); }
	header #hNavigation > ul > li:hover > a > .toggler > svg { transform: rotate(180deg); }
	/* End: Toggler */

	/* Start: Second-Level */
	header #hNavigation > ul > li > ul { position: absolute; top: 47px; right: 0; display: none; flex-direction: column; align-items: flex-end; gap: 9px; min-width: 100%; padding: 13px 19px 19px 27px; background: var(--white); box-shadow: 0 4px 4px 0 rgba(0,0,0,0.25); }
	header #hNavigation > ul > li:hover > ul { display: flex; }
	header #hNavigation > ul > li > ul > li { display: block; }
	header #hNavigation > ul > li > ul > li > a { position: relative; display: block; font-size: 18px; line-height: 22px; white-space: nowrap; padding: 0 0 3px 0; }
	header #hNavigation > ul > li > ul > li > a:before { content: ""; position: absolute; z-index: 1; bottom: 0; left: -10px; width: 0px; height: 3px; background: var(--tertiary); transition: var(--transition); }
	header #hNavigation > ul > li > ul > li.current > a:before,
	header #hNavigation > ul > li > ul > li:hover > a:before { width: calc(100% + 10px); }
	/* End: Second-Level */

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

	body.scrolled header { height: 92px; }
	body.scrolled header .cms_container_wide { height: 92px; }
	body.scrolled #logo_container { opacity: 0; visibility: hidden; }
	body.scrolled #logo_container_small { opacity: 1; visibility: visible; }
	body.scrolled header #hNavigation > ul { padding: 33px 0 0 124px; }
	/* End: Scrolled */
}

/***-------------------------------------------*** Tablet ***-------------------------------------------***/
@media screen and (min-width: 960px) and (max-width: 1200px) {
	/* Start: Header */
	#cmsgrid > div:first-of-type { padding-top: 140px; }
	header { height: 140px; }
	header .cms_container_wide { height: 140px; }
	header #hHamburger { display: block; }
	header #hNavigation { position: fixed; top: 140px; right: -100%; bottom: 0; min-width: 300px; overflow-y: auto; transition: var(--transition); }
	body.navi header #hNavigation { right: 0; }
	/* End: Header */

	/* Start: First-Level */
	header #hNavigation > ul { display: flex; flex-direction: column; gap: 26px; padding: 15px; background: var(--white); border: 1px solid var(--primary); }
	header #hNavigation > ul > li { display: flex; flex-direction: column; align-items: center; gap: 4px; }
	header #hNavigation > ul > li > a { position: relative; display: block; }
	header #hNavigation > ul > li > a:not([href]) { cursor: auto; }
	header #hNavigation > ul > li > a:has(.toggler) { padding-right: 41px; margin-left: 41px; }
	header #hNavigation > ul > li > a > span { position: relative; display: block; font-size: 25px; line-height: 30px; white-space: nowrap; padding-bottom: 5px; }
	header #hNavigation > ul > li > a > span:before { content: ""; position: absolute; z-index: 1; bottom: 0; left: 0; width: 0px; height: 3px; background: var(--tertiary); transition: var(--transition); }
	header #hNavigation > ul > li.current > a > span:before,
	header #hNavigation > ul > li > a:hover > span:before { width: 100%; }
	/* End: First-Level */

	/* Start: Toggler */
	header #hNavigation > ul > li > a > .toggler { position: absolute; z-index: 1; top: 0; right: 0; display: flex; align-items: center; width: 24px; height: 35px; }
	header #hNavigation > ul > li > a > .toggler > svg { display: block; width: 24px; height: 13px; will-change: transform; }
	header #hNavigation > ul > li > a > .toggler > svg > path { stroke: var(--primary); }
	header #hNavigation > ul > li.open > a > .toggler > svg { transform: rotate(180deg); }
	/* End: Toggler */

	/* Start: Second-Level */
	header #hNavigation > ul > li > ul { display: none; flex-direction: column; align-items: center; gap: 21px; width: 100%; padding: 20px; margin: 0 0 5px 0; background: var(--white); box-shadow: 0 4px 4px 0 rgba(0,0,0,0.25); }
	header #hNavigation > ul > li.open > ul { display: flex; }
	header #hNavigation > ul > li > ul > li { display: block; }
	header #hNavigation > ul > li > ul > li > a { position: relative; display: block; font-size: 22px; line-height: 26px; white-space: nowrap; padding: 0 0 5px 0; }
	header #hNavigation > ul > li > ul > li > a:before { content: ""; position: absolute; z-index: 1; bottom: 0; left: 0; width: 0px; height: 3px; background: var(--tertiary); transition: var(--transition); }
	header #hNavigation > ul > li > ul > li.current > a:before,
	header #hNavigation > ul > li > ul > li:hover > a:before { width: 100%; }
	/* End: Second-Level */

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

	body.scrolled header { height: 103px; }
	body.scrolled header .cms_container_wide { height: 103px; }
	body.scrolled #logo_container { opacity: 0; visibility: hidden; }
	body.scrolled #logo_container_small { opacity: 1; visibility: visible; }
	body.scrolled header #hNavigation { top: 103px; }
	/* End: Scrolled */
}

/***-------------------------------------------*** Smartphone ***-------------------------------------------***/
@media screen and (max-width: 959px) {
	/* Start: Header */
	#cmsgrid > div:first-of-type { padding-top: 245px; }
	header { height: 245px; }
	header .cms_container_wide { height: 245px; }
	header #hHamburger { top: 180px; right: 50%; transform: translateX(50%); display: block; }
	body #logo_container { top: 32px; left: 50%; transform: translate(-50%,0); }
	body #logo_container_small { width: 75px; height: 49px; }
	header #hNavigation { position: fixed; top: 245px; right: -100vW; bottom: 0; width: 100vW; overflow-y: auto; background: var(--white); transition: var(--transition); }
	body.navi header #hNavigation { right: 0; }
	/* End: Header */

	/* Start: Box Shadow Fix */
	body.scrolled header { box-shadow: none; }
	header .cms_container_wide:before { content: ""; position: absolute; z-index: 1; bottom: 0; left: 0; width: 100%; height: 4px; box-shadow: 0 4px 4px 0 rgba(0,0,0,0.2); opacity: 0; visibility: visible; transition: var(--transition); }
	body.scrolled header .cms_container_wide:before,
	body.navi header .cms_container_wide:before { opacity: 1; visibility: visible; }
	/* End: Box Shadow Fix */

	/* Start: First-Level */
	header #hNavigation > ul { display: flex; flex-direction: column; gap: 26px; padding: 83px 30px 30px 30px; }
	header #hNavigation > ul > li { display: flex; flex-direction: column; align-items: center; gap: 4px; }
	header #hNavigation > ul > li > a { position: relative; display: block; }
	header #hNavigation > ul > li > a:not([href]) { cursor: auto; }
	header #hNavigation > ul > li > a:has(.toggler) { padding-right: 41px; margin-left: 41px; }
	header #hNavigation > ul > li > a > span { position: relative; display: block; font-size: 25px; line-height: 30px; white-space: nowrap; padding-bottom: 5px; }
	header #hNavigation > ul > li > a > span:before { content: ""; position: absolute; z-index: 1; bottom: 0; left: 0; width: 0px; height: 3px; background: var(--tertiary); transition: var(--transition); }
	header #hNavigation > ul > li.current > a > span:before,
	header #hNavigation > ul > li > a:hover > span:before { width: 100%; }
	/* End: First-Level */

	/* Start: Toggler */
	header #hNavigation > ul > li > a > .toggler { position: absolute; z-index: 1; top: 0; right: 0; display: flex; align-items: center; width: 24px; height: 35px; }
	header #hNavigation > ul > li > a > .toggler > svg { display: block; width: 24px; height: 13px; will-change: transform; }
	header #hNavigation > ul > li > a > .toggler > svg > path { stroke: var(--primary); }
	header #hNavigation > ul > li.open > a > .toggler > svg { transform: rotate(180deg); }
	/* End: Toggler */

	/* Start: Second-Level */
	header #hNavigation > ul > li > ul { display: none; flex-direction: column; align-items: center; gap: 21px; width: 100%; padding: 20px; margin: 0 0 5px 0; background: var(--white); box-shadow: 0 4px 4px 0 rgba(0,0,0,0.25); }
	header #hNavigation > ul > li.open > ul { display: flex; }
	header #hNavigation > ul > li > ul > li { display: block; }
	header #hNavigation > ul > li > ul > li > a { position: relative; display: block; font-size: 22px; line-height: 26px; white-space: nowrap; padding: 0 0 5px 0; }
	header #hNavigation > ul > li > ul > li > a:before { content: ""; position: absolute; z-index: 1; bottom: 0; left: 0; width: 0px; height: 3px; background: var(--tertiary); transition: var(--transition); }
	header #hNavigation > ul > li > ul > li.current > a:before,
	header #hNavigation > ul > li > ul > li:hover > a:before { width: 100%; }
	/* End: Second-Level */

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

	body.scrolled header { height: 82px; }
	body.scrolled header .cms_container_wide { height: 82px; }
	body.scrolled header #hHamburger { top: 50%; right: 30px; transform: translate(0,-50%); }
	body.scrolled #logo_container { opacity: 0; visibility: hidden; }
	body.scrolled #logo_container_small { opacity: 1; visibility: visible; }
	body.scrolled header #hNavigation { top: 82px; }
	/* End: Scrolled */
}