/* ============ 基础重置 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: #333;
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
a { color: #333; text-decoration: none; transition: color 0.2s; }
a:hover { color: #667eea; }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }
img { border: 0; }

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --text: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg: #fff;
    --bg-light: #f8f9fb;
    --border: #eaeaea;
    --radius: 6px;
    --shadow: 0 2px 12px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.site-main { flex: 1; }

/* ============ 顶部导航 ============ */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    align-items: center;
    height: 70px;
}
.logo { display: flex; align-items: center; margin-right: 40px; }
.logo img { display: block; }
.logo-text {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}
.nav-item {
    padding: 8px 16px;
    color: #555;
    font-size: 15px;
    border-radius: 4px;
    transition: all 0.2s;
}
.nav-item:hover { color: var(--primary); background: rgba(102, 126, 234, 0.06); }
.nav-item.active { color: var(--primary); background: rgba(102, 126, 234, 0.1); font-weight: 500; }
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; padding: 8px; color: #555; }

@media (max-width: 900px) {
    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        padding: 10px 20px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        display: none;
    }
    .main-nav.show { display: flex; }
    .nav-toggle { display: block; }
    .nav-item { padding: 12px 16px; }
}

/* ============ 通用 section ============ */
.section { padding: 60px 0; }
.section-light { background: var(--bg-light); }
.section-title {
    text-align: center;
    margin-bottom: 40px;
}
.section-title h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}
.section-title p { color: var(--text-light); font-size: 15px; }
.section-title .line {
    width: 40px;
    height: 3px;
    background: var(--gradient);
    margin: 14px auto 0;
    border-radius: 2px;
}

/* ============ 首页 Banner 轮播 ============ */
.hero-slider {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
    background: #2c3e50;
}
.hero-slide {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0;
    transition: opacity 0.8s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-slide.active { opacity: 1; z-index: 1; }
.hero-slide-bg {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover; background-position: center;
}
.hero-slide-bg::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(102,126,234,0.85) 0%, rgba(118,75,162,0.85) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 800px;
    padding: 0 20px;
}
.hero-content h1 { font-size: 42px; margin-bottom: 16px; font-weight: 600; }
.hero-content p { font-size: 18px; opacity: 0.95; margin-bottom: 24px; }
.hero-content .btn { background: rgba(255,255,255,0.2); border: 2px solid #fff; }
.hero-content .btn:hover { background: #fff; color: var(--primary); }
.hero-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.hero-indicator {
    width: 30px; height: 4px; background: rgba(255,255,255,0.4);
    border: none; padding: 0; cursor: pointer; border-radius: 2px;
    transition: all 0.3s;
}
.hero-indicator.active { background: #fff; width: 50px; }

/* ============ 按钮 ============ */
.btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary);
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ============ 卡片网格 ============ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.feature-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.feature-icon {
    width: 60px; height: 60px;
    margin: 0 auto 16px;
    background: var(--gradient);
    color: #fff;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    font-weight: 600;
}
.feature-card h3 { font-size: 18px; color: #2c3e50; margin-bottom: 8px; }
.feature-card p { color: var(--text-light); font-size: 14px; line-height: 1.7; }

/* ============ 产品/新闻卡片 ============ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex; align-items: center; justify-content: center;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card:hover .card-image img { transform: scale(1.05); }
.card-body { padding: 20px; }
.card-title {
    font-size: 17px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card-desc {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
}
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-lighter);
    font-size: 12px;
}
.card-tag {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}

/* ============ 新闻列表（更紧凑） ============ */
.news-list { background: #fff; border-radius: 8px; box-shadow: var(--shadow); }
.news-item {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 16px;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: var(--bg-light); }
.news-item-date {
    flex-shrink: 0;
    width: 64px;
    text-align: center;
    color: var(--primary);
    border-right: 1px solid var(--border);
    padding-right: 16px;
}
.news-item-date .day { font-size: 28px; font-weight: 600; line-height: 1; }
.news-item-date .month { font-size: 12px; color: var(--text-lighter); margin-top: 4px; }
.news-item-body { flex: 1; min-width: 0; }
.news-item-title {
    font-size: 15px;
    color: #2c3e50;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}
.news-item-desc {
    color: var(--text-lighter);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============ 列表页/面包屑 ============ */
.breadcrumb {
    background: var(--bg-light);
    padding: 14px 0;
    font-size: 13px;
    color: var(--text-light);
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 8px; color: var(--text-lighter); }
.breadcrumb .current { color: var(--text); }

/* ============ 详情页 ============ */
.detail-wrap { padding: 40px 0; }
.detail-wrap h1 { font-size: 28px; color: #2c3e50; text-align: center; margin-bottom: 14px; }
.detail-meta { text-align: center; color: var(--text-lighter); font-size: 13px; margin-bottom: 30px; }
.detail-meta span { margin: 0 12px; }
.detail-content {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    line-height: 1.9;
    font-size: 15px;
    color: #444;
    max-width: 900px;
    margin: 0 auto;
}
.detail-content h1, .detail-content h2, .detail-content h3, .detail-content h4 {
    color: #2c3e50;
    margin: 20px 0 12px;
    font-weight: 600;
}
.detail-content h2 { font-size: 22px; }
.detail-content h3 { font-size: 18px; }
.detail-content p { margin-bottom: 14px; }
.detail-content img { max-width: 100%; height: auto; display: block; margin: 14px auto; border-radius: 4px; }
.detail-content ul, .detail-content ol { margin: 14px 0 14px 24px; }
.detail-content li { margin-bottom: 6px; }
.detail-content a { color: var(--primary); text-decoration: underline; }
.detail-content blockquote {
    border-left: 4px solid var(--primary);
    background: var(--bg-light);
    padding: 12px 18px;
    margin: 14px 0;
    color: var(--text-light);
}

/* ============ 列表筛选 ============ */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.filter-tab {
    padding: 8px 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-light);
    font-size: 14px;
    transition: all 0.2s;
}
.filter-tab:hover, .filter-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ============ 分页 ============ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    padding: 0 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-light);
    font-size: 14px;
}
.pagination a:hover { color: var(--primary); border-color: var(--primary); }
.pagination .active span, .pagination span.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.pagination .disabled span { color: var(--text-lighter); cursor: not-allowed; }

/* ============ 联系我们 ============ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    align-items: start;
}
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info { background: #fff; padding: 30px; border-radius: 8px; box-shadow: var(--shadow); }
.contact-info h3 { font-size: 20px; color: #2c3e50; margin-bottom: 16px; }
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.contact-info-item:last-child { border-bottom: none; }
.contact-info-icon {
    width: 36px; height: 36px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.contact-info-content { flex: 1; }
.contact-info-content .label { color: var(--text-lighter); font-size: 12px; }
.contact-info-content .value { color: #2c3e50; font-size: 14px; margin-top: 2px; }

.message-form { background: #fff; padding: 30px; border-radius: 8px; box-shadow: var(--shadow); }
.message-form h3 { font-size: 20px; color: #2c3e50; margin-bottom: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; color: var(--text-light); font-size: 14px; margin-bottom: 6px; }
.form-field label .required { color: #f56c6c; }
.form-field input, .form-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-field input:focus, .form-field textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.form-field textarea { resize: vertical; min-height: 100px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-row-2 { grid-template-columns: 1fr; } }

.alert { padding: 10px 14px; border-radius: 4px; font-size: 14px; margin-bottom: 14px; display: none; }
.alert.show { display: block; }
.alert.success { background: #f0f9eb; color: #67c23a; border: 1px solid #e1f3d8; }
.alert.error { background: #fef0f0; color: #f56c6c; border: 1px solid #fde2e2; }

/* ============ 页脚 ============ */
.site-footer {
    background: #2c3e50;
    color: rgba(255,255,255,0.7);
    padding: 50px 0 0;
    margin-top: 60px;
}
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.site-footer p { margin-bottom: 8px; font-size: 14px; line-height: 1.8; }
.site-footer a { color: rgba(255,255,255,0.7); }
.site-footer a:hover { color: #fff; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 20px; } }
.footer-bottom {
    padding: 20px 0;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}
.footer-bottom p { margin: 2px 0; font-size: 12px; }
.footer-bottom a { color: rgba(255,255,255,0.5); }

/* ============ 工具类 ============ */
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-lighter);
    background: #fff;
    border-radius: 8px;
}
.empty-state p { margin-top: 8px; }
