/* =====================================================
   🌟 Service Navigation Bar - Minimal Floating Tabs
   ===================================================== */

.service-nav {
    background: transparent;
    position: relative;
    z-index: 100;
    pointer-events: none;
    width: 100%;
    /* Ensure it spans full width to allow internal centering/left-align */
}

/* 🌟 Container to ensure left-align even in centered parents */
#service_nav-placeholder {
    width: 100%;
    display: block;
}

.service-nav-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-self: stretch;
    /* Force stretch in flex parent */
}

.service-nav-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Left align with Logo/Title */
    gap: 10px;
    padding: 70px 0 15px 0;
    /* 60px header + 15px space */
    pointer-events: auto;
}

.service-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    text-decoration: none;
    color: #ffffff;
    /* Full white for visibility */
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Kaku Gothic ProN', sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    /* Force consistent height regardless of page body line-height */
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.service-nav-item:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.service-nav-item.active {
    color: #ffffff;
    /* High contrast for active */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    /* background-color: rgba(255, 255, 255, 0.15); */
    border-radius: 5px;
}

/* 🌟 精致的品牌黄色横条 - 悬浮在下方 */
.service-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 3px;
    background: #ffc11c;
    /* Kamome Gold */
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(255, 193, 28, 0.6);
    /* Soft Glow */
}

.service-nav-icon {
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    /* Pure white icons */
    transition: all 0.3s ease;
    opacity: 1;
}

.service-nav-item.active .service-nav-icon,
.service-nav-item:hover .service-nav-icon {
    opacity: 1;
}

.service-nav-label {
    white-space: nowrap;
    letter-spacing: 0.3px;
}

/* ===== 响应式设计 (Unified & Cleaned) ===== */

/* 1. 针对全透明 Header 的适配：在小屏幕上也需要保持顶部间距 */
@media screen and (max-width: 900px) {
    .service-nav-container {
        padding-top: 65px;
        /* 60px header + 5px gap */
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 5px;
        padding-left: 20px;
        /* Align with Logo (20px) */
        padding-right: 20px;
    }

    /* 隐藏滚动条但保留功能 */
    .service-nav-container::-webkit-scrollbar {
        display: none;
    }

    .service-nav-container {
        scrollbar-width: none;
    }

    .service-nav-item {
        padding: 8px 15px;
        font-size: 13px;
        flex-shrink: 0;
        /* 防止文字在滚动容器中换行 */
    }

    .service-nav-icon {
        width: 16px;
        height: 16px;
    }

    .service-nav-item.active::after {
        bottom: -2px;
        left: 15px;
        right: 15px;
    }
}

/* 2. 针对极小屏幕的进一步微调 */
@media screen and (max-width: 480px) {
    .service-nav-container {
        padding-top: 62px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .service-nav-item {
        padding: 6px 5px;
        font-size: 14px;
        gap: 5px;
        align-items: center;
        flex: 1;
        width: 25%;
        justify-content: center;
    }

    .service-nav-label {
        font-size: 12px;
    }
}

/* =====================================================
   🌟 Float Sidebar - Quick Access (Always with Labels)
   ===================================================== */

.float-sidebar {
    position: fixed;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
}

.sidebar-item {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    /* 图标文字垂直排布 */
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #4b5e7a;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.sidebar-label {
    font-size: 10px;
    /* 紧凑小字 */
    font-weight: 700;
    white-space: nowrap;
    color: inherit;
    line-height: 1;
}

.sidebar-item:hover {
    background: #1962EB;
    color: white;
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(25, 98, 235, 0.4);
    border-color: #1962EB;
}

.sidebar-item:hover .sidebar-icon {
    transform: translateY(-2px) scale(1.1);
}

.sidebar-top {
    width: 64px;
    height: 48px;
    background: #333;
    color: white;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 5px;
    gap: 2px;
}

.sidebar-top span {
    font-size: 9px;
    font-weight: bold;
}

.sidebar-top:hover {
    background: #000;
    transform: translateY(-3px);
}

/* 移动端逻辑保持隐藏 */
@media screen and (max-width: 1024px) {
    .float-sidebar {
        display: none;
    }
}