/* ── Shared Navigation ── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000; padding: 0.875rem 0;
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.nav-logo { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--text-primary); text-decoration: none; white-space: nowrap; }

/* Desktop nav */
.nav-links { display: flex; gap: 0.25rem; list-style: none; align-items: center; margin: 0; padding: 0; }
.nav-links > li > a,
.nav-links > li > .dropdown-toggle {
  font-size: 0.875rem; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; transition: color 0.2s ease, background-color 0.2s ease;
  padding: 0.4rem 0.75rem; border-radius: 6px;
  display: flex; align-items: center; gap: 0.3rem;
  background: none; border: none; cursor: pointer; font-family: inherit; line-height: 1;
}
.nav-links > li > a:hover, .nav-links > li > a.active,
.nav-links > li > .dropdown-toggle:hover, .nav-links > li > .dropdown-toggle.active {
  color: var(--accent-primary); background: rgba(99,102,241,0.07);
}
.dropdown-toggle svg { transition: transform 0.2s ease; flex-shrink: 0; }
.has-dropdown:hover > .dropdown-toggle svg { transform: rotate(180deg); }
.has-dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%); list-style: none; z-index: 100;
  padding-top: 6px; min-width: 160px;
}
.dropdown-menu::before { content: ''; display: block; height: 6px; }
.dropdown-menu-inner {
  background: #fff; border: 1px solid var(--border-color); border-radius: 10px;
  padding: 0.5rem; box-shadow: 0 8px 24px rgba(0,0,0,0.1); overflow: hidden;
}
.has-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block; padding: 0.5rem 0.875rem; font-size: 0.8125rem; font-weight: 500;
  color: var(--text-secondary); text-decoration: none; border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease; white-space: nowrap;
}
.dropdown-menu a:hover, .dropdown-menu a.active { color: var(--accent-primary); background: rgba(99,102,241,0.07); }

.nav-right { display: flex; align-items: center; gap: 0.75rem; }
.nav-cta {
  font-size: 0.8125rem; font-weight: 600; color: #fff;
  background: var(--text-primary); padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full); text-decoration: none; white-space: nowrap;
}

/* Hamburger — hidden on desktop, shown by nav.js on mobile */
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; color: var(--text-primary); padding: 0.25rem; }

/* Bottom Tab Bar */
.btab-bar { display: none; }

@media (min-width: 901px) {
  .mobile-cta-wrapper { display: none; }
}

@media (max-width: 900px) {
  nav { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .nav-links { display: none; }
  .nav-right { display: none; }

  /* Scrollable tab bar — all pages accessible */
  .btab-bar {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 64px; padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff; border-top: 1px solid #E2E8F0; z-index: 9000;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .btab-bar::-webkit-scrollbar { display: none; }
  .btab {
    -webkit-tap-highlight-color: transparent;
    flex: 0 0 auto;
    min-width: 58px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; text-decoration: none; color: #94A3B8;
    font-size: 0.55rem; font-weight: 600; letter-spacing: 0.04em;
    text-transform: uppercase; font-family: 'Inter', system-ui, sans-serif;
    padding: 6px 6px; transition: color 0.15s ease;
  }
  .btab svg { display: block; width: 20px; height: 20px; flex-shrink: 0; }
  .btab span { display: block; line-height: 1; white-space: nowrap; }
  .btab.active { color: #2563EB; }
  .btab:active { opacity: 0.7; }
}

@media (max-width: 600px) {
  .container { padding: 0 1.25rem; }
  section { padding: 6rem 0 3rem; }
  .section-title { font-size: 1.75rem; }
  footer { flex-direction: column; gap: 1.5rem; text-align: center; padding: 2rem 1.25rem; }
  .footer-links { justify-content: center; flex-wrap: wrap; gap: 1rem; }
}
