/* Header 组件样式 - 对比度增强版 */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0a0f1f 0%, #111827 100%); /* 加深渐变: #0f172a -> #0a0f1f */
    border-bottom: 3px solid #1e40af; /* 加粗边框: 1px -> 3px, 加深颜色: #334155 -> #1e40af */
    z-index: 1000;
    height: 60px;
    margin: 0;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25); /* 加深阴影 */
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px; /* 增大内边距: 20px -> 24px */
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.navbar-logo {
    font-size: 1.6rem; /* 增大字体: 1.5rem -> 1.6rem */
    font-weight: 800; /* 增加字重: bold -> 800 */
    color: #ffffff; /* 纯白色 */
    text-decoration: none;
    display: flex;
    align-items: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* 添加文字阴影 */
}

.logo-image {
    height: 44px; /* 增大: 40px -> 44px */
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); /* 添加阴影 */
}

.logo-text {
    color: #ffffff; /* 纯白色 */
    margin-left: 10px; /* 增大间距: 8px -> 10px */
    font-weight: 800; /* 增加字重 */
    letter-spacing: -0.5px; /* 优化字母间距 */
}

/* 桌面端菜单 */
.navbar-menu {
    display: flex;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0;
}

/* 桌面端导航链接 */
.nav-desktop {
    display: flex;
    gap: 2.5rem; /* 增大间距: 2rem -> 2.5rem */
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-desktop li {
    display: inline-block;
}

.nav-desktop a {
    color: #ffffff !important; /* 改为纯白色: #f8fafc -> #ffffff */
    text-decoration: none;
    font-size: 1rem; /* 增大字体: 0.95rem -> 1rem */
    padding: 8px 0; /* 增大内边距: 5px 0 -> 8px 0 */
    position: relative;
    font-weight: 600; /* 增加字重 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* 添加文字阴影 */
    letter-spacing: 0.3px; /* 添加字母间距 */
}

.nav-desktop a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px; /* 加粗下划线: 2px -> 3px */
    background: #3b82f6; /* 蓝色下划线 */
    transition: width 0.3s;
    border-radius: 2px; /* 添加圆角 */
}

.nav-desktop a:hover::after {
    width: 100%;
}

.nav-desktop a:hover {
    color: #3b82f6 !important; /* 悬停时改为蓝色 */
    text-shadow: 0 1px 3px rgba(59, 130, 246, 0.4); /* 添加蓝色文字阴影 */
}

/* 当前菜单项用纯白色 */
.nav-desktop .current-menu-item a {
    color: #ffffff !important; /* 纯白色 */
    font-weight: 700; /* 增加字重: bold -> 700 */
    text-shadow: 0 1px 3px rgba(59, 130, 246, 0.5); /* 添加蓝色阴影 */
}

.nav-desktop .current-menu-item a::after {
    width: 100%;
    background: #3b82f6; /* 当前项下划线 */
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.4); /* 添加阴影 */
}

/* CTA按钮 - 增强对比度 */
.navbar-button {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important; /* 加深渐变: #2563eb -> #1d4ed8 */
    color: #ffffff !important; /* 纯白色文字 */
    padding: 12px 28px !important; /* 增大内边距: 10px 24px -> 12px 28px */
    border-radius: 10px; /* 增大圆角: 8px -> 10px */
    text-decoration: none;
    font-weight: 700; /* 增加字重: bold -> 700 */
    border: 3px solid #1d4ed8 !important; /* 加粗边框: 2px -> 3px */
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.4); /* 加深阴影: 0.2 -> 0.4 */
    transition: all 0.2s ease;
    text-transform: uppercase; /* 改为大写字母 */
    letter-spacing: 0.5px; /* 添加字母间距 */
    position: relative;
    overflow: hidden;
}

.navbar-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.navbar-button:hover::before {
    left: 100%;
}

.navbar-button:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%) !important; /* 更深渐变 */
    border-color: #1e3a8a !important; /* 边框颜色加深 */
    transform: translateY(-2px); /* 增大上移距离: -1px -> -2px */
    box-shadow: 0 8px 20px rgba(29, 78, 216, 0.5); /* 加深阴影 */
}

.navbar-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.4);
}

/* 移动端菜单开关 */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 6px; /* 增大间距: 5px -> 6px */
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.3); /* 添加边框 */
    border-radius: 6px;
    cursor: pointer;
    padding: 10px 8px; /* 增大内边距: 5px -> 10px 8px */
    transition: all 0.3s ease;
}

.navbar-toggle:hover {
    background: rgba(59, 130, 246, 0.1); /* 添加悬停背景 */
    border-color: rgba(59, 130, 246, 0.5); /* 悬停边框颜色 */
}

.navbar-toggle span {
    width: 28px; /* 增大: 25px -> 28px */
    height: 3px;
    background: #ffffff; /* 白色线条 */
    display: block;
    transition: 0.3s;
    border-radius: 2px; /* 添加圆角 */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* 添加阴影 */
}

.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px); /* 调整位置 */
    background: #3b82f6; /* 激活时改为蓝色 */
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px); /* 调整位置 */
    background: #3b82f6; /* 激活时改为蓝色 */
}

/* 移动端菜单 */
.navbar-mobile {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0a0f1f; /* 加深背景: #1e293b -> #0a0f1f */
    z-index: 999;
    display: none;
    overflow-y: auto;
    border-top: 3px solid #1e40af; /* 添加上边框 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); /* 添加阴影 */
}

.navbar-mobile.active {
    display: block;
    animation: slideDown 0.3s ease; /* 添加动画 */
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-content {
    padding: 24px; /* 增大内边距: 20px -> 24px */
}

/* 移动端导航链接 */
.nav-mobile {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-mobile li {
    display: block;
    border-bottom: 2px solid #1e293b; /* 加粗边框: 1px -> 2px, 加深颜色: #334155 -> #1e293b */
}

.nav-mobile li:last-child {
    border-bottom: none;
}

.nav-mobile a {
    color: #ffffff; /* 纯白色文字 */
    text-decoration: none;
    font-size: 1.2rem; /* 增大字体: 1.1rem -> 1.2rem */
    padding: 18px 16px; /* 增大内边距: 15px -> 18px 16px */
    display: block;
    font-weight: 600; /* 增加字重 */
    transition: all 0.2s ease;
    border-radius: 8px; /* 添加圆角 */
    margin: 4px 0; /* 添加外边距 */
    border: 1px solid transparent; /* 添加透明边框 */
}

.nav-mobile a:hover {
    background: rgba(59, 130, 246, 0.2); /* 加深悬停背景: #334155 -> rgba(59, 130, 246, 0.2) */
    color: #3b82f6; /* 悬停时改为蓝色 */
    border-color: rgba(59, 130, 246, 0.3); /* 添加边框 */
    transform: translateX(4px); /* 添加移动效果 */
}

.nav-mobile .current-menu-item a {
    color: #ffffff; /* 纯白色 */
    font-weight: 700; /* 增加字重: bold -> 700 */
    background: rgba(59, 130, 246, 0.25); /* 加深背景: 0.1 -> 0.25 */
    border-left: 4px solid #3b82f6; /* 添加左边框 */
    border-radius: 8px; /* 调整圆角 */
    text-shadow: 0 1px 3px rgba(59, 130, 246, 0.5); /* 添加文字阴影 */
}

.mobile-button {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%); /* 加深渐变: #3b82f6 -> #1d4ed8 */
    color: #ffffff; /* 纯白色文字 */
    padding: 18px 24px; /* 增大内边距: 15px -> 18px 24px */
    border-radius: 10px; /* 增大圆角: 6px -> 10px */
    text-decoration: none;
    font-weight: 700; /* 增加字重: bold -> 700 */
    text-align: center;
    margin-top: 24px; /* 增大间距: 20px -> 24px */
    display: block;
    border: 3px solid #1d4ed8; /* 添加边框 */
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.4); /* 添加阴影 */
    transition: all 0.3s ease;
    text-transform: uppercase; /* 改为大写字母 */
    letter-spacing: 0.5px; /* 添加字母间距 */
}

.mobile-button:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%); /* 更深渐变: #2563eb -> #1e40af */
    border-color: #1e3a8a;
    transform: translateY(-2px); /* 添加上移效果 */
    box-shadow: 0 8px 20px rgba(29, 78, 216, 0.5); /* 加深阴影 */
}

/* Body padding */
body {
    padding-top: 70px;
}

/* 响应式 */
@media (max-width: 768px) {
    .navbar-menu,
    .navbar-button {
        display: none;
    }
    
    .navbar-toggle {
        display: flex;
    }
    
    .navbar-container {
        padding: 0 18px; /* 调整内边距: 15px -> 18px */
    }
    
    .navbar-logo {
        font-size: 1.5rem; /* 调整字体大小 */
    }
    
    .logo-image {
        height: 40px; /* 调整大小 */
    }
    
    .logo-text {
        font-size: 1.5rem; /* 调整字体大小 */
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .navbar {
        background: #000000;
        border-bottom: 3px solid #ffffff;
    }
    
    .navbar-logo,
    .nav-desktop a,
    .nav-mobile a,
    .logo-text {
        color: #ffffff !important;
        text-shadow: 0 2px 4px #000000;
    }
    
    .navbar-button,
    .mobile-button {
        background: #000000 !important;
        color: #ffffff !important;
        border: 3px solid #ffffff !important;
    }
    
    .navbar-toggle {
        border: 2px solid #ffffff;
    }
    
    .navbar-toggle span {
        background: #ffffff;
    }
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    .navbar-button,
    .nav-desktop a,
    .nav-mobile a,
    .navbar-toggle,
    .mobile-button {
        transition: none !important;
        transform: none !important;
    }
    
    .navbar-button::before {
        display: none;
    }
    
    @keyframes slideDown {
        from { opacity: 1; transform: none; }
        to { opacity: 1; transform: none; }
    }
}

/* 打印样式 */
@media print {
    .navbar {
        position: static;
        background: none !important;
        border-bottom: 2px solid #000000;
        box-shadow: none;
        height: auto;
    }
    
    .navbar-logo,
    .logo-text {
        color: #000000 !important;
    }
    
    .navbar-menu {
        display: none;
    }
    
    body {
        padding-top: 0;
    }
}