/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    position: relative;
}

/* 返回顶部按钮样式 */
.top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #3498db;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.top.show {
    opacity: 1;
    visibility: visible;
}

.top:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
}

.top a {
    color: white;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

/* 顶部导航样式 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #2c3e50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
    height: 70px;
}

.logo a {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s;
}

.logo a i {
    margin-right: 10px;
    color: #3498db;
}

.logo a:hover {
    color: #3498db;
}

/* 导航菜单样式 */
.main-nav {
    position: relative;
}

.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background: #fff;
    height: 2px;
    width: 2em;
    border-radius: 2px;
    position: relative;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
    content: '';
    position: absolute;
}

.nav-toggle-label span::before {
    bottom: 7px;
}

.nav-toggle-label span::after {
    top: 7px;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
}

.nav-menu li {
    margin-left: 25px;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s;
}

.nav-menu a:hover {
    color: #3498db;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* 顶部导航栏调整 - 移除搜索框后 */
/* 搜索框样式已移除 */

/* 主内容区域样式 */
.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 90px 20px 20px;
    min-height: calc(100vh - 200px);
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    position: sticky;
    top: 90px;
    height: fit-content;
    margin-right: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    z-index: 10;
    transition: all 0.3s ease;
    flex-shrink: 0;
    overflow: hidden;
}

/* 侧边栏搜索框样式 */
.sidebar-search {
    margin-bottom: 20px;
    position: relative;
}

.sidebar-search .form-control {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
}

.sidebar-search .form-control:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.sidebar-search i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 16px;
}

.sidebar-menu-inner {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* 侧边栏头部样式 */
.logo-env {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.logo-env .logo {
    margin-bottom: 20px;
}

.logo-env .logo h1 {
    font-size: 20px;
    color: #2c3e50;
    margin: 0;
}

.logo-env .logo a {
    text-decoration: none;
}

/* 侧边栏搜索框样式 */
.logo-env .search {
    position: relative;
    margin-bottom: 0;
}

.logo-env .search .form-control {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.logo-env .search .form-control:focus {
    outline: none;
    border-color: #3498db;
}

.logo-env .search i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.logo-env .search i:hover {
    color: #3498db;
}

/* 侧边栏菜单样式 */
.main-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-menu > li {
    position: relative;
}

.main-menu > li > a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.main-menu > li > a:hover,
.main-menu > li > a.active {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border-left-color: #3498db;
}

.main-menu > li > a i {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.main-menu > li > a .title {
    font-size: 15px;
    flex-shrink: 0;
}

/* 子菜单样式 (预留) */
.main-menu .has-sub > ul {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #f8f9fa;
}

.main-menu .has-sub.open > ul {
    display: block;
}

/* 旧侧边栏样式保持兼容 */
.sidebar-nav {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
}

/* 技术支持区域样式 */
.tech-support {
    margin-top: 30px;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

.tech-support h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.wechat-qrcode {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.tech-support p {
    color: #666;
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border-left-color: #3498db;
}

/* 内容区域样式 */
.content {
    flex: 1;
    min-width: 0;
    width: 0; /* 确保内容区域能正确压缩 */
}

/* 分类区块样式 */
.section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
}

/* 分类标题样式 */
.section-title {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: inline-block;
}

.content-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
}

.content-section h2 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: inline-block;
}

/* 卡片样式已移至 cards.css */

/* 分页控件样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 5px;
    color: #555;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.page-link:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.page-link.active {
    background-color: #3498db;
    color: #fff;
}

/* 联系我们页面样式 */
.content-full {
    width: 100%;
    padding: 0;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background-color: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #3498db;
    color: #fff;
    border-radius: 50%;
    font-size: 20px;
}

.contact-details h3 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 18px;
}

.contact-details p {
    color: #666;
    margin-bottom: 5px;
}

.contact-form {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-form h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    display: inline-block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
}

.submit-btn {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #2980b9;
}

.map-container {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f5f7fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #777;
}

.map-placeholder i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #3498db;
}

.faq-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.faq-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.faq-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.faq-item h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 18px;
    position: relative;
    padding-left: 25px;
}

.faq-item h3::before {
    content: 'Q';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    background-color: #3498db;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.faq-item p {
    color: #666;
    line-height: 1.6;
    position: relative;
    padding-left: 25px;
}

.faq-item p::before {
    content: 'A';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    background-color: #2ecc71;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* 底部信息区样式 */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 40px 20px 20px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #3498db;
}

.footer-section p,
.footer-section ul {
    font-size: 14px;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.social-links {
    display: flex;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(52, 152, 219, 0.2);
    border-radius: 50%;
    margin-right: 10px;
    color: #ecf0f1;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: #3498db;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: #95a5a6;
}

/* 响应式设计 - 确保侧边栏始终在左侧并根据屏幕大小调整 */
@media (max-width: 1200px) {
    /* 中等屏幕：侧边栏略微变窄 */
    .sidebar {
        width: 220px;
    }
    
    .main-menu > li > a i {
        margin-right: 8px;
    }
}

@media (max-width: 992px) {
    /* 保持侧边栏在左侧，不堆叠 */
    .container {
        flex-direction: row;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    /* 缩小侧边栏，只显示图标 */
    .sidebar {
        width: 60px;
        margin-right: 20px;
        padding: 15px 5px;
    }
    
    /* 隐藏文字，只显示图标 */
    .main-menu > li > a .title {
        display: none;
    }
    
    .main-menu > li > a i {
        margin-right: 0;
        width: 100%;
        text-align: center;
        font-size: 18px;
    }
    
    /* 隐藏侧边栏头部内容 */
    .logo-env,
    .sidebar-search {
        display: none;
    }
    
    /* 内容区域自适应 */
    .content {
        width: calc(100% - 80px);
    }
    
    /* 兼容旧版侧边栏导航 */
    .sidebar-nav {
        display: flex;
        flex-direction: column;
        padding: 0;
    }
    
    .nav-item {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 5px;
        border-left: 3px solid transparent;
    }
    
    .nav-item:hover,
    .nav-item.active {
        border-left: 3px solid #3498db;
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .nav-toggle-label {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #2c3e50;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transform: scale(1, 0);
        transform-origin: top;
        transition: transform 0.3s;
    }
    
    .nav-menu li {
        margin: 10px 0;
        width: 100%;
    }
    
    .search-box {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .nav-toggle:checked ~ .nav-menu {
        transform: scale(1, 1);
    }
    
    .resource-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .header-container {
        padding: 0 15px;
    }
    
    .logo a {
        font-size: 20px;
    }
    
    .container {
        padding: 80px 15px 15px;
    }
    
    .content-section {
        padding: 20px 15px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
}
