/* ----------------------------------------------------------
     Direction-aware sticky header
   ---------------------------------------------------------- */
/* Match Enfold's native tablet/phone menu breakpoints. Transparent headers
   keep their intentional overlay; desktop spacing remains native. */
@media only screen and (max-width: 989px) {
  html.responsive.nikolai-scroll-header.html_mobile_menu_tablet.html_header_top.html_header_sticky:not(.html_header_transparency) #top #wrap_all #main {
    padding-top: var(--nl-enfold-sticky-header-height, 0px) !important;
  }
}

@media only screen and (max-width: 767px) {
  html.responsive.nikolai-scroll-header.html_header_top.html_header_sticky:not(.html_header_transparency) #top #wrap_all #main {
    padding-top: var(--nl-enfold-sticky-header-height, 0px) !important;
  }
}

html.nikolai-scroll-header.html_header_top.html_header_sticky #top #wrap_all #header {
  position: fixed !important;
  top: 0;
  right: 0;
  left: 0;
  margin-top: 0 !important;
  transform: translateY(0);
  transition: transform .34s ease, opacity .24s ease;
  will-change: transform;
}

@keyframes nikolai-header-slide-down {
  from {
    transform: translateY(-90px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

html.nikolai-scroll-header.html_header_top.html_header_sticky.nikolai-header-hidden #top #wrap_all #header {
  transform: translateY(calc(-100% - 2px)) !important;
  opacity: 0 !important;
  pointer-events: none;
  animation: none;
}

html.nikolai-scroll-header.nikolai-header-visible #top #wrap_all #header {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  animation: nikolai-header-slide-down .92s cubic-bezier(.19, 1, .22, 1) both;
}

html.nikolai-scroll-header.nikolai-header-visible #top #wrap_all #header.av_header_scrolldown {
  margin-top: 0 !important;
}

html.nikolai-scroll-header.html_header_top.html_header_sticky #top.admin-bar #wrap_all #header {
  top: 32px;
}

@media only screen and (max-width: 782px) {
  html.nikolai-scroll-header.html_header_top.html_header_sticky #top.admin-bar #wrap_all #header {
    top: 46px;
  }
}

html.nikolai-scroll-header.av-burger-overlay-active #top #wrap_all #header,
html.nikolai-scroll-header body.av-burger-overlay-active #wrap_all #header {
  transform: translateY(0);
  opacity: 1 !important;
  pointer-events: auto;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  html.nikolai-scroll-header #top #wrap_all #header {
    animation: none !important;
    transition: none;
  }
}

@media only screen and (max-width: 767px) {
  html.nikolai-scroll-header.html_header_top.html_header_sticky #top #wrap_all #header {
    transition: none;
    animation: none !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  html.nikolai-scroll-header.html_header_top.html_header_sticky.nikolai-header-hidden #top #wrap_all #header {
    animation: none !important;
  }

  html.nikolai-scroll-header.html_header_top.html_header_sticky.nikolai-header-visible #top #wrap_all #header {
    transform: translateY(0);
    opacity: 1;
    animation: none !important;
  }

  html.nikolai-scroll-header.html_header_top.html_header_sticky.nikolai-header-returning.nikolai-header-visible #top #wrap_all #header {
    animation: nikolai-header-slide-down .92s cubic-bezier(.19, 1, .22, 1) both !important;
  }


}

@media only screen and (max-width: 1024px) {
  html.nikolai-scroll-header #top #wrap_all #header .av-burger-overlay {
    height: 100dvh !important;
    max-height: none !important;
    overflow: visible !important;
  }

  html.nikolai-scroll-header #top #wrap_all #header .av-burger-overlay-scroll {
    height: 100dvh !important;
    max-height: none !important;
    overflow-y: auto !important;
  }
}
