/* Force scrollbar to prevent layout shift */
html {
  overflow-y: scroll !important;
}

/* Shared Navigation Styles */
nav, .nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: rgba(255,255,255,0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(0,0,0,0.05) !important;
  z-index: 1000 !important;
  padding: 0 5vw !important;
}

.nav-inner {
  max-width: 1400px !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 72px !important;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-mark {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #0ea5e9 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 16px;
}

.logo-text {
  font-weight: 700;
  font-size: 18px;
  color: #0f172a;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: #1e293b;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
}

.nav-links a:hover {
  color: #3b82f6;
}

.nav-dropdown {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.nav-dropdown svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.nav-links > li {
  position: relative;
}

.nav-links li:hover .nav-dropdown svg {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.08);
  padding: 12px;
  min-width: 680px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}

.nav-links li:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  transition: background 0.2s;
}

.dropdown-menu a:hover {
  background: #f8fafc;
}

.dropdown-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropdown-icon svg {
  width: 16px;
  height: 16px;
  color: white;
}

.dropdown-icon.flagship { background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%); }
.dropdown-icon.manufacturing { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.dropdown-icon.business { background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%); }
.dropdown-icon.iot { background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%); }
.dropdown-icon.healthcare { background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%); }

.dropdown-text {
  flex: 1;
}

.dropdown-title {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 12px;
  color: #0f172a;
  display: block;
}

.dropdown-desc {
  font-size: 11px;
  color: #64748b;
  display: block;
}

.dropdown-divider {
  height: 1px;
  background: rgba(0,0,0,0.08);
  margin: 8px 0;
}

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

.dropdown-category {
  padding: 8px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #3b82f6;
  grid-column: 1 / -1;
}

.dropdown-category:not(:first-child) {
  margin-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 12px;
}

/* Services dropdown - narrower with single column */
.dropdown-menu-services {
  min-width: 320px;
}

.dropdown-menu-services .dropdown-grid {
  grid-template-columns: 1fr;
}

.dropdown-all {
  text-align: center;
  padding: 10px 12px !important;
  justify-content: center !important;
}

.dropdown-all span {
  font-weight: 600;
  color: #3b82f6;
  font-size: 14px;
}

.nav-cta {
  background: #0f172a;
  color: white !important;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.nav-cta:hover {
  background: #1e40af;
  color: white !important;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
  stroke: #0f172a;
}

@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }
  .nav-cta {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
}

/* Custom scrollbar for dropdown */
.dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
  background: transparent;
}

.dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.3);
}

/* ===== Mobile Navigation Overlay ===== */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.98);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow-y: auto;
}

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

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 5%;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav-header .logo {
  color: white;
}

.mobile-nav-header .logo-text {
  color: white;
}

.mobile-nav-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-nav-close svg {
  width: 28px;
  height: 28px;
  stroke: white;
}

.mobile-nav-links {
  list-style: none;
  padding: 20px 5%;
}

.mobile-nav-links > li {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav-links > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  color: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
}

.mobile-nav-links > li > a svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s;
}

.mobile-nav-links > li.open > a svg {
  transform: rotate(180deg);
}

.mobile-submenu {
  display: none;
  padding: 0 0 16px 0;
}

.mobile-nav-links > li.open .mobile-submenu {
  display: block;
}

.mobile-submenu-category {
  padding: 12px 0 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #3b82f6;
}

.mobile-submenu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 15px;
}

.mobile-submenu a:hover {
  color: white;
}

.mobile-submenu .dropdown-icon {
  width: 32px;
  height: 32px;
}

.mobile-submenu .dropdown-icon svg {
  width: 16px;
  height: 16px;
}

.mobile-nav-cta {
  display: block;
  margin: 20px 5%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #0ea5e9 100%);
  color: white;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  border-radius: 10px;
}

.mobile-nav-cta:hover {
  opacity: 0.9;
}
