/* Full-screen mobile menu (replaces the template's .side-menu2 drawer).
   Only reachable below 1202px, where the hamburger shows; hidden otherwise.
   Dark in both site themes on purpose: it is an overlay, not page content. */
.m-nav {
  --m-bg: #100d1c;
  --m-text: #ffffff;
  --m-muted: rgba(255, 255, 255, 0.68);
  --m-line: rgba(255, 255, 255, 0.1);
  --m-accent: #45d0bd;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(130, 88, 200, 0.35), transparent 60%),
    radial-gradient(90% 50% at 0% 100%, rgba(69, 208, 189, 0.18), transparent 60%),
    var(--m-bg);
  color: var(--m-text);
  font-family: var(--font-secondary, "Manrope", Arial, sans-serif);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.32s ease, transform 0.32s ease, visibility 0s linear 0.32s;
}
.m-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.32s ease, transform 0.32s ease, visibility 0s;
}
@media (min-width: 1202px) {
  .m-nav { display: none; }
}

.m-nav__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--m-line);
}
.m-nav__logo img {
  display: block;
  width: 180px;
  height: auto;
}
.m-nav__close {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--m-text);
  cursor: pointer;
}
.m-nav__close svg { width: 18px; height: 18px; }

.m-nav__scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px 20px 24px;
}
.m-nav__list,
.m-nav__sub ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.m-nav__item {
  border-bottom: 1px solid var(--m-line);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.m-nav.is-open .m-nav__item {
  opacity: 1;
  transform: none;
}
.m-nav.is-open .m-nav__item:nth-child(1) { transition-delay: 0.06s; }
.m-nav.is-open .m-nav__item:nth-child(2) { transition-delay: 0.10s; }
.m-nav.is-open .m-nav__item:nth-child(3) { transition-delay: 0.14s; }
.m-nav.is-open .m-nav__item:nth-child(4) { transition-delay: 0.18s; }
.m-nav.is-open .m-nav__item:nth-child(5) { transition-delay: 0.22s; }

/* Top-level rows: a plain link, or (for sections) one button that opens the group. */
.m-nav__link,
.m-nav__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 64px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--m-text);
  font-family: var(--font-primary, "Sora", Arial, sans-serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.m-nav__link:hover,
.m-nav__toggle:hover,
.m-nav__link:focus,
.m-nav__toggle:focus { color: var(--m-text); }
.m-nav__link.is-current,
.m-nav__item.is-current > .m-nav__toggle { color: var(--m-accent); }

.m-nav__chev {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease, background-color 0.3s ease;
}
.m-nav__chev svg { width: 16px; height: 16px; }
.m-nav__toggle[aria-expanded="true"] .m-nav__chev {
  transform: rotate(180deg);
  background: var(--m-accent);
  color: #0d0b17;
}

/* Collapsible group: animates its height via grid rows, no JS measuring. */
.m-nav__sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s ease;
}
.m-nav__sub > ul { overflow: hidden; min-height: 0; }
.m-nav__toggle[aria-expanded="true"] + .m-nav__sub { grid-template-rows: 1fr; }
.m-nav__sub ul { padding-bottom: 10px; }
.m-nav__sub a {
  display: block;
  padding: 11px 0 11px 14px;
  border-left: 2px solid transparent;
  color: var(--m-muted);
  font-size: 17px;
  line-height: 1.35;
  text-decoration: none;
}
.m-nav__sub a:hover,
.m-nav__sub a:focus { color: var(--m-text); }
.m-nav__sub a.is-current {
  color: var(--m-text);
  border-left-color: var(--m-accent);
}
.m-nav__sub a.m-nav__all {
  color: var(--m-accent);
  font-weight: 600;
}

/* Always-visible footer: the actions people open the menu for. */
.m-nav__foot {
  flex: 0 0 auto;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--m-line);
  background: rgba(16, 13, 28, 0.92);
}
.m-nav__cta {
  display: block;
  padding: 15px 20px;
  border-radius: 50px;
  background: linear-gradient(113deg, #45d0bd 2.7%, #44b6e9 98.55%);
  color: #0d0b17;
  font-family: var(--font-primary, "Sora", Arial, sans-serif);
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.m-nav__cta:hover,
.m-nav__cta:focus { color: #0d0b17; }
.m-nav__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.m-nav__phone {
  color: var(--m-text);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.m-nav__phone:hover,
.m-nav__phone:focus { color: var(--m-accent); }
.m-nav__social {
  display: flex;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.m-nav__social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: var(--m-text);
  font-size: 15px;
  text-decoration: none;
}
.m-nav__social a:hover,
.m-nav__social a:focus { color: var(--m-accent); border-color: var(--m-accent); }

/* the template rings every focused button; keep rings for keyboard users only */
.m-nav a:focus:not(:focus-visible),
.m-nav button:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}
.m-nav a:focus-visible,
.m-nav button:focus-visible {
  outline: 2px solid var(--m-accent);
  outline-offset: 3px;
}

html.m-nav-locked,
html.m-nav-locked body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .m-nav,
  .m-nav.is-open,
  .m-nav__item,
  .m-nav__sub,
  .m-nav__chev { transition: none !important; transform: none !important; }
}

/* Pages with no header (the 404) get a floating opener instead. */
.hamburger.m-nav-fab {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000;
  width: 52px;
  height: 52px;
  padding: 0 13px;
  border-radius: 50%;
  background: rgba(16, 13, 28, 0.85);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: none;
  -webkit-transform: none;
  -ms-transform: none;
}
.hamburger.m-nav-fab span { background: #ffffff; }
