/* ══════════════════════════════════════════════════════════════════
   mobile-fix.css
   Loaded LAST on every page. Overrides only what breaks once the
   viewport meta is corrected. Your original stylesheets are untouched.
   ══════════════════════════════════════════════════════════════════ */

/* ── Global guards ───────────────────────────────────────────────── */
html, body { overflow-x: hidden; max-width: 100%; }
img, video, iframe { max-width: 100%; }
* { -webkit-tap-highlight-color: rgba(217,177,95,.25); }

/* 16px minimum stops iOS Safari auto-zooming when a field is focused */
input, select, textarea, button { font-size: 16px; font-family: inherit; }

:focus-visible { outline: 3px solid #d9b15f; outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Hover effects stick on touchscreens — kill them where there's no mouse */
@media (hover: none) {
  nav li:hover, .service-card:hover, .trust-card:hover, .testimonial-card:hover,
  button:hover, .nav-btn:hover, .hero-btn:hover,
  .work-carousel img:hover, .work-carousel video:hover {
    transform: none !important; box-shadow: none !important;
  }
}

/* ── Hamburger button (injected by enhance.js, hidden on desktop) ─── */
.nav-toggle { display: none; }

/* ── Sticky call / WhatsApp bar ──────────────────────────────────── */
.hd-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9998;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: rgba(255,255,255,.14);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -6px 24px rgba(0,0,0,.45);
}
.hd-sticky a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 60px; font-weight: 700; font-size: 16px; text-decoration: none;
}
.hd-sticky .call { background: #d9b15f; color: #000; }
.hd-sticky .wa   { background: #25D366; color: #062d18; }
@media (min-width: 901px) { .hd-sticky { display: none; } }

/* ══════════════════════════════════════════════════════════════════
   MOBILE  (≤900px)
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {

  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }

  /* ── NAV ────────────────────────────────────────────────────────
     Was flex-direction:column + position:fixed, which made the bar
     ~170px tall and buried the hero underneath it.               */
  nav {
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px !important;
    gap: 10px !important;
  }
  .logo { width: 44px !important; height: 44px !important; font-size: 18px !important; flex: none; }
  nav .nav-btn { display: none; }

  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 11px; flex: none;
    background: transparent; border: 1px solid rgba(255,255,255,.22);
    border-radius: 10px; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: .25s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  nav ul {
    display: none !important;
    width: 100%; flex-direction: column; gap: 0 !important;
    margin-top: 6px; padding: 6px 0 2px;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  nav ul.open { display: flex !important; }
  nav ul li { padding: 0; border-bottom: 1px solid rgba(255,255,255,.05); }
  nav ul li a { display: block; padding: 14px 4px; font-size: 16px; }

  /* ── HERO ─────────────────────────────────────────────────────── */
  .hero {
    flex-direction: column;
    padding: 92px 18px 44px !important;
    text-align: left !important;
    min-height: auto;
  }
  .left, .right { width: 100% !important; max-width: 100% !important; }
  .right { display: none; }              /* blurred orb is decoration; it just pushes the CTA off-screen */

  h1 { font-size: clamp(32px, 8.8vw, 52px) !important; letter-spacing: -1px !important; line-height: 1.06 !important; margin-bottom: 20px; }
  .tag { font-size: 12px; letter-spacing: 1.5px; margin-bottom: 14px; }
  .description { font-size: 17px !important; line-height: 1.65 !important; margin-bottom: 26px; }

  .hero-buttons { display: flex; flex-direction: row !important; align-items: stretch !important; gap: 10px; flex-wrap: wrap; }
  .hero-buttons a {
    flex: 1 1 140px; display: flex; align-items: center; justify-content: center;
    min-height: 54px; padding: 14px 16px; text-align: center;
  }

  .stats-card {
    width: 100% !important; flex-direction: row !important;
    gap: 6px !important; padding: 16px 10px !important;
    justify-content: space-between; margin-top: 30px !important;
  }
  .stat { flex: 1; text-align: center; }
  .stat h3 { font-size: 19px !important; margin-bottom: 4px !important; }
  .stat p  { font-size: 11px !important; line-height: 1.3; }

  /* ── SECTION PADDING (80px side padding on a 360px screen) ────── */
  .services, .why-us, .trust, .testimonials, .work-showcase,
  .cta, .location-section, .footer,
  .contact-hero, .contact-info, .contact-form-section, .contact-faq,
  .about-hero, .services-hero, .work-hero {
    padding-left: 18px !important; padding-right: 18px !important;
  }
  .services, .why-us, .trust, .testimonials, .work-showcase,
  .location-section, .cta, .footer {
    padding-top: 62px !important; padding-bottom: 62px !important;
  }

  h2 { font-size: clamp(26px, 7.2vw, 36px) !important; letter-spacing: -.5px !important; line-height: 1.15; }
  .services h2, .cta h2, .trust h2, .why-us h2, .testimonials h2 { margin-bottom: 32px !important; }
  .section-tag, .cta-tag { font-size: 12px !important; letter-spacing: 1.5px !important; margin-bottom: 14px !important; }

  /* ── GRIDS ────────────────────────────────────────────────────── */
  .service-grid  { display: grid !important; grid-template-columns: 1fr !important; gap: 14px !important; }
  .features-grid { grid-template-columns: 1fr !important; gap: 14px !important; margin-top: 32px !important; }
  .trust-grid    { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .footer-grid   { grid-template-columns: 1fr !important; gap: 28px !important; }
  .service-card  { padding: 24px !important; min-height: auto !important; }
  .trust-card    { padding: 20px 16px !important; }
  .trust-card h3 { font-size: 24px !important; }
  .feature       { padding: 24px !important; }
  .icon          { font-size: 40px !important; margin-bottom: 18px !important; }

  /* ── WORK CAROUSEL ────────────────────────────────────────────
     BUG: the 768px block reset width to 280px but left
     flex:0 0 380px, so cards stayed 380px and overflowed.      */
  .work-carousel { gap: 12px !important; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .work-carousel img, .work-carousel video {
    flex: 0 0 78vw !important;
    width: 78vw !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    scroll-snap-align: start;
    border-radius: 16px !important;
  }

  /* ── MAP ──────────────────────────────────────────────────────── */
  .map-container iframe { height: 320px !important; }
  .location-info { margin-top: 22px !important; }

  /* ── TESTIMONIALS ─────────────────────────────────────────────── */
  .testimonial-card { padding: 26px !important; }
  .testimonial-card p { margin-bottom: 20px !important; line-height: 1.7 !important; }

  /* ── CTA ──────────────────────────────────────────────────────── */
  .cta-buttons { display: flex; flex-direction: row; gap: 10px; flex-wrap: wrap; justify-content: center; }
  .cta-buttons a { flex: 1 1 150px; display: flex; align-items: center; justify-content: center; min-height: 54px; }

  /* ── FOOTER ───────────────────────────────────────────────────── */
  .footer-col p { font-size: 15px !important; line-height: 1.7 !important; }
  .footer-bottom { font-size: 13px !important; text-align: center; }

  /* ── QUOTE MODAL → bottom sheet ───────────────────────────────── */
  .quote-modal { align-items: flex-end !important; }
  .quote-content {
    width: 100% !important; max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 90vh; overflow-y: auto;
    padding: 24px 20px 30px !important;
  }
  .quote-content input, .quote-content select, .quote-content textarea,
  .contact-form input, .contact-form select, .contact-form textarea {
    font-size: 16px !important; padding: 14px !important; min-height: 52px;
  }
  .quote-content button, .contact-form button { min-height: 54px; }

  /* ── PAGE HEROES on inner pages ───────────────────────────────── */
  .about-hero, .services-hero, .contact-hero, .work-hero {
    padding-top: 96px !important; padding-bottom: 48px !important;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  h1 { font-size: 30px !important; }
  .trust-grid { grid-template-columns: 1fr !important; }
  .stat h3 { font-size: 17px !important; }
}

/* ══════════════════════════════════════════════════════════════════
   Round 2 — bugs found by rendering the pages at 390px
   ══════════════════════════════════════════════════════════════════ */

/* Anchor links landed under the fixed nav */
section, [id] { scroll-margin-top: 80px; }

@media (max-width: 900px) {

  /* The 35% -transparent nav let hero text bleed through the open menu */
  nav { background: rgba(0,0,0,.82) !important; }
  nav.menu-open { background: #0a0a0a !important; border-bottom-color: rgba(255,255,255,.12); }

  /* Order: logo | burger on row one, menu panel full-width on row two.
     Without this the burger was pushed below the menu items. */
  .logo       { order: 1; }
  .nav-toggle { order: 2; margin-left: auto; }
  nav ul      { order: 3; }

  /* Call + WhatsApp side by side — saves ~70px and lifts the stats card
     above the fold */
  .hero-buttons { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 10px !important; }
  .hero-buttons > a { flex: 1 1 0 !important; min-width: 0 !important; width: auto !important; padding: 15px 8px !important; font-size: 15px !important; }

  /* about.html: grid was resolving to two columns wider than the screen */
  .about-stats { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; padding: 62px 18px !important; }
  .stat-box, .stat-card { padding: 22px 14px !important; }
  .stat-box h3, .stat-card h3 { font-size: 26px !important; }
  .stat-box p, .stat-card p { font-size: 13px !important; }

  /* Trim dead space under the map */
  .location-section { padding-bottom: 44px !important; }
  .location-info { margin-top: 20px !important; }
}

/* "Get Free Quote" inside the mobile menu — the desktop nav button is
   hidden on phones, so without this the quote form is unreachable. */
.nav-cta-item { display: none; }
@media (max-width: 900px) {
  nav ul .nav-cta-item { display: block !important; border-bottom: 0 !important; padding: 12px 0 6px !important; }
  nav ul .nav-cta-item .nav-cta-link {
    display: block; text-align: center; background: #d9b15f; color: #000 !important;
    padding: 15px 20px; border-radius: 999px; font-weight: 700; font-size: 16px;
  }
}
