/* ══════════════════════════════════════════════════════════════════════════
   Nexura V3 – Enterprise SaaS Header, Mega Menu & Mobile Drawer CSS
   ══════════════════════════════════════════════════════════════════════════ */

.v3-topbar {
  background: rgba(7, 13, 24, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  padding: 6px 0;
  position: relative;
  z-index: 1001;
}

.v3-topbar-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.v3-topbar-left, .v3-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.v3-topbar-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: color var(--t-fast);
}

.v3-topbar-link:hover { color: #fff; }

.v3-topbar-tag {
  background: rgba(37, 99, 235, 0.15);
  color: #60A5FA;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.v3-topbar-socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v3-topbar-socials a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: color var(--t-fast);
}

.v3-topbar-socials a:hover { color: #fff; }

/* Free Tools Dropdown Menu */
.v3-dropdown-wrap { position: relative; }
.v3-dropdown-toggle { background: none; border: none; cursor: pointer; display: flex; align-items: center; gap: 4px; }

.v3-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  width: 240px;
  background: #0F172A;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--t-fast);
  z-index: 1050;
}

.v3-dropdown-wrap:hover .v3-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.v3-dropdown-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-blue-light);
  margin-bottom: 8px;
  padding: 0 8px;
}

.v3-dropdown-item {
  display: block;
  padding: 6px 8px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 4px;
  transition: background var(--t-fast);
}

.v3-dropdown-item:hover { background: rgba(255,255,255,0.05); color: #fff; }

/* Main Sticky Header */
.v3-site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  transition: background var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}

.v3-site-header.scrolled {
  background: rgba(11, 18, 32, 0.95);
  border-bottom-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.v3-nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Nav Menu */
.v3-nav-menu { height: 100%; }
.v3-nav-list { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; height: 100%; }
.v3-nav-item { position: relative; height: 100%; display: flex; align-items: center; }

.v3-nav-link {
  font-size: 14px;
  font-weight: 600;
  color: #E2E8F0;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all var(--t-fast);
}

.v3-nav-link:hover, .v3-nav-item:hover > .v3-nav-link {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.v3-caret { font-size: 8px; opacity: 0.7; transition: transform var(--t-fast); }
.v3-nav-item:hover .v3-caret { transform: rotate(180deg); }

/* Mega Menu Panels */
.v3-mega-panel {
  position: absolute;
  top: 100%;
  left: 0;
  background: #0B1220;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--t-base);
  z-index: 1000;
}

.v3-nav-item:hover .v3-mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.v3-mega-services { width: 780px; }
.v3-mega-industries { width: 720px; }
.v3-mega-simple { width: 260px; }

.v3-mega-grid-3col { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.v3-mega-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.v3-mega-column-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-blue-light); margin-bottom: 12px; }

.v3-mega-grid-items { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.v3-mega-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  transition: background var(--t-fast);
}

.v3-mega-item:hover { background: rgba(255, 255, 255, 0.04); }

.v3-item-icon { font-size: 20px; }
.v3-mega-item strong { display: block; font-size: 13px; color: #fff; margin-bottom: 2px; }
.v3-mega-item span { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }

.v3-simple-grid { display: flex; flex-direction: column; gap: 4px; }
.v3-simple-grid a {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
  transition: all var(--t-fast);
}
.v3-simple-grid a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }

/* ── Search Overlay Modal ───────────────────────────────────────────── */
.v3-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.88);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  padding: 100px 16px 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--t-base);
}

.v3-search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.v3-search-dialog {
  width: 100%;
  max-width: 640px;
  background: #121A2E;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 60px rgba(0,0,0,0.8);
  overflow: hidden;
  max-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
}

.v3-search-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.v3-search-head input {
  flex: 1;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 16px;
  color: #fff;
}
.v3-search-head input:focus { outline: none; }

/* ── Mobile Hamburger Button ────────────────────────────────────────── */
.v3-hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 38px;
  height: 38px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  cursor: pointer;
  z-index: 1010;
}

.v3-hamburger-btn span {
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--t-fast);
}

.v3-hamburger-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.v3-hamburger-btn.active span:nth-child(2) { opacity: 0; }
.v3-hamburger-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Slide-Out Drawer Navigation ─────────────────────────────── */
.v3-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 13, 24, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all var(--t-base);
}

.v3-mobile-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.v3-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background: #0B1220;
  border-left: 1px solid var(--border-strong);
  box-shadow: -20px 0 40px rgba(0,0,0,0.8);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.v3-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.v3-drawer-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v3-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.v3-drawer-nav { display: flex; flex-direction: column; gap: 4px; }

.v3-drawer-link {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #E2E8F0;
  text-decoration: none;
  border-radius: 6px;
  transition: background var(--t-fast);
}

.v3-drawer-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.v3-drawer-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-blue-light);
  margin: 16px 0 6px 12px;
}

.v3-drawer-sublink {
  display: block;
  padding: 8px 12px 8px 24px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
  transition: all var(--t-fast);
}

.v3-drawer-sublink:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }

.v3-drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  background: #080D1A;
}

/* ── Media Queries ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .v3-topbar { display: none !important; }
  .v3-topbar-tag { display: none; }
  .v3-nav-menu { display: none; }
  .v3-hamburger-btn { display: flex; }
  .v3-auth-buttons { display: none !important; }
  .v3-cta-btn { display: none !important; }
}

@media (max-width: 640px) {
  .v3-search-dialog { max-width: 100%; border-radius: 0; }
}
