/* =========================================================
   Dream Neighborhood — Bill review site navigation
   Page-scoped to / only. Loaded AFTER /styles.css so it
   wins the cascade. The main site (/) never links this file,
   so it is completely untouched.
   ========================================================= */

/* ---------- Keep the top bar on a single line ---------- */
.nav__inner {
  gap: 14px;
}
.nav__links {
  gap: 18px;
  align-items: center;
}
.nav__cta {
  gap: 10px;
}
.nav__links a.nav__main,
.nav__dropdown-toggle {
  white-space: nowrap;
}

/* ---------- Active page highlight (no layout shift) ---------- */
.nav__links a.nav__main {
  position: relative;
}
.nav__links a.nav__main[aria-current="page"] {
  color: #127d6b;
}
.nav__links a.nav__main[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: -7px;
  height: 2px;
  border-radius: 2px;
  background: #127d6b;
}

/* ---------- "See It In Action" dropdown (desktop) ---------- */
.nav__item {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav__dropdown-toggle {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.nav__dropdown-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  opacity: 0.55;
}
.nav__dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 300px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
  padding: 8px;
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.16s ease;
}
.nav__dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.nav__item:hover .nav__dropdown-menu,
.nav__item:focus-within .nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav__dropdown-menu a {
  display: block;
  padding: 11px 14px;
  border-radius: 8px;
  white-space: nowrap;
  color: #0f172a;
  font-weight: 600;
  font-size: 14px;
}
.nav__dropdown-menu a:hover {
  background: #f1f5f9;
  color: #127d6b;
}
.nav__dropdown-menu a[aria-current="page"] {
  color: #127d6b;
}

/* ---------- Hamburger button (hidden on desktop) ---------- */
.nav__burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  cursor: pointer;
}
.nav__burger span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #0f172a;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav.is-open .nav__burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav.is-open .nav__burger span:nth-child(2) {
  opacity: 0;
}
.nav.is-open .nav__burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Mobile / tablet panel ---------- */
.nav__mobile {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  padding: 12px 24px 24px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
.nav.is-open .nav__mobile {
  display: block;
}

/* =========================================================
   Collapse to hamburger below 1200px (covers laptops at
   1024, tablets, and phones — the bar never wraps).
   ========================================================= */
@media (max-width: 1200px) {
  .nav__inner > .nav__links,
  .nav__inner > .nav__cta {
    display: none !important;
  }
  .nav__burger {
    display: inline-flex;
  }

  /* Cloned links inside the panel, stacked vertically */
  .nav__mobile .nav__links {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-size: 16px;
  }
  .nav__mobile .nav__links > a,
  .nav__mobile .nav__item {
    display: block;
    width: 100%;
    padding: 14px 4px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 16px;
  }
  .nav__mobile .nav__dropdown-toggle {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
  }
  .nav__mobile .nav__dropdown-toggle::after {
    display: none;
  }
  .nav__mobile .nav__dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    padding: 4px 0 0;
    min-width: 0;
  }
  .nav__mobile .nav__dropdown-menu::before {
    display: none;
  }
  .nav__mobile .nav__dropdown-menu a {
    padding: 10px 0 10px 18px;
    font-size: 15px;
    color: #475569;
  }
  .nav__mobile .nav__cta {
    display: flex;
    gap: 12px;
    margin-top: 18px;
  }
  .nav__mobile .nav__cta .btn {
    flex: 1;
    text-align: center;
  }
}
