/**
 * SBS MEP Engineers - Mobile Responsive & SEO Performance Enhancements
 */

/* Prevent horizontal overflow on mobile */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Ensure all images and iframes never exceed container bounds */
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

iframe {
  border: 0;
}

/* iOS Safari form auto-zoom prevention */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Touch targets and clickability optimization for mobile */
a, button, .cs-btn, input[type="submit"] {
  touch-action: manipulation;
}

/* Header & Contact Topbar for mobile */
@media (max-width: 767px) {
  .cs-top-header__content-wr {
    flex-direction: column;
    text-align: center;
    padding: 6px 10px;
  }

  .cs-top-header__links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 15px;
    margin-bottom: 4px;
  }

  .cs-top-header__links-item {
    margin: 0 !important;
    font-size: 13px;
  }

  .cs-top-header__desc {
    font-size: 12px;
  }

  .cs-header__wrapp {
    padding: 10px 15px;
  }

  .cs-logo--header img {
    max-height: 48px;
    width: auto;
  }

  /* Footer touch targets */
  .footerTop .widget_subscribe__social li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
}

/* Breadcrumb / H1 visual responsiveness */
@media (max-width: 576px) {
  .cs-banner h1.cs-banner__title {
    font-size: 32px !important;
    line-height: 1.2 !important;
  }
  
  .cs-counter__title {
    font-size: 22px !important;
  }
}

/* Visually hidden utility for SEO semantic elements */
.visually-hidden-seo {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
