/*
 * 3 George's mobile navigation tap protection.
 * Prevents the visually closed fixed navigation layer from intercepting taps
 * intended for page buttons, quote-form fields, and service checkboxes.
 */
@media (max-width: 1050px) {
  .gg-nav {
    pointer-events: none !important;
    touch-action: none;
  }

  .gg-nav:not(.is-open),
  .gg-nav[aria-hidden="true"] {
    pointer-events: none !important;
  }

  .gg-nav:not(.is-open) *,
  .gg-nav[aria-hidden="true"] * {
    pointer-events: none !important;
  }

  .gg-nav.is-open,
  .gg-nav.is-open * {
    pointer-events: auto !important;
  }

  .gg-nav.is-open {
    touch-action: pan-y;
  }

  .gg-nav-toggle {
    position: relative;
    z-index: 102;
    pointer-events: auto !important;
    touch-action: manipulation;
  }

  /* Keep ordinary page controls in their own interaction layer. */
  #main-content,
  .gg-quote-form,
  .gg-btn,
  button,
  input,
  select,
  textarea,
  label {
    touch-action: manipulation;
  }
}

/*
 * Mobile Call / Get a Quote bar placement.
 * On interior pages it stays directly beneath the sticky logo/menu header.
 * It is intentionally hidden on the homepage, Contact page, and Get a Quote page.
 */
@media (max-width: 760px) {
  body.gg-mobile-cta-below-header {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /*
   * Reserve the CTA bar's height below the sticky header without moving the
   * header itself. Applying this offset to body created a blank strip above
   * the header until the first scroll event.
   */
  body.gg-mobile-cta-below-header #main-content,
  body.gg-mobile-cta-below-header main.site-main,
  body.gg-mobile-cta-below-header .site-main {
    padding-top: 60px !important;
  }

  body.gg-mobile-cta-below-header .gg-mobile-bar {
    position: fixed !important;
    top: var(--gg-mobile-header-bottom, 116px) !important;
    bottom: auto !important;
    left: 0;
    right: 0;
    z-index: 99 !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .16) !important;
  }


  body.gg-mobile-cta-excluded {
    padding-bottom: 0 !important;
  }

  body.gg-mobile-cta-excluded .gg-mobile-bar {
    display: none !important;
  }
}


/*
 * The Get a Quote page already contains the actual quote form. Remove the
 * duplicate hero quote button while retaining the phone button.
 */
body.gg-quote-page .gg-page-hero .gg-actions > .gg-btn:first-child {
  display: none !important;
}

/*
 * Homepage behavior: keep the mobile CTA bar hidden while the visitor is in
 * the hero. Reveal it beneath the header once the What We Do/services section
 * reaches the top of the viewport. Unlike interior pages, no layout padding is
 * added when it appears, avoiding a jump during scrolling.
 */
@media (max-width: 760px) {
  body.gg-mobile-cta-home-scroll .gg-mobile-bar {
    display: none !important;
  }

  body.gg-mobile-cta-home-scroll.gg-home-cta-visible .gg-mobile-bar {
    display: grid !important;
    position: fixed !important;
    top: var(--gg-mobile-header-bottom, 116px) !important;
    bottom: auto !important;
    left: 0;
    right: 0;
    z-index: 99 !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .16) !important;
  }
}
