/* --- 1. 全局与基础样式 --- */
:root {
    /* 核心品牌色：调整为更具科技感与能源感的深绿色系 */
    --primary-color: #00897b;       /* 核心绿 - 沉稳、清洁能源 */
    --primary-dark: #005b4f;        /* 深绿 - 用于hover和边框 */
    --secondary-color: #00bcd4;     /* 电光蓝 - 代表电力、传输 */
    --accent-color: #8bc34a;        /* 生态绿 - 环保、可持续 */
    
    /* 中性色与背景 */
    --dark-color: #1a2732;          /* 近黑的深蓝灰 - 替代纯黑，更高级 */
    --text-color: #37474f;          /* 正文深灰 */
    --light-color: #e0f2f1;         /* 浅色点缀 */
    --white-color: #ffffff;
    --gray-bg: #f7f9fa;             /* 极淡的灰蓝色背景 */
    --border-color: #cfd8dc;
    
    /* 视觉效果 */
    --shadow: 0 10px 30px rgba(0, 77, 64, 0.08); /* 更柔和现代的阴影 */
    --shadow-hover: 0 15px 35px rgba(0, 77, 64, 0.15);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), #00695c);
    --gradient-hero: linear-gradient(135deg, #004d40 0%, #00695c 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), #26c6da);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7; /* 增加行高，提升阅读舒适度 */
    color: var(--text-color);
    background-color: var(--white-color);
    display: flex; flex-direction: column; min-height: 100vh;
    -webkit-font-smoothing: antialiased; /* 让字体在Mac上更清晰 */
}

main { flex: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* 排版 */
h1, h2, h3, h4, h5, h6 { color: var(--dark-color); margin-bottom: 1rem; line-height: 1.3; }

h2 { 
    font-size: 2.25rem; 
    text-align: center; 
    margin-bottom: 3.5rem; 
    position: relative; 
    font-weight: 700;
    letter-spacing: -0.5px;
}
h2::after { 
    content: ''; 
    position: absolute; 
    bottom: -15px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 60px; 
    height: 4px; 
    background: var(--gradient-primary);
    border-radius: 2px; 
}

section { padding: 80px 0; position: relative; }
section:nth-of-type(odd) { background-color: var(--gray-bg); }

/* 按钮样式 */
.btn {
    display: inline-block; 
    padding: 14px 32px; 
    background: var(--gradient-primary);
    color: var(--white-color); 
    text-decoration: none; 
    border-radius: 50px; /* 圆角胶囊按钮，更现代 */
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    border: none; 
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 137, 123, 0.3);
    letter-spacing: 0.5px;
}
.btn:hover { 
    background: linear-gradient(135deg, #00796b, #004d40); 
    transform: translateY(-2px); 
    box-shadow: 0 8px 20px rgba(0, 137, 123, 0.4);
    color: #fff; 
}

/* --- 2. 头部与导航 --- */
.main-header { 
    background-color: rgba(255, 255, 255, 0.98); 
    backdrop-filter: blur(10px); /* 磨砂玻璃效果 */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05); 
    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-size: 1.6rem; 
    font-weight: 800; 
    color: var(--primary-dark); 
    text-decoration: none; 
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
}
/* 导航 */
.main-nav ul { display: flex; list-style: none; margin: 0; padding: 0; }
.main-nav ul li { margin-left: 35px; }
.main-nav ul li a { 
    text-decoration: none; 
    color: var(--text-color); 
    font-weight: 500; 
    font-size: 1rem;
    position: relative; 
    padding: 8px 0; 
    transition: color 0.3s ease;
}
.main-nav ul li a::after { 
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 0; 
    height: 2px; 
    background: var(--primary-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:hover, 
.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-dark); 
    padding: 5px;
}

/* --- 3. 英雄区域 (Hero Section) --- */
#hero {
    background: var(--gradient-hero);
    color: var(--white-color); 
    height: 85vh; 
    min-height: 550px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    padding: 0 20px;
    position: relative;
    overflow: hidden;
}
/* 增加一个深色遮罩，确保文字在任何背景下清晰 */
#hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}
/* 动态背景纹理 */
#hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        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: 40px 40px;
    z-index: 0;
}
/* 专门控制 PHP 中的 .hero-content */
.hero-content {
    position: relative;
    z-index: 2; /* 确保在遮罩之上 */
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}
#hero h1 { 
    font-size: 3.5rem; 
    color: var(--white-color); 
    margin-bottom: 1.5rem; 
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
#hero p { 
    font-size: 1.25rem; 
    margin-bottom: 2.5rem; 
    opacity: 0.95; 
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

/* --- 4. 解决方案 (Cards) --- */
#solutions { background-color: var(--white-color); }
.solutions-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
}
.solution-card { 
    background-color: var(--white-color); 
    padding: 40px 30px; 
    border-radius: 12px; 
    box-shadow: var(--shadow); 
    text-align: center; 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    top: 0;
}
.solution-card:hover { 
    transform: translateY(-8px); 
    box-shadow: var(--shadow-hover); 
    border-color: rgba(0, 137, 123, 0.2);
}

.solution-icon { 
    width: 80px; 
    height: 80px; 
    margin: 0 auto 25px; 
    background: linear-gradient(135deg, #e0f2f1, #b2dfdb);
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 2.2rem;
    color: var(--primary-color);
    position: relative;
}

/* --- 图标优化：将 Emoji 伪装成图标 --- */
/* 这里使用了文字阴影技巧，让Emoji看起来更像纯色图标，或者保持原色但增加发光 */
.solution-icon::before {
    /* 技巧：如果想要单色图标，可以使用 filter: grayscale(100%); 
       这里保持原色，但增加一点微光让它融入设计。
    */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.icon-cloud::before { content: "☀️"; }      /* 太阳能/云 */
.icon-data::before { content: "⚡"; }      /* 电力/数据 */
.icon-ai::before { content: "🔋"; }        /* 储能/智能 */
.icon-security::before { content: "🛡️"; }  /* 安全/防护 - 用盾牌替换了锁 */
.icon-iot::before { content: "📡"; }       /* 传输/IoT */
.icon-consult::before { content: "💡"; }   /* 创新/咨询 */

.solution-card h3 { 
    font-size: 1.4rem; 
    margin-bottom: 12px;
    color: var(--dark-color);
}
.solution-card p { 
    color: #607d8b; 
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- 5. 关于我们 --- */
#about .about-content { 
    display: flex; 
    align-items: center; 
    gap: 60px; 
}
.about-text { flex: 1; }
.about-text p { 
    margin-bottom: 1.5rem; 
    color: #546e7a;
    text-align: justify;
}
.about-visual {
    flex: 0 0 45%; 
    height: 320px; 
    background: var(--gradient-primary);
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: var(--white-color); 
    box-shadow: var(--shadow);
    position: relative; 
    overflow: hidden; /* 防止动画溢出 */
}
/* 调整光效动画，使其更柔和 */
.about-visual::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.1) 50%, transparent 60%);
    animation: shine 4s infinite linear;
}
@keyframes shine {
    0% { transform: translate(-50%, -50%) rotate(45deg); }
    100% { transform: translate(20%, 20%) rotate(45deg); }
}
.about-visual span { 
    z-index: 1; 
    font-size: 1.8rem; 
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- 6. 最新动态 (News) --- */
.news-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); 
    gap: 30px; 
}
.news-card {
    background-color: var(--white-color); 
    border-radius: 10px; 
    box-shadow: var(--shadow);
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    height: 100%;
}
.news-card:hover { 
    transform: translateY(-5px); 
    box-shadow: var(--shadow-hover); 
    border-color: var(--primary-color);
}

/* 图片容器修正 */
.news-cover {
    height: 220px; 
    width: 100%; 
    overflow: hidden; 
    position: relative;
    background-color: #eee;
}
.news-cover img {
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center center; /* 确保图片居中裁剪 */
    display: block;
    transition: transform 0.6s ease;
}
.news-card:hover .news-cover img { transform: scale(1.08); }

.news-content { 
    padding: 24px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
}
.news-content h4 { 
    font-size: 1.3rem; 
    margin-bottom: 0.8rem; 
    line-height: 1.4;
    font-weight: 700;
}
.news-content h4 a { 
    text-decoration: none; 
    color: var(--dark-color); 
    transition: color 0.2s; 
}
.news-content h4 a:hover { color: var(--primary-color); }

.news-meta { 
    font-size: 0.85rem; 
    color: #90a4ae; 
    margin-bottom: 1rem; 
    display: flex; 
    gap: 10px; 
}
.news-meta a { 
    color: var(--primary-color); 
    text-decoration: none; 
    font-weight: 600; 
}
.news-meta a:hover { text-decoration: underline; }

.news-content p { 
    flex-grow: 1; 
    margin-bottom: 1.2rem; 
    font-size: 0.95rem; 
    color: #607d8b; 
    line-height: 1.6; 
}
.read-more-link { 
    text-decoration: none; 
    color: var(--primary-color); 
    font-weight: 600; 
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}
.read-more-link:hover { color: var(--primary-dark); }

/* --- 7. FAQ --- */
.faq-accordion { 
    max-width: 800px; 
    margin: 0 auto; 
}
.faq-item { 
    border: 1px solid var(--border-color); 
    background-color: var(--white-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}
.faq-question {
    width: 100%; 
    background: var(--white-color); 
    border: none; 
    text-align: left; 
    padding: 20px 25px;
    font-size: 1.05rem; 
    font-weight: 600; 
    cursor: pointer; 
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    color: var(--dark-color);
    transition: background-color 0.2s;
}
.faq-question:hover { background-color: #f0fdfc; }
.faq-question::after { 
    content: '+'; 
    font-size: 1.5rem; 
    color: var(--primary-color); 
    transition: transform 0.3s ease; 
    line-height: 1;
}
.faq-item.active .faq-question {
    background-color: #e0f2f1;
    color: var(--primary-dark);
}
.faq-item.active .faq-question::after { 
    transform: rotate(45deg); 
}
.faq-answer { 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.3s ease; 
}
.faq-answer p {
    padding: 20px 25px;
    color: #546e7a;
    font-size: 0.95rem;
    line-height: 1.7;
    border-top: 1px solid #f1f1f1;
}

/* --- 8. Footer --- */
.main-footer { 
    background-color: #151e26; /* 极深蓝黑，比纯黑更护眼 */
    color: #cfd8dc; 
    padding: 70px 0 20px; 
    margin-top: auto; 
    font-size: 0.95rem;
}
.footer-content { 
    display: flex; 
    justify-content: space-between; 
    flex-wrap: wrap; 
    gap: 40px; 
    margin-bottom: 50px; 
}
.footer-column { flex: 1; min-width: 200px; }
.footer-column h4 { 
    color: var(--white-color); 
    margin-bottom: 1.5rem; 
    font-size: 1.1rem; 
    position: relative;
    padding-bottom: 12px;
    letter-spacing: 0.5px;
}
.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background-color: var(--primary-color);
}
.footer-column ul { list-style: none; }
.footer-column ul li { margin-bottom: 10px; }
.footer-column ul li a { 
    color: #b0bec5; 
    text-decoration: none; 
    transition: all 0.2s; 
}
.footer-column ul li a:hover { 
    color: var(--secondary-color); 
    padding-left: 5px; 
}
.footer-bottom { 
    text-align: center; 
    padding-top: 25px; 
    border-top: 1px solid rgba(255, 255, 255, 0.05); 
    font-size: 0.85rem; 
    color: #78909c; 
}
.footer-bottom a { color: #90a4ae; text-decoration: none; transition: color 0.2s;}
.footer-bottom a:hover { color: var(--white-color); }

/* --- CMS 内容页面样式 --- */
.breadcrumb { 
    padding: 15px 0; 
    font-size: 0.9rem; 
    color: #78909c; 
    border-bottom: 1px solid var(--border-color); 
    margin-bottom: 40px; 
    display: flex;
    flex-wrap: wrap; /* 移动端换行 */
    align-items: center;
}
.breadcrumb a { 
    color: var(--primary-color); 
    text-decoration: none; 
}
.breadcrumb span { margin: 0 8px; color: #ccc; }

.page-container { padding: 60px 0 100px; }
.page-header { margin-bottom: 40px; }
.page-header.center-header { text-align: center; }
.page-header h1 { 
    font-size: 2.4rem; 
    color: var(--dark-color); 
    line-height: 1.25;
}
.page-meta { 
    color: #90a4ae; 
    font-size: 0.9rem; 
    margin-top: 15px; 
}
.page-meta a { color: var(--primary-color); text-decoration: none; }

/* 分页 */
.pagination { 
    display: flex; 
    justify-content: center; 
    gap: 8px; 
    margin-top: 60px; 
}
.page-btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    width: 44px; 
    height: 44px; 
    border: 1px solid var(--border-color); 
    border-radius: 50%; 
    color: var(--text-color); 
    text-decoration: none; 
    transition: all 0.2s; 
    background-color: 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: 44px; 
    padding: 0 15px; 
    font-weight: 600; 
    color: var(--dark-color); 
}

/* Markdown 文章详情 */
.markdown-body { 
    color: #2c3e50; 
    font-size: 1.05rem; 
    line-height: 1.8; 
    max-width: 100%; 
    overflow-wrap: break-word; /* 防止长单词溢出 */
}
.markdown-body h2 { 
    font-size: 1.8rem; 
    margin-top: 3rem; 
    margin-bottom: 1.5rem; 
    padding-bottom: 12px; 
    border-bottom: 1px solid var(--border-color); 
    text-align: left; 
}
.markdown-body h2::after { display: none; } /* 移除通用H2的装饰线 */
.markdown-body h3 { font-size: 1.4rem; margin-top: 2.5rem; color: var(--dark-color); }
.markdown-body p { margin-bottom: 1.6rem; }

/* 优化文章内图片 */
.markdown-body img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 8px; 
    margin: 30px 0; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    display: block; /* 消除图片底部间隙 */
}

/* 引用块优化 */
.markdown-body blockquote { 
    border-left: 4px solid var(--primary-color); 
    background-color: #f1f8e9; /* 极淡的绿色背景 */
    padding: 20px 25px; 
    margin: 25px 0; 
    border-radius: 0 8px 8px 0; 
    color: #558b2f;
    font-style: normal;
}

/* 表格横向滚动支持 */
.markdown-body table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.markdown-body th, .markdown-body td { padding: 12px; border: 1px solid var(--border-color); }
.markdown-body th { background-color: var(--gray-bg); }

/* 代码块 */
.markdown-body pre { 
    background: #263238; 
    color: #eceff1; 
    padding: 20px; 
    border-radius: 8px; 
    overflow-x: auto; 
    margin-bottom: 25px; 
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    font-size: 0.9rem;
}

.post-tags { 
    margin-top: 50px; 
    padding-top: 25px; 
    border-top: 1px solid var(--border-color); 
}
.tag-pill { 
    display: inline-block; 
    background: #e0f2f1; 
    padding: 6px 16px; 
    border-radius: 50px; 
    color: var(--primary-dark); 
    text-decoration: none; 
    font-size: 0.85rem; 
    margin-right: 10px; 
    margin-bottom: 10px; 
    transition: all 0.2s; 
    font-weight: 500;
}
.tag-pill:hover { 
    background: var(--primary-color); 
    color: #fff; 
}

.post-navigation { 
    display: flex; 
    justify-content: space-between; 
    margin-top: 40px; 
    padding-top: 30px; 
    border-top: 1px solid var(--border-color); 
}
.nav-next, .nav-prev { 
    width: 48%; 
    text-decoration: none; 
    color: var(--dark-color); 
    font-weight: 600; 
    padding: 15px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.nav-next:hover, .nav-prev:hover { 
    background-color: var(--gray-bg);
    border-color: var(--border-color);
}
.nav-next span, .nav-prev span { 
    font-size: 0.8rem; 
    color: #90a4ae; 
    font-weight: normal; 
    margin-bottom: 5px; 
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 404 & 错误页 */
.error-page { text-align: center; padding: 80px 0; }
.error-page h1 { font-size: 6rem; color: var(--primary-color); margin: 0; line-height: 1; opacity: 0.2; }
.error-page p { font-size: 1.5rem; margin: 20px 0 40px; color: var(--dark-color); }
.no-content { 
    text-align: center; 
    padding: 60px; 
    color: #90a4ae; 
    background: var(--gray-bg); 
    border-radius: 8px; 
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* --- 响应式设计 --- */
@media (max-width: 992px) { 
    h2 { font-size: 2rem; } 
    #hero h1 { font-size: 2.8rem; } 
    .about-content { gap: 30px; }
}

@media (max-width: 768px) {
    .main-header .container { padding: 0 20px; }
    .logo { font-size: 1.4rem; }

    .menu-toggle { display: block; }
    .main-nav { 
        position: absolute; 
        top: 80px; 
        left: 0; 
        width: 100%; 
        background-color: var(--white-color); 
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        flex-direction: column; 
        max-height: 0; 
        overflow: hidden; 
        transition: max-height 0.3s ease-in-out; 
    }
    .main-nav.active { max-height: 500px; border-bottom: 1px solid var(--border-color); }
    .main-nav ul { 
        flex-direction: column; 
        padding: 10px 0; 
    }
    .main-nav ul li { margin: 0; text-align: center; }
    .main-nav ul li a { 
        display: block; 
        padding: 15px 20px; 
        border-bottom: 1px solid #f5f5f5;
    }
    .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; gap: 30px; }
    .footer-column { width: 100%; }
    .footer-column h4::after { left: 0; transform: none; } /* Footer左对齐更整齐 */
    
    .page-header h1 { font-size: 1.8rem; }
    .post-navigation { flex-direction: column; gap: 15px; }
    .nav-next, .nav-prev { width: 100%; text-align: left; }
    .nav-next { text-align: left !important; }
}

@media (max-width: 480px) { 
    #hero h1 { font-size: 2rem; } 
    #hero p { font-size: 1rem; } 
    section { padding: 50px 0; } 
    h2 { font-size: 1.7rem; margin-bottom: 2.5rem; } 
    
    .solutions-grid { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
    .about-visual span { font-size: 1.4rem; }
    .btn { width: 100%; text-align: center; } /* 移动端按钮全宽更易点击 */
}