/***-------------------------------------------*** Header ***-------------------------------------------***/
header { position: relative; z-index: 1000; top: 0; right: 0; left: 0; display: flex; align-items: center; height: 167px; }
header li { list-style: none; }
header a { text-decoration: none; }
header .cms_container_ultrawide { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; height: 85px; padding: 0 30px; }

/***-------------------------------------------*** Hamburger ***-------------------------------------------***/
header #hHamburger { cursor: pointer; flex-direction: column; gap: 7px; }
header #hHamburger > div { width: 39px; height: 2px; background: var(--secondary); }

/***-------------------------------------------*** Close ***-------------------------------------------***/
header #hClose { cursor: pointer; position: absolute; top: 30px; right: 30px; width: 30px; height: 30px; }
header #hClose > div { position: absolute; top: 50%; left: 50%; width: 39px; height: 2px; background: var(--white); }
header #hClose > div:first-of-type { transform: translate(-50%,-50%) rotate(45deg); }
header #hClose > div:last-of-type { transform: translate(-50%,-50%) rotate(-45deg); }

/***-------------------------------------------*** Hide above Mobile ***-------------------------------------------***/
header #hLngMobile { display: none; }
header #hClose { display: none; }
header #hFooter { display: none; }
header #hHamburger { display: none; }

/***-------------------------------------------*** Logo ***-------------------------------------------***/
body #logo_container { position: relative; width: 301px; height: 83px; }
body #logo_container > a { position: absolute; inset: 0; background: center / contain no-repeat url("/pages/img/logo.png"); }

/***-------------------------------------------*** Functions ***-------------------------------------------***/
header #hFunctions { display: flex; align-items: center; gap: 25px; }

/***-------------------------------------------*** Service ***-------------------------------------------***/
header #hService > ul { display: flex; align-items: center; gap: 25px; }
header #hService > ul > li { display: block; }
header #hService > ul > li:first-of-type { display: none; }
header #hService > ul > li > a { display: flex; align-items: center; gap: 5px; font-weight: 400; font-size: 15px; line-height: 23px; transition: var(--transition); }
header #hService > ul > li.current > a,
header #hService > ul > li > a:hover { color: var(--secondary); }
header #hService > ul > li > a > svg { flex-shrink: 0; width: auto; height: 11px; }
header #hService > ul > li > a > svg > path { stroke: var(--secondary); }

/***-------------------------------------------*** Language ***-------------------------------------------***/
header #hLng > ul { display: flex; align-items: center; gap: 15px; }
header #hLng > ul > li { position: relative; display: block; }
header #hLng > ul > li:first-of-type:before { content: ""; position: absolute; top: 50%; transform: translateY(-50%); right: -8.5px; width: 1px; height: 18px; background: var(--black); }
header #hLng > ul > li > a { font-weight: 400; font-size: 15px; line-height: 23px; transition: var(--transition); }
header #hLng > ul > li.active > a,
header #hLng > ul > li > a:hover { color: var(--secondary); }

/***-------------------------------------------*** Navigation Desktop ***-------------------------------------------***/
@media screen and (min-width: 1081px) {
    /* Start: First Level */
    header #hNavigation { margin: 0 0 -8px 0; }
    header #hNavigation > ul { display: flex; align-items: center; gap: 50px; }
    header #hNavigation > ul > li { display: block; position: relative; }
    header #hNavigation > ul > li > a { display: block; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 20px; line-height: 24px; white-space: nowrap; padding: 0 0 8px 0; transition: var(--transition); }
    header #hNavigation > ul > li.current > a,
    header #hNavigation > ul > li:hover > a { color: var(--secondary); }
    header #hNavigation > ul > li > .toggler { display: none; }
    /* End: First Level */

    /* Start: Subnavi Titles */
    header #hNavigation a.subnavititle { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 32px; line-height: 38px; transition: var(--transition); }
    header #hNavigation a.subnavititle.current,
    header #hNavigation a.subnavititle:hover { color: var(--secondary); }
    header #hNavigation .subnavititle2 { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 12px; line-height: 14px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--secondary); padding: 0 0 0 22px; }
    /* End: Subnavi Titles */

    /* Start: Meganavi */
    header #hNavigation .meganavi { position: absolute; top: 32px; left: calc(50% - 200.5px); display: none; padding: 21px 0 0 0; }
    header #hNavigation > ul > li:hover > .meganavi { display: block; }
    header #hNavigation .meganavi > div { position: relative; display: flex; gap: 62px; width: 970px; padding: 40px 30px; background: var(--white); filter: drop-shadow(0px 0px 50px rgba(0,0,0,0.15)); border-radius: var(--border-radius-default); will-change: transform; }
    header #hNavigation .meganavi > div > .navtriangle { position: absolute; z-index: -1; top: -15px; left: 185px; width: 30px; height: 30px; background-color: var(--white); transform: rotate(45deg); }
    header #hNavigation .meganavi > div:before { content: ""; position: absolute; top: 95px; bottom: 30px; left: 50%; transform: translateX(-50%); width: 1px; background: var(--trennlinie); }
    header #hNavigation .meganavi > div > div { width: 50%; }
    header #hNavigation .meganavi > div > div:first-of-type { display: flex; flex-direction: column; gap: 51px; }
    header #hNavigation .meganavi > div > div:last-of-type { display: flex; flex-direction: column; gap: 20px; padding: 55px 0 0 0; }
    header #hNavigation .meganavi ul { display: flex; flex-direction: column; gap: 5px; }
    header #hNavigation .meganavi ul > li { display: block; }
    header #hNavigation .meganavi ul > li > a {
        display: flex;
        align-items: center;
        gap: 20px;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        font-size: 20px;
        line-height: 24px;
        padding: 18px 22px;
        border-radius: var(--border-radius-default);
        transition: var(--transition);
    }
    header #hNavigation .meganavi ul > li.current > a,
    header #hNavigation .meganavi ul > li:hover > a { color: var(--secondary); background: var(--subnavi-bg); }
    header #hNavigation .meganavi ul > li > a[data-navkey]:not([data-navkey="0"]) { position: relative; padding: 18px 63px 18px 22px; }
    header #hNavigation .meganavi ul > li > a[data-navkey]:not([data-navkey="0"]):before { content: ""; position: absolute; top: 50%; right: 22px; transform: translateY(-50%); width: 19px; height: 12px; background: center / contain no-repeat url("/pages/img/meganavi/arrow.svg"); opacity: 0; visibility: hidden; transition: var(--transition); }
    header #hNavigation .meganavi ul > li.current > a[data-navkey]:not([data-navkey="0"]):before,
    header #hNavigation .meganavi ul > li:hover > a[data-navkey]:not([data-navkey="0"]):before { opacity: 1; visibility: visible; }
    header #hNavigation .meganavi ul > li > a > svg { flex-shrink: 0; width: 30px; height: 30px; }
    /* End: Meganavi */

    /* Start: Default Subnavi */
    header #hNavigation .defaultnavi { position: absolute; top: 32px; left: 50%; transform: translateX(-50%); display: none; min-width: max-content; padding: 21px 0 0 0; }
    header #hNavigation > ul > li:hover > .defaultnavi { display: block; }
    header #hNavigation .defaultnavi > div { display: flex; flex-direction: column; gap: 25px; padding: 40px 30px; background: var(--white); filter: drop-shadow(0px 0px 50px rgba(0,0,0,0.15)); border-radius: var(--border-radius-default); will-change: transform; }
    header #hNavigation .defaultnavi > div > .navtriangle { position: absolute; z-index: -1; top: -15px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 30px; height: 30px; background-color: var(--white); }
    header #hNavigation .defaultnavi ul { display: flex; flex-direction: column; gap: 5px; }
    header #hNavigation .defaultnavi ul > li { display: block; }
    header #hNavigation .defaultnavi ul > li > a {
        display: flex;
        align-items: center;
        gap: 20px;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        font-size: 20px;
        line-height: 24px;
        padding: 18px 22px;
        border-radius: var(--border-radius-default);
        transition: var(--transition);
    }
    header #hNavigation .defaultnavi ul > li.current > a,
    header #hNavigation .defaultnavi ul > li:hover > a { color: var(--secondary); background: var(--subnavi-bg); }
    header #hNavigation .defaultnavi ul > li > a > svg { flex-shrink: 0; width: 30px; height: 30px; }
    /* End: Default Subnavi */
}

@media screen and (min-width: 1081px) and (max-width: 1366px) {
    /* Start: Meganavi */
    header #hNavigation > ul > li:hover > .meganavi { display: none; }
    header #hNavigation > ul > li.customOpen > .meganavi { display: block; }
    /* End: Meganavi */

    /* Start: Default Subnavi */
    header #hNavigation > ul > li:hover > .defaultnavi { display: none; }
    header #hNavigation > ul > li.customOpen > .defaultnavi { display: block; }
    /* End: Default Subnavi */
}

/***-------------------------------------------*** Navigation Tablet Tweak ***-------------------------------------------***/
@media screen and (min-width: 1081px) and (max-width: 1555px) {
    /* Start: Header */
    header { height: 164px; }
    header .cms_container_ultrawide { display: block; height: 164px; }
    /* End: Header */

    /* Start: Logo */
    body #logo_container { position: absolute; top: 45px; left: 30px; width: 250px; height: 69px; }
    /* End: Logo */

    /* Start: Functions */
    header #hFunctions { position: absolute; top: 15px; right: 30px; gap: 40px; }
    /* End: Functions */

    /* Start: Service */
    header #hService > ul { gap: 46px; }
    /* End: Service */

    /* Start: First Level */
    header #hNavigation { position: absolute; top: 91px; right: 30px; display: flex; justify-content: flex-end; width: calc(100% - 340px); margin: 0; }
    header #hNavigation > ul { gap: 40px; }
    /* End: First Level */

    /* Start: Meganavi */
    header #hNavigation .meganavi { position: fixed; top: 122px; left: 10svw; }
    header #hNavigation .meganavi > div { width: 80svw; }
    header #hNavigation .meganavi > div > .navtriangle { left: 0; }
    /* End: Meganavi */

    /* Start: Default Subnavi */
    header #hNavigation > ul > li:last-of-type .defaultnavi { right: 0; left: auto; transform: none; }
    header #hNavigation > ul > li:last-of-type .defaultnavi > div > .navtriangle { left: auto; transform: rotate(45deg); }
    /* End: Default Subnavi */
}

/***-------------------------------------------*** Navigation Smartphone ***-------------------------------------------***/
@media screen and (max-width: 1080px) {
    /* Start: Header */
    header { height: 85px; }
    header .cms_container_ultrawide { align-items: center; height: 85px; }
    /* End: Header */

    /* Start: Hamburger */
    header #hHamburger { display: flex; }
    /* End: Hamburger */

    /* Start: Close */
    header #hClose { display: block; }
    /* End: Close */

    /* Start: Logo */
    body #logo_container { width: 180px; height: 50px; }
    /* End: Logo */

    /* Start: Allgemein */
    header #hNavigation	{ position: fixed; top: 0; right: -100vW; display: flex; flex-direction: column; width: 100vW; height: 100svh; background: var(--primary-100); padding: 132px 30px 30px 30px; overflow-y: auto; transition: var(--transition); }
    body.navi header #hNavigation { right: 0; }
    /* End: Allgemein */

    /* Start: Hide On Mobile */
    header #hFunctions { display: none; }
    header #hNavigation .subnavititle { display: none; }
    header #hNavigation .navtriangle { display: none; }
    /* Start: Hide On Mobile */

    /* Start: First Level */
    header #hNavigation > ul { display: flex; flex-direction: column; gap: 19px; }
    header #hNavigation > ul > li { position: relative; display: block; border-bottom: 1px solid var(--secondary); }
    header #hNavigation > ul > li > a {
        display: block;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        font-size: 22px;
        line-height: 26px;
        white-space: nowrap;
        color: var(--white);
        padding: 0 39px 19px 0;
        transition: var(--transition);
    }
    header #hNavigation > ul > li.current > a,
    header #hNavigation > ul > li:hover > a { color: var(--secondary); }
    /* End: First Level */

    /* Start: Toggler */
    header #hNavigation > ul > li > .toggler { cursor: pointer; position: absolute; top: 0; right: 0; display: flex; justify-content: center; align-items: center; width: 30px; height: 26px; }
    header #hNavigation > ul > li > .toggler > svg { width: 18px; height: 9px; will-change: transform; }
    header #hNavigation > ul > li.open > .toggler > svg { transform: rotate(180deg); }
    /* End: Toggler */

    /* Start: Second Level */
    header #hNavigation > ul > li > .meganavi,
    header #hNavigation > ul > li > .defaultnavi { display: none; }
    header #hNavigation > ul > li.open > .meganavi,
    header #hNavigation > ul > li.open > .defaultnavi { display: block; }
    header #hNavigation ul ul { display: flex; flex-direction: column; gap: 24px; margin: 0 0 28px 0; }
    header #hNavigation ul ul > li { display: block; }
    header #hNavigation ul ul > li > a {
        display: flex;
        align-items: center;
        gap: 20px;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        font-size: 16px;
        line-height: 19px;
        white-space: nowrap;
        color: var(--white);
        transition: var(--transition);
    }
    header #hNavigation ul ul > li.current > a,
    header #hNavigation ul ul > li:hover > a { color: var(--secondary); }
    header #hNavigation ul ul > li > a > svg { flex-shrink: 0; width: 25px; height: 25px; }
    /* End: Second Level */

    /* Start: Third Level */
    header #hNavigation > ul > li > .meganavi > div > div:last-of-type { display: none; }
    /* End: Third Level */

    /* Start: Language Mobile */
    header #hLngMobile { display: block; position: absolute; top: 30px; left: 30px; }
    header #hLngMobile > ul { display: flex; align-items: center; gap: 15px; }
    header #hLngMobile > ul > li { position: relative; display: block; }
    header #hLngMobile > ul > li:first-of-type:before { content: ""; position: absolute; top: 50%; transform: translateY(-50%); right: -8.5px; width: 1px; height: 18px; background: var(--white); }
    header #hLngMobile > ul > li > a { font-weight: 400; font-size: 15px; line-height: 23px; color: var(--white); transition: var(--transition); }
    header #hLngMobile > ul > li.active > a,
    header #hLngMobile > ul > li > a:hover { color: var(--secondary); }
    /* End: Language Mobile */

    /* Start: hFooter */
    header #hFooter { display: flex; flex-direction: column; gap: 50px; padding: 50px 0 0 0; margin: auto 0 0 0; }
    /* End: hFooter */

    /* Start: Headerzusatz */
    .cms_headerzusatz_box .small-text { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 24px; font-size: 15px; line-height: 23px; }
    .cms_headerzusatz_box strong { font-weight: 600; }
    .cms_headerzusatz_box a { color: var(--white); }
    /* End: Headerzusatz */

    /* Start: Service Mobile */
    header #hServiceMobile > ul { display: flex; flex-direction: column; gap: 5px; }
    header #hServiceMobile > ul > li { display: block; }
    header #hServiceMobile > ul > li > a { display: flex; align-items: center; gap: 15px; font-weight: 400; font-size: 15px; line-height: 23px; color: var(--white); }
    header #hServiceMobile > ul > li > a > svg { flex-shrink: 0; width: auto; height: 16px; }
    /* End: Service Mobile */
}