/* =========================================================
   MATRIX — Responsive overrides
   All media queries live here, scoped by the same section
   parent classes used in style.css. Keep desktop-first rules
   in style.css; only breakpoint-specific overrides go here.

   Bootstrap 5 breakpoints for reference:
   xl  <1400px
   lg  <1200px
   md  <992px
   sm  <768px
   xs  <576px
   ========================================================= */

@media (max-width: 1399.98px) {

}

@media (max-width: 1199.98px) {
  :root {
    --fs-h1: 2.75rem;
    --fs-h2: 2.25rem;
    --section-spacing: 5rem; /* 80px */
  }
}

@media (max-width: 991.98px) {
  :root {
    --fs-h1: 2.5rem;
    --fs-h2: 2rem;
  }

  .main-navbar .navbar-collapse {
    margin-top: 1rem;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
  }

  .main-navbar .nav-link {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .hero-section {
    padding: 100px 0;
  }

  /* Estimate form no longer overlaps the CTA copy once the columns stack */
  .cta-section .estimate-form-card {
    margin-top: 2rem;
  }



  .title-area-section {
    padding: 100px 0;
  }

  /* Sidebar stacks under the article below lg, so the CTA card just
     flows normally instead of pinning in place */
  .blog-detail .blog-sidebar .blog-cta-card {
    position: static;
  }

  /* No hover on mobile, so every mega menu just stacks open inline —
     the whole .navbar-collapse panel above scrolls (fixed max-height)
     so this doesn't push content off-screen or cover the page */
  .main-navbar .services-mega-menu {
    display: block;
    position: static;
    transform: none;
    width: auto;
    max-width: none;
    box-shadow: none;
    border-radius: 0;
    padding: 1rem 0 1rem 1rem;
  }
  .main-navbar .nav-item.dropdown .bi-chevron-down {
    display: none;
  }

  /* Columns stack below lg (image first via .order-1/.order-2);
     center everything once it's a single column */
  .services-list .service-row {
    text-align: center;
  }
  .services-list .service-row .d-flex {
    justify-content: center;
  }
  .service-detail .service-detail-checklist li {
    min-width: 100%;
  }
}

@media (max-width: 767.98px) {
  :root {
    --fs-h1: 2.125rem;
    --fs-h2: 1.75rem;
    --fs-h3: 1.25rem;
    --section-spacing: 3.5rem; /* 56px */
  }

  .hero-section {
    text-align: center;
  }

  .hero-section .d-flex {
    justify-content: center;
  }

  .topbar {
    text-align: center;
    font-size: 0.8rem;
  }

  .intro-section .intro-image-wrap::after,
  .why-choose-section .why-choose-image-wrap::after {
    right: -0.5rem;
    bottom: -0.5rem;
  }

  .cta-section .estimate-form-card {
    padding: 1.75rem;
  }

  .services-section .service-card {
    padding-bottom: 1rem;
  }
}

@media (max-width: 575.98px) {
  :root {
    --fs-h1: 1.875rem;
    --fs-h2: 1.5rem;
    --section-spacing: 3rem; /* 48px */
  }

  .gallery-section .gallery-item-accent-top,
  .gallery-section .gallery-item-accent-bottom {
    border-width: 3px;
  }

  .cta-section .estimate-form-card {
    padding: 1.5rem;
  }
}
