/* 确保中文正常显示的字体设置 */
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Heiti SC", Arial, sans-serif;
    margin: 0;
    padding: 0;
    padding-top: 60px; /* 为固定导航栏留出空间 */
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 80%;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

h2 {
    color: #333;
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

p {
    margin-bottom: 20px;
}

/* 完全重写的响应式顶部导航栏 */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    transition: all 0.3s ease;
}

/* 导航Logo */
.navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    white-space: nowrap;
}

.navbar-logo img {
    max-height: 36px;
    margin-right: 8px;
}

/* 桌面端导航菜单 */
.navbar-body {
    display: flex;
    align-items: center;
}

.nav.nav-line {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav.nav-line > li {
    margin: 0;
    position: relative;
}

.nav.nav-line > li > a {
    display: block;
    padding: 20px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav.nav-line > li > a:hover {
    color: #00aa88;
    background-color: rgba(0, 170, 136, 0.05);
}

/* 当前页面高亮样式 */
.nav.nav-line > li.active > a {
    color: #00aa88;
    background-color: rgba(0, 170, 136, 0.05);
}

/* 移动端汉堡菜单按钮 */
.nav.nav-switch {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav.nav-switch li {
    width: 24px;
    height: 2px;
    background: #333;
    margin: 2px 0;
    transition: all 0.3s ease;
}

/* 移动端侧边菜单 */
.nav-mask {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    transition: opacity 0.3s ease;
}

/* 响应式断点 - 中等屏幕及以下 */
@media (max-width: 1023px) {
    /* 显示汉堡菜单按钮 */
    .nav.nav-switch {
        display: flex;
    }
    
    /* 隐藏桌面端菜单 */
    .navbar-body {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        max-height: 0;
        background: #fff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 999;
        overflow: hidden;
        transition: max-height 0.3s ease, box-shadow 0.3s ease;
    }
    
    /* 下拉菜单激活状态 */
    .navbar-body.active {
        max-height: 400px;
    }
    
    /* 移动端菜单项样式 */
    .nav.nav-line {
        flex-direction: column;
        width: 100%;
    }
    
    .nav.nav-line > li > a {
        padding: 16px 20px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    /* 显示遮罩层 */
    .nav-mask.active {
        display: block;
    }
    
    /* 汉堡菜单按钮激活动画 */
    .nav.nav-switch.active li:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav.nav-switch.active li:nth-child(2) {
        opacity: 0;
    }
    
    .nav.nav-switch.active li:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* 响应式断点 - 大屏幕 */
@media (min-width: 1024px) {
    .navbar-body {
        position: static !important;
        left: auto !important;
    }
}

/* 小屏幕特殊处理 */
@media (max-width: 480px) {
    #navbar {
        padding: 0 12px;
    }
    
    .navbar-logo strong {
        font-size: 16px;
    }
}

/* 自适应布局样式 */
.grid.documents {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* 超大屏幕：每行4个元素 */
@media (min-width: 1200px) {
    .grid.documents {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 大屏幕：每行3个元素 */
@media (min-width: 992px) and (max-width: 1199px) {
    .grid.documents {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 中等屏幕：每行2个元素 */
@media (max-width: 991px) and (min-width: 600px) {
    .grid.documents {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 小屏幕：每行1个元素 */
@media (max-width: 599px) {
    .grid.documents {
        grid-template-columns: 1fr;
    }
}

/* 确保卡片内容适应容器 */
.big-x3 {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #DCDCDC;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 按钮组自适应 */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.button-group .button {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
}

.bg-main {
    background-color: #00aa88;
    color: white;
}

.bg-ios {
    background-color: #555555;
    color: white;
}

.bg-sub {
    background-color: #57c7f6;
    color: white;
}

/* 图片自适应 */
.img-auto {
    width: 100%;
    height: auto;
}

/* 面包屑导航样式 */
.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #00aa88;
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 8px;
}

/* 内页内容样式 */
.inner-content {
    padding: 20px 0;
}

.content-section {
    margin-bottom: 30px;
}

/* 网站底部样式 */
footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 80%;
    margin: 0 auto;
    flex-wrap: wrap;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
    padding: 0 15px;
}

.footer-column h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #00aa88;
    color: #fff;
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 5px 0;
}

.footer-column ul li a:hover {
    color: #00aa88;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #555;
    font-size: 14px;
    color: #888;
}

/* 响应式底部样式 */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        max-width: 90%;
    }
    
    .footer-column {
        margin-bottom: 25px;
    }
}