/* =====================================================================
 * SCC compact site header (loaded on every page).
 * Mobile (<992px): menu · logo · search-ICON — like the mockup. The big
 * permanent search box is hidden and opens when the search icon is tapped.
 * Desktop is left as the theme designed it.
 * Scoped to #masthead so it can only affect the header, never page content.
 * ===================================================================== */

.scc-search-icon{ background:none; border:0; color:#fff; padding:6px; cursor:pointer; line-height:0; }
@media (min-width:992px){ .scc-search-icon{ display:none; } }

@media (max-width:991.98px){
  /* one compact row — wrap is allowed so the collapsed menu can drop BELOW it */
  #masthead .navbar > [class*="container"]{
    display:flex !important; align-items:center; flex-wrap:wrap; gap:8px;
    min-height:56px; position:relative;
  }
  /* the hamburger menu panel spans the full width under the header row */
  #masthead .navbar-collapse{
    order:4; flex:0 0 100%; width:100%; max-width:100%;
    background:var(--purple, #7a4f97);
    margin:0 -12px; padding:4px 12px 10px;
  }
  #masthead .navbar-collapse .navbar-nav{ width:100%; }
  /* hide BOTH theme search forms on mobile (the mobile .d-lg-none box AND the
   * desktop search form that leaks through). The icon reveals the mobile one. */
  #masthead .d-lg-none,
  #masthead .navbar form{ display:none !important; }
  /* order: menu (left) · logo (center) · search icon (right) */
  #masthead .navbar-toggler{ order:1; margin:0; padding:4px 6px; }
  #masthead .navbar-brand{ order:2; margin:0 auto; }
  #masthead .scc-search-icon{ order:3; display:inline-flex; }
  #masthead .navbar-brand img#site-logo{ max-height:34px; width:auto; }

  /* search box revealed under the header when the icon is tapped */
  #masthead.scc-search-open .d-lg-none{
    display:block !important; position:absolute; top:100%; left:0; right:0;
    max-width:none !important; margin:0 !important; padding:10px 14px;
    background:#7a4f97; z-index:1200; box-shadow:0 6px 14px rgba(60,40,90,.25);
  }
  #masthead.scc-search-open .d-lg-none form{ display:block !important; margin:0 !important; }
}
