/* ─── NAV ───────────────────────────────────────────────────────── */
/* Color Flow Map reference:
 *   dark-top pages: nav transparent at scroll=0 (body.kbs-page--dark-top bg = navy)
 *   light-top pages: nav forced solid navy always
 *   nav link default color = WHITE (dark-nav context)
 */

.kbs-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 68px;
  display: flex;
  align-items: center;
  transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

/* Dark-top: starts transparent, body bg is navy → transparent nav shows navy */
body.kbs-page--dark-top .kbs-nav {
  background: transparent;
}

/* Scrolled state for dark-top */
body.kbs-page--dark-top .kbs-nav.kbs-nav--scrolled {
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

/* Light-top: always solid dark nav (never transparent) */
body.kbs-page--light-top .kbs-nav {
  background: var(--kbs-navy);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.kbs-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
}

.kbs-nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.kbs-nav__logo:hover { text-decoration: none; }

.kbs-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 36px;
  list-style: none;
}

/* Nav links always white (nav bg is always dark on all nav states) */
.kbs-nav__link {
  color: rgba(237, 242, 247, 0.82);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.kbs-nav__link:hover {
  color: #EDF2F7;
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

.kbs-nav__link--active {
  color: var(--kbs-teal);
}

/* Nav CTA group */
.kbs-nav__cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.kbs-nav__signin {
  color: rgba(237, 242, 247, 0.72);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--kbs-radius-btn);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

.kbs-nav__signin:hover {
  color: #EDF2F7;
  text-decoration: none;
}

.kbs-nav__trial-btn {
  padding: 8px 18px;
  font-size: 0.875rem;
  white-space: nowrap;
}

/* Mobile hamburger */
.kbs-nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.kbs-nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #EDF2F7;
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* Mobile menu */
.kbs-nav__mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--kbs-navy);
  border-bottom: 1px solid var(--kbs-navy-border);
  padding: 20px 24px 28px;
  flex-direction: column;
  gap: 4px;
  z-index: 999;
}

.kbs-nav__mobile-menu.is-open {
  display: flex;
}

.kbs-nav__mobile-menu a {
  color: rgba(237, 242, 247, 0.82);
  font-size: 1rem;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 4px;
  text-decoration: none;
}

.kbs-nav__mobile-menu a:hover {
  color: #EDF2F7;
  background: rgba(255,255,255,0.06);
}

.kbs-nav__mobile-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--kbs-navy-border);
}

@media (max-width: 900px) {
  .kbs-nav__links { display: none; }
  .kbs-nav__cta { display: none; }
  .kbs-nav__hamburger { display: flex; }
}
