/* Native disclosures keep site navigation usable without JavaScript. */
.heloc-desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-inline: auto;
  color: var(--mama-navy);
  font-weight: 600;
}

.heloc-desktop-nav > a,
.heloc-desktop-nav summary,
.heloc-mobile-nav summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
}

.heloc-resources {
  position: relative;
}

.heloc-resources summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 4px;
  border-right: 2px solid;
  border-bottom: 2px solid;
  transform: rotate(45deg);
}

.heloc-resources[open] summary::after {
  transform: rotate(225deg);
}

.heloc-desktop-nav summary::-webkit-details-marker,
.heloc-mobile-nav summary::-webkit-details-marker {
  display: none;
}

.heloc-menu-panel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1;
  width: 252px;
  max-height: min(65vh, 480px);
  overflow-y: auto;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--mama-line);
  border-radius: var(--radius);
  background: var(--mama-soft);
  box-shadow: 0 12px 28px rgb(11 18 32 / 16%);
  color: var(--mama-navy);
  font-weight: 600;
}

.heloc-menu-panel a {
  display: block;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 4px;
  text-decoration: none;
}

.heloc-menu-panel a:hover,
.heloc-menu-panel a[aria-current="page"],
.heloc-desktop-nav > a:hover,
.heloc-desktop-nav summary:hover,
.heloc-mobile-nav summary:hover {
  background: var(--mama-paper);
}

.heloc-mobile-nav {
  display: none;
}

.heloc-menu-label {
  padding: 12px 12px 4px;
  border-top: 1px solid var(--mama-line);
  color: var(--mama-muted);
  font-size: 0.85rem;
}

@media (max-width: 1000px) {
  html { scroll-padding-top: 148px; }
  .header-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding-block: 8px;
  }
  .heloc-desktop-nav { display: none; }
  .heloc-mobile-nav { display: block; }
  .heloc-mobile-nav .heloc-menu-panel { width: 100%; }
  .header-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 8px;
  }
  .header-actions .header-link {
    display: inline-flex;
    font-size: 0.85rem;
  }
  .header-actions .button {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 0.85rem;
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .header-actions .header-link,
  .header-actions .button { font-size: 0.78rem; white-space: nowrap; }
}
