/* ===========================================
   统一导航栏组件样式
   甘肃仲安建筑 | AI赋能·智慧智造
   设计风格: 深色科技 · 玻璃拟态
   适用于所有页面统一导航
   =========================================== */

.unified-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.unified-nav.scrolled {
  background: rgba(10, 14, 26, 0.98);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.unified-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

/* Logo / Brand */
.unified-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #e2e8f0;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.unified-nav-brand .brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
}

.unified-nav-brand .brand-text {
  background: linear-gradient(135deg, #60a5fa, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Navigation Links */
.unified-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.unified-nav-links li {
  margin: 0;
  padding: 0;
}

.unified-nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.unified-nav-links a:hover {
  color: #e2e8f0;
  background: rgba(59, 130, 246, 0.08);
}

.unified-nav-links a.active {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.12);
}

.unified-nav-links a .nav-icon {
  font-size: 1rem;
}

/* Special CTA button */
.unified-nav-links a.nav-cta {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff !important;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 8px;
  margin-left: 12px;
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.3);
}

.unified-nav-links a.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
}

/* Hamburger Menu Button */
.unified-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #e2e8f0;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.25s ease;
  z-index: 10001;
}

.unified-nav-toggle:hover {
  background: rgba(59, 130, 246, 0.1);
}

/* Hamburger icon bars */
.unified-nav-toggle .hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: #e2e8f0;
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.unified-nav-toggle.open .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.unified-nav-toggle.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.unified-nav-toggle.open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Overlay */
.unified-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.unified-nav-overlay.open {
  display: block;
  opacity: 1;
}

/* ========== 响应式: 移动端 (max-width 768px) ========== */
@media (max-width: 768px) {
  .unified-nav-inner {
    height: 56px;
    padding: 0 16px;
  }

  .unified-nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
  }

  .unified-nav-links {
    display: none;
    position: fixed;
    top: 56px;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: calc(100vh - 56px);
    flex-direction: column;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-left: 1px solid rgba(59, 130, 246, 0.15);
    padding: 20px 16px;
    gap: 4px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
    animation: slideInRight 0.3s ease;
  }

  .unified-nav-links.open {
    display: flex;
  }

  .unified-nav-links a {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  .unified-nav-links a.nav-cta {
    margin-left: 0;
    margin-top: 8px;
    justify-content: center;
    padding: 12px 16px;
  }

  .unified-nav-overlay.open {
    display: block;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 页面顶部留白，避免被固定导航遮挡 */
body.has-unified-nav {
  padding-top: 60px;
}

@media (max-width: 768px) {
  body.has-unified-nav {
    padding-top: 56px;
  }
}
