/* Five native header links stay readable without changing the desktop header. */
@media (max-width: 780px) {
  :root .site-shell .site-header .mobile-nav {
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 12px;
    row-gap: 0;
  }

  :root .site-shell .site-header .mobile-nav a {
    min-height: 44px;
    font-size: 16px;
  }
}

/* Center the final two links beneath the first three on narrow phones. */
@media (max-width: 430px) {
  :root .site-shell .site-header .mobile-nav {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 0;
  }

  :root .site-shell .site-header .mobile-nav a {
    grid-column: span 2;
  }

  :root .site-shell .site-header .mobile-nav a:nth-child(4) {
    grid-column: 2 / span 2;
  }

  :root .site-shell .site-header .mobile-nav a:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

/* Give the final desktop contact action a clearer reading size. */
@media (min-width: 781px) {
  :root .site-shell .site-footer .site-footer-contact-choices.contact-choices--simple {
    --reading-phone: 2rem;
  }

  :root .site-shell .site-footer .contact-choices--simple .contact-choice-buttons > :is(.contact-call-action, .contact-text-action) {
    min-height: 3.75rem;
    font-size: 1.375rem;
  }

  :root .site-shell .site-footer .contact-choices--simple .contact-choice-buttons .contact-action-label {
    font-size: 1.375rem;
  }
}

/* Keep the complete county list together in the mobile footer. */
@media (max-width: 780px) {
  :root .site-shell .site-footer .site-footer-identity {
    font-size: clamp(.75rem, 3.8vw, 1rem);
    line-height: 1.5;
    letter-spacing: 0;
    white-space: nowrap;
  }
}

/* Four native header links remain readable and evenly balanced. */
@media (max-width: 780px) {
  :root .site-shell .site-header .mobile-nav {
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 12px;
    row-gap: 0;
  }

  :root .site-shell .site-header .mobile-nav a {
    min-height: 44px;
    font-size: 16px;
  }
}

/* Two equal rows on narrow phones: Services/Recent work, About/Contact. */
@media (max-width: 430px) {
  :root .site-shell .site-header .mobile-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
  }

  :root .site-shell .site-header .mobile-nav a:nth-child(n) {
    grid-column: auto;
  }
}

/* Keep only the compact county list together in the mobile footer. */
@media (max-width: 780px) {
  :root .site-shell .site-footer .site-footer-inner .site-footer-business > .site-footer-identity {
    font-size: clamp(.75rem, 3.8vw, 1rem);
    line-height: 1.5;
    letter-spacing: 0;
    white-space: nowrap;
  }

  /* Earlier static guide footers contain a full service-area paragraph. */
  :root .site-shell .site-footer .site-footer-copy .site-footer-identity {
    font-size: var(--reading-body);
    line-height: 1.5;
    letter-spacing: -.012em;
    white-space: normal;
  }
}

/* Keep all four mobile header links on one readable line. */
@media (max-width: 780px) {
  :root .site-shell .site-header .mobile-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    column-gap: clamp(4px, 1.5vw, 10px);
    row-gap: 0;
  }

  :root .site-shell .site-header .mobile-nav a:nth-child(n) {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 44px;
    padding: 7px 0;
    font-size: 16px;
    white-space: nowrap;
  }
}

/* Emphasize only the existing paired contact actions; keep their layout intact.
   The legacy IDs in :is() give every pair enough weight to match those overrides. */
:root :is(.site-shell, .not-found-page) :is(.contact-choice-buttons, #get-started .contact-choice-buttons, #mpb-emergency-contact .contact-choice-buttons) > :is(.contact-call-action, .contact-text-action) {
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

@media (hover: hover) {
  :root :is(.site-shell, .not-found-page) :is(.contact-choice-buttons, #get-started .contact-choice-buttons, #mpb-emergency-contact .contact-choice-buttons) > :is(.contact-call-action, .contact-text-action):hover {
    border-color: #d45812;
    background: #053b24;
    color: #fdf7ee;
    box-shadow: 0 4px 8px #051e1426;
  }
}

:root :is(.site-shell, .not-found-page) :is(.contact-choice-buttons, #get-started .contact-choice-buttons, #mpb-emergency-contact .contact-choice-buttons) > :is(.contact-call-action, .contact-text-action):focus-visible {
  border-color: #d45812;
  background: #053b24;
  color: #fdf7ee;
  box-shadow: 0 4px 8px #051e1426;
}

:root :is(.site-shell, .not-found-page) :is(.contact-choice-buttons, #get-started .contact-choice-buttons, #mpb-emergency-contact .contact-choice-buttons) > :is(.contact-call-action, .contact-text-action):active {
  border-color: #d45812;
  background: #053b24;
  color: #fdf7ee;
  box-shadow: inset 0 1px 3px #051e1433;
}

@media (prefers-reduced-motion: no-preference) {
  @media (hover: hover) {
    :root :is(.site-shell, .not-found-page) :is(.contact-choice-buttons, #get-started .contact-choice-buttons, #mpb-emergency-contact .contact-choice-buttons) > :is(.contact-call-action, .contact-text-action):hover {
      transform: translateY(-2px);
    }
  }

  :root :is(.site-shell, .not-found-page) :is(.contact-choice-buttons, #get-started .contact-choice-buttons, #mpb-emergency-contact .contact-choice-buttons) > :is(.contact-call-action, .contact-text-action):focus-visible {
    transform: translateY(-2px);
  }

  :root :is(.site-shell, .not-found-page) :is(.contact-choice-buttons, #get-started .contact-choice-buttons, #mpb-emergency-contact .contact-choice-buttons) > :is(.contact-call-action, .contact-text-action):active {
    transform: none;
  }

  :root :is(.site-shell, .not-found-page) :is(.contact-choice-buttons, #get-started .contact-choice-buttons, #mpb-emergency-contact .contact-choice-buttons).contact-emphasis-animating > :is(.contact-call-action, .contact-text-action) {
    animation: contact-emphasis-pop 480ms ease-out 1;
  }

  @keyframes contact-emphasis-pop {
    0%, 100% { transform: none; }
    45% { transform: translateY(-2px); }
  }
}

@media (prefers-reduced-motion: reduce) {
  :root :is(.site-shell, .not-found-page) :is(.contact-choice-buttons, #get-started .contact-choice-buttons, #mpb-emergency-contact .contact-choice-buttons) > :is(.contact-call-action, .contact-text-action) {
    transition: none;
  }
}
