/**
 * Public nav layout guards for DB-driven menus.
 * Keep header/footer geometry stable; dropdowns stay out of document flow.
 */

/* Header: don't let long menus wrap and double the sticky bar height */
.header-layout1 .header-bottom .menu-top .row {
  flex-wrap: nowrap;
}

.header-layout1 .header-bottom .menu-top .row > .col-auto {
  min-width: 0;
}

.header-layout1 .main-menu {
  position: relative;
  z-index: 6;
  max-width: 100%;
}

.header-layout1 .main-menu > ul {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

/* Preserve theme spacing while using flex instead of inline-block whitespace quirks */
.header-layout1 .main-menu > ul > li {
  display: block;
  flex: 0 0 auto;
}

/* Dropdowns must never push page content or widen the viewport */
.header-layout1 .main-menu ul.sub-menu {
  position: absolute;
  z-index: 20;
}

.header-layout1 .sticky-wrapper,
.header-layout1 .sticky-active {
  overflow: visible;
}

/* Footer quick links: nested items stay in-flow (no floating desktop dropdown) */
.fcf-footer-quicklinks .menu,
.fcf-footer-quicklinks .menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fcf-footer-quicklinks .menu > li {
  display: block;
}

.fcf-footer-quicklinks .menu .sub-menu {
  position: static;
  visibility: visible;
  opacity: 1;
  margin: 6px 0 0;
  padding: 0 0 0 14px;
  min-width: 0;
  width: auto;
  box-shadow: none;
  background: transparent;
  border: 0;
  transform: none;
}

.fcf-footer-quicklinks .menu .sub-menu::before {
  display: none;
}

.fcf-footer-quicklinks .menu .sub-menu li {
  display: block;
  margin: 0 0 8px;
}

.fcf-footer-quicklinks .menu .sub-menu a {
  padding: 0;
}

/* Mobile drawer: nested lists stay collapsed until theme JS expands them */
.vs-mobile-menu ul ul {
  display: none;
}

.vs-mobile-menu ul ul.vs-open {
  display: block;
}
