/* Mobile menu (templates/includes/header_dropdowns.html, tags/top_menu_mobile_collapse.html,
   tags/language_switch.html "row"): header 60px, rows with plus/minus, submenu with
   group labels, language row fixed at the bottom. Tokens: agrex.css. */

/* Header bar below 992px: 60px, 20px side padding, wordmark 18px, burger 22px */
@media (max-width: 991.98px) {
  :root:has(#header.site-head--glass) { --agx-nav-h: 60px; }
  #header.site-head--glass > .container-lg { padding-inline: 20px; }
}
.agx-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: -9px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--agx-ink);
}
.agx-burger:focus { box-shadow: none; }
.agx-burger:focus-visible,
.agx-mnav__close:focus-visible,
.agx-mnav__row:focus-visible,
.agx-mnav a:focus-visible {
  outline: 2px solid var(--agx-teal);
  outline-offset: -2px;
  border-radius: 6px;
}
.agx-burger svg,
.agx-mnav__close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

/* Modal: header, scrolling list, language row at the bottom */
.agx-mnav .modal-content {
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  background: var(--agx-white);
  /* fullscreen and fixed: iPhone safe area at the sides (landscape) and
     below the language row (home indicator) */
  padding: 0 var(--agx-safe-right) var(--agx-safe-bottom) var(--agx-safe-left);
}
.agx-mnav__head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 20px;
  border-bottom: 1px solid var(--agx-line);
}
.agx-mnav__brand { display: inline-flex; align-items: center; color: var(--agx-ink); text-decoration: none; }
.agx-mnav__logo { display: block; width: auto; height: 32px; }
.agx-mnav__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: -9px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--agx-ink);
}
.agx-mnav__body { flex: 1 1 auto; overflow-y: auto; }
.agx-mnav__list,
.agx-mnav__entries { margin: 0; padding: 0; list-style: none; }

/* Main rows */
.agx-mnav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  border: 0;
  border-bottom: 1px solid var(--agx-line);
  background: none;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  color: var(--agx-ink);
  text-decoration: none;
}
.agx-mnav__row:hover { color: var(--agx-ink); }
.agx-mnav__row[aria-expanded="true"] { color: var(--agx-teal); }
.agx-mnav__pm {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.agx-mnav__row[aria-expanded="true"] .agx-mnav__pm-v { display: none; }

/* Submenu below the open row */
.agx-mnav__sub {
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--agx-line);
}
.agx-mnav__group {
  margin: 0;
  padding: 10px 20px 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--agx-muted);
}
.agx-mnav__link,
.agx-mnav__all {
  display: block;
  padding: 10px 20px;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
}
.agx-mnav__link { color: var(--agx-ink); }
.agx-mnav__link:hover { color: var(--agx-ink); background-color: var(--agx-surface); }
.agx-mnav__all { font-weight: 600; color: var(--agx-teal); }
.agx-mnav__all:hover { color: var(--agx-teal); }

/* Language row, fixed at the bottom */
.agx-mnav__foot {
  flex: none;
  padding: 18px 20px;
  border-top: 1px solid var(--agx-line);
  background: var(--agx-white);
}
.lang-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.lang-row__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--agx-line);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--agx-ink);
  text-decoration: none;
}
.lang-row__item:hover { color: var(--agx-ink); background-color: var(--agx-surface); }
.lang-row__item.is-active { border-color: #000000; }
.lang-row .lang-flag,
.lang-row .lang-flag img { border-radius: 2px; }

@media (min-width: 992px) {
  .agx-mnav { display: none !important; }
}
