/* Keep the desktop menu intact; place the mobile toggle beside Search. */
@media (max-width: 790px) {
  #masthead .primary-header > .container {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
  }
  #masthead .primary-header > .container::before,
  #masthead .primary-header > .container::after { content: none; }
  #masthead .logo_area { float: none; margin: 0; }
  #masthead .header_right {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: start;
    gap: 8px;
    float: none;
    min-width: 0;
    width: 100%;
    text-align: start;
    direction: ltr;
  }
  #masthead #header-search { display: block; float: none; min-width: 0; width: 100%; margin: 0; }
  #masthead #header-search .header-search-input {
    display: flex;
    float: none;
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }
  #masthead #header-search input.prompt {
    flex: 1 1 0;
    box-sizing: border-box;
    min-width: 0;
    width: 0;
    height: 44px;
    font-size: 16px;
  }
  html[dir="rtl"] #masthead #header-search input.prompt,
  html:lang(he) #masthead #header-search input.prompt,
  html:lang(iw) #masthead #header-search input.prompt,
  html:lang(ar) #masthead #header-search input.prompt {
    direction: rtl;
    text-align: right;
  }
  #masthead #header-search .header-search-submit {
    flex: 0 0 auto;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    font-size: 12px;
    letter-spacing: 0;
  }
  #masthead #nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    box-shadow: none;
    line-height: 1;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }
  #masthead #nav-toggle svg { display: block; flex: 0 0 24px; }
  #masthead #nav-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  #masthead #nav-toggle:hover,
  #masthead #nav-toggle[aria-expanded="true"] { background: rgba(255, 255, 255, .12); }
  #masthead #site-header-nav-wrapper { height: auto !important; min-height: 0; }
  #masthead #site-header-nav {
    display: none;
    position: static !important;
    width: auto !important;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    transition: none;
  }
  #masthead #site-header-nav:has(.st-menu-mobile) { display: block; }
  #masthead .primary-navigation { float: none; width: 100%; }
  #masthead .primary-navigation .st-menu.st-menu-mobile {
    position: static;
    width: 100%;
    margin: 0;
    padding: 4px 0;
    border-top: 0;
  }
  #masthead .nav-user-action { float: none; width: 100%; }
}
@media (max-width: 500px) {
  #masthead .primary-header { padding-top: 16px; padding-bottom: 16px; }
  #masthead .primary-header > .container { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #masthead .logo_area { justify-self: center; }
}
