/* ============================================================
   navbar.css — 导航栏样式（ThinkCMF 版）
   原 Vue 3 项目：src/components/navbar/Navbar.vue <style scoped>
   ============================================================ */

/* ===== 基础样式 ===== */
.navbar {
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 70px;
    background-color: #101014B3;
    color: #ffffff;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, height 0.3s ease;
}

/* Logo样式 */
.logo-container {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    background-color: transparent;
    outline: none;
    transition: opacity 0.2s ease;
}

.logo {
    height: 30px;
    transition: height 0.3s ease;
}

.primary-logo {
    display: block;
}

.secondary-logo {
    display: none;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* 桌面端菜单样式 */
.desktop-menu {
    display: none;
    margin: 0 0 0 50px;
}

.menu-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: flex-start;
}

.menu-item {
    padding: 0 20px;
}

.menu-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: color 0.2s ease;
    white-space: nowrap;
    background-color: transparent;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.menu-link:hover {
    background-color: transparent;
}

.menu-link:focus {
    background-color: transparent;
    outline: none;
}

.menu-link:active {
    background-color: transparent;
}

.caret-icon {
    margin-left: 5px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.menu-item:hover .caret-icon {
    transform: rotate(180deg);
}

/* 桌面端操作区样式 */
.desktop-actions {
    display: none;
    align-items: center;
    margin-left: auto;
}

.language-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    margin-right: 15px;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.language-btn:hover {
    transform: scale(1.1);
}

.login-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    margin-right: 15px;
    transition: color 0.2s ease;
}

.login-btn:hover {
    color: #00a3ff;
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    z-index: 1010;
    padding: 5px;
}

/* 移动端菜单遮罩 */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1005;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 移动端菜单样式 */
.mobile-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    padding-top: 80px;
    z-index: 1006;
    overflow-y: auto;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.mobile-menu-item {
    margin-bottom: 8px;
}

.mobile-submenu-heading {
    padding: 16px 24px 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.42);
    pointer-events: none;
}

/* 分栏子菜单：分组标题贴左，可点项统一右缩进（仅移动端） */
.mobile-submenu-panel--columns .mobile-submenu-heading {
    padding: 14px 16px 6px;
    margin-top: 4px;
}

.mobile-submenu-panel--columns .mobile-menu-item:not(.mobile-back-item):not(.mobile-submenu-heading) .mobile-link {
    padding: 12px 16px 12px 32px;
}

.mobile-link.is-nav-placeholder {
    opacity: 0.55;
}

.mobile-link {
    display: block;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    padding: 12px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.mobile-link-disabled {
    color: rgba(255, 255, 255, 0.5);
    cursor: default;
}

.mobile-menu-overlay.is-visible {
    animation: mobile-overlay-in 0.3s ease;
}

@keyframes mobile-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mobile-login-btn {
    width: 90%;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 16px;
    padding: 12px 10px;
    border-radius: 4px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mobile-login-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-submenu-panel {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.mobile-back-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.mobile-back-link {
    font-weight: bold;
}

/* ===== 响应式：桌面设备 (>=916px) ===== */
@media (min-width: 916px) {
    .navbar {
        justify-content: flex-start;
    }

    .mobile-menu {
        width: 70%;
    }

    .desktop-menu {
        flex-grow: 1;
        display: flex;
    }

    .desktop-actions {
        display: flex;
        margin-left: auto;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .has-submenu {
        position: relative;
    }

    /* 填补顶栏与下拉之间的空隙，避免移过去时菜单消失点不到链接 */
    .has-submenu::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 14px;
        z-index: 1000;
    }

    .app-submenu {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        background-color: #1a1a1a;
        border-radius: 15px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        padding: 10px;
        min-width: 160px;
        z-index: 1001;
        display: none;
        margin-top: 4px;
    }

    .has-submenu:hover .app-submenu--columns {
        display: flex;
    }

    .app-submenu--columns {
        flex-direction: row;
        align-items: flex-start;
        padding: 14px 8px;
        min-width: min(92vw, 640px);
        max-width: 720px;
    }

    .nav-menu-column {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        flex: 1 1 0;
        min-width: 140px;
        padding: 0 6px;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
    }

    .app-submenu:not(.app-submenu--columns) {
        display: none;
        flex-direction: column;
        align-items: stretch;
    }

    .has-submenu:hover .app-submenu:not(.app-submenu--columns) {
        display: flex;
    }

    .app-submenu--columns .nav-menu-column:first-child:not(:has(.nav-menu-column-label)) {
        padding-top: 22px;
    }

    .nav-menu-column:last-child {
        border-right: none;
    }

    .nav-menu-column-label {
        margin: 0 0 8px;
        padding: 0 14px 6px;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.06em;
        color: rgba(255, 255, 255, 0.42);
        white-space: nowrap;
    }

    /* 咨询：单列分组，勿沿用解决方案三栏下拉宽度 */
    .menu-item[data-id="consulting"] .app-submenu--columns {
        min-width: 0;
        width: max-content;
        max-width: min(92vw, 320px);
        padding: 12px 10px;
    }

    .menu-item[data-id="consulting"] .nav-menu-column {
        flex: 0 0 auto;
        min-width: 0;
        padding: 0 4px;
        border-right: none;
    }

    .submenu-item {
        display: block;
        padding: 8px 20px;
        border-radius: 10px;
        color: #ffffff;
        font-size: 14px;
        cursor: pointer;
        transition: background-color 0.2s ease;
        white-space: nowrap;
        text-decoration: none;
    }

    .submenu-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .submenu-item.is-nav-placeholder {
        opacity: 0.55;
        cursor: default;
    }

    .submenu-item.is-nav-placeholder:hover {
        background-color: transparent;
    }

    .mobile-menu-overlay {
        display: none !important;
    }
}

/* ===== 响应式：移动端 (<=768px) ===== */
@media (max-width: 768px) {
    .desktop-menu,
    .desktop-actions {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .navbar {
        padding: 0 16px;
    }
}