/* ==========================================================================
   Formium Alliance — Mega Menu (desktop, >= 1280px)
   One shared panel that opens under the floating glass header. Old white
   dropdowns are hidden; the mobile sidebar is untouched.
   Brand: Power Black #000 / Action Red #FF3131 / True White #FFF only.
   ========================================================================== */

:root {
  --mm-red: #ff3131;
  --mm-ink: #fff;
  --mm-ink-2: rgba(255, 255, 255, 0.62);
  --mm-ink-3: rgba(255, 255, 255, 0.38);
  --mm-line: rgba(255, 255, 255, 0.09);
  --mm-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Retire the legacy white dropdowns on desktop */
@media (min-width: 1280px) {
  header .dropdown-menu,
  header .dropdown-menu-bridge {
    display: none !important;
  }
}

/* Active state on the top-level nav label */
header nav .nav-item > a { position: relative; transition: opacity 0.2s ease; }
header nav .nav-item > a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--mm-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--mm-ease);
}
header nav .nav-item.mm-active > a::after { transform: scaleX(1); }

/* ---------- Panel ---------- */
.mm-panel {
  position: fixed;
  z-index: 60;
  left: 50%;
  top: 0;
  width: 1290px;
  max-width: calc(100vw - 48px);
  transform: translate(-50%, -8px) scale(0.985);
  transform-origin: top center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  border-radius: 28px;
  background: rgba(8, 8, 8, 0.93);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  backdrop-filter: blur(28px) saturate(1.5);
  border: 1px solid var(--mm-line);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.14), 0 30px 80px rgba(0, 0, 0, 0.55);
  color: var(--mm-ink);
  font-family: inherit;
  transition: opacity 0.24s ease, transform 0.34s var(--mm-ease), visibility 0s linear 0.34s;
}
.mm-panel.mm-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
  transition: opacity 0.22s ease, transform 0.34s var(--mm-ease), visibility 0s;
}
/* invisible bridge so the pointer can travel from nav to panel */
.mm-panel::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -22px; height: 22px;
}

.mm-panel::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(520px 260px at 0% 0%, rgba(255, 49, 49, 0.16), transparent 70%);
}
.mm-view { display: none; position: relative; z-index: 1; padding: 36px 36px 34px; }
.mm-view.mm-on {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 40px;
  animation: mm-in 0.36s var(--mm-ease) both;
}
@keyframes mm-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Left: intro */
.mm-intro { display: flex; flex-direction: column; border-right: 1px solid var(--mm-line); padding-right: 32px; }
.mm-eyebrow {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mm-red); font-weight: 600; margin: 0 0 14px;
}
.mm-title { font-size: 26px; line-height: 1.12; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 12px; color: var(--mm-ink); }
.mm-desc { font-size: 14px; line-height: 1.55; color: var(--mm-ink-2); margin: 0; }
.mm-all {
  margin-top: auto; padding-top: 28px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--mm-ink); text-decoration: none;
  width: fit-content;
}
.mm-all svg { transition: transform 0.3s var(--mm-ease); }
.mm-all:hover { color: var(--mm-red); }
.mm-all:hover svg { transform: translateX(4px); }

/* Right: link columns */
.mm-cols { display: grid; gap: 8px 20px; align-content: start; }
.mm-cols[data-n="1"] { grid-template-columns: 1fr; }
.mm-cols[data-n="2"] { grid-template-columns: repeat(2, 1fr); }
.mm-cols[data-n="3"] { grid-template-columns: repeat(3, 1fr); }
.mm-cols[data-n="4"] { grid-template-columns: repeat(4, 1fr); }

.mm-head {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--mm-ink-3); font-weight: 600;
  margin: 0 0 12px; padding: 0 12px; white-space: nowrap;
}
.mm-col { display: flex; flex-direction: column; }
.mm-link {
  position: relative; display: block;
  padding: 9px 12px; margin: 0 0 1px; border-radius: 12px;
  text-decoration: none; color: var(--mm-ink);
  transition: background 0.25s ease, transform 0.35s var(--mm-ease);
}
.mm-link b { display: block; font-size: 15px; font-weight: 450; line-height: 1.3; color: rgba(255,255,255,0.9); transition: color 0.2s ease; }
.mm-link small { display: block; font-size: 12.5px; line-height: 1.4; color: var(--mm-ink-3); margin-top: 2px; }
.mm-link:hover, .mm-link:focus-visible { background: rgba(255, 255, 255, 0.06); outline: none; transform: translateX(3px); }
.mm-link:hover b, .mm-link:focus-visible b { color: #fff; }
.mm-link::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0;
  border-radius: 3px; background: var(--mm-red); transform: translateY(-50%);
  transition: height 0.3s var(--mm-ease);
}
.mm-link:hover::before, .mm-link:focus-visible::before { height: 55%; }

/* larger "card" links (pricing) */
.mm-card { padding: 16px 16px 15px; border: 1px solid var(--mm-line); border-radius: 16px; margin: 0; }
.mm-card:hover { border-color: rgba(255, 49, 49, 0.55); transform: translateY(-2px); }
.mm-card::before { display: none; }
.mm-card b { font-size: 16px; }
.mm-card small { font-size: 13px; margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  .mm-panel, .mm-panel.mm-open, .mm-view.mm-on, .mm-link, .mm-all svg { transition: none !important; animation: none !important; }
}
@media (max-width: 1279px) { .mm-panel { display: none !important; } }

/* ==========================================================================
   Mobile / tablet drawer (< 1280px) — dark accordion built from the same
   config as the desktop panel.
   ========================================================================== */
@media (max-width: 1279px) {
  header aside.sidebar {
    width: min(100%, 440px) !important;
    background: #0a0a0a !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    filter: none !important;
    border-left: 1px solid var(--mm-line);
    border-radius: 28px 0 0 28px !important;
    height: 100vh; height: 100dvh;
    overflow: hidden;
    color: #fff;
  }
  header aside.sidebar::before, header aside.sidebar::after { display: none !important; }
  header aside.sidebar > div { padding: 0 !important; height: 100%; display: flex; flex-direction: column; }
  header aside.sidebar .nav-hamburger-close {
    background: rgba(255,255,255,.08) !important; border: 1px solid var(--mm-line);
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important; filter: none !important;
  }
  header aside.sidebar .nav-hamburger-close span { background: #fff !important; }
  header aside.sidebar > div > .flex.items-center.justify-between {
    padding: 20px 22px 8px; position: relative;
  }
  header aside.sidebar > div::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background: radial-gradient(420px 260px at 0% 0%, rgba(255,49,49,.18), transparent 70%);
  }
  header aside.sidebar > div > * { position: relative; z-index: 1; }

  .mm-m { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .mm-m-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 22px 16px; -webkit-overflow-scrolling: touch; }
  header .mm-m .mm-m-row, header .mm-m .mm-m-link {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    min-height: 58px; padding: 0; background: none; border: 0; border-bottom: 1px solid var(--mm-line);
    color: #fff; font-family: inherit !important; font-size: 21px !important; line-height: 1.2 !important; font-weight: 450; letter-spacing: -0.01em;
    text-align: left; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  header .mm-m .mm-m-row > span:first-child { font-size: inherit !important; line-height: inherit !important; font-family: inherit !important; color: inherit !important; }
  .mm-m-row:active, .mm-m-link:active { color: var(--mm-red); }
  .mm-m-row .mm-m-ico { position: relative; width: 14px; height: 14px; flex: none; }
  .mm-m-row .mm-m-ico::before, .mm-m-row .mm-m-ico::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; background: #fff;
    transform: translate(-50%, -50%); transition: transform .35s var(--mm-ease), background .2s;
  }
  .mm-m-row .mm-m-ico::after { transform: translate(-50%, -50%) rotate(90deg); }
  .mm-m-row[aria-expanded="true"] { color: #fff; border-bottom-color: transparent; }
  .mm-m-row[aria-expanded="true"] .mm-m-ico::before, .mm-m-row[aria-expanded="true"] .mm-m-ico::after { background: var(--mm-red); }
  .mm-m-row[aria-expanded="true"] .mm-m-ico::after { transform: translate(-50%, -50%) rotate(0deg); }

  .mm-m-pan { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--mm-ease); border-bottom: 1px solid var(--mm-line); }
  .mm-m-pan.mm-m-open { grid-template-rows: 1fr; }
  .mm-m-pan > div { overflow: hidden; min-height: 0; }
  .mm-m-pan:not(.mm-m-open) { border-bottom-color: transparent; }
  .mm-m-inner { padding: 2px 0 18px 4px; }
  .mm-m-head {
    font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mm-red);
    font-weight: 600; margin: 14px 0 4px;
  }
  .mm-m-inner .mm-m-head:first-child { margin-top: 2px; }
  .mm-m-sub { display: block; padding: 8px 0; color: rgba(255,255,255,.86); text-decoration: none; font-size: 15.5px; line-height: 1.3; -webkit-tap-highlight-color: transparent; }
  .mm-m-sub small { display: block; font-size: 13px; color: var(--mm-ink-3); margin-top: 2px; }
  .mm-m-sub:active { color: var(--mm-red); }
  .mm-m-all { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 0; color: #fff; font-weight: 500; font-size: 15px; text-decoration: none; }
  .mm-m-all svg { color: var(--mm-red); }

  .mm-m-foot { padding: 14px 22px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--mm-line); display: grid; grid-template-columns: 1fr auto; gap: 10px; background: #0a0a0a; }
  .mm-m-cta {
    display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 999px;
    background: var(--mm-red); color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; letter-spacing: .01em;
  }
  .mm-m-cta:active { filter: brightness(.9); }
  .mm-m-login {
    display: flex; align-items: center; justify-content: center; height: 52px; padding: 0 22px; border-radius: 999px;
    border: 1px solid rgba(255,255,255,.22); color: #fff; font-weight: 500; font-size: 15px; text-decoration: none;
  }
}
@media (min-width: 1280px) { .mm-m { display: none !important; } }
