/* WealSure V73 — sticky navigation and responsive corrections.
   Loaded last so the older V21–V72 styles cannot override these fixes. */
:root { --ws73-header-desktop: 100px; --ws73-header-mobile: 86px; }

/* overflow-x:hidden on html/body was creating an unintended scrolling
   ancestor that stopped CSS position:sticky from following the viewport. */
html, html body {
  overflow-x: clip !important;
  overflow-y: visible !important;
}
html { scroll-padding-top: calc(var(--ws73-header-desktop) + 18px) !important; }
html body .wealsure-header,
html body header.wealsure-header {
  position: sticky !important;
  position: -webkit-sticky !important;
  top: 0 !important;
  inset-block-start: 0 !important;
  z-index: 9999 !important;
  overflow: visible !important;
  transform: none !important;
  isolation: isolate !important;
  background: rgba(255,255,253,.985) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  backdrop-filter: blur(16px) !important;
  box-shadow: 0 4px 20px rgba(5,48,34,.06) !important;
}
html body .wealsure-header.ws73-scrolled {
  box-shadow: 0 8px 28px rgba(5,48,34,.13) !important;
}
html body .wealsure-header .ws-v71-services-dropdown > .ws-v71-megamenu {
  z-index: 10002 !important;
}

/* No matter the viewport, text and imagery must stay inside the layout. */
html body main,
html body main section,
html body main .container,
html body footer,
html body footer .container { min-width: 0 !important; }
html body main img { max-width: 100%; }
html body main :is(h1,h2,h3,h4,h5,h6,.display,.h2,.section-title) {
  max-width: 100%;
  overflow-wrap: break-word;
}
html body main :is(input,select,textarea,button) { max-width: 100% !important; }

@media (max-width:1120px) {
  html { scroll-padding-top: calc(var(--ws73-header-mobile) + 16px) !important; }
  html body .wealsure-header,
  html body header.wealsure-header {
    min-height: var(--ws73-header-mobile) !important;
    max-height: none !important;
  }
  html body .wealsure-header .nav {
    min-height: var(--ws73-header-mobile) !important;
    height: var(--ws73-header-mobile) !important;
  }
  /* Off-canvas style mobile navigation. It does not push the page down or
     enlarge the sticky header by 600+ px when the menu is opened. */
  html body .wealsure-header #mobile.mobile {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: var(--ws73-header-mobile) !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100vw !important;
    max-height: calc(100vh - var(--ws73-header-mobile)) !important;
    max-height: calc(100dvh - var(--ws73-header-mobile)) !important;
    overflow-y: auto !important;
    overflow-x: clip !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: #fffefa !important;
    border-top: 1px solid rgba(9,44,32,.10) !important;
    box-shadow: 0 24px 40px rgba(9,44,32,.16) !important;
    z-index: 10001 !important;
    padding: 9px max(18px,env(safe-area-inset-right)) 20px max(18px,env(safe-area-inset-left)) !important;
  }
  html body .wealsure-header #mobile.mobile:not(.open) { display: none !important; }
  html body .wealsure-header #mobile.mobile.open { display: block !important; }
  html body .wealsure-header #mobile.mobile :is(a,strong) {
    overflow-wrap: break-word !important;
    white-space: normal !important;
  }
  html body .wealsure-header #menu.menu {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    touch-action: manipulation;
  }
  html body .wealsure-header #mobile.mobile .ws-v71-mobile-services a {
    min-height: 48px !important;
    padding-block: 10px !important;
  }
}

@media (max-width:767px) {
  html body main .container,
  html body footer .container {
    max-width: 100% !important;
  }
  html body main .hero-v18 {
    padding-top: clamp(26px,5vw,45px) !important;
  }
  html body main .hero-v18 .hero-v18-inner,
  html body main .hero-v18 .hero-grid,
  html body main .hero-v18 .hero-content,
  html body main .hero-v18 .hero-form-shell {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html body main section.ws-unified-hero .ws-inner-hero-grid {
    width: calc(100% - 32px) !important;
    grid-template-columns: minmax(0,1fr) !important;
    gap: 22px !important;
  }
  html body main section.ws-unified-hero h1.ws-inner-title {
    font-size: clamp(29px,8.2vw,42px) !important;
    line-height: 1.19 !important;
    margin-bottom: 16px !important;
  }
  html body main section.ws-unified-hero .ws-inner-hero-media {
    width: 100% !important;
    min-height: 235px !important;
    height: clamp(235px,68vw,345px) !important;
    border-radius: 18px !important;
  }
  html body main section.ws-unified-hero .ws-inner-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
  }
  html body main section.ws-unified-hero .ws-inner-actions a.btn {
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 46px !important;
  }
  html body main .ws-v66-services .ws-v66-services-grid {
    grid-template-columns: minmax(0,1fr) !important;
  }
  html body main .ws-v66-services .ws-v66-service-card {
    min-width: 0 !important;
    min-height: 325px !important;
    padding: 23px !important;
  }
  html body main .ws-clean-home-section .section-kicker,
  html body main .section-kicker { min-width:0 !important; }
  html body main :is(.contact-grid,.ws-contact-cards,.ws-contact-layout,.ws-consult-grid) {
    max-width:100% !important;
  }
  html body main :is(.hero-consult-form,.form,.ws-consult-form) :is(input,select,textarea) {
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }
  html body footer.ws-v70-footer .ws-v70-footer-grid {
    grid-template-columns: minmax(0,1fr) !important;
    gap: 28px !important;
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }
  html body footer.ws-v70-footer .ws-v70-footer-contact-list {
    min-width:0 !important;
  }
}
@media (max-width:390px) {
  html body .wealsure-header .nav {
    width: calc(100% - 28px) !important;
    grid-template-columns: minmax(0,1fr) 48px !important;
    gap: 12px !important;
  }
  html body .wealsure-header .brand {
    min-width:0 !important;
    max-width: min(175px,100%) !important;
  }
  html body .wealsure-header .brand img.ws-official-logo {
    max-width:100% !important;
  }
  html body main section.ws-unified-hero .ws-inner-actions a.btn {
    width:100% !important;
  }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto !important; }
}
