/* Cross-theme mobile layout fixes: overflow, media, heroes, directory columns. */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
video,
svg,
canvas,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

table {
  max-width: 100%;
}

.table-responsive,
article table,
.entry-content table,
.article-body table,
.article-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Directory/blog listing column width cap */
.page-shell.container {
  width: min(calc(100% - 48px), 1200px);
}

@media (max-width: 680px) {
  .page-shell.container {
    width: min(calc(100% - 24px), 1200px);
  }
}

@media (max-width: 991.98px) {
  .container,
  .container-fluid:not(.no-gutters) {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  /* Long tokens in headers/footers */
  a[href^="mailto:"],
  a[href^="tel:"],
  .top-bar-info,
  .top-bar-info li,
  .top-bar-info a,
  .footer-contact-block h4,
  .footer-contact-block h4 a,
  .phone,
  .phone a {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* Hero headings */
  .banner .block h1,
  .slider-text h1,
  .hero-wrap h1,
  .hero-content h1,
  .blog-hero h1,
  .directory-hero h1 {
    font-size: clamp(1.75rem, 7vw, 3rem) !important;
    line-height: 1.15 !important;
  }

  /* Novena testimonial dots overflow */
  .testimonial-wrap-2 {
    position: relative;
  }

  .testimonial-wrap-2 .slick-dots {
    left: 0;
    width: 100%;
    margin-left: 0;
  }

  /* HTMLCodex plumber about images with desktop padding */
  img[style*="100px"],
  .about img[style*="padding"] {
    padding: 0 !important;
  }

  /* Aircon / carousel heroes */
  .carousel-item img,
  .hero-carousel img,
  .hero-slide img {
    max-height: 70vh;
    object-fit: cover;
  }

  /* Prevent pre/code blocks from forcing horizontal scroll */
  pre,
  code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
  }

  /* Custom pest/article long pages */
  .article-shell,
  .listing-shell,
  .directory-layout,
  .blog-layout {
    max-width: 100%;
    overflow-x: clip;
  }
}

@media (max-width: 575.98px) {
  .hc-brand__tag {
    display: none;
  }

  @media (min-width: 400px) {
    .hc-brand__tag {
      display: block;
    }
  }
}
