/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    padding-bottom: 60px; /* 为底部导航预留空间 */
}

/* 底部导航顶部间距 */
.footer-top {
    height: 20px; /* 可根据需要调整 */
}

/* 底部导航容器 - 全宽设计 */
.footer-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* 导航栏样式 */
.footer-nav {
    display: flex;
    width: 100%;
    max-width: 100%;
    height: 60px;
    background-color: #ffffff;
    justify-content: space-around;
    align-items: center;
}

/* 导航项目样式 */
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    min-width: 0; /* 允许flex项目收缩 */
}

/* 导航项目激活状态 */
.nav-item.active {
    color: #88157a;
    background-color: #f8f8f8; /* 激活时的轻微背景色 */
}

/* 图标样式 */
.footer-img {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: block;
}

/* 不同图标样式 */
.footer-home-icon {
    background-image: url(../image/footer_home.png);
}

.nav-item.active .footer-home-icon,
.nav-item:hover .footer-home-icon {
    background-image: url(../image/footer_home_active.png);
}

.footer-solution-icon {
    background-image: url(../image/footer_solution.png);
}

.nav-item.active .footer-solution-icon,
.nav-item:hover .footer-solution-icon {
    background-image: url(../image/footer_solution_active.png);
}

.footer-industry-icon {
    background-image: url(../image/footer_industry.png);
}

.nav-item.active .footer-industry-icon,
.nav-item:hover .footer-industry-icon {
    background-image: url(../image/footer_industry_active.png);
}

.footer-research-icon {
    background-image: url(../image/footer_research.png);
}

.nav-item.active .footer-research-icon,
.nav-item:hover .footer-research-icon {
    background-image: url(../image/footer_research_active.png);
}

.footer-book-icon {
    background-image: url(../image/footer_book.png);
}

.nav-item.active .footer-book-icon,
.nav-item:hover .footer-book-icon {
    background-image: url(../image/footer_book_active.png);
}

/* 文字样式 */
.nav-text {
    font-size: 12px;
    line-height: 14px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .footer-nav {
        height: 50px;
    }
    
    .nav-text {
        font-size: 10px;
    }
    
    .footer-img {
        width: 20px;
        height: 20px;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding-bottom: 50px;
    }
    
    .footer-nav {
        height: 50px;
    }
    
    .nav-text {
        font-size: 9px;
    }
    
    .footer-img {
        width: 18px;
        height: 18px;
    }
    
    .nav-item {
        min-width: 0;
    }
}

/* 高分辨率屏幕优化 */
@media screen and (min-width: 769px) {
    .footer-nav {
        max-width: 750px;
        margin: 0 auto;
    }
}

/* 悬停效果 */
.nav-item:hover {
    color: #88157a;
    background-color: #f0f0f0;
}

/* 确保在触摸设备上也有良好的体验 */
@media (hover: none) and (pointer: coarse) {
    .nav-item:hover {
        color: #666; /* 在触摸设备上去掉悬停效果 */
        background-color: transparent;
    }
    
    .nav-item.active {
        background-color: #f8f8f8;
    }
}