/* ═══════════════════════════════════════════════════════════════
   VNV — CORPORATE NAVIGATION SYSTEM (WHITE THEME)
   Crisp White Glass Header, Pure White Mega-Menu & Mobile Drawer
   Palette: Corporate White (#ffffff) + Slate (#0f172a) + Teal (#0891b2)
═══════════════════════════════════════════════════════════════ */

#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#nav.nav-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 0 rgba(8, 145, 178, 0.15);
  height: 70px;
}

/* ─── BRAND LOGO ─── */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
  z-index: 1002;
}

.logo-mark {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(8, 145, 178, 0.25));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.nav-logo:hover .logo-img {
  filter: drop-shadow(0 4px 14px rgba(8, 145, 178, 0.45));
  transform: scale(1.04);
}

.logo-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.15), rgba(2, 132, 199, 0.15));
  border: 1px solid var(--primary);
  border-radius: 10px;
  color: var(--primary);
  font-weight: 800;
  font-size: 16px;
}

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

.logo-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #0f172a;
  text-transform: uppercase;
}

.logo-amp {
  color: var(--primary);
  font-style: normal;
  margin: 0 1px;
}

.logo-sub {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 600;
  margin-top: 2px;
}

/* ─── DESKTOP NAV MENU ─── */
.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  height: 100%;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.nl-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nl-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 100%;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #334155;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  white-space: nowrap;
  position: relative;
  transition: color 0.2s ease;
}

.nl-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nl-item:hover > .nl-link,
.nl-link.is-current {
  color: var(--primary-dk);
}

.nl-item:hover > .nl-link::after,
.nl-link.is-current::after {
  width: calc(100% - 20px);
}

.nl-caret {
  width: 9px;
  height: 6px;
  opacity: 0.6;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nl-item:hover .nl-caret {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--primary);
}

/* ─── STANDARD DROPDOWN ─── */
.nl-dropdown {
  position: absolute;
  top: calc(100% - 4px);
  left: 0;
  min-width: 290px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nl-item:hover .nl-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dd-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-dk);
  font-weight: 800;
  padding: 6px 12px 4px;
}

.dd-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.18s ease;
  text-decoration: none;
}

.dd-link .dd-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  transition: color 0.18s ease;
}

.dd-link .dd-sub {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.35;
  transition: color 0.18s ease;
}

.dd-link:hover {
  background: rgba(8, 145, 178, 0.08);
  transform: translateX(3px);
}

.dd-link:hover .dd-title {
  color: var(--primary-dk);
}

.dd-link:hover .dd-sub {
  color: #334155;
}

/* ─── MEGA MENU (ECOSYSTEM: WHAT WE DO + AREA OF WORK) ─── */
.nl-mega {
  position: absolute;
  top: calc(100% - 4px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 860px;
  max-width: 95vw;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.14), 0 4px 16px rgba(0, 0, 0, 0.05);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.nl-item.has-mega:hover .nl-mega {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-ecosystem-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.mega-col {
  display: flex;
  flex-direction: column;
}

.mega-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.mega-col-badge {
  font-size: 9px;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: var(--primary-dk);
  background: rgba(8, 145, 178, 0.1);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.mega-col-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #0f172a;
  text-transform: uppercase;
}

.mega-col-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mega-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  text-decoration: none;
}

.mega-item:hover {
  background: rgba(8, 145, 178, 0.08);
  border-color: rgba(8, 145, 178, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.08);
}

.mi-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #e0f2fe;
  border: 1px solid rgba(8, 145, 178, 0.2);
  color: var(--primary-dk);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mi-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mi-name {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.mi-desc {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.35;
}

.mega-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mega-footer a {
  font-size: 12.5px;
  color: var(--primary-dk);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mega-footer a:hover {
  color: var(--accent-blue);
}

/* ─── NAV ACTIONS (Search & CTA) ─── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.nav-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  padding: 7px 14px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-search-btn:hover {
  background: #ffffff;
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.15);
}

.nav-search-key {
  font-size: 10px;
  padding: 2px 6px;
  background: #e2e8f0;
  border-radius: 4px;
  color: #64748b;
  font-weight: 700;
}

.nav-cta-btn {
  padding: 9px 20px;
  font-size: 12px;
  letter-spacing: 0.08em;
  font-weight: 700;
}

/* ─── MOBILE HAMBURGER ─── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 19px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1002;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background: #0f172a;
  border-radius: 2px;
  transition: all 0.25s ease;
}

.nav-hamburger.is-active .hamburger-line:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
  background: var(--primary);
}
.nav-hamburger.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
  background: var(--primary);
}

/* ─── MOBILE DRAWER MENU ─── */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 88vw;
  max-width: 400px;
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid #cbd5e1;
  z-index: 1001;
  padding: 85px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.is-open {
  right: 0;
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.mobile-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.mob-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--primary-dk);
  text-transform: uppercase;
  margin-top: 14px;
  margin-bottom: 2px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
}

.mob-link {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  padding: 7px 0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.mob-link.mob-sub {
  font-size: 13.5px;
  font-weight: 500;
  color: #475569;
  padding-left: 12px;
  border-left: 2px solid #e2e8f0;
}

.mob-link:hover, .mob-link.is-current {
  color: var(--primary-dk);
  border-left-color: var(--primary);
}

/* ─── RESPONSIVE BREAKPOINTS ─── */
@media (max-width: 1200px) {
  #nav { padding: 0 24px; }
  .nl-link { padding: 0 10px; font-size: 12.5px; }
  .nl-mega { width: 780px; }
}

@media (max-width: 1040px) {
  .nav-list, .nav-actions .nav-search-btn, .nav-actions .nav-cta-btn { display: none !important; }
  .nav-hamburger { display: flex; }
  #nav { padding: 0 20px; }
}

@media (max-width: 500px) {
  #nav {
    padding: 0 16px;
    height: 64px;
  }
  .nav-logo {
    gap: 10px;
  }
  .logo-mark {
    width: 36px;
    height: 36px;
  }
  .logo-name {
    font-size: 13px;
  }
  .logo-sub {
    font-size: 8px;
    letter-spacing: 0.12em;
  }
  .nav-hamburger {
    width: 24px;
    height: 18px;
  }
  .mobile-drawer {
    width: 90vw;
    padding: 75px 20px 32px;
  }
}

