/* --- 1. 全局与基础样式 (纺织主题) --- */
:root {
    /* 核心色彩 - 纺织感 */
    --primary-color: #2F4550;   /* 深靛蓝 (经典染料色) */
    --secondary-color: #B8860B; /* 织线金/黄铜色 (高级点缀) */
    --dark-color: #1A2421;      /* 极深灰墨色 */
    --light-color: #F7F5F0;     /* 亚麻白/原布色 (替代纯白作为背景) */
    --text-color: #4A4A4A;      /* 柔和的深灰色 */
    --border-color: #DCD6CC;    /* 偏暖的边框色 */
    --white-color: #FFFFFF;     
    --shadow: 0 8px 24px rgba(47, 69, 80, 0.08);
    
    /* 字体设置 - 标题采用优雅衬线体，正文采用清晰无衬线体 */
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: "Playfair Display", "Georgia", "Times New Roman", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white-color);
    display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { 
    font-family: var(--font-heading); 
    color: var(--dark-color); 
    margin-bottom: 1rem; 
    font-weight: 600;
}
h2 { 
    font-size: 2.6rem; 
    text-align: center; 
    margin-bottom: 3.5rem; 
    position: relative; 
}
/* 标题底部的车线效果 */
h2::after { 
    content: ''; 
    position: absolute; 
    bottom: -15px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 80px; 
    height: 0; 
    border-bottom: 2px dashed var(--secondary-color); 
}

section { padding: 90px 0; }
section:nth-of-type(odd) { background-color: var(--light-color); }

/* 按钮 - 模拟布料标签 */
.btn {
    display: inline-block; 
    padding: 14px 32px; 
    background-color: var(--primary-color);
    color: var(--white-color); 
    text-decoration: none; 
    border-radius: 2px; 
    font-weight: normal;
    letter-spacing: 1px;
    transition: all 0.3s ease; 
    border: none; 
    cursor: pointer;
    position: relative;
}
/* 按钮内部的缝线细节 */
.btn::before {
    content: '';
    position: absolute;
    top: 4px; left: 4px; right: 4px; bottom: 4px;
    border: 1px dashed rgba(255,255,255,0.4);
    pointer-events: none;
}
.btn:hover { 
    background-color: var(--secondary-color); 
    color: #fff; 
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(184, 134, 11, 0.3);
}

/* --- 2. 头部与导航 --- */
.main-header { 
    background-color: var(--white-color); 
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 1000; width: 100%; 
}
.main-header .container { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo { 
    font-family: var(--font-heading);
    font-size: 2rem; 
    font-weight: bold; 
    color: var(--primary-color); 
    text-decoration: none; 
    letter-spacing: 2px;
}
.main-nav ul { display: flex; list-style: none; }
.main-nav ul li { margin-left: 35px; }
.main-nav ul li a { 
    text-decoration: none; 
    color: var(--text-color); 
    font-size: 0.95rem;
    font-weight: 500; 
    position: relative; 
    padding: 5px 0; 
    text-transform: uppercase;
    letter-spacing: 1px;
}
.main-nav ul li a::after { 
    content: ''; 
    position: absolute; 
    bottom: -2px; left: 0; 
    width: 0; height: 2px; 
    background-color: var(--secondary-color); 
    transition: width 0.3s ease; 
}
.main-nav ul li a:hover::after, .main-nav ul li a.active::after { width: 100%; }
.main-nav ul li a.active { color: var(--primary-color); }
.menu-toggle { display: none; cursor: pointer; background: none; border: none; font-size: 1.8rem; color: var(--primary-color); }

/* --- 3. 英雄区域 (纯CSS编织纹理) --- */
#hero {
    background-color: var(--primary-color);
    /* 通过多重渐变创造出经纬交织的布料肌理 */
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 2px, transparent 2px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 2px, transparent 2px),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 24px 24px, 24px 24px, 6px 6px, 6px 6px;
    background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
    color: var(--white-color); 
    height: 80vh; min-height: 550px;
    display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 20px;
    position: relative;
    border-bottom: 8px solid var(--primary-color); /* 配合伪元素形成布料锁边效果 */
}
/* 底部车缝线锁边效果 */
#hero::after {
    content: ''; 
    position: absolute; 
    bottom: 4px; 
    left: 0; 
    width: 100%; 
    height: 0;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.3);
}
#hero h1 { 
    font-size: 4rem; 
    color: var(--white-color); 
    margin-bottom: 1.5rem; 
    text-shadow: 2px 4px 10px rgba(0,0,0,0.3);
}
#hero p { 
    font-size: 1.2rem; max-width: 750px; margin: 0 auto 2.5rem; 
    opacity: 0.9; font-weight: 300; 
    letter-spacing: 0.5px;
}

/* --- 4. 解决方案 (业务展示) --- */
.solutions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.solution-card { 
    background-color: var(--white-color); 
    padding: 40px 30px; 
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--secondary-color); /* 顶部点缀 */
    border-radius: 2px; 
    text-align: center; 
    transition: transform 0.4s ease, box-shadow 0.4s ease; 
}
.solution-card:hover { 
    transform: translateY(-8px); 
    box-shadow: var(--shadow); 
    border-color: transparent;
}
/* 将原有图标改造为真正的“纽扣/线轴/缝线”等纺织相关几何图形 */
.solution-icon { 
    width: 70px; height: 70px; margin: 0 auto 25px; 
    background-color: var(--light-color); 
    border: 2px dashed var(--secondary-color);
    border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    position: relative; 
    box-shadow: inset 0 0 0 4px var(--white-color); /* 内圈留白 */
}
.solution-icon::before, .solution-icon::after { display: block; } /* 确保几何形状正常渲染 */

/* 1. 模拟两个交叠的纽扣 */
.icon-cloud::before { content:''; width: 20px; height: 20px; border-radius: 50%; background: var(--primary-color); box-shadow: -10px 0 0 rgba(47, 69, 80, 0.7); }
/* 2. 模拟彩色线轴 */
.icon-data::before { content:''; width: 10px; height: 24px; background: var(--secondary-color); border-top: 4px solid var(--primary-color); border-bottom: 4px solid var(--primary-color); }
/* 3. 模拟纺织机的经纬网格 */
.icon-ai::before { content:''; width: 24px; height: 24px; background-image: repeating-linear-gradient(0deg, transparent, transparent 4px, var(--primary-color) 4px, var(--primary-color) 6px), repeating-linear-gradient(90deg, transparent, transparent 4px, var(--secondary-color) 4px, var(--secondary-color) 6px); }
/* 4. 模拟交叉缝线 (X形) */
.icon-security::before { content:''; width: 2px; height: 26px; background: var(--primary-color); transform: rotate(45deg); position: absolute; }
.icon-security::after { content:''; width: 2px; height: 26px; background: var(--primary-color); transform: rotate(-45deg); position: absolute; }
/* 5. 模拟带有线头的穿针引线 */
.icon-iot::before { content:''; width: 8px; height: 24px; border: 2px solid var(--primary-color); border-radius: 8px; border-bottom: none; }
.icon-iot::after { content:''; width: 2px; height: 16px; background: var(--secondary-color); position: absolute; bottom: 13px; }
/* 6. 模拟皮尺/卷尺 */
.icon-consult::before { content:''; width: 30px; height: 12px; background: var(--secondary-color); border-radius: 2px; background-image: repeating-linear-gradient(90deg, transparent, transparent 4px, var(--dark-color) 4px, var(--dark-color) 5px); }

.solution-card h3 { font-size: 1.4rem; color: var(--primary-color); }

/* --- 5. 关于我们 --- */
#about .about-content { display: flex; align-items: center; gap: 60px; }
.about-text { flex: 1.2; }
.about-text h3 { color: var(--secondary-color); font-size: 1.8rem; margin-bottom: 1.5rem; }
.about-text p { margin-bottom: 1.2rem; font-size: 1.05rem; }

/* 模拟一块缝制的布料色卡 */
.about-visual {
    flex: 0.8; height: 350px; 
    background-color: var(--primary-color);
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(184, 134, 11, 0.15) 10px,
        rgba(184, 134, 11, 0.15) 20px
    );
    border: 8px solid var(--white-color);
    box-shadow: 0 0 0 1px var(--border-color), var(--shadow);
    display: flex; align-items: center; justify-content: center;
    position: relative; 
}
.about-visual span { 
    z-index: 1; 
    background: var(--white-color);
    color: var(--primary-color);
    padding: 15px 30px;
    border: 1px dashed var(--secondary-color);
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.about-action { margin-top: 2.5rem; }

/* --- 6. 资讯/动态 --- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.news-card {
    background-color: var(--white-color); 
    border-radius: 2px; 
    overflow: hidden; display: flex; flex-direction: column; 
    transition: transform 0.4s ease;
    border: 1px solid var(--border-color);
}
.news-card:hover { 
    transform: translateY(-5px); 
    box-shadow: var(--shadow); 
}

/* 占位图使用类似布料染色的CSS斜纹渐变 */
.news-cover {
    height: 220px; width: 100%; overflow: hidden; position: relative;
    background-color: #3a506b;
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.05), rgba(255,255,255,0.05) 5px, transparent 5px, transparent 10px), linear-gradient(120deg, var(--primary-color), #1c2541);
}
.news-card:nth-child(2n) .news-cover { 
    background-color: #8b5a5a;
    background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,0.05), rgba(255,255,255,0.05) 5px, transparent 5px, transparent 10px), linear-gradient(120deg, #7A4B4B, #4A2B2B); 
}
.news-card:nth-child(3n) .news-cover { 
    background-color: #b8860b;
    background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.05), rgba(255,255,255,0.05) 5px, transparent 5px, transparent 10px), linear-gradient(120deg, var(--secondary-color), #8a6308); 
}

.news-cover img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.6s ease, filter 0.6s;
    filter: sepia(20%) contrast(110%); /* 给真实的图片增加一点复古纺织胶片感 */
}
.news-card:hover .news-cover img { transform: scale(1.05); }

.news-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.news-content h4 { font-size: 1.3rem; margin-bottom: 0.8rem; line-height: 1.4; }
.news-content h4 a { text-decoration: none; color: var(--primary-color); transition: color 0.3s; }
.news-content h4 a:hover { color: var(--secondary-color); }
.news-meta { font-size: 0.85rem; color: #888; margin-bottom: 1.2rem; display: flex; gap: 10px; font-family: monospace; }
.news-meta a { color: var(--secondary-color); text-decoration: none; transition: color 0.3s ease; }
.news-meta a:hover { color: var(--primary-color); text-decoration: underline; }
.news-content p { flex-grow: 1; margin-bottom: 1.5rem; font-size: 0.95rem; color: #666; line-height: 1.6; }
.read-more-link { 
    text-decoration: none; color: var(--primary-color); 
    font-weight: bold; align-self: flex-start; 
    border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
.read-more-link:hover { border-color: var(--primary-color); }

/* --- 7. FAQ --- */
.faq-accordion { max-width: 850px; margin: 0 auto; }
.faq-item { border-bottom: 1px dashed var(--border-color); }
.faq-question {
    width: 100%; background: none; border: none; text-align: left; padding: 25px 20px;
    font-size: 1.15rem; font-weight: 600; cursor: pointer; display: flex;
    justify-content: space-between; align-items: center; color: var(--primary-color);
    font-family: var(--font-heading);
}
.faq-question::after { content: '+'; font-size: 1.8rem; color: var(--secondary-color); transition: transform 0.3s ease; font-family: var(--font-main); }
.faq-item.active .faq-question::after { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; padding: 0 20px; }
.faq-item.active .faq-answer { padding: 0 20px 25px; }
.faq-answer p {
    color: #666; font-size: 1rem; line-height: 1.8;
    border-top: 1px solid var(--light-color); 
    padding: 15px 0 0 0; margin-top: 5px;
}

/* --- 8. Footer --- */
.main-footer { background-color: var(--dark-color); color: #d5cfc4; padding: 70px 0 30px; border-top: 5px solid var(--secondary-color); }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; margin-bottom: 50px; }
.footer-column { flex: 1; min-width: 220px; }
.footer-column h4 { color: var(--white-color); margin-bottom: 1.5rem; font-size: 1.3rem; letter-spacing: 1px; }
.footer-column ul { list-style: none; }
.footer-column ul li { margin-bottom: 12px; }
/* 修正：避免 hover 引起文字挤压排版抖动 */
.footer-column ul li a { display: inline-block; color: #a8a39a; text-decoration: none; transition: all 0.3s ease; }
.footer-column ul li a:hover { color: var(--secondary-color); transform: translateX(5px); }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.9rem; color: #888; }

/* --- 9. CMS 内容页排版 --- */
.breadcrumb { padding: 25px 0; font-size: 0.9rem; color: #888; border-bottom: 1px dashed var(--border-color); margin-bottom: 40px; }
.breadcrumb a { color: var(--primary-color); text-decoration: none; }
.breadcrumb a:hover { color: var(--secondary-color); }
.breadcrumb span { margin: 0 12px; color: var(--border-color); }
.page-container { padding: 50px 0 100px; }
.page-header { text-align: center; margin-bottom: 50px; }
.page-header h1 { font-size: 2.8rem; color: var(--primary-color); }
.page-meta { color: #888; font-size: 0.95rem; margin-top: 15px; font-family: monospace; }
.page-meta a { color: var(--secondary-color); text-decoration: none; transition: color 0.3s ease; }
.page-meta a:hover { color: var(--primary-color); text-decoration: underline; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 15px; margin-top: 60px; }
.page-btn { 
    display: inline-flex; align-items: center; justify-content: center; 
    width: 45px; height: 45px; border: 1px solid var(--border-color); 
    border-radius: 2px; color: var(--primary-color); 
    text-decoration: none; transition: all 0.3s; background: var(--white-color);
}
.page-btn:hover { background-color: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.page-current { display: inline-flex; align-items: center; height: 45px; padding: 0 20px; font-weight: bold; color: var(--dark-color); font-family: monospace; font-size: 1.1rem; }

/* Markdown 正文细节 - 纺织质感排版 */
.markdown-body { color: #333; font-size: 1.1rem; line-height: 1.9; max-width: 100%; overflow-x: hidden; font-family: var(--font-main); }
.markdown-body h2 { font-size: 2rem; margin-top: 3rem; margin-bottom: 1.5rem; text-align: left; }
.markdown-body h2::after { display: none; }
.markdown-body h3 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 1rem; color: var(--primary-color); }
.markdown-body p { margin-bottom: 1.5rem; }
.markdown-body ul, .markdown-body ol { padding-left: 25px; margin-bottom: 1.5rem; }
.markdown-body li { margin-bottom: 0.8rem; }
.markdown-body img { max-width: 100%; height: auto; border-radius: 2px; margin: 30px 0; box-shadow: var(--shadow); border: 5px solid var(--white-color); outline: 1px solid var(--border-color); }

/* 引用块设计为布料裁片风格 (修正了虚线框可能与文字重叠的问题) */
.markdown-body blockquote { 
    border-left: 4px solid var(--secondary-color); 
    background-color: var(--light-color); 
    padding: 25px 30px; margin: 30px 0; 
    color: #555; position: relative; font-style: italic; font-family: var(--font-heading); font-size: 1.2rem;
}
.markdown-body blockquote::after {
    content: ''; position: absolute;
    top: 6px; bottom: 6px; right: 6px; left: 6px;
    border: 1px dashed var(--border-color);
    pointer-events: none;
}
.markdown-body a { color: var(--secondary-color); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.markdown-body a:hover { border-bottom-color: var(--secondary-color); }
.markdown-body hr { border: 0; height: 0; border-bottom: 1px dashed var(--border-color); margin: 50px 0; }
.markdown-body pre { background: var(--dark-color); color: #d5cfc4; padding: 25px; border-radius: 2px; overflow-x: auto; margin-bottom: 25px; border-left: 4px solid var(--primary-color); }

.post-tags { margin-top: 50px; padding-top: 30px; border-top: 1px dashed var(--border-color); }
.tag-pill { 
    display: inline-block; background: var(--white-color); padding: 8px 18px; 
    color: var(--text-color); text-decoration: none; font-size: 0.9rem; 
    margin-right: 12px; margin-bottom: 12px; border: 1px solid var(--border-color); 
    transition: all 0.3s; position: relative;
}
.tag-pill::before { content: '#'; color: var(--secondary-color); margin-right: 5px; font-weight: bold; }
.tag-pill:hover { border-color: var(--secondary-color); background: var(--light-color); }

.post-navigation { display: flex; justify-content: space-between; margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--border-color); }
.nav-next, .nav-prev { max-width: 48%; text-decoration: none; color: var(--primary-color); font-weight: bold; transition: color 0.3s; }
.nav-next:hover, .nav-prev:hover { color: var(--secondary-color); }
.nav-next span, .nav-prev span { display: block; font-size: 0.85rem; color: #888; font-weight: normal; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }

.error-page { text-align: center; padding: 120px 0; }
.error-page h1 { font-size: 6rem; color: var(--primary-color); margin-bottom: 10px; font-family: var(--font-heading); }
.error-page p { font-size: 1.5rem; margin-bottom: 40px; color: #666; }
.no-content { text-align: center; padding: 60px; color: #888; background: var(--light-color); border: 1px dashed var(--border-color); font-style: italic; }

/* --- 10. 响应式布局 --- */
@media (max-width: 992px) { 
    h2 { font-size: 2.2rem; } 
    #hero h1 { font-size: 3.2rem; } 
}

@media (max-width: 768px) {
    .logo { font-size: 1.6rem; }
    .menu-toggle { display: block; }
    .main-nav { 
        position: absolute; top: 80px; left: 0; width: 100%; 
        background-color: var(--white-color); flex-direction: column; 
        max-height: 0; overflow: hidden; transition: max-height 0.4s ease-in-out; 
        box-shadow: 0 10px 15px rgba(0,0,0,0.05); /* 修正：移除了多余的border-top，防止双层横线 */
    }
    .main-nav.active { max-height: 600px; } /* 修正：提高高度，防止项目增多时被截断 */
    .main-nav ul { flex-direction: column; padding: 10px 0; }
    .main-nav ul li { margin: 0; text-align: center; border-bottom: 1px dashed var(--light-color); }
    .main-nav ul li:last-child { border-bottom: none; }
    .main-nav ul li a { display: block; padding: 15px 20px; }
    .main-nav ul li a::after { display: none; }
    
    #about .about-content { flex-direction: column; }
    .about-visual { width: 100%; height: 250px; }
    .footer-content { flex-direction: column; text-align: center; }
    .page-header h1 { font-size: 2.2rem; }
}

@media (max-width: 480px) { 
    #hero h1 { font-size: 2.5rem; } 
    #hero p { font-size: 1.05rem; } 
    section { padding: 60px 0; } 
    h2 { font-size: 1.8rem; } 
    .solution-card { padding: 30px 20px; }
}