/* ========================================
   NAVBAR & MEGA MENU — LIGHT PREMIUM THEME
   ======================================== */

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 72px;
  display: flex;
  align-items: center;
  background: rgba(10, 10, 10, 0.85); /* Dark frosted glass */
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 4px 30px rgba(107, 255, 46, 0.08); /* Faint neon glow when scrolling */
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* ─── LOGO ─── */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

/* ─── DESKTOP NAV ─── */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 16px;
  width: 0;
  height: 2px;
  background: var(--accent-orange);
  transition: width var(--transition);
  border-radius: 2px;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.nav-link.active {
  color: var(--accent-orange);
  font-weight: 600;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: calc(100% - 32px);
}

.nav-link.active::after {
  background: var(--accent-orange);
}

.nav-chevron {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
  opacity: 0.5;
}

.nav-item:hover .nav-chevron,
.nav-item.open .nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* ─── MEGA MENU ─── */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 800px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  padding-top: 38px;
  margin-top: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 20px 60px rgba(0,0,0,0.10), 0 4px 16px rgba(0,0,0,0.06);
}

/* Bridge: fills the gap so hover never breaks */
.mega-menu::after {
  content: '';
  position: absolute;
  top: -16px;
  left: 0; right: 0;
  height: 16px;
  background: transparent;
}

/* Orange accent bar on top */
.mega-menu::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6BFF2E, #2563EB);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  z-index: 1;
}

.nav-item:hover .mega-menu,
.nav-item:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}

.mega-menu-header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mega-menu-header-left .mono {
  color: var(--text-muted);
  font-size: 0.67rem;
}

.mega-menu-header-left p {
  font-size: 0.82rem;
  margin-top: 4px;
  max-width: none;
}

.mega-menu-header-line {
  width: 40px;
  height: 3px;
  background: #6BFF2E;
  margin-top: 6px;
  border-radius: 2px;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

/* ─── MEGA ITEM CARD ─── */
.mega-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  background: var(--bg-card);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

/* Shimmer overlay on hover */
.mega-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(120deg, transparent, rgba(107,255,46,0.06), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.mega-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  border-color: #6BFF2E;
}

.mega-item:hover::after { opacity: 1; }

/* ─── ICON ─── */
.mega-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(107,255,46,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-orange);
  margin-bottom: 4px;
  transition: background 0.25s ease, color 0.25s ease;
  flex-shrink: 0;
  border: 1px solid rgba(107,255,46,0.12);
}

.mega-item-icon svg {
  width: 18px;
  height: 18px;
  transition: stroke 0.25s ease;
}

.mega-item:hover .mega-item-icon {
  background: #6BFF2E;
  border-color: #6BFF2E;
  color: #0A0A0A;
}

.mega-item:hover .mega-item-icon svg {
  stroke: #0A0A0A;
}

/* ─── FEATURED CARD (Analytics) ─── */
.mega-item.featured {
  background: linear-gradient(135deg, rgba(107, 255, 46, 0.05), transparent);
  border: 1px solid rgba(107, 255, 46, 0.2);
  grid-row: span 2;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.mega-item.featured:hover {
  background: linear-gradient(135deg, rgba(107, 255, 46, 0.1), rgba(107, 255, 46, 0.02));
  border-color: var(--accent-orange); /* currently mapped to neon green */
}

.mega-item-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #6BFF2E;
  color: #FFFFFF;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 7px;
  border-radius: 5px;
  text-transform: uppercase;
}

/* ─── TYPOGRAPHY ─── */
.mega-item-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-heading);
  line-height: 1.25;
  margin-bottom: 1px;
}

.mega-item-desc {
  font-size: 0.73rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ─── NAV CTA ─── */
.nav-cta .btn-primary {
  padding: 10px 20px;
  font-size: 0.87rem;
}

/* ─── HAMBURGER ─── */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.nav-toggle:hover { background: var(--bg-secondary); }

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── MOBILE DRAWER ─── */
.mobile-drawer {
  position: fixed;
  top: 72px; left: 0; right: 0; bottom: 0;
  background: var(--bg-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 999;
  border-top: 1px solid var(--border-subtle);
}

.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-link {
  display: block;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mobile-link:hover,
.mobile-link.active {
  background: var(--bg-secondary);
  color: var(--accent-orange);
}

.mobile-services-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  background: none;
  font-family: var(--font-body);
}

.mobile-services-toggle:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.mobile-chevron {
  transition: transform 0.3s;
  opacity: 0.5;
}

.mobile-services-list {
  display: none;
  padding: 6px 0 6px 16px;
  flex-direction: column;
  gap: 2px;
  border-left: 2px solid var(--border-subtle);
  margin-left: 16px;
}

.mobile-services-list.open {
  display: flex;
}

.mobile-services-list a {
  display: block;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mobile-services-list a:hover {
  color: var(--accent-orange);
  background: rgba(107,255,46,0.05);
}

.mobile-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .nav-menu, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 640px) {
  .mega-menu { width: calc(100vw - 48px); }
}
