/**
 * Custom CSS overrides for Helix3 template
 * Fixes navigation display issue after security hardening (July 2026)
 *
 * Root cause: .sp-megamenu-wrapper collapses to height:0 because all
 * children are floated (toggler float:right, megamenu float:right).
 * Fix: clearfix on wrapper + constrain megamenu height to header.
 */

/* Ensure header is always visible above page content */
#sp-header {
  position: relative;
  z-index: 999;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Ensure top bar also stays above */
#sp-top-bar {
  position: relative;
  z-index: 1000;
}

/* FIX: wrapper collapses because children are floated - add clearfix */
#sp-header .sp-megamenu-wrapper {
  overflow: hidden;
  height: 90px;
}

/* FIX: constrain megamenu UL to single line within header height */
#sp-header .sp-megamenu-parent {
  line-height: 90px;
  height: 90px;
  overflow: hidden;
  white-space: nowrap;
}

/* Nav links - ensure proper alignment */
.sp-megamenu-parent > li > a,
.sp-megamenu-parent > li > span {
  color: #333333;
  font-weight: 500;
  line-height: 90px;
}

.sp-megamenu-parent > li > a:hover,
.sp-megamenu-parent > li.active > a {
  color: #eb4947;
}

/* Fix sticky wrapper height collapse */
.sticky-wrapper {
  position: relative;
  z-index: 999;
}

/* When header becomes fixed (scrolled), maintain white bg */
#sp-header.menu-fixed {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

#sp-header.menu-fixed .sp-megamenu-wrapper,
#sp-header.menu-fixed .sp-megamenu-parent {
  height: 60px;
  line-height: 60px;
}

#sp-header.menu-fixed .sp-megamenu-parent > li > a,
#sp-header.menu-fixed .sp-megamenu-parent > li > span {
  line-height: 60px;
}

/* Ensure the page content does not overlap the header */
#sp-main-body,
#sp-page-title {
  position: relative;
  z-index: 1;
}

/* Menu column alignment */
#sp-menu {
  display: flex;
  align-items: center;
  height: 90px;
}

#sp-menu > .sp-column {
  width: 100%;
}

/* Hide toggler on desktop (it shows on mobile via media query) */
@media (min-width: 992px) {
  #offcanvas-toggler {
    display: none;
  }
}
