/* ===== 导航栏容器 ===== */
.navbar {
    position: fixed;
    top: -80px;                /* 初始隐藏 */
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    z-index: 999;
    transition: top 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

/* 显示状态 */
.navbar.show {
    top: 0;
}

/* 滚动时增强阴影 */
.navbar.scrolled {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
}

/* ===== Logo ===== */
.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.navbar-logo-img {
    height: 38px;
    width: auto;
}

.navbar-logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.5px;
}

/* ===== 导航菜单 ===== */
.navbar-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.navbar-links a {
    text-decoration: none;
    color: #334155;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.25s;
    position: relative;
}

.navbar-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2.5px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.navbar-links a:hover {
    color: #4f46e5;
}

.navbar-links a:hover::after {
    width: 100%;
}

/* CTA 按钮 */
.navbar-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff !important;
    padding: 8px 22px;
    border-radius: 30px;
    font-weight: 600;
    transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.30);
}

.navbar-btn::after {
    display: none !important;
}

.navbar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.40);
    color: #fff !important;
}

/* ===== 移动端汉堡菜单 ===== */
.navbar-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}

.navbar-hamburger span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: #1e293b;
    border-radius: 4px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 汉堡菜单激活态 — 第一横旋转为交叉 */
.navbar-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

/* 汉堡菜单激活态 — 中间横条消失 */
.navbar-hamburger.active span:nth-child(2) {
    opacity: 0;
}

/* 汉堡菜单激活态 — 第三横反向旋转 */
.navbar-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;

        top: -64px;
    }

    .navbar-links {
        position: fixed;
        top: 50px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 24px 20px 32px;
        gap: 18px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
        transform: translateY(-120%);
        transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
        border-bottom: 1px solid #f1f5f9;
    }

    .navbar-links.open {
        transform: translateY(0);
        top: 64px;
    }

    .navbar-hamburger {
        display: flex;
    }

    .navbar-btn {
        align-self: center;
        margin-top: 6px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0 16px;
    }

    .navbar-logo-img {
        height: 32px;
    }

    .navbar-logo-text {
        font-size: 18px;
    }
}
