/* ==========================================================================
   Mega menu — Sitoo Design System 1.0 (Figma module/mega_menu)
   Mobile-first; desktop navigation from 1024px.

   Token mapping Figma → theme (all theme vars from css/generic/*):
     Text/text-foreground, Border/border-positive  #102228 → --brand-dark_blue
     Background/background-base                    #fff    → --brand-white
     Background/background-surface                 #f5f6f7 → --gray-10
     Background/background-accent                  #fdca29 → --brand-yellow
     Contrast/contrast-low                         #e7e9ea → --gray-15
     Text/text-placeholder                         #838c90 → --gray-50
     Gap/*            → --gap-xxs/xs/s/m/xl/2xl, Section-gap-global → --gap-global
     Padding/padding-x-large 24 → --padding-xl, padding-small 12 → --padding-s,
     padding-xx-large 32 → --padding-2xl
     Margin/margin-x-small 24→32  → --margin-xs
     Margin/margin-x-large 80@1920 → --margin-xl
     Desktop panel spacing + mobile side padding follow the customer prototype
     (Sizes 9033:101971) as local --mm-* variables — see "Desktop panel layout".

   FLAG: the DS 1.0 type sizes below have no exact equivalent in
   css/elements/_typography.css (theme classes are fluid clamp() and land on other
   values, e.g. .heading-m = 26px @1920 vs Figma 24px). They are kept as local
   --mm-* tokens with the exact Figma values until global DS 1.0 type tokens exist.
   ========================================================================== */

.mega-menu {
  /* Mobile (375) values — from the customer prototype ("Sitoo – To Sitoo", Menu-Mobile),
     which supersedes the smaller DS 1.0 mobile variables (12/14/18). */
  --mm-fs-nav: 14px;          /* Utility/label-medium */
  --mm-fs-accordion: 22px;    /* accordion title, Bold, line-height 1 */
  --mm-fs-explore: 20px;      /* column 1 links, Bold, line-height 1 (desktop: Heading/small) */
  --mm-fs-heading-xs: 20px;   /* CTA title */
  --mm-fs-text-xxl: 24px;     /* Text/text-xx-large */
  --mm-fs-text-s: 16px;       /* list links, Text/small */
  --mm-fs-text-xs: 14px;      /* column titles / CTA subtitle */
  --mm-fs-label-l: 14px;      /* Utility/label-large (pagination) */

  --mm-color: var(--brand-dark_blue);
  --mm-bg: transparent;
  --mm-divider: var(--gray-10);   /* prototype Line 46 / accordion borders #F5F6F7 */
  --mm-ease: cubic-bezier(.4, 0, .2, 1);
  /* Motion from the customer prototype (Figma "Sitoo – To Sitoo", Menu-dark) */
  --mm-ease-menu: cubic-bezier(.5, 0, .5, 1);           /* sheet, content fade, CTA */
  --mm-ease-link: cubic-bezier(.47, .14, .335, .965);   /* panel link hovers */
  --mm-bar-height: 73px;          /* mobile: 64px bar (72 while open) + divider */
  --mm-side: 24px;                /* mobile drawer/search side padding — 24 at 375 and 768 (prototype Sizes) */

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 5000;
  color: var(--mm-color);
  transition: transform .45s var(--mm-ease);
}

@media (min-width: 1024px) {
  .mega-menu {
    --mm-fs-explore: 26px;    /* prototype (all desktop sizes); DS Heading/small = 24 */
    --mm-fs-heading-xs: 20px;
    --mm-fs-text-xxl: 28px;
    --mm-fs-text-s: 16px;
    --mm-fs-text-xs: 14px;
    --mm-fs-label-l: 16px;
  }
}

.mega-menu *,
.mega-menu *::before,
.mega-menu *::after {
  box-sizing: border-box;
}

.mega-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-menu p {
  margin: 0;
}

.mega-menu a {
  color: inherit;
  text-decoration: none;
}

.mega-menu button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.mm-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mm-skip-link {
  position: absolute;
  left: var(--margin-xs);
  top: -100px;
  z-index: 2;
  padding: var(--padding-s) var(--padding-m);
  background: var(--brand-yellow);
  color: var(--brand-dark_blue) !important;
  font-weight: 700;
}

.mm-skip-link:focus {
  top: var(--gap-xs);
}

/* ---------- States: scroll / dark hero / open ---------- */

.mega-menu.is-hidden {
  transform: translateY(-100%);
}

.mega-menu.is-scrolled,
.mega-menu.is-open {
  --mm-bg: var(--brand-white);
}

/* White text + icons on a dark hero (Figma "Closed – on dark hero"), only while
   transparent at the top of the page and nothing is open. */
.mega-menu.is-negative:not(.is-open):not(.is-scrolled) {
  --mm-color: var(--brand-white);
}

/* ---------- Navbar ---------- */

.mm-bar {
  position: relative;
  z-index: 2;
  background: var(--mm-bg);
  /* Logo, links and icons inherit this colour, so white → dark on a dark hero fades
     with the background (prototype Menu-light, 600ms) instead of snapping. */
  color: var(--mm-color);
  transition: background-color .6s var(--mm-ease-menu), color .6s var(--mm-ease-menu);
}

/* Page overlay while a panel or search is open (prototype "Overlay": #102228).
   Opacity is set in the editor (Styling → Page overlay opacity, default 6%).
   pointer-events: none — clicking or hovering the page counts as outside the menu. */
.mm-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--brand-dark_blue);
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s var(--mm-ease-menu);
}

.mega-menu.is-open .mm-overlay {
  opacity: var(--mm-overlay-opacity, .06);
}

.mm-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--padding-m) var(--margin-xs);
  transition: padding-bottom .6s var(--mm-ease-menu);
}

/* Prototype Menu-Mobile: 64px bar, grows to 72px while the menu/search is open */
.mega-menu.is-open .mm-bar__inner {
  padding-bottom: var(--padding-xl);
}

@media (min-width: 1024px) {
  .mega-menu {
    --mm-bar-height: 81px;
  }

  /* prototype: 24px vertical / 32px horizontal at 1024, 1440 and 1920 */
  .mm-bar__inner,
  .mega-menu.is-open .mm-bar__inner {
    padding: var(--padding-xl) var(--padding-2xl);
  }
}

.mm-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: inherit !important; /* inherits the animated bar colour */
}

.mm-logo__svg {
  display: block;
  width: 108px;
  height: 32px;
  color: inherit; /* theme-settings logo (mask, painted with currentColor) follows the bar too */
}

.mm-bar__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--margin-xs);
}

/* Prototype: no divider while the bar is transparent; it fades in with the white
   sheet (and stays on the white scrolled bar). */
.mm-divider {
  height: 1px;
  background: var(--mm-divider);
  opacity: 0;
  transition: opacity .6s var(--mm-ease-menu);
}

.mega-menu.is-open .mm-divider,
.mega-menu.is-scrolled .mm-divider {
  opacity: 1;
}

/* Top-level links (desktop only) */
.mm-nav {
  display: none;
}

.mm-nav__list {
  display: flex;
  align-items: center;
  gap: var(--gap-xl);
}

/* The global `li { color: --brand-dark_blue }` would otherwise break the inherit
   chain, leaving the labels dark on a dark hero while logo and icons turn white. */
.mm-nav__item {
  color: inherit;
}

.mm-nav__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--padding-s);
  color: inherit !important;
}

/* Optical centring: the caps (not the line box, not the underline) sit on the centre
   of the 80px bar and the logo, cap middle at 40px (Johan Green). The line box puts
   the caps 2px high, so the label (with its underline) is moved down 2px. */
.mm-nav__text {
  position: relative;
  top: 2px;
  font-size: var(--mm-fs-nav);
  font-weight: 700;
  line-height: 1.56;
  text-transform: uppercase;
  white-space: nowrap;
  color: inherit;
}

/* 2px underline under the label: active/open = full width, hover grows from centre.
   Positioned outside the flow so the label alone is centred in the bar, at the same
   height as the current sitoo.com menu (Johan Green, Figma "Design adjustments"). */
.mm-nav__text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 2px; /* prototype: line is inset 2px from the label edges */
  right: 2px;
  height: 2px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0);
  transition: transform .3s ease-out, opacity .3s ease-out;
}

.mm-nav__link:hover .mm-nav__text::after,
.mm-nav__link:focus-visible .mm-nav__text::after,
.mm-nav__link[aria-expanded="true"] .mm-nav__text::after,
.mm-nav__link[aria-current="page"] .mm-nav__text::after {
  opacity: 1;
  transform: scaleX(1);
}

/* On a dark hero the label fades white → dark as the white sheet opens. The underline
   takes the final dark colour straight away so it never flashes white first — while
   open, and on hover of items that open a panel (hover opens it on desktop). */
.mega-menu.is-open .mm-nav__text::after {
  background: var(--brand-dark_blue);
}

@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  .mm-nav__link[data-mm-panel-toggle]:hover .mm-nav__text::after {
    background: var(--brand-dark_blue);
  }
}

/* Icon buttons */
.mm-actions {
  /* one step of the hamburger ⇄ X morph — apple.com globalnav: 0.24s in total, two halves
     (keySplines .42,0,1,1 then 0,0,.58,1) */
  --mm-burger-step: 120ms;
  --mm-burger-ease-in: cubic-bezier(.42, 0, 1, 1);
  --mm-burger-ease-out: cubic-bezier(0, 0, .58, 1);
  display: flex;
  align-items: center;
  gap: var(--gap-s);
}

.mm-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  color: inherit !important;
}

.mm-icon {
  display: block;
  width: 24px;
  height: 24px;
}

/* The magnifier glyph sits high in its 24px box (glyph 1–20). 2px down centres it on
   the bar: on desktop on the same middle (~40px) as the nav label caps and the logo;
   on mobile as asked in the customer feedback. */
.mm-sicon {
  position: relative;
  top: 2px;
}

/* Hamburger (two 20×2 lines at y 10/16) ⇄ X — copied from the apple.com globalnav menu
   trigger (customer feedback 2026-10-16; the original Figma version is in
   docs/mega-menu-figma-icons.md). module.js sets .is-close on .mm-actions when the drawer or the mobile search
   opens.
   Open:  the outer <g> slides both lines to the centre (= → –, ease-in), then the <line>
          rotates them ±45° into an X (ease-out).
   Close: the same two steps in reverse — rotate back (ease-in), then slide apart (ease-out).
   Transitions take the timing of the state they go to, so each state below holds the
   duration/easing/delay for the move into it. The X keeps Apple's proportions: its
   diagonal span is ~0.8 of the burger width (scaleX 1.13 → 16px). */
.mm-burger__top {
  transform-origin: 12px 10px;
}

.mm-burger__bottom {
  transform-origin: 12px 16px;
}

/* → closed (hamburger) */
.mm-burger__line {
  transition: transform var(--mm-burger-step) var(--mm-burger-ease-in);
}

.mm-burger__slide {
  transition: transform var(--mm-burger-step) var(--mm-burger-ease-out) var(--mm-burger-step);
}

/* → open (X) */
.mm-actions.is-close .mm-burger__slide {
  transition: transform var(--mm-burger-step) var(--mm-burger-ease-in);
}

.mm-actions.is-close .mm-burger__line {
  transition: transform var(--mm-burger-step) var(--mm-burger-ease-out) var(--mm-burger-step);
}

.mm-actions.is-close .mm-burger__slide--top {
  transform: translateY(2px);
}

.mm-actions.is-close .mm-burger__slide--bottom {
  transform: translateY(-4px);
}

.mm-actions.is-close .mm-burger__top {
  transform: rotate(45deg) scaleX(1.13);
}

.mm-actions.is-close .mm-burger__bottom {
  transform: rotate(-45deg) scaleX(1.13);
}

/* Hover = apple.com: no shape change, the icon goes from 80% to full colour
   (.32s cubic-bezier(.4,0,.6,1)). Only for real pointers — on touch the icons stay at
   full colour, as on apple.com. Set on the SVG so it does not clash with the mobile
   fade of the search button. */
@media (hover: hover) {
  .mm-icon-btn .mm-icon {
    opacity: .8;
    transition: opacity .32s cubic-bezier(.4, 0, .6, 1);
  }

  .mm-icon-btn:hover .mm-icon,
  .mm-icon-btn:focus-visible .mm-icon {
    opacity: 1;
  }
}

@media (max-width: 1023px) {
  /* Mobile menu / search open: the search icon fades out while the hamburger morphs into
     the X (which then closes the drawer or the search). apple.com: out .24s right away,
     back in .24s after 80ms, cubic-bezier(.4,0,.6,1); visibility keeps it out of the tab order. */
  .mm-search-toggle {
    transition: opacity .24s cubic-bezier(.4, 0, .6, 1) 80ms, visibility .24s step-start 80ms;
  }

  .mm-actions.is-close .mm-search-toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .24s cubic-bezier(.4, 0, .6, 1), visibility .24s step-end;
  }
}

.mega-menu :focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* The search input signals focus through its underline instead of an outline */
.mega-menu .mm-search-field__control:focus,
.mega-menu .mm-search-field__control:focus-visible {
  outline: none;
}

@media (min-width: 1024px) {
  .mm-nav {
    display: block;
  }

  .mm-menu-toggle {
    display: none;
  }

  /* Figma "Menu lockup & breakpoints": 32px from the last menu item to the search icon
     at every desktop width */
  .mm-bar__right,
  .mm-actions {
    gap: var(--gap-2xl);
  }
}

/* ---------- Dropdown container ---------- */

.mm-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 0;
  overflow: hidden;
  /* Prototype (Menu-dark Start → Solution Start, smart animate): the white background
     fades in while the sheet grows, and fades out while it collapses. */
  background-color: rgba(255, 255, 255, 0);
  /* duration is set per state from module.js (editor fields: Styling → Animation) */
  transition: height .6s var(--mm-ease-menu), background-color .6s var(--mm-ease-menu);
}

.mega-menu.is-open .mm-dropdown {
  background-color: var(--brand-white);
}

/* No bottom line on the sheet (prototype has none). The former inset box-shadow was
   fully opaque while the background was still fading in, so on a dark hero it showed
   as a white line sliding down with the sheet. */

/* Panels are stacked in the sheet so the outgoing and incoming panel can cross-fade
   while the sheet animates to the new height. */
.mm-panel,
.mm-search,
.mm-drawer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity var(--mm-fade-in, .6s) var(--mm-ease-menu);
}

.mm-panel.is-visible,
.mm-search.is-visible,
.mm-drawer.is-visible {
  opacity: 1;
}

.mm-panel[hidden],
.mm-search[hidden],
.mm-drawer[hidden] {
  display: none;
}

@keyframes mm-reveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .mega-menu,
  .mega-menu *,
  .mega-menu *::before,
  .mega-menu *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Shared typography inside panels ---------- */

/* Column titles: 14px Bold, line-height 1 (prototype NewMenuText "Lable") */
.mm-group-heading {
  font-size: var(--mm-fs-text-xs);
  font-weight: 700;
  line-height: 1;
  color: var(--brand-dark_blue);
}

/* Hover underline (2px for large links, 1px for list links) */
.mm-line-link {
  display: inline;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 2px;
  padding-bottom: var(--gap-xxs);
  transition: background-size .4s var(--mm-ease-link);
}

.mm-line-link--thin {
  background-size: 0 1px;
}

.mm-line-link:hover,
.mm-line-link:focus-visible,
.mm-quicklink:hover .mm-line-link,
.mm-quicklink:focus-visible .mm-line-link {
  background-size: 100% 2px;
}

.mm-line-link--thin:hover,
.mm-line-link--thin:focus-visible,
.mm-quicklink:hover .mm-line-link--thin,
.mm-quicklink:focus-visible .mm-line-link--thin {
  background-size: 100% 1px;
}

/* ---------- Mega panel content (shared by desktop panel + mobile accordion) ---------- */

/* Mobile rhythm — Figma "Design adjustments" Menu-Mobile (8963:47145): 38px between the
   Explore block, the lists and the CTA; 15px under the Explore title, 12px under list titles. */
.mm-panel__grid {
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.mm-panel__links {
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.mm-explore,
.mm-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap-s);
}

.mm-explore {
  gap: 15px;
}

.mm-explore__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap-m);
}

/* Heading/small (desktop 24) · Heading/x-small (mobile 18) */
/* List items are flex so the theme's li line-height adds no extra strut space */
.mm-explore__list > li,
.mm-list__links > li,
.mm-quicklinks__list > li {
  display: flex;
}

.mm-explore__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: var(--mm-fs-explore);
  font-weight: 700;
  line-height: 1;
  color: var(--brand-dark_blue);
}

/* Hover (prototype NewMenuText Large, 400ms): an 18px 45° arrow slides in diagonally
   and fades in on the left while the label shifts 26px right (18 arrow + 8 gap). */
.mm-explore__text {
  color: inherit;
  font: inherit;
  transition: transform .4s var(--mm-ease-link);
}

.mm-explore__arrow {
  position: absolute;
  top: 50%;
  left: 0;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  overflow: hidden;
  opacity: 0;
  transition: opacity .4s var(--mm-ease-link);
}

.mm-explore__link:hover .mm-explore__text,
.mm-explore__link:focus-visible .mm-explore__text {
  transform: translateX(26px);
}

.mm-explore__link:hover .mm-explore__arrow,
.mm-explore__link:focus-visible .mm-explore__arrow {
  opacity: 1;
}

/* Shared diagonal arrow swap (explore links, quicklinks): the visible arrow leaves
   top-right while a second one enters from bottom-left. */
.mm-arrow-in,
.mm-arrow-out {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  transition: transform .4s var(--mm-ease-link);
}

.mm-arrow-in {
  transform: translate(-100%, 100%);
}

.mm-explore__link:hover .mm-arrow-in,
.mm-explore__link:focus-visible .mm-arrow-in,
.mm-quicklink:hover .mm-arrow-in,
.mm-quicklink:focus-visible .mm-arrow-in {
  transform: translate(0, 0);
}

.mm-explore__link:hover .mm-arrow-out,
.mm-explore__link:focus-visible .mm-arrow-out,
.mm-quicklink:hover .mm-arrow-out,
.mm-quicklink:focus-visible .mm-arrow-out {
  transform: translate(100%, -100%);
}

.mm-lists {
  display: flex;
  flex-direction: column;
  gap: var(--gap-2xl);
}

.mm-list__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap-xs);
}

/* Text/small */
.mm-list__link {
  font-size: var(--mm-fs-text-s);
  font-weight: 300;
  line-height: 1.375; /* 22px at 16px — prototype list rows are 26px (22 + 4 underline gap) */
  color: var(--brand-dark_blue);
  /* Figma "Design adjustments" (8935:48505): the hover line sits 3px closer to the text.
     The row keeps its 26px height, only the line moves up. */
  background-position: 0 calc(100% - 3px);
}

/* CTA box (menu/mega-cta). Figma "Design adjustments" (8935:48221 / 8935:48463): the
   arrow sits top-right, 4px between title and subtitle, line-heights 1.1 / 1.3. */
.mm-cta {
  display: flex;
  align-items: flex-start;
  gap: var(--gap-xs);
  padding: var(--padding-xl);
  background: var(--brand-yellow);
  color: var(--brand-dark_blue) !important;
  align-self: stretch;
}

.mm-cta__content {
  display: flex;
  flex-direction: column;
  gap: var(--gap-xxs);
  flex: 1 1 0;
  min-width: 0;
}

/* Utility/button */
.mm-cta__title {
  font-size: var(--mm-fs-heading-xs);
  font-weight: 700;
  line-height: 1.1;
  color: inherit;
}

/* Text/x-small */
.mm-cta__subtitle {
  font-size: var(--mm-fs-text-xs);
  font-weight: 300;
  line-height: 1.3;
  color: inherit;
}

/* Animated 45° arrow — same mechanic as .btn-icon-animation-first/second */
.mm-cta__arrow {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  overflow: hidden;
}

.mm-cta__arrow-icon {
  position: absolute;
  inset: 0;
  width: 32px;
  height: 32px;
  transition: transform .4s var(--mm-ease-menu);
}

.mm-cta__arrow-icon--in {
  transform: translate(-100%, 100%);
}

.mm-cta:hover .mm-cta__arrow-icon--in,
.mm-cta:focus-visible .mm-cta__arrow-icon--in {
  transform: translate(0, 0);
}

.mm-cta:hover .mm-cta__arrow-icon--out,
.mm-cta:focus-visible .mm-cta__arrow-icon--out {
  transform: translate(100%, -100%);
}

/* ---------- Desktop panel layout ----------
   Figma "Menu lockup & breakpoints" (8939:58366, Johan Green 2026-10-28):
                padding   explore min/max  gap  list gap  CTA
     1024–1279  64 / 64   210 / 330        72   56        full width, own row below (40px above)
     1280–1439  80 / 136  210 / 260        72   56        228, top-right, min 80 from the lists
     1440+      80 / 164  210 / 330        96   72        280, top-right, min 96 from the lists
   At most 3 columns (explore + 2 lists, see module.html). The explore column hugs its
   links (each with 26px right padding for the hover shift) between the min and max
   width, and the gap to the lists stays fixed. The CTA is pinned to the right padding
   edge. Below 1024 the mobile drawer is used (768–1023 = mobile layout). */

.mm-panel {
  display: none;
}

@media (min-width: 1024px) {
  .mega-menu {
    --mm-panel-pad-y: 64px;
    --mm-panel-pad-x: 64px;
    --mm-explore-min: 210px;
    --mm-explore-w: 330px;
    --mm-panel-gap: 72px;
    --mm-lists-gap: 56px;
    --mm-cta-w: auto;
  }

  .mm-panel {
    display: block;
  }

  .mm-panel__inner {
    padding: var(--mm-panel-pad-y) var(--mm-panel-pad-x);
  }

  /* 1024–1279: links row, CTA full width on its own row below */
  .mm-panel__grid {
    display: flex;
    flex-direction: column;
    gap: var(--gap-global);
  }

  .mm-panel__links {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: var(--mm-panel-gap);
    flex: 1 1 auto;
    min-width: 0;
  }

  /* When space runs out (e.g. 1440 with the 1440+ spacing) the explore column gives way
     first, down to its min width, so the lists don't wrap. */
  .mm-explore {
    flex: 0 100 auto;
    gap: var(--gap-s);
    min-width: var(--mm-explore-min);
    max-width: var(--mm-explore-w);
  }

  /* Prototype NewMenuText: 26px right padding = room for the hover shift, part of
     the column's hug width */
  .mm-explore__link {
    padding-right: 26px;
  }

  /* The lists never shrink: even a fraction of a pixel wraps the longest link
     ("Customer service excellence" at ~1440). The explore column takes the squeeze. */
  .mm-lists {
    display: flex;
    align-items: flex-start;
    flex-direction: row;
    gap: var(--mm-lists-gap);
    flex: 1 0 auto;
    min-width: 0;
  }

  .mm-list {
    flex: 0 1 auto;
    min-width: 0;
  }

  .mm-cta {
    flex: 0 0 auto;
    width: var(--mm-cta-w);
    align-self: stretch;
  }
}

/* 1280+: CTA moves up, top-right, pinned to the right padding edge */
@media (min-width: 1280px) {
  .mega-menu {
    --mm-panel-pad-y: 80px;
    --mm-panel-pad-x: 136px;
    --mm-explore-w: 260px;
    --mm-cta-w: 228px;
    --mm-cta-gap: 80px;
  }

  /* The CTA is pushed to the right edge; the gap is the minimum distance to the lists
     (Figma Frame 300 right padding: 80 at 1280–1439, 96 at 1440+). When space is tight
     the explore column shrinks first, so this gap is never squeezed. */
  .mm-panel__grid {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--mm-cta-gap);
  }

  .mm-cta {
    align-self: flex-start;
    margin-left: auto;
  }
}

@media (min-width: 1440px) {
  .mega-menu {
    --mm-panel-pad-x: 164px;
    --mm-explore-w: 330px;
    --mm-panel-gap: 96px;
    --mm-lists-gap: 72px;
    --mm-cta-w: 280px;
    --mm-cta-gap: 96px;
  }
}

/* ---------- Mobile drawer / accordion ---------- */

/* Prototype Menu-Mobile: the white sheet always fills the viewport below the bar,
   regardless of how many items are open; the content scrolls inside it. The sheet
   (.mm-dropdown) animates to this panel's height from module.js. */
.mm-drawer {
  height: calc(100vh - var(--mm-bar-height));
  height: calc(100dvh - var(--mm-bar-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: var(--padding-xl);
}

@media (min-width: 1024px) {
  .mm-drawer {
    display: none !important;
  }
}

.mm-accordion__item {
  border-bottom: 1px solid var(--mm-divider);
  transition: background-color .4s ease-out, border-color .4s ease-out;
}

.mm-accordion__item.is-expanded {
  background: var(--gray-10);
  border-bottom-color: transparent;
}

/* 32px top/bottom (88px row); the 37px gap to the content when expanded is 32 + the
   panel's 5px top padding (Figma "Design adjustments" Menu-Mobile, 8963:47145) */
.mm-accordion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-m);
  width: 100%;
  padding: var(--padding-2xl) var(--mm-side);
  text-align: left;
}

.mm-accordion__title {
  font-size: var(--mm-fs-accordion);
  font-weight: 700;
  line-height: 1;
  color: var(--brand-dark_blue);
}

/* Plus / minus: two 16×2 bars in a 24 box (prototype Icon, Rectangle 368/369) */
.mm-plus {
  position: relative;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--brand-dark_blue);
}

/* Plus ↔ minus — same motion as faq.module: the whole icon turns a quarter-turn,
   clockwise on open and back counter-clockwise on close, so the vertical bar swings
   into the minus while the horizontal bar scales away (and back). scaleX only changes
   the bar's length, so the line weight stays constant. 0.4s ease, as in the FAQ. */
.mm-plus svg {
  display: block;
  width: 24px;
  height: 24px;
  transform-origin: center;
  transition: transform .4s ease;
}

.mm-plus__h {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .4s ease;
}

.mm-accordion__header[aria-expanded="true"] .mm-plus svg {
  transform: rotate(90deg);
}

.mm-accordion__header[aria-expanded="true"] .mm-plus__h {
  transform: scaleX(0);
}

@media (prefers-reduced-motion: reduce) {
  .mm-plus svg,
  .mm-plus__h {
    transition: none;
  }
}

/* Height is animated from module.js (400ms ease-out, prototype MenuText → Open).
   The content itself doesn't move: the header's padding is fixed, so links and texts
   are revealed in their final position (Johan Green 2026-11-04). */
.mm-accordion__panel {
  overflow: hidden;
  transition: height .4s ease-out;
}

/* The extra 5px (32 → 37px gap under the header) lives inside the panel, so the
   header's padding never changes and nothing jumps on open or close. */
.mm-accordion__panel > .mm-panel__grid {
  padding: 5px var(--mm-side) var(--padding-2xl);
}

/* The links fade in with the same "Fade in" setting as the rest of the menu, in place
   (no vertical movement) while the panel's height opens. */
.mm-accordion__panel:not([hidden]) > .mm-panel__grid {
  animation: mm-reveal var(--mm-fade-in, .6s) var(--mm-ease-menu) both;
}

.mm-accordion__panel[hidden] {
  display: none;
}

.mm-drawer__cta {
  display: flex;
  padding: var(--gap-xl) var(--mm-side) 0;
}

.mm-drawer__cta .mm-cta {
  flex: 1 1 auto;
}

/* ---------- Search panel ---------- */

.mm-search {
  max-height: calc(100vh - var(--mm-bar-height));
  max-height: calc(100dvh - var(--mm-bar-height));
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Mobile: full-height white sheet, same as the drawer */
@media (max-width: 1023px) {
  .mm-search {
    height: calc(100vh - var(--mm-bar-height));
    height: calc(100dvh - var(--mm-bar-height));
  }
}

.mm-search__inner {
  padding: var(--gap-global) var(--mm-side);
}

.mm-search__column {
  display: flex;
  flex-direction: column;
  gap: var(--gap-xl);
}

@media (min-width: 1024px) {
  .mm-search__inner {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap-global);
    padding: var(--mm-panel-pad-y) var(--mm-panel-pad-x);
  }

  /* col 4 / span 6 = 780px at 1920 (--rich_text_width) */
  .mm-search__column {
    grid-column: 4 / span 6;
    gap: var(--gap-global);
  }
}

/* Search field (menu/search-field) — shared with the search results page */
.mm-search-field {
  display: flex;
  flex-direction: column;
  gap: var(--gap-m);
  margin: 0;
}

.mm-search-field__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-m);
}

.mm-search-field__input {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: var(--gap-m);
  margin: 0;
  color: var(--brand-dark_blue);
}

.mm-search-field__icon {
  flex-shrink: 0;
}

/* Text/xx-large */
.mm-search-field__control {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  font-family: inherit;
  font-size: var(--mm-fs-text-xxl);
  font-weight: 300;
  line-height: 1.4;
  color: var(--brand-dark_blue);
  caret-color: var(--brand-dark_blue);
  -webkit-appearance: none;
  appearance: none;
}

.mm-search-field__control::placeholder {
  color: var(--gray-50);
  opacity: 1;
}

.mm-search-field__control::-webkit-search-cancel-button,
.mm-search-field__control::-webkit-search-decoration {
  -webkit-appearance: none;
}

.mm-search-field__clear {
  position: relative;
  flex-shrink: 0;
  color: var(--brand-dark_blue) !important;
}

.mm-search-field__clear[hidden] {
  display: none;
}

/* Busy (.is-busy, set by module.js as soon as a search is pending and kept for at
   least 400ms): the X crossfades to a spinner — same as search-results.module. */
.mm-search-field__clear-icon,
.mm-search-field__spinner {
  position: absolute;
  inset: 0;
  transition: opacity .2s ease;
}

.mm-search-field__spinner {
  opacity: 0;
}

.mm-search.is-busy .mm-search-field__clear-icon {
  opacity: 0;
}

.mm-search.is-busy .mm-search-field__spinner {
  opacity: 1;
  animation: mm-spin .8s linear infinite;
}

@keyframes mm-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-search.is-busy .mm-search-field__spinner {
    animation-duration: 2s;
  }
}

/* Prototype close-bg-hover: the dark circle grows 20 → 22px, the X stays */
.mm-search-field__clear-bg {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .6s var(--mm-ease-menu);
}

.mm-search-field__clear:hover .mm-search-field__clear-bg {
  transform: scale(1.1);
}

.mm-search-field__line {
  height: 1px;
  background: var(--brand-dark_blue);
}

.mm-search-field:focus-within .mm-search-field__line {
  box-shadow: 0 1px 0 var(--brand-dark_blue);
}

/* Quicklinks (menu/search-quicklink) */
.mm-quicklinks {
  display: flex;
  flex-direction: column;
  gap: var(--gap-s);
}

.mm-quicklinks[hidden] {
  display: none;
}

.mm-quicklinks__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap-xs);
}

.mm-quicklink {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-size: var(--mm-fs-text-s);
  font-weight: 300;
  line-height: 1.4;
  color: var(--brand-dark_blue) !important;
}

.mm-quicklink .mm-line-link {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

/* 12px at 16px text. Centring in the 1.4 line box lands ~.13em below the middle of
   the capitals (measured live), so the arrow is lifted to sit centred on the caps. */
.mm-quicklink__arrow {
  position: relative;
  top: -.13em;
  flex-shrink: 0;
  width: .75em;
  height: .75em;
  overflow: hidden;
}

/* Suggestions while typing (menu/search-suggestion) */
.mm-suggestions {
  display: flex;
  flex-direction: column;
  gap: var(--gap-m);
}

.mm-suggestions[hidden] {
  display: none;
}

/* Swapping quicklinks ↔ results fades the new content in ("Fade in" field) */
.mm-suggestions:not([hidden]),
.mm-quicklinks:not([hidden]) {
  animation: mm-reveal var(--mm-fade-in, .6s) var(--mm-ease-menu) both;
}

.mm-suggestions__list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-m);
}

.mm-suggestion {
  display: flex;
  flex-direction: column;
  gap: var(--gap-m);
}

.mm-suggestion::after {
  content: "";
  display: block;
  height: 1px;
  background: #dee0e2; /* prototype result divider (Line 43) */
}

.mm-suggestion__link {
  display: block;
  color: var(--brand-dark_blue) !important;
}

/* Text/small-strong */
.mm-suggestion__title {
  display: block;
  font-size: var(--mm-fs-text-s);
  font-weight: 700;
  line-height: 1.4;
  color: inherit;
}

/* Text/small, truncated (1 line desktop, 2 lines mobile) */
.mm-suggestion__desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: var(--mm-fs-text-s);
  font-weight: 300;
  line-height: 1.4;
  color: inherit;
}

@media (min-width: 1024px) {
  .mm-suggestion__desc {
    -webkit-line-clamp: 1;
  }
}

.mm-suggestion__desc strong,
.mm-suggestion__title strong {
  font-weight: 700;
  color: inherit;
}

/* Title = theme text link: thin underline that runs the text-link-hover animation
   (keyframes in css/elements/_general.css) on hover, keyboard focus and arrow-key highlight */
.mm-suggestion__title-text {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 100% var(--link-underline-size);
  background-position: 0 100%;
  padding-bottom: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.mm-suggestion__link:hover .mm-suggestion__title-text,
.mm-suggestion__link:focus-visible .mm-suggestion__title-text,
.mm-suggestion.is-active .mm-suggestion__title-text {
  animation: text-link-hover 1.2s cubic-bezier(.57,.45,.03,1);
}

.mm-suggestions__status {
  font-size: var(--mm-fs-text-s);
  font-weight: 300;
  line-height: 1.4;
  color: var(--brand-dark_blue);
}

/* Lock page scroll while the mobile drawer / search is open */
html.mm-scroll-lock,
html.mm-scroll-lock body {
  overflow: hidden;
}

@media (min-width: 1024px) {
  html.mm-scroll-lock,
  html.mm-scroll-lock body {
    overflow: visible;
  }
}
