/* Le Takunga — "Consultations" sub-menu in the book site's main navigation.
   Clicking "Consultations" goes to its page; its sub-pages show on hover (computer)
   or with the ▾ button (phone). A separate file so returning visitors get it despite
   style.css being cached for a year. */
/* The header must sit above the page content, or the hero title shows through the sub-menu. */
.site-header { position: relative; z-index: 60; }

.main-nav li.nav-has-sub {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav-sub-btn {
  background: none;
  border: 0;
  color: var(--cream-dim);
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  padding: 0.3rem 0.35rem;
  transition: color .25s ease, transform .25s ease;
}
.nav-sub-btn:hover,
.nav-sub-btn:focus-visible,
.nav-has-sub.open > .nav-sub-btn { color: var(--gold-light); }
.nav-has-sub.open > .nav-sub-btn { transform: rotate(180deg); }

.main-nav ul.nav-sub {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  flex-direction: column;
  gap: 0;
  min-width: 15rem;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  background: var(--midnight-mid);
  border: 1px solid rgba(217, 168, 70, 0.3);
  border-radius: 6px;
  box-shadow: var(--shadow-deep);
}
.nav-has-sub:hover > ul.nav-sub,
.nav-has-sub:focus-within > ul.nav-sub,
.nav-has-sub.open > ul.nav-sub { display: flex; }
.main-nav ul.nav-sub a {
  display: block;
  padding: 0.45rem 0.6rem;
  border-bottom: 0;
  white-space: nowrap;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .main-nav li.nav-has-sub { flex-wrap: wrap; width: 100%; }
  .main-nav ul.nav-sub {
    position: static;
    width: 100%;
    min-width: 0;
    padding: 0.3rem 0 0 1rem;
    border: 0;
    border-top: 0;
    background: transparent;
    box-shadow: none;
  }
  .nav-has-sub:hover > ul.nav-sub,
  .nav-has-sub:focus-within > ul.nav-sub { display: none; }
  .nav-has-sub.open > ul.nav-sub { display: flex; }
}
