/* 全局CSS变量 */
:root {
    --primary-color: #165DFF;
    --primary-hover: #0e42cc;
    --text-color: #333;
    --white: #fff;
    --shadow-primary: 0 4px 12px rgba(22,93,255,0.4);
    --shadow-hover: 0 6px 18px rgba(22,93,255,0.6);
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", "PingFang SC", sans-serif;
}

/* 确保容器可以居中 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto !important;
    padding: 0 15px;
}

/* 消除section之间的间隙 */
section {
    margin: 0 !important;
    border: none !important;
}

section + section {
    margin-top: 0 !important;
}

/* 基础样式 */
html {
    scroll-behavior: smooth;
    font-size: 16px;
    margin: 0 !important;
    padding: 0 !important;
    background: #c6c6c6 !important;
}

body {
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.5;
    padding-top: 0 !important; /* 导航栏静态定位，不需要预留空间 */
    background: #c6c6c6 !important; /* 页面背景色与导航栏一致 */
    margin: 0 !important;
}

@media (max-width: 768px) {
    body {
        padding-top: 0; /* 导航栏静态定位，不需要预留空间 */
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 0; /* 导航栏静态定位，不需要预留空间 */
    }
}

/* 通用flex布局兼容 */
.flex {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

/* 页面加载动画 - 背景透明 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900; /* 低于导航栏(1000) */
}

.loader::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 屏幕阅读器隐藏文本 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 页面其他内容样式 */
.content-section {
    padding: 60px 0;
    background: #F5F7FA;
}

.content-section h2 {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.content-section p {
    font-size: 16px;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 20px;
    text-align: center;
}

/* 修复导航栏固定时的内容偏移 - 注意：轮播图绝对定位，不需要此修复 */
/* #navbar.nav-fixed + * { margin-top: 0; } */

/* 响应式适配 - 移动端 */
@media (max-width: 768px) {
    .content-section {
        padding: 40px 0;
    }
    
    .content-section h2 {
        font-size: 24px;
    }
    
    .content-section p {
        font-size: 14px;
        padding: 0 10px;
    }
}