/* Mobile header: brand → quiet phone action → menu. Never render Call as a box. */
#primo-global-header-mvp .pmux-call { display: none; }

@media (max-width: 1024px) {
  #primo-global-header-mvp .pgh__shell,
  #primo-global-header-mvp.pgh--scrolled .pgh__shell {
    grid-template-columns: minmax(0, 1fr) 48px 48px !important;
    column-gap: 6px;
    padding: 0 12px 0 18px;
  }

  #primo-global-header-mvp .pgh__brand {
    min-width: 0;
    overflow: visible;
  }
  #primo-global-header-mvp .pgh__brand img {
    display: block;
    width: clamp(148px, 19vw, 158px);
    max-width: 100%;
    max-height: 44px;
    object-fit: contain;
    object-position: left center;
  }

  #primo-global-header-mvp .pmux-call {
    grid-column: 2;
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: #efaa7b;
    background: transparent;
    box-shadow: none;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 140ms ease, background-color 140ms ease, transform 100ms ease;
  }
  #primo-global-header-mvp .pmux-call span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  #primo-global-header-mvp .pmux-call svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    color: currentColor;
  }
  #primo-global-header-mvp .pmux-call:active {
    color: #fff;
    background: rgba(194, 103, 45, .18);
    transform: scale(.94);
  }
  #primo-global-header-mvp .pmux-call:focus-visible {
    outline: 3px solid #efaa7b;
    outline-offset: 2px;
  }

  #primo-global-header-mvp .pgh__menu-toggle {
    grid-column: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 140ms ease, transform 100ms ease;
  }
  #primo-global-header-mvp .pgh__menu-toggle:active {
    background: rgba(255, 255, 255, .12);
    transform: scale(.94);
  }
  #primo-global-header-mvp .pgh__menu-toggle:focus-visible {
    outline: 3px solid #efaa7b;
    outline-offset: 2px;
  }
}

@media (hover: hover) and (pointer: fine) and (max-width: 1024px) {
  #primo-global-header-mvp .pmux-call:hover {
    color: #fff;
    background: rgba(194, 103, 45, .12);
  }
  #primo-global-header-mvp .pgh__menu-toggle:hover {
    background: rgba(255, 255, 255, .08);
  }
}

@media (max-width: 430px) {
  #primo-global-header-mvp .pgh__shell,
  #primo-global-header-mvp.pgh--scrolled .pgh__shell {
    top: 10px;
    width: calc(100% - 20px);
    height: 66px;
    grid-template-columns: minmax(0, 1fr) 44px 44px !important;
    column-gap: 6px;
    padding: 0 10px 0 14px;
  }
  #primo-global-header-mvp.pgh--scrolled .pgh__shell {
    top: 6px;
    height: 62px;
  }
  #primo-global-header-mvp .pgh__brand img {
    width: clamp(132px, 38vw, 148px);
    max-height: 40px;
  }
  #primo-global-header-mvp .pmux-call,
  #primo-global-header-mvp .pgh__menu-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }
}

@media (max-width: 340px) {
  #primo-global-header-mvp .pgh__shell,
  #primo-global-header-mvp.pgh--scrolled .pgh__shell {
    column-gap: 4px;
    padding-left: 12px;
    padding-right: 8px;
  }
  #primo-global-header-mvp .pgh__brand img { width: 126px; }
}

/* Residential: exact mobile reading order is H1, description, image, support, actions. */
@media (max-width: 767px) {
  /* Home services: keep the approved cards in flow with a calm image-to-title gap. */
  body.home main .sgrid > a.sc > .sc-b {
    padding-top: 12px !important;
  }

  body.pmux-residential .h-img-mob {
    display: flex !important;
    flex-direction: column;
    height: auto !important;
    overflow: visible !important;
  }
  body.pmux-residential .h-img-mob::before,
  body.pmux-residential .h-img-mob::after { display: none !important; }
  body.pmux-residential .h-img-mob .sub {
    position: static !important;
    order: 1;
    inset: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 18px 20px 14px !important;
    color: rgba(255,255,255,.86) !important;
    font-size: 14px !important;
    line-height: 1.65 !important;
  }
  body.pmux-residential .h-img-mob > img {
    order: 2;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 10;
    max-height: none !important;
    object-fit: cover;
    object-position: center 15%;
  }
  body.pmux-residential .h-img-mob .hero-supporting-line {
    position: static !important;
    order: 3;
    margin: 13px 20px 0 !important;
    padding: 0 0 4px !important;
  }
  body.pmux-residential .hero .ctas { margin-top: 17px !important; }
}

/* Commercial: script moves the existing approved hero image after the H1 description. */
@media (max-width: 820px) {
  body.pmux-commercial .hero .hero-copy > .hero-media.pmux-commercial-media {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 10;
    margin: 22px 0 0 !important;
    overflow: hidden;
    order: initial !important;
  }
  body.pmux-commercial .hero .hero-copy > .hero-media.pmux-commercial-media img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: 61% center;
  }
  body.pmux-commercial .hero .hero-copy > .hero-media.pmux-commercial-media::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,15,30,.18), transparent 18%, transparent 82%, rgba(0,15,30,.24));
  }
  body.pmux-commercial .hero .hero-actions { margin-top: 22px !important; }
}

@media (prefers-reduced-motion: reduce) {
  #primo-global-header-mvp .pmux-call,
  #primo-global-header-mvp .pgh__menu-toggle { transition: none !important; }
}
