/* -----------------------------
  Mobile-first responsive fixes
  ----------------------------- */
.totco-home {
  overflow-x: hidden;
}

/* Prevent long strings / buttons from blowing up layout */
.totco-home a,
.totco-home button,
.totco-home p,
.totco-home h1,
.totco-home h2,
.totco-home h3 {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Images should never overflow their containers */
.totco-home img {
  max-width: 100%;
  height: auto;
}

/* Respect device safe areas (iOS notch etc.) */
.totco-home main {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

@media (max-width: 640px) {

  /* Container padding: keep content away from edges */
  .totco-home .max-w-6xl {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Hero: tighten top/bottom padding for mobile */
  .totco-home section .pt-16 {
    padding-top: 56px !important;
  }

  .totco-home section .pb-10 {
    padding-bottom: 24px !important;
  }

  /* Headings: avoid oversized typography on small screens */
  .totco-home h1.text-4xl {
    font-size: 2rem !important;
    line-height: 1.1 !important;
  }

  .totco-home h2.text-3xl,
  .totco-home h3.text-2xl {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }

  /* Force multi-column grids to stack */
  .totco-home .md\:grid-cols-3,
  .totco-home .sm\:grid-cols-2,
  .totco-home .lg\:grid-cols-2,
  .totco-home .lg\:grid-cols-4,
  .totco-home .grid {
    grid-template-columns: 1fr !important;
  }

  /* Common "header row" layout (title + CTA button) */
  .totco-home .lg\:flex-row {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  /* Buttons/links become full width for better tap targets */
  .totco-home a.inline-flex,
  .totco-home button.inline-flex {
    width: 100% !important;
  }

  /* Pill rows wrap nicely */
  .totco-home .inline-flex {
    flex-wrap: wrap;
  }
}