/* Shared site chrome: mobile navigation.
   Page content itself is styled inline by the design source. */

#mobNavBtn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  flex: none;
}

#mobNavBtn span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: #f2f2f2;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* hamburger turns into an X while the panel is open */
#mobNavBtn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#mobNavBtn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
#mobNavBtn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#mobNavPanel {
  display: none;
  flex-direction: column;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 500;
  padding: 8px 24px 20px;
  background: #0a1236;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

#mobNavPanel a {
  padding: 14px 0;
  border-bottom: 1px solid rgba(242, 242, 242, 0.12);
}

/* the "Book a discovery call" button keeps its own styling, so give it room
   instead of a divider */
#mobNavPanel a:last-child {
  margin-top: 12px;
  border-bottom: 0;
  text-align: center;
}

/* booking / signup anchors: keep a little breathing room when a CTA jumps down to them */
#book-a-call,
#members-subscribe,
#marketplace-subscribe {
  scroll-margin-top: 24px;
}

@media (max-width: 767px) {
  nav { position: relative; }
  /* Only hide the inline links once the hamburger is actually in the DOM,
     otherwise there is a moment with no navigation at all while the dc runtime
     is still rendering the header. */
  nav:has(#mobNavBtn) > div:nth-child(2) { display: none !important; }
  #mobNavBtn { display: flex !important; }
  #mobNavPanel.is-open { display: flex !important; }
}
