/* style.css - 前端样式表 */
:root {
    --primary-color: #1a237e;
    --primary-dark: #0d1555;
    --secondary-color: #c9a84c;
    --secondary-light: #e8d5a0;
    --accent-color: #ff6f00;
    --text-color: #333;
    --text-light: #666;
    --text-white: #fff;
    --bg-white: #ffffff;
    --bg-light: #f5f7fa;
    --bg-dark: #0d1555;
    --border-color: #e0e0e0;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== 顶部栏 ========== */
.top-header {
    background: var(--bg-white);
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.top-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 22px;
    color: var(--primary-color);
}

.logo-img {
    height: 45px;
    width: auto;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-text i {
    color: var(--secondary-color);
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 5px;
    align-items: center;
}

.nav-list li a {
    display: block;
    padding: 8px 16px;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-color);
    border-radius: 4px;
    transition: var(--transition);
}

.nav-list li a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.nav-list li.active a {
    color: var(--primary-color);
    background: var(--bg-light);
    font-weight: 600;
}

.nav-list li a i {
    margin-right: 5px;
    font-size: 14px;
    color: var(--secondary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
    padding: 5px 10px;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--primary-dark);
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

.qq-contact {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.qq-contact i {
    color: #12B7F5;
    font-size: 18px;
}

.qq-link {
    color: var(--text-light);
    font-weight: 600;
}

/* ========== 移动端导航 ========== */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: var(--bg-white);
    z-index: 201;
    padding: 60px 20px 20px;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.mobile-nav.open {
    right: 0;
}

.mobile-nav-overlay.open {
    display: block;
}

.mobile-nav-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-color);
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav ul li {
    margin-bottom: 5px;
}

.mobile-nav ul li a {
    display: block;
    padding: 12px 15px;
    font-size: 16px;
    color: var(--text-color);
    border-radius: 6px;
    transition: var(--transition);
}

.mobile-nav ul li a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.mobile-nav ul li a i {
    margin-right: 10px;
    color: var(--secondary-color);
}

/* ========== 轮播图 ========== */
.hero-slider {
    position: relative;
    height: 480px;
    overflow: hidden;
    background: var(--bg-dark);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    color: var(--text-white);
    max-width: 700px;
    padding: 20px;
}

.slide-content h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--secondary-light);
}

.slide-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.slide-content .btn {
    font-size: 16px;
    padding: 14px 30px;
}

.slide-bg-1 { background: linear-gradient(135deg, #1a237e 0%, #0d1555 50%, #1a237e 100%); }
.slide-bg-2 { background: linear-gradient(135deg, #0d1555 0%, #1a237e 50%, #283593 100%); }
.slide-bg-3 { background: linear-gradient(135deg, #283593 0%, #1a237e 50%, #0d1555 100%); }

/* ========== 通用章节 ========== */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-bg-light {
    background: var(--bg-light);
}

/* ========== 卡片网格 ========== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
    border-color: var(--secondary-color);
}

.card-icon {
    font-size: 40px;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.card p {
    font-size: 14px;
    color: var(--text-light);
}

/* ========== 新闻列表 ========== */
.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.news-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.news-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.news-card-image {
    height: 200px;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-image .no-image {
    font-size: 60px;
    color: var(--border-color);
}

.news-card-body {
    padding: 20px;
}

.news-card-body h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-card-body h3 a {
    color: var(--text-color);
}

.news-card-body h3 a:hover {
    color: var(--primary-color);
}

.news-card-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 10px;
    display: flex;
    gap: 15px;
}

.news-card-excerpt {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ========== 关于页面 ========== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text h2 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 15px;
    color: var(--text-light);
}

.about-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--bg-light);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== 下载页面 ========== */
.download-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.download-card {
    text-align: center;
    padding: 30px 20px;
}

.download-card .card-icon {
    font-size: 50px;
}

.download-card .btn {
    margin-top: 15px;
    width: 100%;
    justify-content: center;
}

/* ========== 联系页面 ========== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info-list {
    list-style: none;
}

.contact-info-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
}

.contact-info-list li i {
    font-size: 22px;
    color: var(--secondary-color);
    width: 30px;
    text-align: center;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
    transition: var(--transition);
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-color);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

.pagination .current {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

/* ========== 文章详情 ========== */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-detail h1 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 20px;
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
}

.article-content img {
    max-width: 100%;
    border-radius: 4px;
    margin: 15px 0;
}

.article-content h2,
.article-content h3 {
    margin: 20px 0 10px;
    color: var(--primary-color);
}

/* ========== 底部 ========== */
.site-footer {
    background: var(--bg-white);
    border-top: 2px solid var(--primary-color);
    margin-top: 40px;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    gap: 30px;
    padding: 40px 20px;
}

.footer-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.footer-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.7;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 16px;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links li a {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links li a i {
    font-size: 10px;
    color: var(--secondary-color);
}

.footer-links li a:hover {
    color: var(--primary-color);
}

.footer-contact-list {
    list-style: none;
}

.footer-contact-list li {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact-list li i {
    color: var(--secondary-color);
    width: 18px;
}

.footer-admin-links {
    margin-top: 15px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-admin-links a {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer-admin-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 15px 0;
    background: var(--bg-light);
}

.footer-bottom-inner {
    text-align: center;
}

.footer-bottom-inner p {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 3px;
}

/* ========== 手机端底部固定按钮 ========== */
.mobile-fixed-bottom {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 8px 15px;
    gap: 10px;
}

.mobile-fixed-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.mobile-open-btn {
    background: var(--secondary-color);
    color: var(--primary-dark);
    border-color: var(--secondary-color);
}

.mobile-admin-btn {
    background: var(--bg-white);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ========== 响应式设计 ========== */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-slider {
        height: 380px;
    }

    .slide-content h2 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .top-header-inner {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        padding: 8px 15px;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .mobile-nav {
        display: block;
    }

    .header-buttons {
        gap: 5px;
    }

    .header-buttons .btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .qq-contact {
        display: none;
    }

    .logo-text {
        font-size: 18px;
    }

    .logo-img {
        height: 35px;
    }

    .hero-slider {
        height: 300px;
    }

    .slide-content h2 {
        font-size: 24px;
    }

    .slide-content p {
        font-size: 14px;
    }

    .section {
        padding: 35px 0;
    }

    .section-title {
        font-size: 24px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .news-list {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 25px 20px;
    }

    .mobile-fixed-bottom {
        display: flex;
    }

    body {
        padding-bottom: 65px;
    }

    .article-detail h1 {
        font-size: 22px;
    }

    .download-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .hero-slider {
        height: 250px;
    }

    .slide-content h2 {
        font-size: 20px;
    }

    .slide-content p {
        font-size: 13px;
    }

    .btn {
        padding: 8px 14px;
        font-size: 12px;
    }

    .header-buttons .btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .section-title {
        font-size: 20px;
    }
}
.article-content img {
    max-width: 100% !important;
    height: auto !important;
}
.article-content table {
    max-width: 100%;
    display: block;
    overflow-x: auto;
}
.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
    word-wrap: break-word;      /* 自动换行 */
    overflow-wrap: break-word;  /* 兼容性 */
}
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 15px 0;
}
.mobile-menu-toggle {
    display: none;   /* 桌面隐藏 */
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
    padding: 5px 10px;
}
/* ===== 手机端汉堡导航强制显示 ===== */
@media (max-width: 768px) {
    .main-nav {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #1a237e;
        padding: 5px 10px;
        order: 2;
    }

    .header-buttons {
        display: none !important;
    }

    .logo-area {
        order: 1;
    }

    .top-header-inner {
        flex-wrap: nowrap;
        align-items: center;
    }
}
/* ========== 手机端顶部QQ栏 ========== */
.mobile-qq-bar {
    display: none; /* 桌面端隐藏 */
    background: #f5f7fa;
    padding: 8px 15px;
    text-align: center;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-qq-bar i {
    color: #12B7F5;
    font-size: 16px;
    margin-right: 5px;
}

.mobile-qq-bar .qq-link {
    color: #666;
    font-weight: 600;
}

/* ========== 手机端样式（≤768px） ========== */
@media (max-width: 768px) {
    /* 隐藏桌面导航 */
    .main-nav {
        display: none !important;
    }

    /* 显示汉堡按钮 */
    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #1a237e;
        padding: 5px 10px;
        order: 2;
    }

    /* 隐藏顶部按钮 */
    .header-buttons {
        display: none !important;
    }

    /* 显示手机端 QQ 栏 */
    .mobile-qq-bar {
        display: block !important;
    }

    .logo-area {
        order: 1;
    }

    .top-header-inner {
        flex-wrap: nowrap;
        align-items: center;
        padding: 8px 15px;
    }

    .logo-text {
        font-size: 18px;
    }

    .logo-img {
        height: 35px;
    }

    /* 其余原有手机端样式保持不变 */
    .hero-slider { height: 300px; }
    .slide-content h2 { font-size: 24px; }
    .slide-content p { font-size: 14px; }
    .section { padding: 35px 0; }
    .section-title { font-size: 24px; }
    .card-grid { grid-template-columns: 1fr; }
    .news-list { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; gap: 20px; padding: 25px 20px; }
    .mobile-fixed-bottom { display: flex; }
    body { padding-bottom: 65px; }
    .article-detail h1 { font-size: 22px; }
    .download-cards { grid-template-columns: 1fr; }
}
/* 桌面端显示按钮旁的QQ，手机端隐藏 */
.qq-contact.desktop-qq {
    display: flex; /* 默认显示 */
}

/* 手机端隐藏桌面QQ */
@media (max-width: 768px) {
    .qq-contact.desktop-qq {
        display: none !important;
    }
    
    /* 手机端QQ栏显示（已在之前定义） */
    .mobile-qq-bar {
        display: block !important;
    }
}