/* ==========================================================================
   Mega menu, announcement strip and mobile accordion drawer.
   Loads after atc.css. Spacing values come from the approved mockup
   (docs/superpowers/specs/2026-11-07-mega-menu-mockup.html); colours use theme tokens.
   Desktop panels exist only >= 1100px (atc.css hides .nav below that).
   ========================================================================== */

/* ---------- Announcement strip: normal flow above the sticky header, scrolls away ---------- */
.annc { position: relative; background: var(--dark-900); color: #E4E5E8; font-size: .8125rem; line-height: 1.4; text-align: center; padding: 10px 48px; border-bottom: 1px solid rgba(255,255,255,.08); }
.annc[hidden] { display: none; }
.annc__text { margin: 0; }
.annc b { color: #FF5C5C; font-weight: 700; }
.annc a { color: #fff; text-decoration: none; }
.annc a:hover { color: var(--red-300); }
.annc u { text-underline-offset: 3px; font-weight: 600; }
.annc__x { position: absolute; right: 8px; top: 50%; translate: 0 -50%; width: 32px; height: 32px; display: grid; place-items: center; background: none; border: 0; border-radius: 8px; color: #B9BBC2; cursor: pointer; }
.annc__x:hover { color: #fff; background: rgba(255,255,255,.08); }
.annc__x svg { width: 16px; height: 16px; }
.annc a:focus-visible, .annc__x:focus-visible { outline: 2px solid var(--red-300); outline-offset: 2px; }

/* ---------- Header actions ---------- */
.header-cta .btn { padding: 0 16px; gap: 8px; }
.v2 .header-cta .btn--outline-light { box-shadow: none; }

/* ---------- Desktop tabs ---------- */
@media (min-width: 1100px) {
  .nav.mm { align-self: stretch; display: flex; }
}
.nav.mm > ul { align-items: stretch; }
/* Items span the full header height so the pointer never leaves them between tab and panel. */
.nav .mm__item { position: static; display: flex; align-items: center; }
/* A tab is two controls that read as one pill: the label is a link to the section page, the chevron button opens the panel. */
.nav .mm__item > .mm__tab { height: 36px; padding: 0 3px 0 12px; border-radius: 999px 0 0 999px; font-size: .9063rem; white-space: nowrap; transition: background .15s, color .15s; }
.nav .mm__item > .mm__chev { height: 36px; width: 28px; padding: 0 8px 0 2px; justify-content: center; border-radius: 0 999px 999px 0; color: #fff; transition: background .15s, color .15s; }
.v2 .nav .mm__item > .mm__tab::after { display: none; }
.nav .mm__item:hover > .mm__tab, .nav .mm__item:hover > .mm__chev { background: rgba(255,255,255,.06); color: var(--red-300); }
.nav .mm__item.is-open > .mm__tab, .nav .mm__item.is-open > .mm__chev { background: rgba(255,255,255,.1); color: #fff; }
.nav .mm__item .mm__chev .chev { width: 14px; height: 14px; flex: none; transform: none; transition: transform .2s var(--ease); }
/* Five tabs + two buttons: tighten on small laptops so labels stay on one line. */
@media (min-width: 1100px) and (max-width: 1279px) {
  .nav .mm__item > .mm__tab { padding: 0 2px 0 8px; font-size: .875rem; }
  .nav .mm__item > .mm__chev { width: 24px; padding: 0 6px 0 2px; }
  .site-header .container { gap: 14px; }
  .header-cta .btn--sm { padding-left: 14px; padding-right: 14px; }
}
.nav .mm__item .mm__chev[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav .mm__item > .mm__tab:focus-visible, .nav .mm__item > .mm__chev:focus-visible { outline: 2px solid var(--red-300); outline-offset: 2px; }

/* ---------- Panel: grey frame, white inner card ---------- */
.nav .mm__panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 5; box-sizing: border-box; width: min(820px, calc(100vw - 24px));
  background: #ececee; border-radius: 16px; padding: 0 8px 8px; color: var(--ink-900); font-weight: 500; text-align: left;
  box-shadow: 0 2px 6px rgba(20,20,20,.05), 0 30px 60px -20px rgba(20,20,20,.4);
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(6px);
  transition: opacity .16s, transform .16s var(--ease), visibility 0s linear .16s; }
.nav .mm__item.is-open > .mm__panel { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition-delay: 0s; }
/* Hover bridge: keeps the panel open while the pointer crosses the gap under the header. */
.nav .mm__panel::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav .mm__panel ul { list-style: none; margin: 0; padding: 0; }
.nav .mm__panel a { display: flex; gap: 12px; padding: 0; color: var(--ink-900); font-size: inherit; font-weight: inherit; text-decoration: none; border-radius: 0; }
.nav .mm__panel a:hover { color: var(--ink-900); }
.nav .mm__panel a:focus-visible, .nav .mm__tab:focus-visible { outline: 2px solid var(--red-500); outline-offset: 2px; }

.nav .mm__heads, .nav .mm__in { display: grid; grid-template-columns: 300px 1fr; column-gap: 24px; }
.nav .mm__heads { padding: 12px 16px; font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-400); font-weight: 600; line-height: 1; }
.nav .mm__panel--nohead { padding-top: 8px; }
/* Landing row: the section page itself, first and widest item in the panel. */
.nav .mm__panel a.mm__land { align-items: center; gap: 12px; margin-top: 8px; padding: 12px 16px; background: #fff; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.06); transition: background .15s; }
.nav .mm__panel a.mm__land:hover { background: #f7f7f8; }
.nav .mm__land .mm__ic { background: rgba(227,43,43,.1); }
.nav .mm__land .mm__t { flex: 1 1 auto; }
.nav .mm__land .mm__t b { font-size: 15.5px; }
.nav .mm__land .mm__t small { font-size: 12.5px; }
.nav .mm__land .mm__land-arrow { flex: none; width: 18px; height: 18px; color: var(--red-600); transition: transform .2s var(--ease); }
.nav .mm__land:hover .mm__land-arrow { transform: translateX(4px); }
.nav .mm__panel--nohead a.mm__land { margin-top: 0; }
.nav .mm__land + .mm__heads { padding-top: 14px; }
.nav .mm__in { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.06); }

/* Left column: large cards (equal height to the right column) */
.nav .mm__left { display: flex; flex-direction: column; min-width: 0; }
.nav .mm__cards { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; }
.nav .mm__cards:has(.mm__ph) .mm__card { min-height: 82px; }
.nav .mm__panel a.mm__card { flex: 1 1 0; align-items: center; gap: 12px; padding: 12px; border: 1px solid #ececee; border-radius: 10px; transition: background .15s, border-color .15s; }
.nav .mm__panel a.mm__card:hover { background: #f7f7f8; border-color: #e4e4e7; }
.nav .mm__ic { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 9px; background: #f2f2f3; display: grid; place-items: center; }
.nav .mm__ic svg { width: 18px; height: 18px; color: var(--red-500); }
.nav .mm__ph { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: #f2f2f3; }
.nav .mm__ph img { display: block; width: 56px; height: 56px; object-fit: cover; }
.nav .mm__t { display: block; min-width: 0; }
.nav .mm__t b { display: block; color: var(--ink-900); line-height: 1.3; font-weight: 600; }
.nav .mm__t small { display: block; color: var(--ink-400); font-weight: 500; line-height: 1.4; margin-top: 2px; white-space: normal; text-wrap: balance; }
.nav .mm__t small.mm__hot { color: var(--red-600); font-weight: 600; }
.nav .mm__card .mm__t b { font-size: 14.5px; }
.nav .mm__card .mm__t small { font-size: 12.5px; }
.nav .mm__panel a.mm__more { margin-top: 12px; align-items: center; gap: 6px; padding: 0 4px; font-size: 13.5px; font-weight: 600; color: var(--red-600); }
.nav .mm__panel a.mm__more:hover { color: var(--red-500); }
.nav .mm__more svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.nav .mm__more:hover svg { transform: translateX(3px); }

/* Right column: dense two-column list (reads down the first column, then the second) + help row */
.nav .mm__right { display: flex; flex-direction: column; min-width: 0; }
.nav .mm__grid { display: grid; grid-auto-flow: column; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(var(--rows, 3), auto); align-content: start; gap: 0 20px; margin-bottom: 12px; }
.nav .mm__panel a.mm__li { align-items: flex-start; gap: 10px; padding: 8px; margin: 0 -8px; border-radius: 8px; transition: background .15s; }
.nav .mm__panel a.mm__li:hover { background: #f7f7f8; }
.nav .mm__li .mm__ic { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; background: none; border-radius: 0; }
.nav .mm__li .mm__t b { font-size: 14px; }
.nav .mm__li .mm__t small { font-size: 12px; line-height: 1.35; margin-top: 1px; }

.nav .mm__foot { margin-top: auto; border-top: 1px solid #ececee; padding-top: 12px; display: flex; align-items: center; gap: 16px; }
.nav .mm__foot b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--ink-900); }
.nav .mm__foot small { display: block; font-size: 12.5px; color: var(--ink-400); margin-top: 2px; }
.nav .mm__panel a.mm__btn { margin-left: auto; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid #dcdcdf; border-radius: 8px; background: #fff; color: var(--ink-900); font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s; }
.nav .mm__btn svg { width: 16px; height: 16px; }
.nav .mm__panel a.mm__btn--soft { background: #f2f2f3; border-color: #f2f2f3; }
.nav .mm__panel a.mm__btn--soft:hover { background: #e8e8ea; border-color: #e8e8ea; }
.nav .mm__panel a.mm__btn--wa { background: var(--wa); border-color: var(--wa); color: #06331b; }
.nav .mm__panel a.mm__btn--wa:hover { background: #1fbe5a; border-color: #1fbe5a; color: #06331b; }

@media (prefers-reduced-motion: reduce) {
  .nav .mm__panel { transition: none; transform: none; }
  .nav .mm__item > .mm__tab, .nav .mm__panel a { transition: none; }
}

/* ---------- Mobile drawer: accordions, pinned Call + WhatsApp ---------- */
.drawer__panel { overflow: hidden; padding-bottom: 16px; gap: var(--s3); }
.drawer__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.drawer__cta { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 12px; padding-bottom: env(safe-area-inset-bottom, 0); }
.dacc { border-bottom: 1px solid var(--dark-700); }
.drawer .dacc__h { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 16px 4px; background: none; border: 0; color: #fff; font: inherit; font-weight: 700; font-size: 1.0625rem; text-align: left; cursor: pointer; }
.drawer .dacc__h .chev { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.drawer .dacc__h[aria-expanded="true"] .chev { transform: rotate(180deg); }
.drawer .dacc__p ul { list-style: none; margin: 0; padding: 0 0 8px; }
.drawer .dacc .drow { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 0; font-weight: 500; font-size: 1rem; color: #fff; text-decoration: none; }
.drawer .drow .mm__ic { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 9px; background: rgba(255,255,255,.08); color: var(--red-300); display: grid; place-items: center; }
.drawer .drow .mm__ic svg { width: 18px; height: 18px; }
.drawer .drow .mm__t { display: block; min-width: 0; }
.drawer .drow b { display: block; font-size: .9375rem; font-weight: 600; color: #fff; line-height: 1.3; }
.drawer .drow small { display: block; font-size: .8125rem; font-weight: 500; color: var(--on-dark-muted); line-height: 1.35; margin-top: 1px; }
.drawer .drow small.mm__hot { color: var(--red-300); font-weight: 600; }
.drawer .dacc .drow--more { padding: 10px 4px 10px 52px; color: var(--red-300); font-weight: 700; font-size: .9375rem; gap: 6px; }
.drawer .drow--more svg { width: 14px; height: 14px; }
/* Landing row (first in each accordion): the section page itself. */
.drawer .dacc .drow--land { justify-content: space-between; padding: 10px 4px; gap: 12px; }
.drawer .drow--land b { color: var(--red-300); font-weight: 700; }
.drawer .drow--land svg { flex: none; width: 16px; height: 16px; color: var(--red-300); }
.drawer .dacc__h:focus-visible, .drawer .drow:focus-visible { outline: 2px solid var(--red-300); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .drawer .dacc__h .chev { transition: none; } }

/* ---------- Small screens: comfortable tap target for the strip's close button ---------- */
@media (max-width: 899px) {
  .annc { padding: 12px 52px; }
  .annc__x { width: 40px; height: 40px; right: 4px; }
}
