/* ============================================
   TxtPress Theme: Corporate Pro (企业管理专业版)
   适配模版：index.php (Universal Tech Base)
   风格关键词：权威、稳重、增长、高端
   主色调：深蓝(#0A2463) + 香槟金(#D4AF37)
   修正记录：修复页脚文字颜色对比度问题
   ============================================ */

/* --- 1. 全局与基础样式 --- */
:root {
    /* 核心色彩系统 */
    --primary-color: #0A2463;        /* 普鲁士蓝 - 权威与专业 */
    --secondary-color: #D4AF37;      /* 香槟金 - 价值与卓越 */
    --accent-color: #3A7CA5;         /* 钢蓝 - 科技与辅助 */
    --dark-color: #1A1A2E;           /* 深夜蓝 - 正文深色/页脚背景 */
    --light-color: #F8F9FA;          /* 极淡灰 - 背景底色 */
    --white-color: #FFFFFF;          
    
    /* 文本颜色 */
    --text-color: #333333;           /* 正文灰 */
    --text-light: #666666;           /* 辅助灰 */
    --border-color: #E5E7EB;         /* 边框灰 */

    /* 视觉特效 */
    --shadow-sm: 0 2px 4px rgba(10, 36, 99, 0.05);
    --shadow-md: 0 6px 16px rgba(10, 36, 99, 0.1);
    --shadow-lg: 0 15px 35px rgba(10, 36, 99, 0.15);
    
    --gradient-primary: linear-gradient(135deg, #0A2463 0%, #173887 100%);
    --gradient-gold: linear-gradient(135deg, #D4AF37 0%, #E6C967 100%);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-font-smoothing: antialiased; 
}

html { 
    scroll-behavior: smooth; 
    font-size: 16px;
}

body {
    font-family: 'Inter', -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;
}

main { 
    flex: 1; 
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 24px; 
    width: 100%;
}

/* 标题体系 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; letter-spacing: -1px; }
h2 { font-size: 2.25rem; text-align: center; margin-bottom: 3rem; position: relative; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* 标题装饰线 */
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-gold);
    margin: 15px auto 0;
    border-radius: 2px;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* 按钮组件 */
.btn {
    display: inline-block;
    padding: 14px 36px;
    background: var(--gradient-primary);
    color: var(--white-color);
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #173887 0%, #0A2463 100%);
    color: var(--white-color);
}

/* 布局区块 */
section {
    padding: 80px 0;
}

section:nth-of-type(even) {
    background-color: var(--light-color);
}

/* --- 2. 头部导航 --- */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.logo::before {
    content: '';
    display: block;
    width: 8px;
    height: 24px;
    background: var(--secondary-color);
    margin-right: 12px;
    border-radius: 2px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 32px;
}

.main-nav a {
    color: var(--dark-color);
    font-weight: 500;
    font-size: 1rem;
    padding: 8px 0;
    position: relative;
}

.main-nav a.active,
.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s;
}

.main-nav a.active::after,
.main-nav a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* --- 3. Hero 区域 --- */
#hero {
    margin-top: 0;
    padding-top: 80px; 
    height: 90vh;
    min-height: 600px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white-color);
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 60%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    color: var(--white-color);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content .btn {
    background: var(--gradient-gold);
    color: var(--dark-color);
}

/* --- 4. 解决方案 (核心图标修复) --- */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.solution-card {
    background: var(--white-color);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    text-align: center;
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.solution-icon {
    width: 64px;
    height: 64px;
    background: rgba(10, 36, 99, 0.05);
    color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s;
}

.solution-card:hover .solution-icon {
    background: var(--primary-color);
    color: var(--white-color);
}

/* 图标 Unicode 修复 */
.icon-cloud::before { content: '☁️'; }
.icon-data::before { content: '📊'; }
.icon-ai::before { content: '🧠'; }
.icon-security::before { content: '🛡️'; }
.icon-iot::before { content: '📡'; }
.icon-consult::before { content: '🤝'; }

.solution-icon::before {
    filter: saturate(0) brightness(0.4); 
}
.solution-card:hover .solution-icon::before {
    filter: saturate(0) brightness(200%); 
}

.solution-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.solution-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* --- 5. 关于我们 --- */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text { flex: 1; }
.about-visual { 
    flex: 1; 
    height: 400px;
    background: var(--primary-color);
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.2);
    font-size: 4rem;
    font-weight: 900;
    overflow: hidden;
}

.about-visual::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 45%, var(--secondary-color) 50%, transparent 55%);
    opacity: 0.1;
}

/* --- 6. 新闻/内容列表 --- */
.page-header { margin-bottom: 40px; }
.center-header { text-align: center; }
.page-header h1 { margin-bottom: 0.5rem; }
.page-meta { color: var(--text-light); }

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.news-cover {
    height: 200px;
    background-color: var(--light-color);
    overflow: hidden;
}

.news-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-card:hover .news-cover img {
    transform: scale(1.05);
}

.news-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-content h4 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-content h4 a {
    color: var(--dark-color);
}

.news-content h4 a:hover {
    color: var(--primary-color);
}

.news-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.read-more-link {
    margin-top: auto;
    font-weight: 600;
    font-size: 0.9rem;
}

/* 分页 */
.pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-btn, .page-current {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 15px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}

.page-btn {
    background: var(--white-color);
    border: 1px solid var(--border-color);
    color: var(--dark-color);
}

.page-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-current {
    background: var(--primary-color);
    color: var(--white-color);
    border: 1px solid var(--primary-color);
}

/* --- 7. 文章详情页 --- */
.single-post-wrapper {
    background: var(--white-color);
    padding: 0;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.breadcrumb a { color: var(--text-light); }
.breadcrumb span { margin: 0 8px; color: #ccc; }

.markdown-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.markdown-body h2 { 
    margin-top: 2.5rem; 
    font-size: 1.75rem; 
    border-bottom: 2px solid var(--light-color);
    padding-bottom: 10px;
}
.markdown-body h2::after { display: none; }

.markdown-body h3 { margin-top: 2rem; color: var(--primary-color); }

.markdown-body p { margin-bottom: 1.5rem; }

.markdown-body ul, .markdown-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.markdown-body li { margin-bottom: 0.5rem; }

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

.markdown-body blockquote {
    border-left: 4px solid var(--secondary-color);
    background: var(--light-color);
    padding: 15px 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-light);
}

/* 表格支持 */
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.markdown-body th, .markdown-body td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

.markdown-body th {
    background-color: var(--light-color);
    font-weight: 600;
}

.post-tags { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border-color); }
.tag-pill {
    display: inline-block;
    padding: 4px 12px;
    background: var(--light-color);
    color: var(--text-light);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 10px;
    margin-bottom: 10px;
}
.tag-pill:hover {
    background: var(--primary-color);
    color: var(--white-color);
}

.post-navigation {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-prev, .nav-next {
    flex: 1;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: block;
}

.nav-prev span, .nav-next span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.nav-prev:hover, .nav-next:hover {
    border-color: var(--primary-color);
}

/* --- 8. FAQ --- */
#faq { background-color: var(--light-color); }

.faq-item {
    background: var(--white-color);
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 20px;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.faq-item.active .faq-question::after {
    content: '-';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    padding-bottom: 20px;
}

/* --- 9. 页脚 (已修复：深色背景下的浅色文字) --- */
.main-footer {
    background: var(--dark-color);
    padding: 60px 0 20px;
    font-size: 0.95rem;
    /* 基础颜色设为浅灰 */
    color: rgba(255, 255, 255, 0.7); 
}

/* 核心修复：强制覆盖全局 p 标签的深色设置 */
.main-footer p {
    color: rgba(255, 255, 255, 0.7); 
    margin-bottom: 1.5rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-column h4 {
    color: var(--white-color);
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    position: relative;
}

/* 装饰线 */
.footer-column h4::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: var(--secondary-color);
    margin-top: 8px;
}

.footer-column ul { list-style: none; }
.footer-column li { margin-bottom: 10px; }

/* 链接颜色 */
.footer-column a { 
    color: rgba(255, 255, 255, 0.7); 
    transition: color 0.3s;
}
.footer-column a:hover { 
    color: var(--secondary-color); 
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a { 
    color: rgba(255, 255, 255, 0.7); 
}
.footer-bottom a:hover { 
    color: var(--white-color); 
}

/* --- 10. 响应式适配 --- */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    .about-content { flex-direction: column; }
    .about-visual { width: 100%; height: 300px; }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    
    .main-nav {
        position: fixed;
        top: 80px; 
        left: 0;
        width: 100%;
        background: var(--white-color);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-nav.active {
        max-height: 100vh; 
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
    }

    .main-nav a {
        display: block;
        padding: 15px 24px;
        border-bottom: 1px solid var(--light-color);
    }
    
    .main-nav a::after { display: none; }

    .container { padding: 0 20px; }
    .hero-content h1 { font-size: 2.2rem; }
    .footer-content { flex-direction: column; }
    .post-navigation { flex-direction: column; }
}

@media print {
    .main-header, .btn, .footer-bottom, .menu-toggle { display: none; }
    body { color: black; background: white; }
    a { text-decoration: underline; color: black; }
}