header .current-menu-item > a > span,
header .current-menu-parent > a > span,
header .current_page_item > a > span,
header .current_page_parent > a > span {
  color: var(--brand-accent-color) !important;
  font-weight: 600;
  text-transform: uppercase;
}

header .current-menu-item:has(.sub-menu)::before,
header .current-menu-parent:has(.sub-menu)::before,
header .current_page_item:has(.sub-menu)::before,
header .current_page_parent:has(.sub-menu)::before {
  background: url('../img/arrow-right-accent.svg')!important;
  background-size: 100%!important;
  background-repeat: no-repeat!important;
  transform: rotate(90deg);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 999;
  background: var(--brand-primary-color);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition: transform 0.3s ease;
}
.header * {
  color:var(--brand-primary-color-text)
}
.header-desktop.hide {
  transform: translateY(-27%);
}

.topheader{
  background-color: var(--brand-accent-color);
  transition: background 0.3s, border 0.3s, border-radius 0.3s, box-shadow 0.3s;
  margin-top: 0px;
  margin-bottom: 0px;
  padding: 16px 0px 16px 0px;
}
.topheader a {
  font-size: 0.85em;
  font-weight: normal;
  line-height: 1em;
  letter-spacing: 0.8px;
}

.topheader .container{
  display: flex;
  justify-content: space-between;
}

.topheader .tel, .topheader .mail, .topheader .termin, .topheader .location{
  position: relative;
  padding-left: 25px;
  margin-right: 25px;
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
}

.topheader .location:last-child{
  margin-right: 0;
}

.topheader .tel::before{
  content: '';
  background: url(../img/phone-white.svg);
  background-size: 100%;
  background-repeat: no-repeat;
  height: 17px;
  width: 17px;
  display: inline-block;
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  left: 0;
}

.topheader .mail::before{
  content: '';
  background: url(../img/mail-white.svg);
  background-size: 100%;
  background-repeat: no-repeat;
  height: 17px;
  width: 17px;
  display: inline-block;
  position: absolute;
  top: 50%;
  transform: translateY(-55%);
  left: 0;
}

.topheader .termin{
  background-color: unset;
  color: var(--white);
  text-transform: none;
  padding: 0;
  padding-left: 25px;
}

.topheader .termin::before{
  content: '';
  background: url(../img/calendar-white.svg);
  background-size: 100%;
  background-repeat: no-repeat;
  height: 17px;
  width: 17px;
  display: inline-block;
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  left: 0;
}

.topheader .locations .row{
  display: flex;
  flex-direction: row;
}

.topheader .location{
  width: max-content;
}

.topheader .location::before{
  content: '';
  background: url(../img/location-white.svg);
  background-size: 100%;
  background-repeat: no-repeat;
  height: 17px;
  width: 17px;
  display: inline-block;
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  left: 0;
}

.bottomheader{
  background-color: #FFFFFF;
  box-shadow: 0px 10px 10px 0px rgba(0, 0, 0, 0.07);
  transition: background 0.3s, border 0.3s, border-radius 0.3s, box-shadow 0.3s;
  margin-top: 0px;
  margin-bottom: 0px;
  padding: 15px 0px 5px 0px;
  z-index: 1000;
}

.bottomheader button.btn.primary{
  background-color: var(--brand-primary-color);
  color: var(--white);
  font-family: var(), Sans-serif;
  border-radius: 50px;
  padding: 12px 25px 12px 25px;
  line-height: 16px;
  letter-spacing: 2px;
  font-weight: 700;
  text-transform: none;
  transition: all 0.3s ease;
}

.bottomheader button.btn.primary:hover{
  background-color: var(--brand-accent-color);
  transition: all .3s ease;
}

.header-mobile {
  display: none;
  flex-direction: row;
  justify-content: space-between;
  position: fixed;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.logo-mobile {
  display: block;
  padding: 1.5rem;
  max-width: 100px;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.header-mobile .logo-mobile.hide {
  pointer-events: none;
  opacity: 0;
}
.header-mobile .burger {
  z-index: 1001;
  width: fit-content;
  padding: 1.5rem;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  right: calc(env(safe-area-inset-right, 0px) + 8px);
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
}
.header-mobile .burger span {
  display: block;
  width: 28px;
  height: 3px;
  border-radius: 5px;
  background:  var(--brand-primary-color);
  transition: all 0.3s ease;
}

.header-mobile .burger span:first-child {
  transform: translateY(-8px);
}
.header-mobile .burger span:last-child {
  transform: translateY(8px);
}

.header-mobile .burger.open span:first-child {
  transform: rotate(-45deg) translateY(4px);
}
.header-mobile .burger.open span:nth-child(2) {
  opacity: 0;
}
.header-mobile .burger.open span:last-child {
  transform: rotate(45deg) translateY(-4px);
}
.header-mobile .burger.open span {
  box-shadow: none;
}

.burger-menu {
  position: fixed;
  width: 40%;
  top: 0;
  right: 0;
  padding: 50px 24px 24px 50px;
  border-radius: 0 0 0 7px;
  background: #1d2f2ec0;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(150%);
  transition: transform 0.3s ease;
}
.burger-menu.active {
  transform: translateX(0);
  height: 100vh;
  z-index: 1000;
  overflow: auto;
}

.burger-menu a {
  font-size: 0.9rem;
}
.mobile-menu li {
  font-size: 1rem;
  font-weight: 500;
  line-height: 3rem;
  margin: 0;
}

.logo {
  height: 100%;
}

.menu-item a span:hover {
  color: var(--brand-accent-color);
  transition: all .3s ease;
}
.logo img {
  object-fit: contain;
  height: inherit;
  border-radius: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.navbar {
  gap: 1rem;
  display: flex;
  align-items: center;
  width: 100%;
  height: 70px;
  padding: 0;
}

.nav-list {
  max-width: 1200px;
  /* width: 100%; */
}

.nav-list > ul{
  display: flex;
  flex-direction: row;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list li {
  position: relative;
  white-space: nowrap;
}

.nav-list a {
  white-space: nowrap;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.54px;
  position: relative;
  text-transform: uppercase;
}

.nav-list li:has(.sub-menu) a {
  padding-right: 10px;
}

.nav-list li:has(.sub-menu)::before {
  content: '';
  background: url('../img/arrow-right-main.svg');
  background-size: 100%;
  background-repeat: no-repeat;
  width: 13px;
  height: 13px;
  display: inline-block;
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
}

.menu-item-has-children {
  position: relative;
}

.nav-list li .sub-menu {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 1rem 2rem 2rem 2rem;
  background: var(--white);
  border-radius: 10px;
  z-index: 999;
  top: 40px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-2rem) translateY(-10px);
  transition: transform 0.25s ease, opacity 0.2s ease;
  will-change: transform, opacity;
  min-width: 300px;
  margin: 0;
}

.nav-list li .sub-menu::before{
  content: '';
  width: 100%;
  height: 20px;
  left: 0;
  top: -20px;
  position: absolute;
}

.nav-list li:hover > .sub-menu {
  transform: translateX(-2rem) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.nav-list li .sub-menu li {
  margin: 0;
  padding: 0.5rem 0;
}
.nav-list li .sub-menu li a {
  padding: 1rem 0;
  transition: all 0.15s ease;
}

.nav-list li .sub-menu li a::after {
  display: none;
}

.mobile-menu .sub-menu {
  padding-left: 1.5rem;
}

.nav-list li .sub-menu li {
  position: relative;
}

.nav-list li .sub-menu li .sub-menu {
  position: absolute;
  top: -16px;
  left: 110%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: var(--white);
  padding: 1rem;
  border-radius: 10px;
  transform: translateX(10px);
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: 100%;
  align-items: center;
}

.nav-list li .sub-menu li .sub-menu::before {
  position: absolute;
  height: 100%;
  width: 20px;
  top: 0;
  left: -20px;
}

.nav-list li .sub-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(0);
}

li.menu-item{list-style: none;}
ul{padding-left: 0;margin-top: 1.5rem;}

/* Modal Styling */
.custom-popup-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  background-color: #A0C5198F;
  overflow-y: auto;
  overflow-x: hidden;
  pointer-events: all;
}

.custom-popup-modal.is-active {
  display: flex;
}

.custom-popup-dialog {
  position: relative;
  background-color: #fff;
  width: 70vw;
  max-width: 1100px;
  height: auto;
  overflow: visible;
  pointer-events: all;

  /* this is the important part */
  margin: auto 0;
}

.custom-termin-message {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  padding: 0;
}

.custom-termin-message iframe {
  display: block;
  width: 100%;
  height: 600px;
  min-height: 554px;
  border: 0;
}

.custom-newsletter-message {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  padding: 0;
}

.custom-newsletter-message iframe {
  display: block;
  width: 640px;
  height: 750px;
  min-height: 554px;
  border: 0;
}

.custom-minikurs-message {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  padding: 0;
}

.custom-minikurs-message iframe {
  display: block;
  width: 600px;
  height: 740px;
  min-height: 554px;
  border: 0;
}

.custom-popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 20;
  border: 0;
  background: transparent;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

@media (min-width: 992px) and (max-width: 1400px) {
  header a.button {
    display: none !important;
  }
}

@media (max-width: 1200px) {

  .burger-menu .btn.secondary{
    background-color: var(--brand-accent-color);
  }

  .burger-menu .btn.secondary:hover{
    background-color: color-mix(in srgb, var(--brand-accent-color) 90%, black);
  }

  /* =========================
    ACTIVE MENU STATE
  ========================= */

  .mobile-menu .current-menu-item > a,
  .mobile-menu .current-menu-parent > a,
  .mobile-menu .current-menu-ancestor > a {
    color: var(--brand-accent-color);
  }

  .burger-menu .mobile-menu .current-menu-item > a,
  .burger-menu .mobile-menu .current-menu-parent > a,
  .burger-menu .mobile-menu .current-menu-ancestor > a {
    color: var(--brand-accent-color);
  }

  /* =========================
     GLOBAL MOBILE HEADER
  ========================= */

  .logo {
    width: 250px;
  }

  .logo-mobile {
    max-width: 300px;
  }

  .nav-list {
    gap: 2rem !important;
  }

  .nav-list li:not(:last-child) a::after {
    right: -1rem;
  }

  /* =========================
     HEADER SWITCH
  ========================= */

  .header-mobile {
    display: flex;
    background-color: var(--white);
  }

  .header-desktop {
    display: none;
  }

  .header-mobile .burger span {
    background: var(--brand-accent-color);
  }

  /* =========================
     MOBILE MENU LAYOUT
  ========================= */

  .mobile-menu ul {
    margin: 0;
  }

  .mobile-menu li.menu-item {
    position: relative;
    font-size: 1rem;
    font-weight: 500;
    line-height: 3rem;
  }

  .burger-menu {
    position: fixed;
    width: 40%;
    top: 0;
    right: 0;
    padding: 50px 24px 24px 50px;
    border-radius: 0 0 0 7px;
    background: #1d2f2ec0;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transform: translateX(150%);
    transition: transform 0.3s ease;
    overflow: auto;
    height: 100vh;
  }

  .burger-menu.active {
    transform: translateX(0);
    z-index: 1000;
  }

  .burger-menu a {
    font-size: 1.1rem;
    color: var(--white);
    text-transform: uppercase;
    font-weight: 700;
  }

  .burger-menu a:hover{
    color: var(--brand-accent-color);
  }

  /* =========================
     SUBMENU SYSTEM (FIXED)
  ========================= */

  /* Basis: alle Submenus zu */
  .mobile-menu .sub-menu {
    display: none;
    padding-left: 1.5rem;
    margin: 0;
  }

  /* geöffnet über JS */
  .mobile-menu .menu-item.submenu-open > .sub-menu {
    display: block;
  }

  /* Parent Item */
  .mobile-menu .menu-item-has-children {
    position: relative;
  }

  .mobile-menu button.submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    background: none;
    border: none;
    cursor: pointer;
  }

  /* ICON direkt am Button */
  .mobile-menu button.submenu-toggle::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url('../img/mobile-arrow-white.svg') no-repeat center;
    background-size: contain;
    position: absolute;
    top: 18px;
    margin-left: 20px;
  }

  .mobile-menu .sub-menu button.submenu-toggle::before{
    top: 13px;
  }

  .mobile-menu button.submenu-toggle span{
    display: none;
  }

  .mobile-menu .sub-menu li {
    line-height: 2.5rem;
  }

  .header-mobile .menu-item a:hover {
    color: var(--brand-accent-color);
    transition: all .3s ease;
  }

  .header-mobile .sub-menu {
    margin-bottom: 10px;
  }

}

@media (max-width: 992px) {
  .nav-list li:not(:last-child) a::after {
    display: none;
  }

  .navbar {
    flex-direction: column;
    margin-top: 1rem;
  }

  .burger-menu{
    width: 60%;
  }
}

@media (max-width: 767px) {
  .custom-popup-modal {
    padding: 20px 10px;
  }

  .custom-popup-dialog {
    width: 95vw;
  }
}

@media (max-width: 576px) {
  .burger-menu{
    width: 100%;
    padding: 50px 15px 24px 15px;
  }
}