/* Keep the full desktop navigation on tablets; the phone drawer starts below 768px. */
@media (min-width:768px) and (max-width:1279px) {
  #masthead #main-header { display:block!important; height:var(--mvn-tablet-header-height,auto)!important; }
  #masthead #mobile-header { display:none!important; }
  #masthead #main-header .site-main-header-wrap .site-container { padding-left:20px!important; padding-right:20px!important; }
  #masthead #main-header .site-main-header-inner-wrap {
    display:grid!important; grid-template-columns:190px minmax(0,1fr) auto auto!important;
    align-items:center!important; gap:12px!important; min-height:100px!important;
    padding:12px 0!important;
  }
  #masthead #main-header .site-header-main-section-left { min-width:0; }
  #masthead #main-header .site-header-main-section-right { display:contents!important; }
  #masthead #main-header .site-header-item { margin:0!important; min-width:0; }
  #masthead #main-header .site-header-item-main-navigation { justify-self:center; width:100%; }
  #masthead #main-header .header-navigation,
  #masthead #main-header .primary-menu-container { width:100%; }
  #masthead #main-header #primary-menu { width:100%; flex-wrap:nowrap!important; justify-content:flex-end!important; gap:0!important; }
  #masthead #main-header #primary-menu>li { flex:0 0 auto; position:relative; }
  #masthead #main-header #primary-menu>li>a {
    display:flex; align-items:center; min-height:44px; padding:9px 9px!important;
    font-size:16px!important; line-height:1.5!important; white-space:nowrap;
  }
  #masthead #main-header #primary-menu>li.menu-item-has-children>a { padding-right:42px!important; }
  #masthead #main-header #primary-menu>li>a .dropdown-nav-toggle { display:none!important; }
  #masthead #main-header #primary-menu>li>.dropdown-nav-special-toggle {
    display:block!important; position:absolute; top:0; right:0; left:auto;
    width:40px!important; height:100%!important; min-height:44px; padding:0!important;
    border:0!important; border-radius:4px; background:transparent!important;
    color:#fff!important; box-shadow:none!important; z-index:2;
    pointer-events:auto!important; touch-action:manipulation;
  }
  #masthead #main-header #primary-menu>li>.dropdown-nav-special-toggle::after {
    content:""; position:absolute; top:50%; left:50%; width:7px; height:7px;
    border:solid currentColor; border-width:0 2px 2px 0; transform:translate(-50%,-65%) rotate(45deg);
  }
  #masthead #main-header #primary-menu>li>.dropdown-nav-special-toggle[aria-expanded="true"]::after { transform:translate(-50%,-20%) rotate(225deg); }
  #masthead #main-header .header-social-inner-wrap { flex-wrap:nowrap!important; gap:2px!important; }
  #masthead #main-header .header-social-item,
  #masthead #main-header .search-toggle-open { width:40px!important; height:44px!important; padding:9px!important; flex:0 0 40px; }
  body:not(.page-id-1239) #masthead #main-header img.custom-logo { width:190px!important; max-width:190px!important; height:auto!important; }
  #masthead #main-header .site-description { font-size:12px!important; line-height:1.4!important; margin:10px 0 0!important; white-space:nowrap; }
  #masthead #main-header .sub-menu { max-width:calc(100vw - 40px); }
  #masthead #main-header .sub-menu a { min-height:44px; }
}

/* All tablet widths keep the desktop order in one row: logo, menu, icons, search. */
@media (min-width:768px) and (max-width:1099px) {
  #masthead #main-header { --mvn-tablet-logo:clamp(128px,calc(18vw - 10px),190px); --mvn-tablet-icon:clamp(28px,3.6vw,40px); }
  #masthead #main-header .site-main-header-wrap .site-container { padding-left:12px!important; padding-right:12px!important; }
  #masthead #main-header .site-main-header-inner-wrap { grid-template-columns:var(--mvn-tablet-logo) minmax(0,1fr) auto auto!important; gap:6px!important; min-height:88px!important; padding:10px 0!important; }
  #masthead #main-header #primary-menu>li>a { font-size:clamp(14px,calc(1.6vw + 1.7px),16px)!important; padding-left:6px!important; padding-right:6px!important; }
  #masthead #main-header #primary-menu>li.menu-item-has-children>a { padding-right:28px!important; }
  #masthead #main-header #primary-menu>li>.dropdown-nav-special-toggle { width:28px!important; }
  #masthead #main-header .header-social-item,
  #masthead #main-header .search-toggle-open { width:var(--mvn-tablet-icon)!important; flex-basis:var(--mvn-tablet-icon)!important; padding:4px!important; }
  #masthead #main-header .header-social-item svg,
  #masthead #main-header .header-social-item img,
  #masthead #main-header .search-toggle-open svg { width:clamp(18px,2vw,21px)!important; height:clamp(18px,2vw,21px)!important; max-width:21px!important; }
  body:not(.page-id-1239) #masthead #main-header img.custom-logo { width:var(--mvn-tablet-logo)!important; max-width:100%!important; }
  #masthead #main-header .site-description { font-size:clamp(10px,1.1vw,12px)!important; white-space:normal; margin-top:7px!important; }
  body.page-id-1239 #masthead #main-header .site-branding a.brand { gap:6px!important; }
  body.page-id-1239 #masthead #main-header img.custom-logo { height:clamp(50px,calc(5.4vw + 8.5px),68px)!important; max-height:68px!important; }
  body.page-id-1239 #masthead #main-header .mvn-ten-brand-name { font-size:clamp(12px,calc(1.4vw + 1.2px),14px)!important; }
  body.page-id-1239 #masthead #main-header .mvn-ten-brand-name strong { font-size:clamp(20px,2.5vw,25px)!important; }
}
