/* ══════════════════════════════════════════
   RAPID TACTICAL — NAVBAR & MOBILE MENU
   Handles navigation, logo, theme toggle, 
   hamburger, and mobile drawer.
══════════════════════════════════════════ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #ffffff;
  height: 95px;
  padding: 0 40px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

/* Logo */
.custom-logo {
  display: block;
  width: 130px;
  max-width: 150px;
  height: auto;
  max-height: 44px;
  object-fit: contain;
  /* margin-left: 25px; */
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 5%;
}

.nav-links li a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  height: 56px;
  border-radius: 9px;
  text-decoration: none;
  color: #1c1c1c;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
  position: relative;
}

.nav-links li a.active,
.nav-links li a:hover {
  background: #e0e0e0;
  font-weight: 600;
  border-radius: 11px 11px 0 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: clamp(20px, 4vw, 80px);
}

/* Theme toggle pill */
.theme-toggle {
  display: flex;
  align-items: center;
  background: #e6e6e6;
  border-radius: 50px;
  padding: 4px 5px;
  gap: 3px;
  cursor: pointer;
  user-select: none;
}

.toggle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.toggle-btn.sun {
  background: #8b1a1a;
}

.toggle-btn.moon {
  background: transparent;
}

body.dark .toggle-btn.sun {
  background: transparent;
}

body.dark .toggle-btn.moon {
  background: #8b1a1a;
}

/* Request Demo button */
.btn-demo {
  background: #8b1a1a;
  color: #ffffff;
  border: none;
  padding: 13px 26px;
  height: 46px;
  border-radius: 8px;
  font-size: var(--content-size);
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.1px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-demo:hover {
  background: #7a1616;
  transform: translateY(-1px);
}

/* ─────────────────────────────────────────────────────────────
   MOBILE HAMBURGER & DRAWER
───────────────────────────────────────────────────────────── */

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.15s ease;
  flex-shrink: 0;
  margin-left: auto;
  position: relative;
  z-index: 300;
}

.nav-hamburger:hover {
  background: #f0f0f0;
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #1c1c1c;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.mobile-menu-overlay {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100vh;
  background: #ffffff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.18);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  pointer-events: none;
  visibility: hidden;
}

.mobile-menu.is-open {
  transform: translateX(0);
  pointer-events: auto;
  visibility: visible;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.mobile-menu-close {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.mobile-nav-links {
  list-style: none;
  padding: 16px 0;
  margin: 0;
  flex: 1;
}

.mobile-nav-links li a {
  display: block;
  padding: 13px 24px;
  font-family: 'Inter', sans-serif;
  font-size: var(--content-size);
  font-weight: 500;
  color: #1c1c1c;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.12s ease, color 0.12s ease;
}

.mobile-nav-links li a:hover,
.mobile-nav-links li a.active {
  background: #f5f0f0;
  color: #8b1a1a;
}

.mobile-menu-footer {
  padding: 24px 20px;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#mobileThemeToggle {
  background: #f0f0f0;
  width: fit-content;
}

/* ── Navbar Multi-Device Overrides ── */

@media (max-width: 1200px) {
  .navbar {
    padding: 0 40px;
    gap: 40px;
    height: 80px;
  }

  .nav-links {
    gap: 24px;
  }
}

@media (max-width: 1024px) {
  .navbar {
    padding: 0 20px;
    height: 70px;
    justify-content: space-between;
  }

  .nav-links,
  .nav-right {
    display: none !important;
  }

  .nav-hamburger {
    display: flex;
  }
}

/* Dark Mode Overrides */
body.dark .navbar {
  background: #1a1a1a;
}

body.dark .nav-links li a {
  color: #e0e0e0;
}

body.dark .nav-links li a.active,
body.dark .nav-links li a:hover {
  background: #2a2a2a;
  color: #fff;
}

body.dark .theme-toggle {
  background: #2a2a2a;
}

body.dark .mobile-menu {
  background: #1a1a1a;
}

body.dark .mobile-menu-header,
body.dark .mobile-menu-footer {
  border-color: #2a2a2a;
}

body.dark .mobile-nav-links li a {
  color: #e0e0e0;
  border-color: #252525;
}

body.dark #mobileThemeToggle {
  background: #2a2a2a;
}

body.dark .mobile-menu-close svg line {
  stroke: #e0e0e0;
}