/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo h1 {
    font-size: 24px;
    color: #667eea;
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover,
.nav a.active {
    color: #667eea;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #667eea;
    transition: 0.3s;
}

/* Hero 区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: white;
    color: #667eea;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: #667eea;
    color: white;
}

.btn-secondary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* 通用区块 */
.section {
    padding: 60px 0;
}

.section-bg {
    background: #f8f9fa;
}

.section-title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 50px;
    color: #333;
}

.section-footer {
    text-align: center;
    margin-top: 30px;
}

/* 关于我们预览 */
.about-preview {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-preview p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
}

/* 产品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.product-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.product-more a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.product-more a:hover {
    text-decoration: underline;
}

/* 新闻网格 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.news-date {
    color: #667eea;
    font-size: 14px;
    margin-bottom: 10px;
}

.news-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.news-card p {
    color: #666;
    line-height: 1.6;
}

/* 页面头部 */
.page-header {
    background: white;
    color: #333;
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e5;
}

/* 面包屑导航 */
.breadcrumb {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #666;
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 18px;
    opacity: 0.9;
}

/* 关于我们页面 */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-content h2 {
    font-size: 28px;
    margin: 30px 0 15px;
    color: #333;
}

.about-content p {
    line-height: 1.8;
    color: #666;
    margin-bottom: 15px;
}

.about-detail {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    line-height: 2;
}

.company-info {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
}

.company-info p {
    margin: 10px 0;
    line-height: 1.8;
}

/* 联系我们页面 */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h2,
.contact-form h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

.info-item {
    margin-bottom: 30px;
}

.info-item h3 {
    font-size: 18px;
    color: #667eea;
    margin-bottom: 10px;
}

.info-item p {
    color: #666;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.message.success {
    background: #d4edda;
    color: #155724;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 40px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

#modal-body h2 {
    margin-bottom: 20px;
    color: #333;
}

.product-content {
    margin-top: 20px;
    line-height: 1.8;
    color: #666;
}

/* 页脚 */
.footer {
    background: #2d3436;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #fff;
}

.footer-section p {
    color: #b2bec3;
    line-height: 1.8;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    color: #b2bec3;
}

/* 主内容 */
.main {
    min-height: calc(100vh - 350px);
}

/* Markdown 内容样式 */
.product-content,
.about-detail {
    line-height: 1.8;
    color: #666;
}

.product-content h1,
.product-content h2,
.product-content h3,
.about-detail h1,
.about-detail h2,
.about-detail h3 {
    color: #333;
    margin: 20px 0 10px;
}

.product-content h1,
.about-detail h1 {
    font-size: 28px;
}

.product-content h2,
.about-detail h2 {
    font-size: 24px;
}

.product-content h3,
.about-detail h3 {
    font-size: 20px;
}

.product-content p,
.about-detail p {
    margin-bottom: 15px;
}

.product-content ul,
.product-content ol,
.about-detail ul,
.about-detail ol {
    margin: 15px 0;
    padding-left: 30px;
}

.product-content li,
.about-detail li {
    margin-bottom: 8px;
}

.product-content strong,
.about-detail strong {
    color: #333;
}

.product-content em,
.about-detail em {
    color: #667eea;
}

.product-content a,
.about-detail a {
    color: #667eea;
    text-decoration: none;
}

.product-content a:hover,
.about-detail a:hover {
    text-decoration: underline;
}

.product-content img,
.about-detail img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 5px;
}

.product-content pre,
.about-detail pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 15px 0;
}

.product-content code,
.about-detail code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.product-content pre code,
.about-detail pre code {
    background: none;
    padding: 0;
}

.product-content blockquote,
.about-detail blockquote {
    border-left: 4px solid #667eea;
    padding-left: 15px;
    margin: 15px 0;
    color: #666;
    font-style: italic;
}

/* 响应式 - 平板 */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .nav.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .products-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 32px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* 响应式 - 手机 */
@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .section {
        padding: 30px 0;
    }

    .product-card,
    .news-card {
        padding: 20px;
    }
    
    .about-content h2 {
        font-size: 22px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 10% auto;
    }
}
