/* ============================================
   文件名: style.css
   用途: 前台全局样式（浅银白色主题，优化字体颜色）
   ============================================ */

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

:root {
    /* 浅银白色主题变量 */
    --primary-color: #6d7f96;        /* 银蓝灰色，用于按钮、强调 */
    --primary-dark: #56677c;         /* 深一点的银蓝 */
    --primary-light: #a0adbd;        /* 浅银蓝 */
    --secondary-color: #c0c8d4;      /* 银灰色 */
    --text-color: #1f2937;           /* 深灰文字，主文字颜色 */
    --text-medium: #374151;          /* 中深灰，用于重要段落 */
    --text-light: #4b5563;           /* 中灰，用于辅助信息，比之前加深 */
    --text-muted: #6b7280;           /* 浅灰，用于次要信息 */
    --bg-white: #ffffff;             /* 纯白背景 */
    --bg-gray: #f5f7fa;              /* 极浅银灰背景 */
    --bg-silver: #e8ecf1;            /* 银白色背景，带一点金属感 */
    --border-color: #d1d8e0;         /* 浅银灰边框 */
    --success-color: #4b8b6b;
    --danger-color: #c45a5f;
    --header-height: 70px;
    --footer-height: auto;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--text-color);
    line-height: 1.7; /* 增加行高提高可读性 */
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 顶部导航 ========== */
.site-header {
    background: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary-light);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 20px;
}

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

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

.logo .logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: 1px;
    margin-left: 8px;
}

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

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 5px;
}

.main-nav ul li {
    position: relative;
}

.main-nav ul li a {
    display: block;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-medium);
    border-radius: 4px;
    transition: all 0.3s;
    white-space: nowrap;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--primary-dark);
    background: var(--bg-silver);
}

/* 下拉菜单 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-white);
    min-width: 200px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 100;
    border: 1px solid var(--border-color);
}

.main-nav ul li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    padding: 12px 20px;
    display: block;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-medium);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: var(--bg-silver);
    color: var(--primary-dark);
}

/* 顶部按钮 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    text-align: center;
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(109,127,150,0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.btn-sm {
    padding: 7px 16px;
    font-size: 13px;
}

/* QQ联系方式 */
.header-qq {
    display: flex;
    justify-content: flex-end;
    padding: 5px 0 10px;
    gap: 15px;
    font-size: 13px;
    color: var(--text-medium);
}

.header-qq a {
    color: var(--text-medium);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.header-qq a:hover {
    color: var(--primary-dark);
}

.header-qq .qq-icon {
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
}

/* 汉堡菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.menu-toggle span {
    width: 26px;
    height: 3px;
    background: var(--text-medium);
    border-radius: 3px;
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ========== 页面内容 ========== */
.page-banner {
    background: linear-gradient(135deg, #e8ecf1 0%, #d5dce4 50%, #c3cdd9 100%);
    color: var(--text-color);
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.page-banner::after {
    content: '';
    position: absolute;
    bottom: -60%;
    left: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.page-banner h1 {
    font-size: 36px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    color: var(--primary-dark);
    font-weight: 700;
}

.page-banner p {
    font-size: 16px;
    opacity: 0.85;
    position: relative;
    z-index: 1;
    color: var(--text-medium);
}

.page-content {
    padding: 50px 0;
    min-height: 400px;
}

/* ========== 首页样式 ========== */
.hero-section {
    background: linear-gradient(135deg, #f8f9fb 0%, #e8ecf1 40%, #d5dce4 100%);
    color: var(--text-color);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiM4YTliYjUiIGZpbGwtb3BhY2l0eT0iMC4wNSI+PHBhdGggZD0iTTM2IDM0djItSDI0di0yaDEyek0zNiAyMnYySDI0di0yaDEyeiIvPjwvZz48L2c+PC9zdmc+');
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 42px;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-color);
    font-weight: 700;
}

.hero-text h1 span {
    color: var(--primary-dark);
}

.hero-text p {
    font-size: 16px;
    opacity: 0.85;
    margin-bottom: 30px;
    max-width: 500px;
    color: var(--text-medium);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-item {
    background: rgba(255, 255, 255, 0.65);
    border-radius: 12px;
    padding: 30px 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.stat-item .stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-dark);
    display: block;
}

.stat-item .stat-label {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 5px;
    color: var(--text-medium);
}

/* 功能卡片 */
.features-section {
    padding: 60px 0;
    background: var(--bg-white);
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 30px;
    color: var(--text-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.section-title p {
    color: var(--text-light);
    font-size: 15px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.feature-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px 25px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: var(--bg-silver);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.feature-card h3 {
    font-size: 17px;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 600;
}

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

/* 新闻预览 */
.news-preview {
    padding: 60px 0;
    background: var(--bg-gray);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.news-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

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

.news-card-image {
    height: 180px;
    overflow: hidden;
    background: var(--bg-silver);
}

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

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

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

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

.news-card-body p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.news-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ========== 新增内容通用样式 ========== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.info-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.info-card h4 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-color);
    font-weight: 600;
}

.info-card p, .info-card li {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
}

.info-card ul {
    list-style: disc;
    padding-left: 20px;
}

.faq-section {
    max-width: 800px;
    margin: 40px auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.faq-question {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 24px;
    color: var(--primary-color);
}

.faq-answer {
    display: none;
    padding-top: 10px;
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-question::after {
    content: '−';
}

/* ========== 文章详情 ========== */
.article-detail {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 40px;
    border: 1px solid var(--border-color);
}

.article-detail h1 {
    font-size: 28px;
    margin-bottom: 15px;
    line-height: 1.3;
    color: var(--text-color);
    font-weight: 700;
}

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

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

.article-content p {
    margin-bottom: 15px;
}

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

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

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: var(--bg-silver);
    border-radius: 10px;
    margin-bottom: 15px;
}

.contact-info-icon {
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.contact-info-item h4 {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 5px;
}

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

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

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(109,127,150,0.2);
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-about h3,
.footer-links h3,
.footer-contact h3 {
    font-size: 17px;
    margin-bottom: 15px;
    color: var(--text-color);
    position: relative;
    padding-bottom: 10px;
    font-weight: 600;
}

.footer-about h3::after,
.footer-links h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--primary-light);
    border-radius: 2px;
}

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

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

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

.footer-links ul li a {
    font-size: 13px;
    color: var(--text-light);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.footer-links ul li a:hover {
    color: var(--primary-dark);
    padding-left: 5px;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--text-muted);
    margin: 0 5px;
}

.footer-bottom a:hover {
    color: var(--primary-dark);
}

/* ========== 手机端底部固定按钮 ========== */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-white);
    border-top: 2px solid var(--primary-light);
    padding: 10px 15px;
    z-index: 9999;
    gap: 10px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    align-items: center;
    justify-content: space-between;
}

.mobile-bottom-bar .btn {
    flex: 1;
    padding: 12px 15px;
    font-size: 14px;
    border-radius: 8px;
}

/* ========== 404页面 ========== */
.error-page {
    text-align: center;
    padding: 80px 0;
}

.error-page .error-code {
    font-size: 100px;
    font-weight: 700;
    color: var(--primary-light);
    line-height: 1;
    margin-bottom: 10px;
}

.error-page h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.error-page p {
    color: var(--text-light);
    margin-bottom: 30px;
}

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

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

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

.pagination .current {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text p {
        margin: 0 auto 30px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .header-top {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 0;
    }
    
    .logo img {
        height: 35px;
    }
    
    .logo .logo-text {
        font-size: 20px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: var(--bg-white);
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        transition: left 0.3s;
        display: block;
        padding-top: 60px;
        overflow-y: auto;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 10px;
    }
    
    .main-nav ul li a {
        padding: 14px 16px;
        border-bottom: 1px solid var(--border-color);
        font-size: 14px;
    }
    
    .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        min-width: auto;
        padding-left: 20px;
        display: none;
    }
    
    .main-nav ul li:hover .dropdown-menu,
    .main-nav ul li.dropdown-open .dropdown-menu {
        display: block;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .header-actions .btn {
        padding: 7px 12px;
        font-size: 12px;
    }
    
    .header-qq {
        display: none;
    }
    
    .page-banner {
        padding: 40px 0;
    }
    
    .page-banner h1 {
        font-size: 24px;
    }
    
    .page-content {
        padding: 30px 0;
    }
    
    .features-grid,
    .news-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .hero-section {
        padding: 50px 0;
    }
    
    .hero-text h1 {
        font-size: 28px;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-item {
        padding: 20px;
    }
    
    .stat-item .stat-number {
        font-size: 28px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .article-detail {
        padding: 20px;
    }
    
    .article-detail h1 {
        font-size: 22px;
    }
    
    .mobile-bottom-bar {
        display: flex !important;
    }
    
    body {
        padding-bottom: 80px;
    }
    
    .site-footer {
        padding-bottom: 80px;
    }
    
    .section-title h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .header-actions .btn-outline {
        display: none;
    }
    
    .hero-text h1 {
        font-size: 22px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .contact-info-item {
        padding: 15px;
    }
}
