/* 全局基础样式重置 */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    font-family: "微软雅黑", sans-serif;
    background: #fff;
    color: #333;
}

/* 通用容器 */
.container{
    width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 通用标题样式 */
.section-title{
    font-size: 26px;
    color: #003366;
    text-align: center;
    margin: 40px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #003366;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    position: relative;
}

/* ========== 顶部导航样式 ========== */
.top-bar{
    background: #003366;
    color: #fff;
    font-size: 13px;
    padding: 6px 0;
}
.top-bar .container{
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar-links a{
    color: #abc;
    margin: 0 8px;
    text-decoration: none;
}

.header{
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}
.header .container{
    display: flex;
    align-items: center;
    gap: 20px;
}
.logo{
    width: 80px;
    height: 80px;
}
.logo img{
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.school-name h1{
    font-size: 28px;
    color: #003366;
}
.school-name p{
    font-size: 14px;
    color: #666;
}

/* 主导航 */
.nav{
    background: #003366;
}
.nav-list{
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    list-style: none;
}
.nav-list li{
    border-right: 1px solid rgba(255,255,255,0.1);
}
.nav-list li:last-child{
    border-right: none;
}
.nav-list li a{
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    padding: 16px 10px;
    transition: background 0.3s ease;
}
.nav-list li a:hover,
.nav-list li a.active{
    background: #00509e;
}

/* 下拉菜单 */
.nav-list li{
    position: relative;
}
.subnav{
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    width: 200px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
    z-index: 99;
    list-style: none;
}
.subnav li a{
    color: #333;
    padding: 10px 16px;
    justify-content: flex-start;
}
.subnav li a:hover{
    background: #f8f9fa;
    color: #003366;
}
.nav-list li:hover .subnav{
    display: block;
}

/* 页脚样式 */
.footer{
    background: #002244;
    color: #abc;
    padding: 40px 0;
    text-align: center;
    font-size: 14px;
    margin-top: 50px;
}
.footer p{
    margin: 8px 0;
}

/* ========== 扁平方块悬浮按钮样式（修改核心） ========== */
.float-btn-group{
    position: fixed;
    right: 20px;
    bottom: 20%; /* 距离底部20% */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: auto;
    /* 移除原来的top和transform */
}
.float-btn{
    width: 50px;
    height: 50px;
    border-radius: 0;
    background: #003366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: background 0.3s ease;
    text-decoration: none;
    border: none;
    outline: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.float-btn:hover{
    background: #00509e !important;
    transform: none !important;
}
.float-btn::after{
    content: attr(data-text);
    position: absolute;
    right: 60px;
    white-space: nowrap;
    padding: 5px 10px;
    background: rgba(0,51,102,0.9);
    color: #fff;
    font-size: 14px;
    font-weight: normal;
    border-radius: 2px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9999;
}
.float-btn:hover::after{
    opacity: 1;
    visibility: visible;
}

/* ========== 响应式适配 ========== */
@media(max-width:768px){
    .container{
        width: 95%;
    }
    .nav-list{
        grid-template-columns: repeat(3, 1fr);
    }
    .nav-list li{
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .header .container{
        flex-direction: column;
        text-align: center;
    }
    .school-name h1{
        font-size: 24px;
    }
    /* 悬浮按钮适配 */
    .float-btn-group{
        right: 10px;
        gap: 8px;
        bottom: 20%; /* 手机端同样保持距离底部20% */
    }
    .float-btn{
        width: 45px;
        height: 45px;
        font-size: 12px;
    }
    .float-btn::after{
        font-size: 12px;
        padding: 4px 8px;
    }
}
@media(max-width:480px){
    .nav-list{
        grid-template-columns: repeat(2, 1fr);
    }
    .float-btn{
        width: 40px;
        height: 40px;
        font-size: 11px;
    }
}