/* nav.css — shared navigation for FamilyFolio public pages */

.site-nav {
  position: sticky; top: 0; z-index: 200;
  height: 56px; background: #172B4D;
  display: flex; align-items: center;
  padding: 0 24px;
  box-shadow: 0 3px 5px rgba(9,30,66,.2), 0 0 1px rgba(9,30,66,.31);
}
.site-nav .logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; flex-shrink: 0; margin-right: 32px;
}
.site-nav .logo-icon {
  width: 28px; height: 28px; background: #5165C2;
  border-radius: 3px; display: flex; align-items: center; justify-content: center;
}
.site-nav .logo-icon svg { width: 16px; height: 16px; }
.site-nav .logo-text { font-size: 15px; font-weight: 700; color: white; }
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-link {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 3px;
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,.75);
  text-decoration: none; background: none; border: none;
  cursor: pointer; font-family: inherit;
  transition: background .12s, color .12s; white-space: nowrap;
}
.nav-link:hover  { background: rgba(255,255,255,.08); color: white; }
.nav-link.active { background: rgba(255,255,255,.12); color: white; font-weight: 600; }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: white;
  box-shadow: 0 8px 24px rgba(9,30,66,.18), 0 0 1px rgba(9,30,66,.2);
  min-width: 270px; padding: 6px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
  z-index: 300;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open  .nav-dropdown-menu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
/* Transparent bridge fills the gap so moving the cursor into the menu doesn't collapse it */
.nav-dropdown-menu::before {
  content: ''; position: absolute;
  top: -8px; left: 0; right: 0; height: 8px;
}
.nav-dropdown-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px; border-radius: 4px;
  text-decoration: none; color: #172B4D; transition: background .1s;
}
.nav-dropdown-item:hover      { background: #F4F5F7; }
.nav-dropdown-item.active-tool { background: #ECEFFE; }
.nav-dropdown-icon {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 6px;
  background: #ECEFFE; display: flex; align-items: center; justify-content: center;
}
.nav-dropdown-icon svg { width: 16px; height: 16px; color: #5165C2; }
.nav-dropdown-label { font-size: 13px; font-weight: 600; color: #172B4D; margin-bottom: 2px; }
.nav-dropdown-desc  { font-size: 11px; color: #6B778C; line-height: 16px; }
.nav-chevron { width: 12px; height: 12px; opacity: .6; transition: transform .15s; flex-shrink: 0; }
.nav-dropdown.open .nav-chevron,
.nav-dropdown:hover .nav-chevron { transform: rotate(180deg); }

/* Hamburger */
.nav-hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 36px; height: 36px; padding: 6px;
  background: none; border: none; cursor: pointer;
  border-radius: 3px; margin-left: auto; flex-shrink: 0;
}
.nav-hamburger span {
  display: block; width: 20px; height: 2px;
  background: rgba(255,255,255,.8); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile overlay */
.mobile-nav-overlay {
  display: none; position: fixed; inset: 56px 0 0 0;
  background: #172B4D; z-index: 199; overflow-y: auto;
  padding: 12px 16px 24px; flex-direction: column; gap: 2px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.mobile-nav-overlay.open { display: flex; }
.mobile-nav-section {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: rgba(255,255,255,.3);
  padding: 10px 14px 4px;
}
.mobile-nav-link {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border-radius: 3px; font-size: 15px; font-weight: 500;
  color: rgba(255,255,255,.8); text-decoration: none;
  border: none; background: none; cursor: pointer; font-family: inherit;
  width: 100%; text-align: left;
}
.mobile-nav-link:hover, .mobile-nav-link.active { background: rgba(255,255,255,.08); color: white; }
.mobile-nav-sub {
  display: block; padding: 9px 14px 9px 28px;
  border-radius: 3px; font-size: 14px;
  color: rgba(255,255,255,.6); text-decoration: none;
  transition: background .1s, color .1s;
}
.mobile-nav-sub:hover, .mobile-nav-sub.active { background: rgba(255,255,255,.06); color: white; }
.mobile-nav-divider { height: 1px; background: rgba(255,255,255,.08); margin: 8px 0; }

@media (max-width: 640px) {
  .nav-hamburger { display: flex; }
  .nav-links     { display: none; }
  .site-nav      { padding: 0 16px; }
}
