/* ============================================================
   MOBILE RESPONSIVENESS FIXES
   Only applies on small screens (≤ 640px, with 768px tweaks).
   ============================================================ */

/* ---------- 1. HEADER: shrink the "Book Inspection" CTA ---------- */
@media (max-width: 640px) {
  /* Reduce padding, font size, and cap the pill width */
  header .btn-primary {
    font-size: 0.75rem;        /* ~12px */
    padding: 0.5rem 0.875rem;  /* tighter pill */
    white-space: nowrap;
  }

  /* Tighten header gaps so logo + CTA + hamburger fit */
  header nav > div {
    gap: 0.75rem;
  }

  /* Reduce header height slightly on mobile */
  header .h-20 {
    height: 4rem; /* 64px instead of 80px */
  }

  /* Scale down the logo on mobile */
  header img {
    height: 2rem !important;
  }
}

/* ---------- 2. HERO BUTTONS: side-by-side, smaller ---------- */
@media (max-width: 640px) {
 #inspection, #register {
     display: none;
 }
}

/* ---------- 3. HERO TRUST METRICS: 3 across, smaller ---------- */
@media (max-width: 640px) {
  /* The trust-metrics row inside the hero */
  .hero-gradient .mt-16.flex.flex-wrap.gap-10 {
    margin-top: 2.5rem;
    gap: 1rem 1.25rem;
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  /* Each metric block */
  .hero-gradient .mt-16.flex.flex-wrap.gap-10 > div {
    flex: 1 1 0;
    min-width: 0;
  }

  /* Big number */
  .hero-gradient .mt-16.flex.flex-wrap.gap-10 .text-2xl {
    font-size: 0.9375rem;      /* ~15px */
    line-height: 1.2;
  }

  /* Small label */
  .hero-gradient .mt-16.flex.flex-wrap.gap-10 .text-xs {
    font-size: 0.625rem;       /* ~10px */
    letter-spacing: 0.03em;
  }
}

/* ---------- 4. HERO CAR IMAGE: shrink to ~80% on mobile ---------- */
@media (max-width: 640px) {
  .car-drive-in {
    max-width: 82%;
    margin-left: auto;
    margin-right: auto;
  }
  .car-drive-in img {
    width: 100%;
    height: auto;
    transform: none !important; /* reset scale-110 / scale-125 */
    transform-origin: center !important;
  }
}

/* ---------- 5. TRUST BAR CARD: align cleanly under hero ---------- */
@media (max-width: 640px) {
  /* The white trust card: less padding, tighter gaps, 2 columns */
  section.relative.-mt-8 .bg-white {
    padding: 1rem 1rem;
    gap: 0.75rem 1rem;
    justify-content: flex-start;
    text-align: left;
    border-radius: 1rem;
  }

  /* Each trust item stretches and stays readable */
  section.relative.-mt-8 .bg-white > div {
    flex: 1 1 45%;
    min-width: 0;
  }

  /* Small icon squares inside the card */
  section.relative.-mt-8 .bg-white .w-10.h-10 {
    width: 2rem;
    height: 2rem;
  }
  section.relative.-mt-8 .bg-white .w-5.h-5 {
    width: 1rem;
    height: 1rem;
  }

  /* Text sizes */
  section.relative.-mt-8 .bg-white .text-sm {
    font-size: 0.75rem;
  }
  section.relative.-mt-8 .bg-white .text-xs {
    font-size: 0.625rem;
  }

  /* Hide the vertical divider lines on mobile (they look odd in a 2-col grid) */
  section.relative.-mt-8 .bg-white .w-px {
    display: none;
  }

  /* Adjust the overlap under hero */
  section.relative.-mt-8 {
    margin-top: -1rem;
  }
  section.relative.-mt-8 > div {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ---------- 6. GENERAL: tighten section spacing on mobile ---------- */
@media (max-width: 640px) {
  /* Reduce big vertical padding on every major section */
  section.py-24,
  section.py-20,
  section.py-16 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  /* Specific large variants */
  section.lg\:py-32,
  section.lg\:py-28 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  /* Tighten inner heading-to-grid gaps */
  .mb-16 {
    margin-bottom: 2rem;
  }
  .mb-14 {
    margin-bottom: 1.75rem;
  }

  /* Heading sizes on mobile */
  h1.font-display {
    font-size: 2.5rem;         /* 40px */
    line-height: 1.1;
  }
  h2.font-display {
    font-size: 1.875rem;       /* 30px */
    line-height: 1.15;
  }
  .text-4xl.lg\:text-5xl {
    font-size: 1.875rem;
  }

  /* Hero section top/bottom padding */
  .hero-gradient {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  .hero-gradient .pt-32 {
    padding-top: 6rem;         /* enough room for fixed header */
  }
  .hero-gradient .pb-24 {
    padding-bottom: 3rem;
  }

  /* Tighten the hero paragraph spacing */
  .hero-gradient .mb-10 {
    margin-bottom: 1.75rem;
  }

  /* Reduce services grid gaps */
  section .grid.gap-8,
  section .grid.gap-6 {
    gap: 1rem;
  }

  /* Card inner padding on mobile */
  .bg-white.rounded-2xl.p-8 {
    padding: 1.25rem;
  }

  /* "Why Choose Us" image height on mobile */
  .aspect-\[4\/5\] {
    aspect-ratio: 4 / 3;
  }

  /* CTA banner padding */
  .rounded-3xl.px-8.py-16 {
    padding: 2rem 1.25rem;
  }
  .md\:px-16.md\:py-20 {
    padding: 2rem 1.25rem;
  }

  /* Footer spacing on mobile */
  footer.pt-20 {
    padding-top: 3rem;
  }
  footer .mb-16 {
    margin-bottom: 2rem;
  }
  footer .gap-12 {
    gap: 2rem;
  }

  /* Final CTA section spacing */
  section.py-24 > .max-w-5xl,
  section.py-24 > .max-w-4xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}