/* Devotee Health horizontal navigation 38: additive overrides for the reviewed Divi header. */
html.dhs38-ready {
  --dhs38-header-height: 100px;
  --dhs38-toolbar-height: 0px;
  scroll-padding-top: calc(var(--dhs38-header-height) + var(--dhs38-toolbar-height) + 16px);
}

/* Retain the existing banner and identity; only its menu and contextual tier are arranged here. */
.et-l--header.dhs38-header {
  position: fixed !important;
  top: var(--dhs38-toolbar-height) !important;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 99990;
}
.dhs38-header .dhs38-main {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 5px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 4px 1px !important;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.dhs38-header .dhs38-main > li {
  flex: 0 0 auto;
  padding: 0 !important;
  margin: 0 !important;
}
.dhs38-header .dhs38-main > li > a {
  display: block !important;
  min-height: 36px;
  box-sizing: border-box;
  padding: 9px 10px !important;
  border: 1px solid #9ca58e;
  border-radius: 4px;
  background: #646c57;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .04em !important;
  line-height: 1.2 !important;
  white-space: nowrap;
  text-decoration: none;
}
.dhs38-header .dhs38-main > li > a:hover { background: #747e64; border-color: #e1e8d7; }
.dhs38-header .dhs38-main > li > a.dhs38-active {
  background: #343e2b !important;
  border-color: #e2ecd6;
  box-shadow: inset 0 0 0 1px #e2ecd6;
}

.dhs38-subnav {
  width: 100%;
  background: #dce2d1;
  border-top: 1px solid #b9c5aa;
  border-bottom: 1px solid #b3bea4;
}
.dhs38-subnav[hidden] { display: none !important; }
.dhs38-subnav-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  width: 92%;
  max-width: 1180px;
  min-height: 48px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 7px 1px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.dhs38-subnav a,
.dhs38-dropdown-panel a,
.dhs38-dropdown-control {
  flex: 0 0 auto;
  display: block;
  min-height: 34px;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid #99a888;
  border-radius: 4px;
  padding: 7px 12px;
  background: #f1f4e9;
  color: #303d27 !important;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
}
.dhs38-dropdown { flex: 0 0 auto; }
.dhs38-dropdown-control { cursor: pointer; }
.dhs38-dropdown-control::after { content: ' +'; font-weight: 700; }
.dhs38-dropdown-control[aria-expanded="true"]::after { content: ' −'; }
.dhs38-subnav a:hover,
.dhs38-dropdown-control:hover { background: #e5ecd9; border-color: #637454; }
.dhs38-subnav a.dhs38-active,
.dhs38-dropdown-control.dhs38-active {
  background: #c0d0af;
  border-color: #60754b;
  box-shadow: inset 0 0 0 1px #60754b;
  color: #23351a !important;
}
.dhs38-overview-link { font-weight: 800 !important; }

/* Panels live at document level, not inside the rail, so a mobile scrollport cannot clip them. */
.dhs38-dropdown-panel {
  position: fixed;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: min(220px, calc(100vw - 16px));
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #70805f;
  border-radius: 5px;
  padding: 8px;
  background: #dce2d1;
  box-shadow: 0 8px 22px rgba(35, 53, 26, .28);
}
.dhs38-dropdown-panel[hidden] { display: none !important; }
.dhs38-dropdown-panel a { width: 100%; white-space: normal; overflow-wrap: anywhere; }
.dhs38-dropdown-panel a:focus-visible { outline: 3px solid #3b572b; outline-offset: 2px; }

.dhs38-header a:focus-visible,
.dhs38-dropdown-control:focus-visible {
  outline: 3px solid #faf4cd !important;
  outline-offset: 2px;
}
.dhs38-subnav a:focus-visible,
.dhs38-dropdown-panel a:focus-visible,
.dhs38-dropdown-control:focus-visible {
  outline-color: #3b572b !important;
}
.dhs38-header-spacer {
  width: 100%;
  height: calc(var(--dhs38-header-height) + var(--dhs38-toolbar-height));
  pointer-events: none;
}
html.dhs38-ready [id] {
  scroll-margin-top: calc(var(--dhs38-header-height) + var(--dhs38-toolbar-height) + 16px) !important;
}

@media (max-width: 1100px) {
  .dhs38-subnav-inner { width: 96%; }
}
@media (max-width: 767px) {
  .dhs38-header .dhs38-main { gap: 4px; }
  .dhs38-header .dhs38-main > li > a { min-height: 38px; padding: 10px 9px !important; }
  .dhs38-subnav-inner { min-height: 46px; gap: 5px; padding: 5px 1px; }
  .dhs38-subnav a,
  .dhs38-dropdown-control { min-height: 36px; padding: 7px 9px; }
  .dhs38-dropdown-panel { min-width: min(206px, calc(100vw - 16px)); }
}
@media (prefers-reduced-motion: reduce) {
  .dhs38-header *, .dhs38-dropdown-panel * { scroll-behavior: auto !important; transition: none !important; }
}

/* Principal subjects remain one-click native links; adjacent compact caret opens related subjects. */
.dhs38-dropdown { display:flex; align-items:center; gap:2px; }
.dhs38-dropdown-control { min-width:36px; }
.dhs38-group-active > .dhs38-group-overview, .dhs38-dropdown-panel a.dhs38-active { background:#c0d0af; border-color:#60754b; box-shadow:inset 0 0 0 1px #60754b; color:#23351a!important; }
.dhs38-dropdown-panel a:hover { background:#e5ecd9; border-color:#637454; }
