/* NexDerm header + navigation — mobile-first, keyboard accessible. */

.nd-header {
  background: var(--nd-white);
  border-bottom: var(--nd-rule);
  position: relative;
  z-index: 50;
}

.nd-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

/* Text brand — placeholder until logo assets are Approved (see ASSET_INVENTORY LOGO-014) */
.nd-brand {
  font-family: var(--nd-font-interface);
  font-weight: 300;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--nd-charcoal);
  text-decoration: none;
  border-left: 2px solid var(--nd-gold);
  padding-left: 0.6rem;
  white-space: nowrap;
}

.nd-brand:hover { color: var(--nd-teal); }

.nd-brand strong { font-weight: 600; }

/* Approved SVG logo lockup (LOGO-014) */
.nd-brand--logo {
  border-left: 0;
  padding-left: 0;
  flex: 0 0 auto; /* never let the header row shrink the logo (it hit 0px at 1024) */
}

.nd-brand--logo img {
  display: block;
  height: 2.1rem;
  width: auto;
}

@media (min-width: 64em) {
  .nd-brand--logo img { height: 2.4rem; }
}

/* Menu toggle (mobile) */
.nd-nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--nd-charcoal);
  border-radius: var(--nd-radius-small);
  padding: 0.65rem 0.6rem;
  cursor: pointer;
}

.nd-nav-toggle .bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--nd-charcoal);
  transition: transform var(--nd-transition-fast), opacity var(--nd-transition-fast);
}

.nd-nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nd-nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nd-nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav panel — collapsed on mobile, row on desktop */
.nd-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--nd-white);
  border-bottom: var(--nd-rule);
  box-shadow: var(--nd-shadow-quiet);
  padding: 0.5rem var(--nd-gutter) 1.5rem;
}

.nd-nav.is-open { display: block; }

.nd-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.nd-nav li { border-bottom: var(--nd-rule); }

.nd-nav a {
  display: block;
  padding: 0.9rem 0.25rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--nd-charcoal);
  text-decoration: none;
}

.nd-nav a:hover,
.nd-nav a[aria-current="page"] { color: var(--nd-teal); }

.nd-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--nd-gold); padding-left: 0.75rem; }

.nd-header__cta { display: none; }

/* The CTA appears as soon as the mobile quick-action bar drops away, so every
   width above the bar keeps a visible booking action even while nav is a menu. */
@media (min-width: 64em) {
  .nd-header__cta {
    display: inline-block;
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* Menu-and-CTA band: nav is still a panel, so group the two controls right. */
@media (min-width: 64em) and (max-width: 79.999em) {
  .nd-brand { margin-right: auto; }
  .nd-nav-toggle { order: 3; }
}

/* Mobile call/text quick actions inside the panel */
.nd-nav__actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1.25rem;
}

.nd-nav__actions .nd-button {
  flex: 1;
  color: var(--nd-white); /* .nd-nav a (0,1,1) would otherwise paint the filled button's text charcoal-on-teal */
}

.nd-nav__actions .nd-button--secondary { color: var(--nd-teal); }

.nd-nav__actions .nd-button:hover { color: var(--nd-white); }

@media (min-width: 80em) {
  .nd-nav-toggle { display: none; }

  .nd-nav {
    display: block;
    position: static;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .nd-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
  }

  .nd-nav li { border: 0; }

  .nd-nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
  }

  .nd-nav a:hover { border-bottom-color: var(--nd-gold); }

  .nd-nav a[aria-current="page"] {
    box-shadow: none;
    padding-left: 0.75rem;
    border-bottom-color: var(--nd-gold);
  }

  .nd-nav__actions { display: none; }

}
