/* 导航栏样式 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-light);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.navbar-brand {
  display: flex;
  align-items: center;
}

.navbar-brand .logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  height: 48px;
}

/* Logo Image Styles */
.navbar-brand .logo {
  height: 48px !important;
  width: auto !important;
  max-width: 180px !important;
  display: block;
}

/* Logo Text Styles */
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-main {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-blue);
  letter-spacing: -0.5px;
}

.logo-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-medium);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-medium);
  font-weight: 500;
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: var(--space-2);
}

.navbar-menu {
  display: flex;
  gap: var(--space-8);
}

.nav-item {
  color: var(--text-dark);
  font-weight: 500;
  padding: var(--space-2) 0;
  position: relative;
  transition: color 0.2s ease-out;
}

.nav-item:hover {
  color: var(--primary-blue);
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-blue);
  transform: scaleX(0);
  transition: transform 0.2s ease-out;
}

.nav-item:hover::after {
  transform: scaleX(1);
}

/* Navbar Actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: var(--space-2);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-dark);
  transition: all 0.2s ease-out;
}

.search-toggle:hover {
  background: var(--bg-light);
  color: var(--primary-blue);
}

.search-toggle svg {
  width: 24px;
  height: 24px;
}

.navbar-toggle {
  display: none;
  padding: var(--space-2);
  background: transparent;
  border: none;
  cursor: pointer;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  position: relative;
  transition: background 0.2s ease-out;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  left: 0;
  transition: transform 0.2s ease-out;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-out;
}

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

.search-container {
  width: 100%;
  max-width: 600px;
  padding: 0 var(--space-6);
  position: relative;
}

.search-close {
  position: absolute;
  top: -60px;
  right: var(--space-6);
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: all 0.2s ease-out;
}

.search-close:hover {
  background: var(--bg-light);
  color: var(--primary-blue);
}

.search-close svg {
  width: 28px;
  height: 28px;
}

.search-form {
  display: flex;
  gap: var(--space-3);
  background: white;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-lg);
}

.search-form:focus-within {
  border-color: var(--primary-blue);
  box-shadow: var(--shadow-focus);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.125rem;
  padding: var(--space-3);
  outline: none;
  color: var(--text-dark);
}

.search-input::placeholder {
  color: var(--text-light);
}

.search-submit {
  width: 48px;
  height: 48px;
  background: var(--primary-blue);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-out;
}

.search-submit:hover {
  background: var(--primary-blue-dark);
}

.search-submit svg {
  width: 24px;
  height: 24px;
}

/* 移动端导航 */
@media (max-width: 767px) {
  .navbar .container {
    height: 56px;
  }
  
  .navbar-brand .logo {
    height: 40px !important;
    max-width: 150px !important;
  }
  
  .brand-tagline {
    display: none;
  }
  
  .navbar-menu {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
  }
  
  .navbar-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .navbar-toggle {
    display: block;
  }
  
  /* 汉堡菜单动画 */
  .navbar-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
  }
  
  .navbar-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg);
    top: 0;
  }
  
  .navbar-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
  }
}
