/* ========================================
   底部导航功能样式
   PC端侧边栏 + 手机端底部导航
   ======================================== */

/* 浮动导航样式（新版） */
.floating-nav {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 12px 0;
    width: 90px;
    align-items: center;
}

.annniu {
    position: relative;
    background: none;
    border-radius: 12px;
    box-shadow: none;
    transition: background 0.2s;
    width: 100%;
    text-align: center;
    margin: 0;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.annniu:hover {
    background: #f5f7fa;
}

.link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 0 6px 0;
    color: #222;
    text-decoration: none;
    font-size: 13px;
    width: 100%;
}

.nav-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 4px auto;
    display: block;
    object-fit: contain;
    object-position: center;
    background: none;
}

.link-item span, .link-item {
    font-size: 13px;
    margin-top: 0px;
    line-height: 1.2;
}

/* 悬浮内容样式 */
.hover-content {
    position: absolute;
    left: -230px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    padding: 18px 20px 16px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.13);
    margin: 0;
    display: none;
    width: 210px;
    min-height: 210px;
    align-items: center;
    justify-content: center;
}

.business-hover:hover .hover-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-text {
    text-align: center;
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    width: 100%;
}

.qr-code {
    width: 120px;
    height: 120px;
    margin: 10px auto 6px auto;
    display: block;
}

.arrow {
    position: absolute;
    right: -8px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    border-left: 8px solid #fff;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.top-button {
    margin-top: 0;
    display: none; /* 初始状态隐藏，滚动时通过JS控制显示 */
}

/* 移动端底部导航样式（优化对齐） */
.mobile-footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0 2px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 999;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* 底部导航栏上方添加渐变遮罩，提升视觉层次 */
.mobile-footer-nav::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(to top, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
    font-size: 12px;
    height: 48px;
    line-height: 1;
}

.nav-item .nav-icon {
    font-size: 28px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    height: 28px;
    width: 28px;
}

.nav-item .nav-text {
    font-size: 12px;
    margin: 0;
    line-height: 1;
    text-align: center;
}

/* 为不同图标添加颜色 */
.nav-item:nth-child(1) .nav-icon {
    color: #4285F4;
}

.nav-item:nth-child(2) .nav-icon {
    color: #FF6B35;
}

.nav-item:nth-child(3) .nav-icon {
    color: #34A853;
}

.nav-item:nth-child(4) .nav-icon {
    color: #FBBC05;
}

.nav-item:nth-child(5) .nav-icon {
    color: #EA4335;
}

/* 悬停效果 */
.nav-item:hover .nav-icon {
    transform: scale(1.1);
}

/* 激活状态 */
.nav-item.active .nav-icon {
    color: #2196F3;
    transform: scale(1.1);
}

.nav-item .nav-text {
    font-size: 12px;
    margin: 0;
    line-height: 1.1;
}

@media screen and (max-width: 768px) {
    .floating-nav {
        display: none;
    }
    .mobile-footer-nav {
        display: flex;
    }
    
    /* 为移动端页面底部添加安全距离，避免被底部导航栏遮挡 */
    body {
        padding-bottom: 54px;
    }
    
    /* 确保footer在移动端有足够的底部间距 */
    .footer {
        padding-bottom: 20px !important;
        margin-bottom: 0;
    }
    
    /* 联系咨询模块在移动端的底部间距调整 */
    .contact-section {
        padding-bottom: 25px !important;
    }
    
    /* 确保所有主要内容区域在移动端都有足够的底部间距 */
    section:last-child,
    .certifications:last-of-type,
    .news-section:last-of-type,
    .subsidy-section:last-of-type {
        margin-bottom: 10px;
    }
    
    /* 防止任何绝对定位的元素被底部导航栏遮挡 */
    .floating-elements,
    .back-to-top,
    .scroll-to-top {
        bottom: 60px !important;
    }
}

@media screen and (min-width: 769px) {
    .mobile-footer-nav {
        display: none;
    }
}

/* 确保不与现有返回顶部按钮冲突 */
.back-to-top {
    display: none !important;
}

@media (max-width: 768px) {
    .back-to-top {
        display: none !important;
    }
}

/* 480px断点下的进一步优化 */
@media screen and (max-width: 480px) {
    /* 480px断点下调整body底部间距 */
    body {
        padding-bottom: 52px;
    }
    
    /* 优化底部导航栏高度和间距 */
    .mobile-footer-nav {
        padding: 4px 0 1px 0;
        height: 50px;
    }
    
    .nav-item {
        height: 46px;
        font-size: 11px;
        line-height: 1;
    }
    
    .nav-item .nav-icon {
        font-size: 24px;
        margin-bottom: 3px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        height: 24px;
        width: 24px;
    }
    
    .nav-item .nav-text {
        font-size: 11px;
        line-height: 1;
        text-align: center;
    }
    
    /* 480px断点下footer的底部间距微调 */
    .footer {
        padding-bottom: 15px !important;
    }
    
    /* 480px断点下联系咨询模块的底部间距微调 */
    .contact-section {
        padding-bottom: 20px !important;
    }
} 