/* TEF Responsive Overrides — loaded last, highest priority */

/* ── Global: prevent horizontal scroll ───────────────────────────────── */
html, body { max-width: 100%; overflow-x: hidden; }
img { max-width: 100%; height: auto; }

/* ── Megamenu: touch-device toggle ───────────────────────────────────── */
/* JS adds .touch-active on first tap; CSS reveals the panel */
.megamenu-link.touch-active + .megamenu {
  max-height: 700px;
  transition: max-height 0.3s ease-in;
}

/* ── Tablet (768–991px) ───────────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 991px) {
  /* Megamenu columns: prevent 3-col squeeze */
  .dd-menu.megamenu .col-md-4 { min-width: 200px; }

  /* Hero text */
  .hero-banner h2 { font-size: 26px; }
}

/* ── Mobile (<768px) ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Touch targets — 44px minimum */
  .btn-submit,
  a.btn-submit {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Inner page hero — reduce top padding */
  .hero-banner-inner { padding-top: 24px; padding-bottom: 24px; }

  /* Pull-quote strip — reduce font for narrow screens */
  .message-info h2 { font-size: 1rem; line-height: 1.5; }

  /* Section horizontal padding normalisation */
  .container { padding-left: 16px; padding-right: 16px; }

  /* How-It-Works cards: stack vertically, full width */
  .row.g-4 > .col-md-4 { width: 100%; }

  /* Pricing card table — allow horizontal scroll on tiny screens */
  .pricing-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Stats strip — wrap into 2-col grid on mobile */
  .stats-container,
  .counter-wrap { flex-wrap: wrap; }
  .stats-item,
  .counter-item { width: 50%; margin-bottom: 16px; }
}

/* ── Very small (<576px) ──────────────────────────────────────────────── */
@media (max-width: 575px) {
  /* Hero headline size */
  .hero-banner h2 { font-size: 20px; line-height: 1.3; }

  /* Hero CTA button: full width on phone */
  .slider-content .btn-submit { width: 100%; text-align: center; }

  /* Inner page hero headline */
  .hero-banner-inner h2 { font-size: 1.3rem; }

  /* 3-col Bootstrap cards: add bottom gap when stacked */
  .col-md-4 { margin-bottom: 16px; }

  /* Section padding reduction */
  section { padding-left: 8px; padding-right: 8px; }

  /* Pull-quote text */
  .message-info h2 { font-size: 0.9rem; }

  /* Footer bottom links: wrap cleanly */
  .footer-bottom ul { text-align: center; padding: 0; }
  .footer-bottom ul li { display: inline-block; margin: 2px 4px; }

  /* Callback form inputs: full width */
  .contact-form input,
  .contact-form select,
  .contact-form textarea { width: 100%; }
}

/* ── Utility: ensure How-It-Works buttons don't overflow ─────────────── */
@media (max-width: 400px) {
  .btn-submit { font-size: 14px; padding: 10px 18px; }
}
