/* Site-level fixes layered on top of the Elementor output.
   Kept in one file so the mirrored theme/plugin CSS stays untouched. */

/* Elementor's populated wrap overflows the viewport by a few pixels and puts a
   horizontal scrollbar on every page.

   `clip` rather than `hidden`, and only on the root: `overflow-x: hidden` on
   html *and* body turns body into a scroll container and stops the page
   scrolling at all. `clip` trims the overflow without creating one. */
html {
  overflow-x: clip;
}

/* ---------------------------------------------------------------- contact */

/* The map opened the page at full viewport height and pushed every piece of
   contact information below the fold. It now sits under the form at a size
   that still shows the surrounding streets. */
.ic-map .elementor-custom-embed,
.ic-map iframe {
  height: 420px !important;
  min-height: 0 !important;
}

@media (max-width: 767px) {
  .ic-map .elementor-custom-embed,
  .ic-map iframe {
    height: 300px !important;
  }
}

/* Page title */
.ic-page-title {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  color: #1a1a1a;
}

.ic-page-title + .ic-page-lead {
  margin: 0;
  color: #5a5a5a;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Contact rows: make the whole row read as one tappable line */
.ic-contact-list .elementor-icon-list-item > a {
  border-radius: 8px;
  padding: 2px 6px;
  margin-left: -6px;
  transition: background-color .15s ease;
}

.ic-contact-list .elementor-icon-list-item > a:hover,
.ic-contact-list .elementor-icon-list-item > a:focus-visible {
  background-color: rgba(37, 99, 235, .08);
}

.ic-contact-list .elementor-icon-list-item > a:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* A row that is plain information rather than a link should not look clickable */
.ic-contact-list .ic-static > span {
  cursor: default;
}

/* ------------------------------------------------------------------- form */

/* Mark the fields that must be filled in */
.elementor-field-group > label .ic-req {
  color: #d21c1c;
  margin-left: 2px;
}

.ic-form-note {
  margin: 14px 0 0;
  font-size: .875rem;
  line-height: 1.5;
  color: #5a5a5a;
}

.ic-form-note a {
  color: #2563eb;
}

/* ---------------------------------------------------------- accessibility */

/* The theme sets outline: none on interactive elements with nothing in its
   place, so keyboard focus was completely invisible. :focus-visible keeps it
   off for mouse users. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #1d4ed8 !important;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Same ring in white where the focused element sits on the blue footer */
.elementor-location-footer a:focus-visible,
.elementor-location-footer button:focus-visible {
  outline-color: #ffffff !important;
}

/* Skip past the header, which is otherwise ~10 tab stops on every page */
.ic-skip-link {
  /* fixed, not absolute: an absolutely positioned skip link is placed against
     the document, so focusing it part-way down the page puts it off-screen */
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 100000;
  padding: 12px 20px;
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
  transition: top .15s ease;
}

.ic-skip-link:focus {
  top: 0;
}

/* #top / #colophon / the popup anchors jumped instantly */
html {
  scroll-behavior: smooth;
}

/* The hero title is now an <h1>; hold its original size against any global
   h1 rule in the theme. */
.ic-hero-title {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  margin: 0;
}

/* Elementor animates almost every section in on scroll. Honour the system
   setting instead of overriding it. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  /* Elementor hides these until its scroll observer fires; with animation
     disabled they must not stay invisible. */
  .elementor-invisible {
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* ------------------------------------------------------------------ touch */

/* Menu and footer links were 20–30px tall, well under the 44px target. The
   padding is added on touch-sized viewports only, so the desktop header keeps
   its proportions. */
@media (max-width: 1024px) {
  .elementor-nav-menu a,
  .hfe-nav-menu a,
  .elementor-icon-list-item > a,
  .ic-contact-list li > a,
  .elementor-social-icon {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .elementor-social-icon {
    min-width: 44px;
    justify-content: center;
  }
}

/* Standalone links that were 19–22px tall on a phone: the flip-box service
   titles and the two policy links in the footer. inline-flex rather than flex,
   so a link that happens to sit in a run of text is not turned into a block.

   Links inside a sentence are left alone on purpose — WCAG 2.5.5 exempts a
   target that is "in a sentence or block of text", and padding them out would
   break the line box. */
@media (max-width: 1024px) {
  .elementor-flip-box a,
  .elementor-icon-box-title a,
  .elementor-heading-title > a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* back to top: a 32px icon in the footer */
  a[href="#top"].elementor-icon {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* The flip-box descriptions render at 13px, which is small for body copy on a
   phone or tablet. Nudged up; measured at 390px the tallest of them is 152px
   inside a 281px card, so nothing clips. */
@media (max-width: 1024px) {
  .elementor-flip-box__layer__description {
    font-size: 15px !important;
    line-height: 1.45 !important;
  }
}

/* Anything that reacts to a click should say so */
a,
button,
.open-popup,
.close-btn,
[role="button"] {
  cursor: pointer;
}

.close-btn {
  min-width: 44px;
  min-height: 44px;
}
