:root{
  --header-h:56px;
  --brand-color:#0b5ed7;
  --header-border:#e6e6e6;
  --desktop-body-gap:16px;
}

/* Base reset to avoid unexpected gaps */
html,body{height:100%;margin:0;padding:0;box-sizing:border-box;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial}
*{box-sizing:inherit}
main, section, .hero, .content { margin-top:0; }

/* Fixed header */
.site-header{
  position:fixed;
  inset:0 0 auto 0; /* top:0; left:0; right:0 */
  height:var(--header-h);
  z-index:1100;
  background:#fff;
  border-bottom:1px solid var(--header-border);
  display:flex;
  align-items:center;
  width:100%;
}

/* container inside header */
.site-header .container{
  display:flex;
  align-items:center;
  width:100%;
  max-width:1200px;
  padding:0 16px;
  margin:0 auto;
}

/* Navbar baseline */
.navbar{width:100%;display:flex;align-items:center;padding:0}
.navbar-brand{display:flex;align-items:center;gap:8px}

/* Nav items */
.navbar-nav{
  display:flex !important;
  gap:0 !important;
  margin-left:auto !important;
  justify-content:flex-end !important;
  align-items:center !important;
  white-space:nowrap;
}
.navbar-nav>*{margin:0 !important;padding:0 !important;display:block !important}
.navbar-nav .nav-link{display:block !important;padding:.45rem .75rem !important;font-weight:700;color:#222;text-decoration:none !important}
.navbar-nav li:empty{display:none !important}

/* Desktop: offset page content and dropdown behavior */
@media (min-width:992px){
  /* content offset uses CSS variable only (no inline body padding from JS) */
  body{padding-top:calc(var(--header-h) + var(--desktop-body-gap));}

  /* Desktop dropdown: allow hover and click both */
  .navbar-nav .dropdown{position:relative}
  .navbar-nav .dropdown > .dropdown-menu{
    position:absolute;
    top:calc(100% + 8px);
    left:0;
    min-width:12rem;
    opacity:0;
    visibility:hidden;
    transform:translateY(8px);
    transition:opacity .16s ease,transform .16s ease,visibility .16s;
    pointer-events:none;
    z-index:1200;
    background:#fff;
    border:1px solid rgba(0,0,0,.06);
    border-radius:4px;
  }

  /* CSS hover open (fallback + UX) */
  .navbar-nav .dropdown:hover > .dropdown-menu,
  .navbar-nav .dropdown:focus-within > .dropdown-menu,
  .navbar-nav .dropdown.show > .dropdown-menu {
    opacity:1;
    visibility:visible;
    transform:translateY(0);
    pointer-events:auto;
  }

  .navbar-nav .dropdown-toggle::after,
  .navbar-nav .menu-item-has-children > a::after{
    content:'\25BE';
    margin-left:.28rem;
    font-size:.78em;
    vertical-align:middle;
    color:inherit;
  }

  .mobile-panel-header, .mobile-panel-header * { display:none !important; }
}

/* Mobile slide panel and toggler */
@media (max-width:991.98px){
  /* mobile body offset equals header height */
  body{padding-top:var(--header-h) !important}
  .site-header{height:var(--header-h);position:fixed}

  .navbar-toggler{position:relative;z-index:1120;background:transparent;border:none;padding:.35rem .5rem;font-size:1rem;font-weight:400;line-height:1}
  .navbar-toggler .hamburger-lines span{width:22px;height:2px;background:currentColor;margin:4px 0;border-radius:2px;display:block}

  /* Slide panel anchored below header */
  .collapse.navbar-collapse{
    position:fixed !important;
    top:var(--header-h) !important;
    right:0 !important;
    width:78% !important;
    max-width:360px !important;
    height:calc(100vh - var(--header-h)) !important;
    z-index:1099 !important;
    background:#fff !important;
    box-shadow:-2px 0 12px rgba(0,0,0,.14) !important;
    transform:translateX(100%) !important;
    transition:transform 320ms cubic-bezier(.22,.9,.32,1) !important;
    display:flex !important;
    flex-direction:column !important;
    padding:0 !important;
    overflow-y:auto !important;
  }
  .collapse.navbar-collapse.show{transform:translateX(0) !important}

  .collapse.navbar-collapse .mobile-panel-header{
    flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:.5rem .9rem;border-bottom:1px solid #efefef;z-index:1098
  }
  .collapse.navbar-collapse .mobile-panel-logo img,
  .collapse.navbar-collapse .mobile-panel-logo svg{height:28px;width:auto;max-width:160px;display:block}
  .collapse.navbar-collapse .mobile-close-btn{background:transparent;border:0;padding:.25rem .5rem;font-weight:600;cursor:pointer}

  .collapse.navbar-collapse .navbar-nav{
    flex:1 1 auto;display:flex;flex-direction:column;align-items:flex-start;padding:0;margin:0;overflow-y:auto;-webkit-overflow-scrolling:touch;
  }
  .navbar-nav .nav-link{padding:.9rem 1.125rem;border-bottom:1px solid #efefef;text-align:left;width:100%}
  .collapse.navbar-collapse .navbar-brand,
  .collapse.navbar-collapse .site-logo-inline,
  .collapse.navbar-collapse .header-action,
  .collapse.navbar-collapse .cta { display:none !important; }

  /* Prevent toggler from gaining bold/scale */
  .navbar-toggler, .navbar-toggler * { font-weight:400; font-size:1rem; }
  .navbar-collapse .nav-link, .navbar-collapse .dropdown-item { font-size:.95rem; font-weight:400; padding:.48rem .75rem; line-height:1.15; }
}

/* Utility & defensive rules */
.navbar-nav .nav-link::before,.navbar-nav .nav-link::after{content:none}
.navbar-nav .menu-item-has-children > a .js-caret{pointer-events:none;color:inherit}
.navbar-nav .nav-link:focus{outline:2px solid rgba(0,86,179,.15);outline-offset:2px}

/* Page override to remove desktop gap when needed */
.no-header-gap { --desktop-body-gap: 0px; }

/* Preserve legacy toggle neutralizations (kept safe) */
.nav-toggle .label { display: none !important; }
.nav-toggle[aria-expanded="true"] .label,
.nav-toggle.is-open .label { display: inline-block !important; font-weight:700 !important; }
.nav-toggle .icon, .nav-toggle .icon * { background: transparent !important; border-radius: 0 !important; box-shadow: none !important; font-weight: 400 !important; }
.nav-toggle .icon::before, .nav-toggle .icon::after { content: none !important; display: none !important; }
