/* =========================================================
   USTL — Mobile overrides (max-width: 767px)
   Applied on top of Tailwind CDN. Desktop styles unchanged.
   ========================================================= */

@media (max-width: 767px) {

  /* ── Section heading sizes ──────────────────────────── */
  h2.font-headline {
    font-size: clamp(1.375rem, 5vw, 2rem); /* ~22–32px */
    line-height: 1.15;
  }
  h2.font-headline.text-4xl,
  h2.font-headline.text-5xl {
    font-size: clamp(1.5rem, 6vw, 2.25rem);
  }

  /* ── Hero section inner padding ─────────────────────── */
  /* Keep hero text from touching screen edge */
  section .max-w-7xl,
  header .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* ── Footer grid — force single column ──────────────── */
  footer .grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
  footer .divide-x > * {
    border-left: none !important;
    border-right: none !important;
  }

  /* ── Client logo scroll strip — ALWAYS horizontal, never wrap ── */
  .client-scroll-track {
    flex-wrap: nowrap !important;
    flex-direction: row !important;
  }
  .client-scroll-track .flex.items-center.gap-16 {
    flex-wrap: nowrap !important;
    gap: 2.5rem;
  }
  /* Slightly smaller logos on mobile */
  .client-scroll-track img.h-10 {
    height: 1.5rem; /* h-6 equivalent */
  }

  /* ── Stats divide rows — remove dividers, stack nicely ─ */
  .divide-x.divide-on-primary-container\/10 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .divide-x.divide-on-primary-container\/10 > * {
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem;
  }

  /* ── Section max-width containers — ensure padding ───── */
  .max-w-7xl.mx-auto.px-8 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .max-w-7xl.mx-auto.px-6 {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* ── No horizontal overflow ─────────────────────────── */
  body {
    overflow-x: hidden;
  }

  /* ── Carousel cards — ensure full width on mobile ───── */
  #proj-track {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* ── Blog article padding ────────────────────────────── */
  article.prose,
  .max-w-\[800px\] {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* ── Contact / form sections ─────────────────────────── */
  .grid.lg\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  .grid.lg\:grid-cols-12 {
    grid-template-columns: 1fr !important;
  }

  /* ── Table / project list rows ───────────────────────── */
  table {
    font-size: 0.75rem;
  }

  /* ── Iframe maps — full width on mobile ──────────────── */
  iframe {
    width: 100% !important;
  }
}
