/* NICHT IRGENDWANN — Header nach Scrollrichtung, Desktop-Sicherheitsstufe.
   Benötigt Enfold > Header > Header Verhalten > Fixierter Header: EIN.
   Ab 1200px aktiv. Unter 1200px wird Enfold NICHT angerührt.
   Kein CSS für Logo, Burger-Overlay oder Seitenabstände. */
@media (min-width: 1200px) {
  html.html_header_sticky #top #wrap_all #header {
    transition: transform 240ms ease;
  }
  html.html_header_sticky.ni-header-down:not(.av-burger-overlay-active) #top #wrap_all #header {
    transform: translate3d(0, -110%, 0);
  }
  html.html_header_sticky.ni-header-down #top #wrap_all #header:focus-within {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html.html_header_sticky #top #wrap_all #header {
    transition: none !important;
  }
}


/* ================================================================
   NICHT IRGENDWANN | Mobile Auto-Hide (bis 1199px)
   Setzt den nativen Enfold-Header fixiert, ohne dessen transform
   zu veraendern. Der JS-Platzhalter haelt den Seitenfluss stabil.
   Kein Eingriff in Burger-Overlay, Logo oder Desktop-Header.
   ================================================================ */
@media (max-width: 1199px) {
  html.ni-mobile-auto-header #top #wrap_all #header {
    position: fixed !important;
    top: var(--ni-mobile-header-top, 0px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100%;
    margin: 0 !important;
    transform: none !important;
    transition: top 250ms ease !important;
    z-index: 10000;
  }

  html.ni-mobile-auto-header.ni-mobile-header-hidden #top #wrap_all #header {
    top: calc(var(--ni-mobile-header-top, 0px) - var(--ni-mobile-header-height, 76px) - 5px) !important;
  }

  /* Geoeffnetes Burger-Menue oder Tastaturfokus: sichtbar lassen. */
  html.ni-mobile-auto-header.ni-mobile-menu-open #top #wrap_all #header {
    top: var(--ni-mobile-header-top, 0px) !important;
  }

  html.ni-mobile-auto-header #ni-mobile-header-space {
    display: block;
    width: 100%;
    height: var(--ni-mobile-header-spacer, 0px);
    pointer-events: none;
  }
}
@media (max-width: 1199px) and (prefers-reduced-motion: reduce) {
  html.ni-mobile-auto-header #top #wrap_all #header {
    transition: none !important;
  }
}
