/**
 * Site-specific fixes (survives `npm run mirror` when normalize injects this file).
 * Header: keep primary nav + CTA on one row; menu items on one line.
 * Mobile/tablet: burger dropdown stacks above sticky header.
 */
@media (max-width: 1024px) {
  /* Avoid horizontal page scroll (100vw, off-screen menus, wide flex children). */
  html {
    overflow-x: hidden;
    max-width: 100%;
  }

  body {
    overflow-x: hidden;
    max-width: 100%;
  }

  .elementor-location-header .elementor-col-50 {
    min-width: 0;
  }

  /* Containing block for absolutely positioned dropdown (Elementor stretch uses position:absolute on the panel). */
  .elementor-widget-nav-menu.elementor-nav-menu--toggle .elementor-widget-container {
    position: relative;
    z-index: 100001;
    max-width: 100%;
    min-width: 0;
  }

  /*
   * Do NOT set position:relative on the open dropdown — that overrides Elementor’s absolute
   * panel and reflows the header row, which vertically re-centers the logo next to the nav.
   * Keep a high z-index only so the menu stacks above the sticky bar.
   */
  /*
   * Open dropdown only (never the closed panel): keep width within the nav widget column.
   * Centering with left:50% + translateX(-50%) while width is ~100vw made the panel wider than
   * its containing block (half the header), so it ran off the right edge of the phone.
   */
  .elementor-widget-nav-menu.elementor-nav-menu--toggle
    .elementor-menu-toggle.elementor-active
    + .elementor-nav-menu--dropdown {
    z-index: 100002;
    box-sizing: border-box;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-top: max(3.25rem, env(safe-area-inset-top, 0px) + 2.5rem);
    padding-bottom: 0.75rem;
    padding-left: max(0.5rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.5rem, env(safe-area-inset-right, 0px));
  }

  .elementor-widget-nav-menu.elementor-nav-menu--toggle
    .elementor-menu-toggle.elementor-active
    + .elementor-nav-menu--dropdown
    > ul.elementor-nav-menu {
    width: 100%;
  }

  .elementor-widget-nav-menu.elementor-nav-menu--toggle
    .elementor-menu-toggle.elementor-active
    + .elementor-nav-menu--dropdown
    .elementor-item,
  .elementor-widget-nav-menu.elementor-nav-menu--toggle
    .elementor-menu-toggle.elementor-active
    + .elementor-nav-menu--dropdown
    .elementor-sub-item {
    font-size: clamp(1.0625rem, 3.6vw, 1.3125rem) !important;
    line-height: 1.35 !important;
    padding: 1.05rem 1.15rem !important;
  }

  .elementor-widget-nav-menu.elementor-nav-menu--toggle .elementor-menu-toggle {
    min-width: 48px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .elementor-widget-nav-menu.elementor-nav-menu--toggle .elementor-menu-toggle .elementor-menu-toggle__icon--open,
  .elementor-widget-nav-menu.elementor-nav-menu--toggle .elementor-menu-toggle .elementor-menu-toggle__icon--close,
  .elementor-widget-nav-menu.elementor-nav-menu--toggle .elementor-menu-toggle svg {
    font-size: 1.5rem;
    width: 1.35em;
    height: 1.35em;
  }

  .psg-nav-dropdown-close {
    position: absolute;
    top: max(10px, env(safe-area-inset-top, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
    z-index: 3;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }

  .psg-nav-dropdown-close:hover,
  .psg-nav-dropdown-close:focus {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
  }

  .psg-nav-dropdown-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
  }
}

@media (min-width: 768px) {
  .elementor-40 .elementor-element.elementor-element-5e40c35
    > .elementor-widget-wrap.elementor-element-populated {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    column-gap: clamp(8px, 1.2vw, 20px);
  }

  .elementor-40 .elementor-element.elementor-element-790113a {
    max-width: none !important;
    width: auto !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    --container-widget-width: 100% !important;
  }

  .elementor-40 .elementor-element.elementor-element-790113a
    .elementor-nav-menu--main
    > ul.elementor-nav-menu {
    flex-wrap: nowrap !important;
  }

  .elementor-40 .elementor-element.elementor-element-940e712 {
    max-width: none !important;
    width: auto !important;
    flex: 0 0 auto !important;
    --container-widget-width: auto !important;
  }
}

/* Tablet breakpoint in post-40.css squeezes nav to 50% — relax so items stay one line */
@media (min-width: 768px) and (max-width: 1024px) {
  .elementor-40 .elementor-element.elementor-element-790113a {
    --container-widget-width: 100% !important;
    max-width: none !important;
  }

  .elementor-40 .elementor-element.elementor-element-940e712 {
    --container-widget-width: auto !important;
    max-width: none !important;
  }
}

/* Our Team (97): last row (cbfa440) keeps empty outer columns for desktop centering; on mobile those
   columns still use 50% width so the two real profiles sit beside blank space on separate rows. */
@media (max-width: 767px) {
  body.page-id-97 .elementor-element-cbfa440 .elementor-inner-column:not(:has(.elementor-widget-wrap.elementor-element-populated)) {
    display: none !important;
  }
}

/* Our Partners (page 96): scroll-in animations may never run on static host — keep grid visible/clickable */
body.page-id-96 .elementor-invisible {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Our Partners: identical logo “cards” — white panel + shadow on link (WebPs are white squares; Vita Green PNG is transparent) */
/*
 * Equal tiles: (1) CSS Grid 4× equal tracks on desktop — avoids flex min-content / empty-column growth.
 * (2) min-width:0 on link + img — wide PNGs (Sureguard) must not expand the card past the column (flex min-width:auto bug).
 * (3) Zero post-96 vertical % margins on image widgets so every row uses the same box model.
 * (4) Unified column padding — post-96.css gives most inner columns padding:8% on .elementor-element-populated
 *     but Sureguard (4da0f06), Weston (15e19c6), and Winkler (10bcfc4) omit that rule, so their white squares were larger.
 */
body.page-id-96 .elementor-element-f92fc8e .elementor-inner-section .elementor-container {
  align-items: stretch;
}

/* Same inset on every populated logo column (overrides spotty post-96 rules) */
body.page-id-96 .elementor-element-f92fc8e .elementor-inner-section .elementor-column.elementor-inner-column > .elementor-widget-wrap.elementor-element-populated {
  box-sizing: border-box;
}

@media (max-width: 767px) {
  body.page-id-96 .elementor-element-f92fc8e .elementor-inner-section .elementor-column.elementor-inner-column > .elementor-widget-wrap.elementor-element-populated {
    padding: 0 10% !important;
  }
}

@media (min-width: 768px) {
  body.page-id-96 .elementor-element-f92fc8e .elementor-inner-section .elementor-column.elementor-inner-column > .elementor-widget-wrap.elementor-element-populated {
    padding: 8% !important;
  }

  body.page-id-96 .elementor-element-f92fc8e .elementor-inner-section .elementor-container {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  body.page-id-96 .elementor-element-f92fc8e .elementor-inner-section .elementor-container > .elementor-col-25 {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    flex: none !important;
    grid-column: auto;
  }

  /* Grid item min-size defaults to min-content; wide intrinsic PNGs must not widen the track */
  body.page-id-96 .elementor-element-f92fc8e .elementor-inner-section .elementor-container > .elementor-col-25 .elementor-widget-wrap {
    min-width: 0;
    max-width: 100%;
  }
}

body.page-id-96 .elementor-element-f92fc8e .elementor-widget-image > .elementor-widget-container {
  margin: 0 !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

body.page-id-96 .elementor-element-f92fc8e .elementor-widget-image .elementor-widget-container > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.39);
  overflow: hidden;
}

body.page-id-96 .elementor-element-f92fc8e .elementor-widget-image img {
  display: block;
  flex: 0 1 auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Map hotspot tooltips: landscape marks (e.g. Sureguard) need width, not a forced square */
body.page-id-96 .e-hotspot__tooltip img {
  width: auto;
  height: auto;
  max-width: min(240px, 82vw);
  max-height: min(100px, 22vw);
  object-fit: contain;
  object-position: center;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Partner detail popups: square logos default to one size; wide Sureguard mark keeps natural aspect */
body.page-id-96 [data-elementor-type="popup"] .elementor-widget-image img {
  width: min(280px, 85vw);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

body.page-id-96 [data-elementor-type="popup"] .elementor-widget-image img.wp-image-921 {
  aspect-ratio: unset;
  width: auto !important;
  max-width: min(340px, 90vw);
  height: auto !important;
  max-height: min(120px, 28vw);
}

/* Elementor Pro hides popups until JS runs; polyfill (psg-elementor-popups.js) toggles .psg-e-popup-visible */
[data-elementor-type="popup"].psg-e-popup-visible {
  display: block !important;
  position: fixed !important;
  z-index: 1000050 !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(640px, 92vw) !important;
  max-height: 85vh !important;
  overflow: auto !important;
  box-sizing: border-box !important;
  background-color: #fff !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25) !important;
  margin: 0 !important;
}

.psg-e-popup-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000040;
  background: rgba(15, 18, 22, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.psg-e-popup-backdrop.psg-e-popup-backdrop--show {
  display: block;
}

.psg-e-popup-close {
  display: none;
  position: fixed;
  z-index: 1000060;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #1f2124;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.psg-e-popup-close.psg-e-popup-close--show {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.psg-e-popup-locked {
  overflow: hidden;
}

/* Header: “contact us” CTA — no chevron, centered label; padding must beat post-40.css (.elementor-element.elementor-element-940e712 + 10% padding) */
@media (min-width: 768px) {
  .elementor-40 .elementor-element.elementor-element-940e712 .elementor-button {
    white-space: nowrap;
    box-sizing: border-box;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.65rem 1.875rem !important;
    min-height: 2.35rem;
    border-radius: 6px;
  }

  .elementor-40 .elementor-element.elementor-element-940e712 .elementor-button-icon {
    display: none !important;
  }

  .elementor-40 .elementor-element.elementor-element-940e712 .elementor-button-content-wrapper {
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    gap: 0 !important;
    width: 100%;
    flex: 1 1 auto;
  }

  .elementor-40 .elementor-element.elementor-element-940e712 .elementor-button-text {
    white-space: nowrap;
    text-align: center;
    flex: 0 1 auto;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
  }
}

/* Contact form: SMS / consent legal copy slightly smaller */
body.page-id-98 .gfield_consent_description,
body.page-id-98 .gfield--type-consent .gfield_description {
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* Home: Jet/Slick partner logo carousel — no custom JS; Slick needs default slide layout (do not flex slides) */
body.page-id-16 .elementor-element-0bd7793 .jet-arrow {
  display: none !important;
}

body.page-id-16 .elementor-element-0bd7793 .jet-carousel-wrap {
  overflow: hidden;
}

body.page-id-16 .elementor-element-0bd7793 .jet-carousel .elementor-slick-slider .jet-carousel__item .jet-carousel__item-inner {
  margin: 0 12px !important;
}

body.page-id-16 .elementor-element-0bd7793 .jet-carousel__item-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
}

body.page-id-16 .elementor-element-0bd7793 .jet-carousel__item-img {
  max-height: 96px;
  width: auto !important;
  max-width: 100%;
  height: auto !important;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 1024px) {
  body.page-id-16 .elementor-element-0bd7793 .jet-carousel__item-img {
    max-height: 80px;
  }

  body.page-id-16 .elementor-element-0bd7793 .jet-carousel__item-link {
    min-height: 78px;
  }

  body.page-id-16 .elementor-element-0bd7793 .jet-carousel .elementor-slick-slider .jet-carousel__item .jet-carousel__item-inner {
    margin: 0 10px !important;
  }
}

@media (max-width: 767px) {
  body.page-id-16 .elementor-element-0bd7793 .jet-carousel__item-img {
    max-height: 60px;
  }

  body.page-id-16 .elementor-element-0bd7793 .jet-carousel__item-link {
    min-height: 64px;
  }

  body.page-id-16 .elementor-element-0bd7793 .jet-carousel .elementor-slick-slider .jet-carousel__item .jet-carousel__item-inner {
    margin: 0 8px !important;
  }
}

/* Home: Our Industries — matches production: Elementor testimonial carousel (Swiper); post-16.css styles d11c5c0 */
body.page-id-16 .elementor-element-97fd6db.elementor-invisible {
  visibility: visible !important;
  opacity: 1 !important;
}

/*
 * Home + Contact (Torren block): keep Phone / Email values on one line like production.
 * Previous overflow-wrap rules forced the address email to break mid-string.
 */
body.page-id-16 .elementor-element-0638b06 .elementor-icon-box-wrapper,
body.page-id-98 .elementor-element-4777b0f .elementor-icon-box-wrapper {
  flex-wrap: nowrap;
  align-items: center;
}

body.page-id-16 .elementor-element-0638b06 .elementor-icon-box-content,
body.page-id-98 .elementor-element-4777b0f .elementor-icon-box-content {
  flex: 1 1 auto;
  min-width: 0;
}

body.page-id-16 .elementor-element-0638b06 .elementor-icon-box-description,
body.page-id-98 .elementor-element-4777b0f .elementor-icon-box-description {
  white-space: nowrap;
}

body.page-id-16 .elementor-element-0638b06 {
  min-width: 0;
}

/* Very narrow phones: allow wrapping so the column does not overflow the viewport */
@media (max-width: 480px) {
  body.page-id-16 .elementor-element-0638b06 .elementor-icon-box-description,
  body.page-id-98 .elementor-element-4777b0f .elementor-icon-box-description {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Mobile: safe edges + forms */
@media (max-width: 767px) {
  .elementor-section.elementor-section-boxed > .elementor-container {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

  .gform_wrapper,
  .eael-gravity-form {
    max-width: 100%;
  }

  .gform_wrapper input.large,
  .gform_wrapper textarea.textarea,
  .gform_wrapper select {
    max-width: 100%;
    box-sizing: border-box;
  }
}
