/* ============================================================
   Responsive overrides - mobile-first breakpoints
   ============================================================ */

/* ----- Global safety: prevent horizontal scroll on all viewports ----- */
html, body { overflow-x: hidden; max-width: 100vw; }
img, video, iframe { max-width: 100%; height: auto; }

/* ----- Large desktop / wider ----- */
@media (min-width: 1400px) {
  :root { --container: 1280px; }
}

/* ----- Below 1100px ----- */
@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: 1fr; gap: 50px; }
  .hero__visual { max-height: 460px; height: 460px; max-width: 560px; margin-inline: auto; width: 100%; }
  .services-grid, .why-grid, .testimonials, .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .how-steps { grid-template-columns: repeat(2, 1fr); gap: 36px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  /* Footer was 5 cols on desktop - make 3 cols here (was 2 - too cramped for 5 items) */
  .site-footer__grid { grid-template-columns: 1fr 1fr 1fr; gap: 32px; }
  .feature-card { padding: 36px; gap: 36px; }
}

/* ----- Below 880px - tablet ----- */
@media (max-width: 880px) {
  :root { --header-h: 88px; }
  .nav, .site-header__cta .btn { display: none; }
  .hamburger { display: flex; }
  .site-header__cta { gap: 8px; }
  .brand { gap: 12px; }
  .brand img { width: 64px !important; height: 64px !important; }
  .brand__name strong { font-size: var(--fs-22); }
  .brand__name span { font-size: 12px; }

  /* Fix hero title overflow on mobile - allow wrapping */
  .hero__title em { white-space: normal; word-break: keep-all; }
  /* Allow eyebrow to wrap when too long */
  .eyebrow { white-space: normal; max-width: 100%; }

  .hero { min-height: auto; padding-block: 32px; }
  .hero__inner { padding-block: 40px; }
  .hero__title { font-size: clamp(1.625rem, 4vw + .7rem, 2.5rem) !important; line-height: 1.15; }
  .hero__sub { font-size: var(--fs-16); line-height: 1.55; }
  .hero__visual { height: 360px; max-height: 50vh; }
  .hero__ctas { width: 100%; gap: 10px; }
  .hero__ctas .btn { flex: 1; min-width: 0; padding: 14px 18px; font-size: var(--fs-15); }
  .hero__phone { width: 100%; justify-content: center; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.18); margin-top: 8px; }
  .hero__floating-badge { font-size: var(--fs-12); padding: 10px 14px; }

  .trustbar__grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .trustbar__num { font-size: var(--fs-26); }
  .trustbar__lbl { font-size: 13px; }

  .feature-card { grid-template-columns: 1fr; padding: 28px; gap: 24px; }
  .feature-card__media { aspect-ratio: 16/10; order: -1; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .form { padding: 28px 22px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  .cta-strip__inner { flex-direction: column; text-align: center; }
  .cta-strip__actions { width: 100%; flex-direction: column; }
  .cta-strip__actions .btn { width: 100%; }

  /* Footer stays 2 cols on tablet */
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }

  /* Sections more compact on tablet */
  .section { padding-block: clamp(40px, 5vw, 64px); }
  .section-header { margin-bottom: 32px; }
  .section-header h2 { font-size: clamp(1.5rem, 3vw + .5rem, 2rem); line-height: 1.2; }

  /* Eyebrow chips slightly smaller */
  .eyebrow { font-size: 12px; padding: 6px 12px; }
}

/* ----- Below 640px - mobile ----- */
@media (max-width: 640px) {
  .container, .container-narrow { padding-inline: 16px; }
  :root { --header-h: 72px; }
  /* Force brand to shrink properly - overriding inline styles */
  .brand { flex-shrink: 1 !important; min-width: 0 !important; gap: 10px !important; max-width: 70%; }
  .brand__name { min-width: 0 !important; flex-shrink: 1 !important; }
  .brand__name span { display: none !important; }
  .brand__name strong { font-size: 14px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand img { width: 44px !important; height: 44px !important; flex-shrink: 0 !important; }
  .site-header__row { min-height: 64px !important; padding-block: 6px !important; gap: 12px !important; }
  .hamburger { flex-shrink: 0 !important; }

  .services-grid, .why-grid, .testimonials, .pricing-grid, .how-steps { grid-template-columns: 1fr; gap: 16px; }
  .how-steps { gap: 36px; }
  .gallery-grid, .gallery-grid--3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Hero photos - tighter on small phones (11-photo scatter layout) */
  .hero__visual { height: 280px; max-height: 42vh; }
  .hero__title { font-size: clamp(1.5rem, 6vw + .3rem, 2rem) !important; line-height: 1.2; margin-bottom: 18px; }
  .hero__sub { font-size: var(--fs-15); }
  .hero__sub strong { display: block; margin-bottom: 6px; }
  .hero__floating-badge { font-size: 11px; padding: 8px 12px; gap: 8px; }

  /* Trust bar - keep 2x2 but compact */
  .trustbar { padding: 20px 0; }
  .trustbar__grid { gap: 14px; }
  .trustbar__num { font-size: 1.5rem; }
  .trustbar__lbl { font-size: 12px; line-height: 1.3; }

  /* Footer - single column, properly aligned */
  .site-footer__grid { grid-template-columns: 1fr; text-align: start; gap: 28px; padding-bottom: 36px; }
  .site-footer__bottom { flex-direction: column; align-items: center; text-align: center; gap: 8px; font-size: 13px; }
  .footer-brand { text-align: start; }

  /* FAB buttons positioning */
  .fab { width: 52px; height: 52px; }
  .fab-stack { inset-inline-end: 12px; bottom: 12px; gap: 10px; }

  .service-card, .why-item, .testimonial, .pricing-card { padding: 24px 18px; }

  .pricing-card.is-featured { transform: none; }

  .section { padding-block: clamp(32px, 6vw, 48px); }
  .section-header { margin-bottom: 28px; }
  .section-header h2 { font-size: 1.5rem; }
  .section-header p { font-size: var(--fs-14); }

  .btn-lg { padding: 14px 22px; font-size: var(--fs-15); }
  .btn-sm { padding: 8px 14px; font-size: 13px; }

  .breadcrumb { flex-wrap: wrap; font-size: 12px; }

  /* Quick-lead form on mobile - tighter spacing */
  .quick-lead { padding: 24px 18px !important; }
  .quick-lead__text h2 { font-size: 1.5rem !important; }
  .quick-lead__text p { font-size: var(--fs-14); }
  .quick-lead__fields { gap: 10px; }
  .quick-lead__fields input { padding: 13px 14px; font-size: var(--fs-15); }
  .quick-lead__submit { padding: 14px 20px !important; font-size: var(--fs-15) !important; }

  /* Exit popup on mobile - full-width with padding */
  .exit-popup { padding: 8px !important; }
  .exit-popup__shell { max-height: 96vh; }

  /* Gallery items - smaller gap */
  .gallery-item { border-radius: 8px; }
}

/* ----- Below 400px - very small ----- */
@media (max-width: 400px) {
  .hero__ctas { flex-direction: column; }
  .hero__ctas .btn { width: 100%; }
  .gallery-grid, .gallery-grid--3 { grid-template-columns: 1fr; }

  /* Even smaller brand */
  .brand img { width: 44px !important; height: 44px !important; }
  .brand__name strong { font-size: var(--fs-15); }

  /* Trust bar: 2x2 keeps but tighter */
  .trustbar__num { font-size: 1.25rem; }
  .trustbar__lbl { font-size: 11px; }

  /* Hero photos very compact */
  .hero__visual { height: 240px; max-height: 36vh; }

  .section-header h2 { font-size: 1.375rem; }
  .hero__title { font-size: 1.5rem !important; }
}

/* ----- Below 360px (older small phones) ----- */
@media (max-width: 360px) {
  .container, .container-narrow { padding-inline: 12px; }
  .brand img { width: 40px !important; height: 40px !important; }
  .hero__visual { height: 210px; }
}

/* ----- Print ----- */
@media print {
  .site-header, .fab-stack, .cta-strip, .site-footer, .gallery-filter, .exit-popup { display: none !important; }
  body { color: #000; background: #fff; }
}
