/* Critical first-paint chrome — prevents header FOUC before widget <style> parses.
   Full styles still live in ElementsKit #152 HTML widget. */

html {
  --wd-chrome-header-offset: 72px;
  --wd-chrome-first-section-tighten: 28px;
  scroll-padding-top: var(--wd-chrome-header-offset);
}

html.wd-chrome-merge-home {
  --wd-chrome-first-section-tighten: 72px;
  background: #173b2e;
}

html.wd-chrome-merge-home body {
  background: #173b2e !important;
}

@media (max-width: 1199px) {
  html {
    --wd-chrome-header-offset: 68px;
    --wd-chrome-first-section-tighten: 24px;
  }
  html.wd-chrome-merge-home {
    --wd-chrome-first-section-tighten: 68px;
  }
}

@media (max-width: 767px) {
  html {
    --wd-chrome-header-offset: 68px;
    --wd-chrome-first-section-tighten: 20px;
  }
  html.wd-chrome-merge-home {
    --wd-chrome-first-section-tighten: 68px;
  }
}

.ekit-template-content-header {
  min-height: var(--wd-chrome-header-offset) !important;
  margin-bottom: calc(-1 * var(--wd-chrome-first-section-tighten)) !important;
  box-sizing: border-box !important;
}

.wd-chrome-header {
  --wd-ch-forest: #2d5a45;
  --wd-ch-deep: #173b2e;
  --wd-ch-cream: #f8f5ee;
  --wd-ch-white: #ffffff;
  --wd-ch-mint: #d4ebc7;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 10050 !important;
  width: 100% !important;
  font-family: Inter, system-ui, sans-serif;
  border: 0 !important;
  box-shadow: none !important;
}

.wd-chrome-header-spacer {
  display: block !important;
  width: 100%;
  height: var(--wd-chrome-header-offset);
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
  visibility: hidden;
}

.wd-chrome-header__announce {
  display: none !important;
}

.wd-chrome-header__bar {
  background: var(--wd-ch-cream);
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none;
  position: relative;
  transition: background-color 0.28s ease, box-shadow 0.28s ease;
}

.wd-chrome-header.is-scrolled .wd-chrome-header__bar {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 24px rgba(28, 36, 32, 0.08) !important;
}

body.home .wd-chrome-header.is-merged .wd-chrome-header__bar,
body.front-page .wd-chrome-header.is-merged .wd-chrome-header__bar {
  background: transparent;
  box-shadow: none;
}

.wd-chrome-header__inner {
  display: flex !important;
  align-items: center !important;
  max-width: 1440px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 64px;
  gap: 16px;
  min-width: 0;
  position: relative;
  box-sizing: border-box;
}

.wd-chrome-header__logo {
  flex: 0 0 180px !important;
  width: 180px !important;
  min-width: 180px !important;
  max-width: 180px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none !important;
  position: relative;
  z-index: 3;
}

.wd-chrome-header__logo-full {
  display: block !important;
  width: auto !important;
  height: 32px !important;
  max-width: 180px !important;
  max-height: 32px !important;
  object-fit: contain !important;
}

.wd-chrome-header__logo-mark {
  display: none !important;
  width: 56px !important;
  height: 56px !important;
  max-width: 56px !important;
  max-height: 56px !important;
  object-fit: contain !important;
}

.wd-chrome-header.is-scrolled .wd-chrome-header__logo {
  flex: 0 0 180px !important;
  width: 180px !important;
  min-width: 180px !important;
  max-width: 180px !important;
}

.wd-chrome-header.is-scrolled .wd-chrome-header__logo-full {
  display: none !important;
}

.wd-chrome-header.is-scrolled .wd-chrome-header__logo-mark {
  display: block !important;
  width: 56px !important;
  height: 56px !important;
  max-width: 56px !important;
  max-height: 56px !important;
}

body.home .wd-chrome-header.is-merged .wd-chrome-header__logo-full,
body.front-page .wd-chrome-header.is-merged .wd-chrome-header__logo-full {
  filter: brightness(0) invert(1);
}

/* Hide mega panels until full widget CSS + hover/open rules apply */
.wd-chrome-header__mega {
  position: absolute;
  left: 50%;
  top: calc(100% - 2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(10px);
}

.wd-chrome-header__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

.wd-chrome-header__toggle {
  display: none !important;
}

.wd-chrome-header__actions--mobile {
  display: none !important;
}

@media (min-width: 1200px) {
  .wd-chrome-header__nav {
    display: flex !important;
    flex: 1 1 auto !important;
    justify-content: center;
    align-items: center;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    z-index: 2;
  }

  .wd-chrome-header__actions--desktop {
    flex: 0 0 auto !important;
    margin-left: 0 !important;
  }
}

@media (max-width: 1199px) {
  .wd-chrome-header__inner {
    padding: 0 24px;
    min-height: 68px;
  }

  .wd-chrome-header__toggle {
    display: inline-block !important;
    margin-left: auto;
  }

  .wd-chrome-header__nav {
    display: none !important;
  }

  .wd-chrome-header__actions--desktop {
    display: none !important;
  }

  .wd-chrome-header.is-nav-open .wd-chrome-header__nav {
    display: flex !important;
  }
}
