/* ============================================================
   Feasy Pro Landing — Mega menu
   ============================================================ */

/* ── Nav host ──────────────────────────────────────────────── */
.site-header .container {
  display: flex;
  align-items: center;
  gap: 0;
}

.mm-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  padding: 0 16px;
}

/* ── Shared tab / simple-link styles ───────────────────────── */
.mm-tab,
.mm-simple-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  border: none;
  background: transparent;
  color: var(--text-on-dark-soft);
  font: 500 0.875rem/1 var(--font-ui);
  border-radius: var(--r-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: color 140ms, background 140ms;
  text-decoration: none;
}

.mm-tab:hover,
.mm-simple-link:hover {
  color: var(--text-on-dark);
  background: rgba(246, 241, 232, 0.06);
}

.mm-tab[aria-expanded="true"] {
  color: var(--teal-bright);
  background: rgba(10, 132, 134, 0.12);
}

/* Chevron rotates when open */
.mm-chevron {
  flex-shrink: 0;
  transition: transform 200ms var(--ease-out, cubic-bezier(0.22,1,0.36,1));
}
.mm-tab[aria-expanded="true"] .mm-chevron {
  transform: rotate(180deg);
}

/* ── Panel ─────────────────────────────────────────────────── */
.mm-group {
  position: static;
}

.mm-panel {
  position: fixed;
  top: var(--nav-h, 72px);
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--linen);
  border-top: 1px solid var(--line);
  border-bottom: 3px solid var(--teal-bright);
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  /* entry animation */
  opacity: 0;
  transform: translateY(-10px) scale(0.985);
  transition:
    opacity 220ms var(--ease-out, cubic-bezier(0.22,1,0.36,1)),
    transform 220ms var(--ease-out, cubic-bezier(0.22,1,0.36,1));
  pointer-events: none;
}

.mm-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Teal gradient top edge */
.mm-panel::before {
  content: '';
  position: absolute;
  inset: -3px 0 auto;
  height: 3px;
  background: var(--grad-brand);
  border-radius: 2px 2px 0 0;
}

.mm-panel-inner {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 0;
  max-width: var(--container, 1180px);
  margin: 0 auto;
  padding: 28px 24px 28px;
}

/* ── Links column ───────────────────────────────────────────── */
.mm-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  align-content: start;
}

.mm-link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: background 140ms;
}

.mm-link:hover {
  background: var(--linen-tint);
}

.mm-link-label {
  font: 600 0.875rem/1.3 var(--font-ui);
  color: var(--ink);
}

.mm-link-desc {
  font: 400 0.8rem/1.4 var(--font-body);
  color: var(--text-soft);
}

/* Stagger child link columns on open */
.mm-panel.is-open .mm-links li:nth-child(1) { animation: mmFadeUp 220ms 20ms both var(--ease-out, ease); }
.mm-panel.is-open .mm-links li:nth-child(2) { animation: mmFadeUp 220ms 40ms both var(--ease-out, ease); }
.mm-panel.is-open .mm-links li:nth-child(3) { animation: mmFadeUp 220ms 60ms both var(--ease-out, ease); }
.mm-panel.is-open .mm-links li:nth-child(4) { animation: mmFadeUp 220ms 80ms both var(--ease-out, ease); }
.mm-panel.is-open .mm-links li:nth-child(5) { animation: mmFadeUp 220ms 100ms both var(--ease-out, ease); }
.mm-panel.is-open .mm-links li:nth-child(6) { animation: mmFadeUp 220ms 120ms both var(--ease-out, ease); }
.mm-panel.is-open .mm-links li:nth-child(7) { animation: mmFadeUp 220ms 140ms both var(--ease-out, ease); }

@keyframes mmFadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Featured card ──────────────────────────────────────────── */
.mm-featured {
  border-left: 1px solid var(--line);
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mm-featured-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--r-md);
  background: var(--linen-tint);
}

.mm-featured-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mm-featured-title {
  font: 600 0.9rem/1.3 var(--font-ui);
  color: var(--ink);
}

.mm-featured-blurb {
  font: 400 0.82rem/1.5 var(--font-body);
  color: var(--text-soft);
  margin: 0;
}

.mm-featured-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 600 0.82rem/1 var(--font-ui);
  color: var(--teal-bright);
  text-decoration: none;
  transition: gap 150ms;
}

.mm-featured-link:hover {
  gap: 8px;
}

.mm-arrow {
  flex-shrink: 0;
}

/* ── Backdrop ────────────────────────────────────────────────── */
.mm-backdrop {
  position: fixed;
  inset: var(--nav-h, 72px) 0 0;
  background: rgba(22, 18, 15, 0.35);
  backdrop-filter: blur(2px);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms;
}

/* The header's own z-index traps the panel in its stacking context, so the
   whole header has to clear the body-level backdrop while a panel is open. */
.site-header.mm-is-open {
  z-index: 201;
}

.mm-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Mobile nav ─────────────────────────────────────────────── */
.mobile-nav {
  position: fixed;
  inset: var(--nav-h, 72px) 0 0;
  z-index: 300;
  background: var(--ink-deep);
  overflow-y: auto;
  padding: 8px 0 32px;
  transform: translateX(100%);
  transition: transform 280ms var(--ease-out, cubic-bezier(0.22,1,0.36,1));
}

.mobile-nav:not([hidden]) {
  display: block;
}

.mobile-nav.is-open {
  transform: translateX(0);
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
}

.mobile-nav-link {
  display: block;
  padding: 14px 24px;
  font: 500 1rem/1 var(--font-ui);
  color: var(--text-on-dark-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line-on-dark);
  transition: color 140ms;
}

.mobile-nav-link:hover { color: var(--text-on-dark); }

/* Accordion group */
.mobile-nav-group-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line-on-dark);
  font: 500 1rem/1 var(--font-ui);
  color: var(--text-on-dark-soft);
  cursor: pointer;
  transition: color 140ms;
}

.mobile-nav-group-btn[aria-expanded="true"] {
  color: var(--teal-bright);
}

.mobile-nav-group-btn[aria-expanded="true"] .mm-chevron {
  transform: rotate(180deg);
}

.mobile-nav-group-links {
  background: rgba(246, 241, 232, 0.04);
  padding: 4px 0;
}

.mobile-nav-sub-link {
  display: block;
  padding: 10px 24px 10px 36px;
  font: 400 0.9rem/1.2 var(--font-body);
  color: var(--text-on-dark-soft);
  text-decoration: none;
  transition: color 140ms;
}

.mobile-nav-sub-link:hover {
  color: var(--teal-bright);
}

.mobile-nav-actions {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* The link already carries the drawer's 24px gutter in its own padding. */
.mobile-nav-actions .mobile-nav-link {
  padding-inline: 0;
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .mm-panel,
  .mm-backdrop,
  .mobile-nav,
  .mm-chevron,
  .mm-links li {
    transition: none !important;
    animation: none !important;
  }
}

/* ── Desktop-only ────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .mm-nav { display: none; }
}

@media (min-width: 1181px) {
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}
