/* Hide old Neve header container */
#header-grid {
  display: none !important;
}

/* Hide Jetpack & WordPress Sharing and Liking elements */
.sharedaddy,
#jp-post-flair,
.jp-relatedposts,
.jetpack-likes-widget-wrapper,
div.sharedaddy,
.sd-sharing,
.sd-like,
.sd-rating,
.jetpack-social-navigation {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  opacity: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

/* Base Sticky Header */
#bioflo-master-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 99999;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #E2E8F0;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #0F172A;
}

.bf-nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Single Clean Brand Logo */
.bf-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.bf-brand img {
  height: 38px;
  width: auto;
  display: block;
}

/* Desktop Menu Items */
.bf-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.bf-nav-item {
  position: relative;
}
.bf-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  outline: none;
  line-height: 1.4;
  white-space: nowrap;
}
.bf-nav-link:hover,
.bf-nav-link.active,
.bf-nav-item.open > .bf-nav-link {
  color: #2563EB;
  background: #EFF6FF;
}
.bf-nav-link.active {
  font-weight: 700;
}

.bf-nav-badge {
  background: #EEF2FF;
  color: #2563EB;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1px solid #C7D2FE;
  margin-left: 2px;
  line-height: 1;
}

.bf-arrow-icon {
  width: 10px;
  height: 10px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.bf-nav-item.open .bf-arrow-icon {
  transform: rotate(180deg);
}

/* Dropdown Shared Styles */
.bf-dropdown-pane {
  position: absolute;
  top: calc(100% + 6px);
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 20px 35px -5px rgba(15, 23, 42, 0.12), 0 8px 12px -6px rgba(15, 23, 42, 0.06);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 100000;
}

/* Invisible hover bridge to eliminate gap flicker */
.bf-dropdown-pane::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
  background: transparent;
}

/* Desktop Hover and Open States */
@media (min-width: 992px) {
  .bf-nav-item:hover > .bf-dropdown-pane,
  .bf-nav-item:focus-within > .bf-dropdown-pane,
  .bf-nav-item.open > .bf-dropdown-pane {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .bf-nav-item:hover .bf-arrow-icon,
  .bf-nav-item:focus-within .bf-arrow-icon,
  .bf-nav-item.open .bf-arrow-icon {
    transform: rotate(180deg);
  }
}

/* Services Dropdown (320px) */
.bf-services-pane {
  left: 0;
  width: 320px;
  padding: 12px;
}
.bf-dropdown-header {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #94A3B8;
  text-transform: uppercase;
  padding: 6px 10px 8px;
  border-bottom: 1px solid #F1F5F9;
  margin-bottom: 6px;
}
.bf-sub-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.bf-sub-item:hover {
  background: #F8FAFC;
}
.bf-sub-icon {
  font-size: 18px;
  line-height: 1.2;
  flex-shrink: 0;
}
.bf-sub-title {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 2px;
}
.bf-sub-item:hover .bf-sub-title {
  color: #2563EB;
}
.bf-sub-desc {
  font-size: 11px;
  color: #64748B;
  line-height: 1.4;
}

/* Applications Mega-Menu (580px) */
.bf-mega-pane {
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 580px;
  max-width: calc(100vw - 32px);
  padding: 16px;
}
@media (min-width: 992px) {
  .bf-nav-item:hover > .bf-mega-pane,
  .bf-nav-item:focus-within > .bf-mega-pane,
  .bf-nav-item.open > .bf-mega-pane {
    transform: translateX(-50%) translateY(0);
  }
}
.bf-mega-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #F1F5F9;
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.bf-mega-title {
  font-size: 13px;
  font-weight: 800;
  color: #0A2540;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bf-search-wrap {
  position: relative;
  margin-bottom: 14px;
}
.bf-search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #F8FAFC;
  outline: none;
  box-sizing: border-box;
  color: #0F172A;
  transition: all 0.15s ease;
}
.bf-search-input:focus {
  border-color: #2563EB;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.bf-search-icon {
  position: absolute;
  left: 11px;
  top: 9px;
  color: #94A3B8;
  font-size: 13px;
  pointer-events: none;
}
.bf-mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bf-mega-col {
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  border-radius: 10px;
  padding: 10px 12px;
}
.bf-col-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.bf-col-scaling { color: #1D4ED8; }
.bf-col-transfer { color: #0D9488; }
.bf-col-lab { color: #059669; }
.bf-col-work { color: #D97706; }

.bf-tool-link {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.15s ease;
}
.bf-tool-link:hover {
  color: #2563EB;
  text-decoration: underline;
}
.bf-mega-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}
.bf-hub-btn {
  color: #2563EB;
  font-weight: 700;
  text-decoration: none;
}
.bf-hub-btn:hover {
  text-decoration: underline;
}

/* Primary CTA Button */
.bf-cta-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bf-cta-btn {
  background: #2563EB;
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  transition: all 0.15s ease;
  white-space: nowrap;
}
.bf-cta-btn:hover {
  background: #1D4ED8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

/* Mobile Hamburger Button */
.bf-hamburger {
  display: none;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 9px 10px;
  cursor: pointer;
  outline: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.bf-hamburger:hover,
.bf-hamburger:focus {
  background: #F8FAFC;
  border-color: #94A3B8;
  outline: none;
}
.bf-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #0F172A;
  margin: 4px 0;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.bf-hamburger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.bf-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.bf-hamburger.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Neutralize Neve Theme Button Overrides */
#bioflo-master-header button,
#bioflo-master-header button:focus,
#bioflo-master-header button:active {
  background: transparent;
  color: inherit;
  outline: none !important;
  box-shadow: none !important;
}
#bioflo-master-header .bf-hamburger,
#bioflo-master-header .bf-hamburger:focus,
#bioflo-master-header .bf-hamburger:active {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  outline: none !important;
  box-shadow: none !important;
}
#bioflo-master-header .bf-hamburger:hover {
  background: #F8FAFC !important;
  border-color: #94A3B8 !important;
}
#bioflo-master-header button.bf-nav-link:hover,
#bioflo-master-header .bf-nav-item.open > button.bf-nav-link {
  background: #EFF6FF !important;
  color: #2563EB !important;
}
#bioflo-master-header .bf-mobile-link,
#bioflo-master-header .bf-mobile-link:focus,
#bioflo-master-header .bf-mobile-link:active {
  background: transparent !important;
  color: #0F172A !important;
  box-shadow: none !important;
}
#bioflo-master-header .bf-mobile-link:hover,
#bioflo-master-header .bf-mobile-link.active,
#bioflo-master-header .bf-mobile-link.open {
  color: #2563EB !important;
}
#bioflo-master-header .bf-cta-btn,
#bioflo-master-header .bf-cta-btn:focus,
#bioflo-master-header .bf-cta-btn:active {
  background: #2563EB !important;
  color: #FFFFFF !important;
}
#bioflo-master-header .bf-cta-btn:hover {
  background: #1D4ED8 !important;
  color: #FFFFFF !important;
}

/* Mobile Drawer */
.bf-mobile-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background: #FFFFFF;
  border-top: 1px solid #F1F5F9;
  border-bottom: 2px solid #E2E8F0;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  height: calc(100vh - 68px);
  max-height: calc(100vh - 68px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 99999;
}
.bf-mobile-drawer.open {
  display: block;
}
.bf-drawer-sheet {
  padding: 16px 20px 48px;
  background: #FFFFFF;
  min-height: 100%;
  box-sizing: border-box;
}
.bf-mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 0;
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
  text-decoration: none;
  border-bottom: 1px solid #F1F5F9;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  box-sizing: border-box;
  text-align: left;
}
.bf-mobile-link:hover,
.bf-mobile-link.active {
  color: #2563EB;
}
.bf-mobile-arrow {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
  color: #94A3B8;
}
.bf-mobile-subgroup {
  display: none;
  padding: 6px 0 10px 14px;
  border-left: 2px solid #EFF6FF;
  margin: 6px 0 10px 6px;
}
.bf-mobile-subgroup.open {
  display: block;
}
.bf-mobile-sublink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
}
.bf-mobile-sublink:hover {
  color: #2563EB;
}

@media (max-width: 991px) {
  .bf-nav-links, .bf-cta-wrap {
    display: none !important;
  }
  .bf-hamburger {
    display: block;
  }
}