/* =========================================================
   components/navbar.css —— 页眉（导航栏 + 移动端菜单）样式
   ========================================================= */
/* ===== 导航栏 ===== */
#navbar {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}
/* 品牌 Logo：按图片原始比例展示，随导航栏高度自适应 */
#navbar .navbar-brand {
    text-decoration: none;
}
#navbar .navbar-logo {
    height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
}
#navbar .nav-link {
    color: #334155;
    font-weight: 500;
    transition: all 0.25s ease;
    position: relative;
    padding-bottom: 4px;
}
#navbar .nav-link:hover {
    color: #3A70EE;
}
#navbar .nav-link.active {
    color: #3A70EE;
    font-weight: 600;
}
#navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2.5px;
    background: linear-gradient(90deg, #3A70EE, #6366F1);
    border-radius: 2px;
}

/* ===== 移动端汉堡按钮 ===== */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(58, 112, 238, 0.18);
    border-radius: 12px;
    background: rgba(58, 112, 238, 0.04);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease;
}
.nav-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: #3A70EE;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}
.nav-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}
.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== 移动端折叠下拉菜单 ===== */
.nav-mobile-panel {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.10);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.32s ease, opacity 0.25s ease, visibility 0.25s ease;
}
.nav-mobile-panel.open {
    max-height: 80vh;
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
}
.nav-mobile-inner {
    display: flex;
    flex-direction: column;
    padding: 12px 20px 20px;
}
.nav-mobile-link {
    display: block;
    padding: 14px 8px;
    font-size: 16px;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: color 0.2s ease;
}
.nav-mobile-link:hover,
.nav-mobile-link.active {
    color: #3A70EE;
}
.nav-mobile-actions {
    display: flex;
    flex-direction: column;
}
/* 免费试用/咨询合作：与普通导航链接（联系我们等）保持一致样式 */
.nav-mobile-action {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    font-family: inherit;
}
.nav-mobile-btn {
    width: 100%;
    padding: 13px 0;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}
.nav-mobile-btn-outline {
    background: transparent;
    border: 1px solid rgba(58, 112, 238, 0.3);
    color: #3A70EE;
}
.nav-mobile-btn-solid {
    background: linear-gradient(135deg, #3A70EE, #6366F1);
    color: #fff;
}
.nav-mobile-overlay {
    position: fixed;
    inset: 80px 0 0 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 40;
    display: none;
}
.nav-mobile-overlay.show {
    display: block;
}

/* 在窄屏（<=1024px）隐藏 PC 导航、显示汉堡按钮 */
@media (max-width: 1024px) {
    .nav-hamburger {
        display: flex;
    }
    #navbar .hidden.lg\:flex {
        display: none !important;
    }
    .nav-cta-trial,
    .nav-cta-business {
        display: none !important;
    }
    /* 导航栏整体高度 80px -> 56px，内部内容同步缩小 */
    #navbar .h-20 {
        height: 56px !important;
    }
    #navbar .navbar-logo {
        height: 30px;
    }
    .nav-hamburger {
        width: 36px;
        height: 36px;
        gap: 4px;
        border-radius: 10px;
    }
    .nav-hamburger span {
        width: 18px;
    }
    .nav-hamburger.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    .nav-hamburger.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
    /* 下拉菜单与遮罩起始位置同步到 56px */
    .nav-mobile-panel {
        top: 56px;
    }
    .nav-mobile-overlay {
        inset: 56px 0 0 0;
    }
    /* 为固定导航预留的顶部空间同步缩小 */
    main.page-body {
        padding-top: 56px;
    }
}
