/* Allhart Kadence fallback.
   The mirrored static deploy does not have the original Kadence CSS assets,
   so this file restores the core layout shell plus the desktop and mobile
   header/navigation behavior. Keep this intentionally small and structural. */

:root {
  --allhart-site-width: min(calc(100% - 3rem), var(--global-content-width, 1290px));
}

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--global-palette8, #f7fafc);
  color: var(--global-palette3, #1a202c);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

#wrapper,
.site,
#masthead,
#main-header,
.site-header-wrap,
.site-header-inner-wrap,
.site-header-upper-wrap,
.site-header-upper-inner-wrap,
.site-header-row-container-inner,
#inner-wrap.wrap {
  width: 100%;
  margin: 0;
}

#masthead,
#masthead .site-header-row-container-inner {
  background: #ffffff;
}

.site-container,
.content-container.site-container {
  width: var(--allhart-site-width);
  max-width: var(--global-content-width, 1290px);
  margin-inline: auto;
}

.content-wrap,
.entry,
.entry-content,
.entry-content-wrap,
.single-page-content,
.page .entry-content {
  margin: 0;
}

.site-branding a.brand {
  display: inline-flex;
  align-items: center;
}

.site-branding .custom-logo {
  display: block;
  width: auto;
  max-width: 200px;
  height: auto;
}

.site-main-header-inner-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 80px;
}

.site-header-main-section-left,
.site-header-main-section-right {
  display: flex;
  align-items: center;
}

.site-header-main-section-left {
  flex: 0 0 auto;
}

.site-header-main-section-right {
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
  margin-left: auto;
}

.site-header-item-main-navigation,
.main-navigation,
.primary-menu-container {
  width: auto !important;
  max-width: 100%;
}

.main-navigation ul,
#primary-menu,
#mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

#primary-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.75rem, 1.2vw, 1.35rem);
  padding-left: clamp(1rem, 2vw, 2.5rem);
}

#primary-menu > li {
  margin: 0;
}

#primary-menu > li > a {
  display: block;
  padding: 0.35rem 0;
  color: var(--global-palette3, #1a202c);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

#primary-menu > li.current-menu-item > a,
#primary-menu > li > a:hover,
#primary-menu > li > a:focus-visible {
  color: var(--global-palette1, #2b6cb0);
}

.menu-toggle-open,
.menu-toggle-close {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

@media all and (min-width: 1025px) {
  #mobile-header,
  #mobile-drawer {
    display: none !important;
  }
}

@media all and (min-width: 1025px) and (max-width: 1220px) {
  #primary-menu {
    gap: 0.75rem;
    padding-left: 1rem;
  }

  #primary-menu > li > a {
    font-size: 0.9rem;
  }
}

@media all and (max-width: 1024px) {
  :root {
    --allhart-site-width: min(calc(100% - 2rem), var(--global-content-width, 1290px));
  }

  #masthead .site-main-header-wrap[data-section="kadence_customizer_header_main"] {
    display: none !important;
  }

  #mobile-header {
    display: block !important;
  }

  #mobile-header .site-main-header-wrap,
  #mobile-header .site-header-row-container-inner,
  #mobile-header .site-container,
  #mobile-header .site-main-header-inner-wrap,
  #mobile-header .site-header-main-section-left,
  #mobile-header .site-header-main-section-right,
  #mobile-header .site-header-item-navgation-popup-toggle,
  #mobile-header .mobile-toggle-open-container {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }

  #mobile-header .site-main-header-inner-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px;
  }

  #mobile-header .site-header-main-section-left {
    flex: 1 1 auto;
    min-width: 0;
  }

  #mobile-header .site-header-main-section-right {
    flex: 0 0 auto;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin-left: auto;
  }

  #mobile-header .mobile-toggle-open-container {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }

  #mobile-header .menu-toggle-open {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    color: var(--global-palette5, #4a5568) !important;
    line-height: 1 !important;
  }

  #mobile-header .menu-toggle-open .menu-toggle-icon,
  #mobile-header .menu-toggle-open .kadence-svg-iconset,
  #mobile-header .menu-toggle-open svg {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    flex: 0 0 24px !important;
  }

  #mobile-header .site-branding.mobile-site-branding {
    display: block !important;
  }

  #mobile-header .site-branding.mobile-site-branding .custom-logo {
    display: block !important;
    max-width: 180px !important;
    height: auto !important;
  }

  #mobile-drawer {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    display: block !important;
    pointer-events: none;
    background: transparent !important;
  }

  #mobile-drawer .drawer-overlay {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(14, 23, 38, 0.42) !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  #mobile-drawer .drawer-inner {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: min(86vw, 360px) !important;
    max-width: 360px !important;
    height: 100vh !important;
    background: #ffffff !important;
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.22);
    transform: translateX(102%) !important;
    transition: transform 0.25s ease;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  #mobile-drawer .drawer-content {
    padding: 16px 20px 32px !important;
  }

  #mobile-drawer .drawer-header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    justify-content: flex-end;
    background: #ffffff;
  }

  #mobile-drawer .menu-toggle-close {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 8px 8px 0 auto;
    color: var(--global-palette3, #1a202c);
  }

  #mobile-drawer .toggle-close-bar {
    position: absolute;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  #mobile-drawer .toggle-close-bar:first-child {
    transform: rotate(45deg);
  }

  #mobile-drawer .toggle-close-bar:last-child {
    transform: rotate(-45deg);
  }

  #mobile-menu > li {
    border-top: 1px solid #e2e8f0;
  }

  #mobile-menu > li:last-child {
    border-bottom: 1px solid #e2e8f0;
  }

  #mobile-menu a {
    display: block;
    padding: 14px 0;
    color: var(--global-palette3, #1a202c);
    text-decoration: none;
    font-weight: 600;
    line-height: 1.4;
  }

  #mobile-menu li.current-menu-item > a,
  #mobile-menu a:hover,
  #mobile-menu a:focus-visible {
    color: var(--global-palette1, #2b6cb0);
  }

  body.showing-popup-drawer-from-right #mobile-drawer,
  body:has(#mobile-toggle:focus) #mobile-drawer,
  body:has(#mobile-drawer:focus-within) #mobile-drawer {
    pointer-events: auto;
  }

  body.showing-popup-drawer-from-right #mobile-drawer .drawer-overlay,
  body:has(#mobile-toggle:focus) #mobile-drawer .drawer-overlay,
  body:has(#mobile-drawer:focus-within) #mobile-drawer .drawer-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body.showing-popup-drawer-from-right #mobile-drawer .drawer-inner,
  body:has(#mobile-toggle:focus) #mobile-drawer .drawer-inner,
  body:has(#mobile-drawer:focus-within) #mobile-drawer .drawer-inner {
    transform: translateX(0) !important;
  }

  body.showing-popup-drawer-from-right {
    overflow: hidden;
    touch-action: none;
  }
}

/* Additional recovery fixes: logo/font/menu/skip-link/cards */
body,
button,
input,
select,
textarea {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.screen-reader-text,
.skip-link {
  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;
}

.skip-link:focus,
.screen-reader-text:focus {
  clip: auto !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
  white-space: normal !important;
  left: 1rem !important;
  top: 1rem !important;
  padding: 0.75rem 1rem !important;
  z-index: 10001 !important;
  background: #ffffff !important;
  color: #0f1923 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.16) !important;
}

.site-branding .custom-logo,
#mobile-header .site-branding.mobile-site-branding .custom-logo {
  max-width: 220px !important;
  max-height: 72px !important;
  width: auto !important;
  object-fit: contain;
}

#primary-menu > li > a,
#mobile-menu a,
#site-navigation,
#mobile-site-navigation {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  letter-spacing: -0.01em;
}

#primary-menu > li > a {
  font-size: 0.98rem !important;
  font-weight: 600 !important;
}

#mobile-drawer,
#mobile-drawer .drawer-inner,
#mobile-drawer .drawer-content,
#mobile-site-navigation,
#mobile-site-navigation .mobile-menu-container,
#mobile-menu {
  background: #ffffff !important;
}

#mobile-menu,
#mobile-menu li,
#mobile-menu a {
  visibility: visible !important;
  opacity: 1 !important;
}

#mobile-menu a {
  color: #0f1923 !important;
  -webkit-text-fill-color: #0f1923 !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
}

.ahh-panels {
  align-items: stretch !important;
}

.ahh-panel {
  min-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

.ahh-panel > p:last-child,
.ahh-offer-secondary > p:last-child {
  margin-top: auto !important;
}
