/* NIO Floating Header – v1.7.2 (no glows; tab/blind mobile reveal) */
:root{ --nio-logo-size: 96px; }

/* Header base */
.niofh-header{
  z-index: 9990;
  background: linear-gradient(180deg, var(--bg-start, #215973), var(--bg-end, #144A65));
  backdrop-filter: saturate(120%) blur(6px);
  -webkit-backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* Robust sticky: fixed + body padding to avoid theme conflicts */
.niofh-header.is-sticky{ position: fixed; top: 0; left:0; right:0; }
.admin-bar .niofh-header.is-sticky{ top: 32px; }
@media (max-width:782px){
  .admin-bar .niofh-header.is-sticky{ top: 46px; }
}
.niofh-header.is-static{ position: relative; }

/* Body offset when sticky */
html.niofh-sticky-on body{ padding-top: var(--niofh-offset, 0px); transition: padding-top .2s ease; }

.niofh-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

.niofh-brand{ grid-column: 1; display:flex; align-items:center; min-height: calc(var(--nio-logo-size) + 12px); }
.niofh-logo{
  height: var(--nio-logo-size);
  width: auto;
  display:block;
  /* removed glow */
  filter: none;
}

/* Burger pinned right */
.niofh-burger{ grid-column: 3; justify-self: end; }
.niofh-menu{ grid-column: 2; }

/* Burger (no glow) */
.niofh-burger{
  display:none;
  height:44px; width:44px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: none; /* removed shadow glow */
}
.niofh-burger .bar{
  position:absolute; left: 10px; right: 10px;
  height:3px; border-radius: 3px;
  background: var(--menu-ink, #ECF6FF);
  box-shadow: none; /* removed glow */
  transition: transform .25s ease, opacity .2s ease, top .25s ease, background .2s ease;
}
.niofh-burger .bar:nth-child(1){ top: 12px; }
.niofh-burger .bar:nth-child(2){ top: 20px; }
.niofh-burger .bar:nth-child(3){ top: 28px; }
.niofh-burger.is-open .bar:nth-child(1){ top: 20px; transform: rotate(45deg); }
.niofh-burger.is-open .bar:nth-child(2){ opacity: 0; }
.niofh-burger.is-open .bar:nth-child(3){ top: 20px; transform: rotate(-45deg); }
.niofh-burger:focus-visible{ outline: 2px solid var(--accent, #00BF63); outline-offset: 3px; }

/* Desktop menu */
.niofh-menu ul{
  margin:0; padding:0; list-style:none;
  display:flex; gap: 22px; justify-content:flex-end; align-items:center;
}
.niofh-menu a{
  color: var(--menu-ink, #ECF6FF);
  text-decoration:none;
  padding:10px 12px;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: .2px;
  text-shadow: none; /* removed text glow */
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s;
  border: 1px solid transparent;
  box-shadow: none; /* removed glow */
}
.niofh-menu a:hover{
  color: var(--menu-ink-hover, #FFFFFF);
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
  transform: translateY(-1px);
}

/* Mobile: tab/blind strips */
@media (max-width:980px){
  .niofh-burger{ display:block; }

  .niofh-menu{ 
    grid-column: 1 / -1; grid-row: 2;
    display:block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height .44s ease, opacity .28s ease, transform .28s ease;
    background: var(--bg-start, #215973);
    border-bottom: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
  }
  .niofh-menu.open{
    max-height: 70vh;
    opacity: 1;
    transform: translateY(0);
  }
  .niofh-menu ul{ 
    flex-direction:column; 
    align-items:stretch; 
    gap: 8px; padding: 12px 14px 16px; 
  }
  .niofh-menu li{
    --tab-delay: calc(var(--i) * 70ms);
    opacity: 0;
    transform: translateY(-6px);
  }
  .niofh-menu.open li{
    animation: nioTabIn .34s cubic-bezier(.2,.7,.2,1.0) forwards;
    animation-delay: var(--tab-delay);
  }
  .niofh-menu a{
    position: relative;
    width:100%;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.18);
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
    padding: 12px 14px;
    box-shadow: none; /* no glow */
    transform: translateZ(0); /* improve scroller perf */
  }
  .niofh-menu a::before{
    content:"";
    position:absolute; inset:0;
    background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0));
    transform-origin: top;
    transform: scaleY(1); /* start covered */
    pointer-events:none;
  }
  .niofh-menu.open li a::before{
    animation: nioBlind .38s ease forwards;
    animation-delay: calc(var(--tab-delay) + 80ms);
  }
  .niofh-menu a:hover{
    background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
    border-color: rgba(255,255,255,.26);
    transform: translateY(-1px);
  }
}

@keyframes nioTabIn{
  0% { opacity:0; transform: translateY(-6px); }
  100%{ opacity:1; transform: translateY(0); }
}
@keyframes nioBlind{
  0% { transform: scaleY(1); }
  100%{ transform: scaleY(0); }
}

#wpadminbar{ z-index: 99999; }
