/* ==========================================
   SOFTEDGE SOLUTION — NAVBAR
   ========================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  padding: 0 32px;
  height: 72px;
  display: flex;
  align-items: center;
  transition: background var(--t-slow), box-shadow var(--t-slow), backdrop-filter var(--t-slow);
  background: transparent;
}

/* Scrolled state */
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 1px 0 var(--border), 0 4px 24px rgba(0,0,0,0.06);
}

.navbar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* ── Logo ── */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
  transition: transform var(--t-bounce);
}

.navbar-logo:hover .logo-mark { transform: rotate(-8deg) scale(1.05); }

.logo-mark svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-sub {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Nav Menu ── */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: all var(--t);
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover,
.nav-item:hover > .nav-link {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-link .chevron {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: transform var(--t);
}

.nav-item:hover > .nav-link .chevron {
  transform: rotate(180deg);
}

/* ── Dropdown ── */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 220px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  z-index: 200;
  list-style: none;
}

.nav-item:hover > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 0.855rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 9px;
  transition: all var(--t);
}

.nav-dropdown li a:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.nav-dropdown li a svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-dropdown li a:hover svg { opacity: 1; }

/* ── Mega dropdown ── */
.nav-mega {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 680px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  z-index: 200;
}

.nav-item:hover > .nav-mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mega-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  padding: 4px 10px 8px;
  margin-bottom: 4px;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.mega-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: all var(--t);
  cursor: pointer;
}

.mega-item:hover { background: var(--accent-light); }

.mega-item-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-soft);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mega-item-icon svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  stroke: currentColor;
  fill: none;
}

.mega-item:hover .mega-item-icon { background: rgba(37,99,235,0.15); }

.mega-item-text strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.mega-item-text span {
  font-size: 0.72rem;
  color: var(--text-light);
}

/* ── Navbar CTA ── */
.navbar-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.navbar-phone {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--t);
}

.navbar-phone:hover { color: var(--accent); background: var(--accent-light); }

.navbar-phone svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

/* ── Hamburger ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--t);
}

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

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

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

/* ── Mobile Menu ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow-y: auto;
  z-index: calc(var(--z-sticky) - 1);
  padding: 24px 24px 48px;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
  border-top: 1px solid var(--border);
}

.mobile-menu.open {
  display: block;
  transform: translateX(0);
}

.mobile-nav-item {
  border-bottom: 1px solid var(--border-light);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.mobile-nav-link .chevron {
  width: 18px;
  height: 18px;
  stroke: var(--text-secondary);
  fill: none;
  transition: transform var(--t);
}

.mobile-nav-link.open .chevron { transform: rotate(180deg); }

.mobile-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
}

.mobile-sub.open { max-height: 500px; }

.mobile-sub a {
  display: block;
  padding: 10px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
}

.mobile-sub a:hover { color: var(--accent); background: var(--accent-light); }

.mobile-cta {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-cta .btn { justify-content: center; width: 100%; }
