/* Orientierung pub20 index.html inline .elementor-1718 (Header f594a8e + Nav 9d24d19) */

.native-header {
  /* pub20: kit --e-global-color-primary */
  --nh-primary: #2a82c9;
  /* Sticky-Micro-Pilot: ruhig, nahezu deckend (Lesbarkeit > Transparenz) */
  --nh-bg: rgba(0, 130, 203, 0.96);
  --nh-bg-solid-fallback: #0082cb;
  --nh-fg: #ffffff;
  /* pub20: Dropdown-Hintergrund = primary; Hauptmenütext = Weiß */
  --nh-drop-bg: var(--nh-primary);
  --nh-drop-link: #ffffff;
  --nh-drop-hover-bg: #ffffff;
  --nh-drop-hover-fg: var(--nh-primary);
  --nh-maxw: 1200px;
  /* Über typischen Elementor-Content-Widgets (z. B. z-index 999), unter globalem Modal-Chaos */
  --nh-z: 1100;

  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: var(--nh-z);
  background-color: var(--nh-bg-solid-fallback);
  background-color: var(--nh-bg);
  color: var(--nh-fg);
  font-family: inherit;
  border-bottom: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

/* Native header sticky guard:
   Elementor/page exports can set html/body overflow-x:auto.
   In Chromium this can make body a sticky-relevant overflow ancestor
   and break position: sticky for the body-child header.
   overflow-x: clip prevents horizontal bleed without creating a scroll container.
*/
body {
  overflow-x: clip !important;
}

@supports not (overflow: clip) {
  body {
    overflow-x: visible !important;
  }
}

.native-header,
.native-header * {
  box-sizing: border-box;
}

/* Mobile/WebKit: kein magnenta/rotes Standard-Tap-Highlight auf Header-Controls */
.native-header button {
  -webkit-tap-highlight-color: transparent;
}

.native-header__shell {
  position: relative;
  max-width: var(--nh-maxw);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.native-header__brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* pub20-Referenz 175px; Micro-Fix näher am Original-Mass (~216 vs ~212 px gerendert) */
.native-header__brand img {
  display: block;
  width: 178px;
  max-width: min(178px, 46vw);
  height: auto;
}

.native-header__brand a {
  color: inherit;
  text-decoration: none;
}

.native-header__brand a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 4px;
}

.native-header__burger {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 2px solid rgba(42, 130, 201, 0.55);
  border-radius: 4px;
  background-color: #ffffff;
  cursor: pointer;
  color: #2a82c9;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
}

.native-header__burger:hover {
  background-color: #ffffff;
  color: #2a82c9;
  border-color: rgba(42, 130, 201, 0.85);
}

.native-header__burger:focus {
  outline: none;
}

.native-header__burger:focus-visible {
  outline: 3px solid rgba(42, 130, 201, 0.65);
  outline-offset: 2px;
  border-color: #2a82c9;
}

.native-header__burger:active {
  background-color: #eef6fc;
  color: #236fad;
  border-color: #2a82c9;
}

.native-header.is-open .native-header__burger {
  background-color: #ffffff;
  color: #2a82c9;
  border-color: #2a82c9;
}

.native-header__burger-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
  justify-content: center;
}

.native-header__burger-lines span {
  display: block;
  height: 3px;
  background-color: currentColor;
  border-radius: 1px;
}

.native-header.is-open .native-header__burger-line-top {
  transform: translateY(8px) rotate(45deg);
}

.native-header.is-open .native-header__burger-line-mid {
  opacity: 0;
}

.native-header.is-open .native-header__burger-line-bot {
  transform: translateY(-8px) rotate(-45deg);
}

.native-header__burger-lines span {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.native-header__panel {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.native-header__nav {
  width: 100%;
}

.native-header__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: stretch;
  gap: 0;
}

.native-header__item {
  position: relative;
  margin: 0;
  padding: 0;
}

.native-header__item--has-sub > .native-header__row {
  display: flex;
  align-items: center;
}

/*
 * Top-Level-Hauptmenü: nur .native-header__link (nicht .native-header__submenu a).
 * Gezielt !important gegen Theme/Elementor-Linkfarben; Dropdown bleibt eigenständig.
 */
.native-header .native-header__link {
  display: flex;
  align-items: center;
  padding: 8px 11px;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  border-radius: 0;
  opacity: 1;
  transition: font-weight 0.15s ease;
  color: #ffffff !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.native-header .native-header__link:visited {
  color: #ffffff !important;
  background-color: transparent !important;
  text-decoration: none !important;
}

.native-header .native-header__link:hover {
  color: #ffffff !important;
  background-color: transparent !important;
  text-decoration: none !important;
  font-weight: 600;
  border: none !important;
  box-shadow: none !important;
}

.native-header .native-header__link:active {
  color: #ffffff !important;
  background-color: transparent !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
}

.native-header .native-header__link:focus-visible {
  color: #ffffff !important;
  background-color: transparent !important;
  text-decoration: none !important;
  outline: 2px solid rgba(255, 255, 255, 0.92);
  outline-offset: 2px;
  border: none !important;
  box-shadow: none !important;
}

/* Aktiver Punkt: weiss, ohne Fläche; Hover gleich ruhig */
.native-header .native-header__link--active {
  color: #ffffff !important;
  font-weight: 600;
  background-color: transparent !important;
}

.native-header .native-header__link--active:hover,
.native-header .native-header__link--active:focus-visible,
.native-header .native-header__link--active:active {
  color: #ffffff !important;
  background-color: transparent !important;
}

.native-header__sub-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
}

.native-header__sub-toggle:focus:not(:focus-visible) {
  outline: none;
}

.native-header__sub-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: -2px;
  background-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.native-header__caret {
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  transition: transform 0.2s ease;
}

.native-header__item--sub-open .native-header__caret {
  transform: rotate(180deg);
}

/* Desktop-Dropdown: pub20 blau + weisse Links; Hover invertiert */
.native-header__submenu {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: var(--nh-drop-bg);
  color: var(--nh-drop-link);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.native-header__submenu li {
  margin: 0;
  padding: 0;
}

/* pub20 Dropdown: 15px, uppercase, Padding 9px vertikal */
.native-header__submenu a {
  display: block;
  padding: 9px 14px;
  color: var(--nh-drop-link);
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.35;
  white-space: normal;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.native-header__submenu a:hover,
.native-header__submenu a:focus-visible {
  background: var(--nh-drop-hover-bg);
  color: var(--nh-drop-hover-fg);
  text-decoration: none !important;
}

.native-header__submenu a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: -3px;
}

.native-header__submenu a.native-header__submenu-link--active {
  font-weight: 600;
}

@media (min-width: 1024px) {
  .native-header__item--has-sub > .native-header__submenu {
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 260px;
    max-width: min(340px, calc(100vw - 32px));
    z-index: calc(var(--nh-z) + 1);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
  }

  /* Rechte Menüpunkte: Dropdown nach innen ausrichten */
  .native-header__item:nth-child(3).native-header__item--has-sub > .native-header__submenu,
  .native-header__item:nth-child(4).native-header__item--has-sub > .native-header__submenu {
    left: auto;
    right: 0;
  }

  .native-header__item--has-sub:hover > .native-header__submenu,
  .native-header__item--has-sub:focus-within > .native-header__submenu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .native-header__item--has-sub > .native-header__row > .native-header__link {
    padding-right: 8px;
  }
}

@media (max-width: 1023px) {
  .native-header__burger {
    display: flex;
  }

  .native-header__panel {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-height: min(78vh, 640px);
    overflow-y: auto;
    background-color: var(--nh-bg-solid-fallback);
    background-color: var(--nh-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  }

  .native-header.is-open .native-header__panel {
    display: block;
  }

  .native-header__list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding: 8px 0 16px;
  }

  .native-header__item--has-sub > .native-header__row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }

  .native-header .native-header__link {
    flex: 1;
    white-space: normal;
    padding: 12px 14px;
  }

  .native-header__sub-toggle {
    display: flex;
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-left: 1px solid rgba(255, 255, 255, 0.28);
  }

  .native-header__sub-toggle:hover {
    background-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
  }

  .native-header__sub-toggle:active {
    background-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
  }

  .native-header__sub-toggle:focus-visible {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    outline: 2px solid rgba(255, 255, 255, 0.95);
    outline-offset: -2px;
  }

  .native-header__item--sub-open .native-header__sub-toggle {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-left-color: rgba(255, 255, 255, 0.35);
  }

  .native-header__item--has-sub > .native-header__submenu {
    display: none;
    padding: 4px 0 8px;
    margin: 0 10px 10px;
    background: var(--nh-drop-bg);
    border-radius: 4px;
    box-shadow: none;
  }

  .native-header__item--has-sub.native-header__item--sub-open > .native-header__submenu {
    display: block;
  }

  .native-header__submenu a {
    color: var(--nh-drop-link);
    font-weight: 500;
    padding: 9px 12px;
  }

  .native-header__submenu a:hover,
  .native-header__submenu a:focus-visible {
    background: var(--nh-drop-hover-bg);
    color: var(--nh-drop-hover-fg);
  }
}
