:root {
  --navi-icon-weight: 3px;
  --navi-icon-spacing: 6px;
  --navi-icon-bar-width: 33px;

  --header-height: 70px;
}


/* ab 1024px */
@media screen and (min-width: 1024px) {
  :root {
    --header-height: 120px;
  }
  :root.scrolled,
  body:not(.home){
    --header-height: 80px;
  }
}

/*
 * Header
 */
.header-wrapper {
  background: rgb(var(--main-light-color));
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 34;
  pointer-events: none;
  transition: all .4s;
  box-shadow: 0 4px 34px 0 rgba(0, 0, 0, 0.16);
}

html:not(.navi-active) body.navi-hidden .header-wrapper{
  transform: translateY(-100%);
}
html:not(.navi-active) body.navi-hidden .topslider-wrapper{
  --header-height: 0;
}

.header > * {
  pointer-events: all;
}

.header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
  max-width: 1760px;
  transition: all .3s;
}

.navi-logo {
  width: 180px;
  height: 45px;
  z-index: 1;
  transition: all .4s;
}

.navi-logo svg {
  width: 100%;
  height: 100%;
  z-index: 2;
  position: relative;
}

.nav-icon {
  position: relative;
  width: 40px;
  height: 40px;
  margin: 0;
  text-align: left;
  z-index: 26;
  cursor: pointer;
  border-radius: 50%;
  transition: all .3s;
}

.nav-icon > span {
  position: absolute;
  top: 50%;
  left: calc(50% - calc(var(--navi-icon-bar-width) / 2));
  display: block;
  width: var(--navi-icon-bar-width);
  height: var(--navi-icon-weight);
  background-color: rgb(var(--main-highlight-color));
  margin-top: calc(0px - var(--navi-icon-weight) / 2);
  transform-origin: 50% 50%;
  transition: all .3s;
}

.nav-icon > span::after,
.nav-icon > span::before {
  content: "";
  position: absolute;
  height: 100%;
  background-color: rgb(var(--main-highlight-color));
  transition: all .3s;
}

html:not(.navi-active) .nav-icon > span::before {
  width: 24px;
}
.nav-icon > span::before {
  width: 100%;
  right: calc(50% - calc(var(--navi-icon-bar-width) / 2));
  transform: translateY(calc(0.1px - calc(var(--navi-icon-weight) + var(--navi-icon-spacing))));
}

html:not(.navi-active) .nav-icon > span::after {
  width: 18px;
}
.nav-icon > span::after {
  width: 100%;
  right: calc(50% - calc(var(--navi-icon-bar-width) / 2));
  transform: translateY(calc(var(--navi-icon-spacing) + var(--navi-icon-weight)));
}

.navi-active .nav-icon > span {
  background: transparent !important;
}

.navi-active .nav-icon > span:before {
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
}

.navi-active .nav-icon > span:after {
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

.navi-active .nav-icon > span:before,
.navi-active .nav-icon > span:after {
  width: 100%;
}

/*
 * Navi General
 */

.nav {
  left: -100%;
  position: fixed;
  top: 0;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all .4s;
  visibility: hidden;
  padding: var(--header-height) 0 0;
  background: rgb(var(--main-light-color));
  margin: 0;
}

.nav:before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: var(--header-height);
  width: 100%;
  z-index: 2;
  pointer-events: none;
  transition: all .4s;
}
.navi-active .nav:before{
  box-shadow: 0 4px 34px 0 rgba(0, 0, 0, 0.16);
}

.navi-active .nav {
  left: 0;
  visibility: visible;
}

.nav > ul {
  position: relative;
  list-style-type: none;
  padding: 35px 0 0;
  width: 77.77%;
  height: calc(100% - 110px);
  margin: 0 auto;
  overflow-y: auto;
}

.nav > ul li {
  position: relative;
  transition: all .4s;
}

.nav > ul a {
  position: relative;
  display: block;
  text-decoration: none;
  hyphens: auto;
  transition: all .4s;
  z-index: 2;
}

/*
 * Navi Items
 */
.nav > ul > li > a {
  position: relative;
  color: rgb(var(--main-highlight-color));
  padding: 15px 10px 15px 0;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}
.nav > ul > li.active-cat > a {
  color: rgb(var(--sub-highlight-color));
}
.nav > ul > li.current > a:after{
  content: '';
  display: block;
  width: 100%;
  height: 6px;
  background-color: rgb(var(--sub-highlight-color));
  position: absolute;
  bottom: 5px;
  left: 0;
  transition: all .4s;
}

/*
 * Navi Subitems
 */
.nav li.active-cat ul {
  display: block;
}

.nav ul ul {
  interpolate-size: allow-keywords;
  height: 0;
  position: relative;
  display: none;
  list-style: none;
  transform: none;
  padding: 0;
  margin: 0;
  transition: all .4s linear;
  border-radius: 0 0 25px 25px;
  overflow: hidden;
}

.nav ul li.active-cat>ul {
  height: auto;
}
.nav li li {
  display: block;
  background: rgb(var(--main-highlight-color));
}
.nav li li > a {
  color: rgb(var(--main-light-color));
  font-size: 1.8rem;
  line-height: 1;
  padding: 12px 15px;
}
.nav li li:first-child > a{
  padding-top: 28px;
}
.nav li li:last-child > a{
  padding-bottom: 28px;
}
.nav > ul ul > li.current > a {
  color: rgb(var(--sub-highlight-color));
  font-weight: 700;
}

a.navi-job-button{
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 280px;
  padding: 14px 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}
a.navi-job-button:before{
  content: '';
  background: url('/images/icons/suche.svg') no-repeat center;
  background-size: contain;
  width: 26px;
  height: 26px;
  display: inline-block;
  transform: translateX(-20px);
}

@media screen and (min-width: 1024px) {
  .navi-active .nav:before,
  a.navi-job-button,
  .nav-icon {
    display: none;
  }
  .header-wrapper{
    background: transparent;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.70) 100%);
    box-shadow: none;
  }
  .scrolled .header-wrapper,
  body:not(.home) .header-wrapper{
    background: rgb(var(--main-light-color));
  }
  .header-wrapper .header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .navi-logo {
    position: relative;
    width: 220px;
    height: 50px;
  }
  .navi-logo:after{
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 300px;
    height: var(--header-height);
    background: rgb(var(--main-light-color));
    z-index: 0;
    pointer-events: none;
    border-radius: 0 0 25px 25px;
    transition: all .4s;
  }

  /*
   * Navi General
   */
  .nav {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    background: transparent;
    left: inherit;
    top: inherit;
    width: fit-content;
    height: inherit;
    padding: 0;
    margin: 0;
    overflow: visible;
    visibility: visible;
  }

  .nav > ul {
    display: flex;
    align-items: center;
    background: transparent;
    width: 100%;
    overflow: visible;
    padding: 0;
    margin: 0;
    height: inherit;
  }


  /*
   * Navi Items
   */
  .nav > ul > li{
    height: 100%;
  }
  .nav > ul > li > a {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 10px;
    height: 100%;
  }
  html:not(.scrolled) body.home .nav > ul > li > a {
    color: rgb(var(--main-light-color));
  }
  .nav > ul > li:last-child > a {
    padding: 20px 0 20px 20px;
  }
  .nav > ul > li:hover > a,
  .nav > ul > li:focus-within > a{
    color: rgb(var(--sub-highlight-color)) !important;
  }
  .nav > ul > li.current > a:after{
    bottom: 25px;
    width: calc(100% - 20px);
    left: 50%;
    transform: translateX(-50%);
  }
  .nav > ul > li:last-child.current > a:after{
    width: calc(100% - 20px);
    right: 0;
    left: inherit;
    transform: none;
  }
  .scrolled .nav > ul > li.current > a:after,
  body:not(.home) .nav > ul > li.current > a:after{
    bottom: 0;
  }

  /*
   * Navi Subitems
   */
  .nav li.active-cat ul {
    display: initial;
  }

  .nav ul ul {
    display: initial;
    position: absolute;
    left: 10px;
    top: 70%;
    pointer-events: none;
    opacity: 0;
  }
  .scrolled .nav ul ul,
  body:not(.home) .nav ul ul {
    padding-top: 10px;
  }

  .nav li:hover > ul,
  .nav li:focus-within > ul {
    pointer-events: initial;
    height: fit-content;
    opacity: 1;
  }
  .scrolled .nav li:hover > ul,
  .scrolled .nav li:focus-within > ul,
  body:not(.home) .nav li > ul {
    top: var(--header-height);
  }
  .nav ul ul li > a {
    display: block;
    width: max-content;
  }
  body.dark .nav li li {
    background: rgb(var(--sub-highlight-color));
  }
  body.dark .nav > ul ul > li.current > a {
    color: rgb(var(--main-highlight-color));
  }
  .nav li li:hover > a,
  .nav li li:focus > a{
    color: rgb(var(--sub-highlight-color));
  }
  body.dark .nav li li:hover > a,
  body.dark .nav li li:focus > a{
    color: rgb(var(--main-highlight-color));
  }
}

@media screen and (min-width: 1200px) {
  .nav > ul > li > a {
    padding: 20px 20px;
  }
  .nav ul ul {
    left: 10px;
  }
  .nav > ul > li.current > a:after {
    width: calc(100% - 40px);
  }
}