/* ===== 头部导航样式 ===== */

/* 顶部导航栏 */
.navbar {
  background: var(--surface);
  color: var(--text);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.navbar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

.navbar-bottom-bg {
  display: none;
}

/* Logo区域 */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-logo-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  min-width: 180px;
  max-width: 380px;
  flex: 0 1 auto;
}

.nav-logo-title {
  overflow: hidden;
  position: relative;
  height: 38px;
}

.nav-logo-title-inner {
  display: inline-block;
  white-space: nowrap;
}

.nav-logo-title-inner .marquee-item {
  display: inline;
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 38px;
}

.nav-logo-title-inner .marquee-item em {
  font-style: normal;
  color: var(--accent);
}

.nav-logo-marquee {
  overflow: hidden;
  position: relative;
  height: 20px;
}

.marquee-text-inner {
  display: inline-block;
  white-space: nowrap;
  animation: marquee-text-scroll 25s linear infinite;
}

.marquee-text-inner .marquee-item {
  display: inline;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 20px;
}

@keyframes marquee-text-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* 操作区域 */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.navbar-actions a:not(.login-link):not(.old-version) {
  color: var(--text-secondary);
}

.navbar-actions a:not(.login-link):not(.old-version):hover {
  color: var(--primary);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.lang-switch svg {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

.lang-btn {
  cursor: pointer;
  transition: color 0.2s;
  opacity: 0.7;
}

.lang-btn:hover {
  opacity: 1;
}

.lang-btn.active {
  opacity: 1;
  font-weight: 600;
}

.login-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid #1E60AC;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1E60AC;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.login-link:hover {
  background: rgba(30, 96, 172, 0.08);
}

.login-link.primary,
.login-link.accent {
  background: transparent;
  border-color: #1E60AC;
  color: #1E60AC;
}

.login-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* 登录注册组合按钮 */
.login-register-group {
  display: flex;
  align-items: center;
  height: 36px;
  border: 1px solid #1E60AC;
  border-radius: 4px;
  background: transparent;
  overflow: hidden;
}

.login-register-group .login-link {
  border: none;
  border-radius: 0;
  padding: 0 12px;
  height: 100%;
  background: transparent;
}

/* 移除登录注册组合按钮内的 hover 效果 */
.login-register-group .login-link:hover {
  background: transparent;
}

.login-register-group .divider-text {
  color: #1E60AC;
  font-size: 0.75rem;
  padding: 0 2px;
}

.divider-text {
  cursor: default;
}

.old-version {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  font-size: 0.75rem;
  color: #1E60AC;
  background: transparent;
  border: 1px solid #1E60AC;
  border-radius: 4px;
  text-decoration: none;
}

/* ===== 服务导航栏 ===== */
.navbar-services {
  background: #1E60AC;
  position: fixed;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.services-nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 80px;
  gap: 0;
}

.services-nav-item {
  display: block;
  padding: 0 20px;
  font-size: 1.0625rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  line-height: 80px;
  transition: all 0.15s;
  position: relative;
}

.services-nav-item:hover,
.services-nav-item.active {
  color: #fff;
  background-color: rgba(255,255,255,0.1);
}

/* Dropdown menu wrapper */
.nav-item-with-dropdown {
  position: relative;
}

.nav-item-with-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  padding: 12px 0;
  min-width: 180px;
  z-index: 1001;
}

.nav-item-with-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px;
  color: #333;
  text-decoration: none;
}

.dropdown-menu-item img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin-bottom: 8px;
}

.dropdown-menu-item span {
  font-size: 0.8125rem;
  color: #333;
}

.services-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  width: 60%;
  height: 3px;
  background-color: var(--accent);
  border-radius: 2px 2px 0 0;
}