/**
 * Global mobile & tablet responsive polish
 */

@media (max-width: 960px) {
  .container-custom {
    width: min(1200px, 94vw);
  }

  .section-padding {
    padding: 3.25rem 0;
  }
}

@media (max-width: 640px) {
  .container-custom {
    width: min(1200px, 92vw);
  }

  .section-padding {
    padding: 2.5rem 0;
  }

  .btn,
  .header-menu-link,
  .tab-btn {
    min-height: 44px;
  }

  h1, .page-header-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem) !important;
  }

  .portfolio-detail {
    padding-top: 3.5rem;
  }

  .faq-hero {
    padding-top: 4.5rem;
  }

  .messages-wrap {
    padding: 0 0.5rem;
  }
}

@media (max-width: 480px) {
  .portfolio-actions {
    flex-direction: column;
  }

  .portfolio-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* Prevent horizontal scroll — keep off header ancestors so sticky/fixed header stays stable */
html {
  max-width: 100%;
}

body.site-body {
  max-width: 100%;
}

img, video, iframe, svg {
  max-width: 100%;
  height: auto;
}

/* Defer layout/paint for below-fold sections on mobile */
@media (max-width: 768px) {
  .gm-services-wrap,
  .gm-steps-wrap,
  .gm-about-wrap,
  .gm-pricing-wrap,
  .gm-clients-wrap,
  .gm-testimonials-wrap,
  .gm-cta-wrap,
  .main-footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 420px;
  }
}

/* Mobile header — solid bg instead of blur */
@media (max-width: 768px) {
  .site-header,
  .filter-tabs,
  .portfolio-tabs,
  .service-tabs {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-mobile {
    transition: none;
  }

  .header-mobile-backdrop {
    transition: none;
  }
}
