/* * TxtPress Corporate Theme
 * Version: 1.1 Fixed
 * Style: 专业 / 可靠 / 稳重 
 */

:root {
    /* --- 企业配色 (专业实业风格) --- */
    --c-primary: #0a2463;      /* 企业主色：深蓝 */
    --c-primary-dark: #081b4d; /* 悬停深色 */
    --c-secondary: #333333;    /* 辅助色：深灰 */
    --c-accent: #d4af37;       /* 强调色：金色 */

    /* --- 基础背景与文字 --- */
    --bg-body: #f8f9fa;
    --bg-white: #ffffff;
    --text-main: #222222;
    --text-light: #555555;
    --text-lighter: #888888;
    --border-color: #e0e0e0;

    /* --- 布局参数 --- */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --header-height: 70px;
    --max-width: 1200px;
    --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* === 全局重置 === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    font-size: 16px;
}

a {
    text-decoration: none;
    color: var(--c-primary);
    transition: color 0.2s;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* 修复：仅移除默认列表样式，不影响正文 */
ul, ol {
    list-style: none;
}

/* === 容器 === */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* === 头部导航 === */
.site-header {
    background: var(--bg-white);
    height: var(--header-height);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--c-primary);
    display: flex;
    align-items: center;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.desktop-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.2s;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--c-primary);
    background-color: rgba(10, 36, 99, 0.05);
}

/* 移动端菜单 */
.mobile-menu-trigger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

.mobile-menu-overlay {
    display: none; /* 由 JS 控制切换为 flex */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 9999;
    flex-direction: column;
    padding: 30px;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 30px;
}

.logo-mobile {
    font-weight: bold;
    font-size: 1.4rem;
    color: var(--c-primary);
}

.close-btn {
    font-size: 2rem;
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 25px;
    text-align: center;
}

.mobile-nav-links a {
    font-size: 1.2rem;
    color: var(--text-main);
    font-weight: 500;
}

/* === Hero Section (Banner) === */
.hero-section {
    background: linear-gradient(135deg, #0a2463 0%, #081b4d 100%);
    color: #fff;
    padding: 120px 0;
    text-align: center;
    margin-bottom: 60px;
}

.hero-content h1 {
    font-size: 3.2rem;
    margin-bottom: 25px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 45px;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.primary-btn {
    background: var(--c-primary);
    color: #fff;
}

.primary-btn:hover {
    background: var(--c-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(10, 36, 99, 0.3);
}

.secondary-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
}

.secondary-btn:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* === Info Section (核心价值) === */
.info-section {
    margin-bottom: 70px;
}

.center-header {
    text-align: center;
    margin-bottom: 60px;
}

.center-header h2 {
    font-size: 2.2rem;
    color: var(--text-main);
    margin-bottom: 15px;
    font-weight: 700;
}

.center-header p {
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.95rem;
    font-weight: 500;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
}

.info-card {
    background: var(--bg-white);
    padding: 45px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.info-card .icon {
    font-size: 2.8rem;
    margin-bottom: 25px;
    color: var(--c-accent);
}

.info-card h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 15px;
    font-weight: 600;
}

.info-card p {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.read-more {
    color: var(--c-accent);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.read-more:hover {
    color: var(--c-primary);
    text-decoration: underline;
}

/* === Main Content Area === */
.main-content-area {
    min-height: 450px;
    margin-bottom: 90px;
}

.section-header {
    margin-bottom: 35px;
    border-left: 4px solid var(--c-primary);
    padding-left: 15px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--text-main);
    font-weight: 700;
}

.cat-desc {
    margin-top: 5px;
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
}

/* === Post Grid (文章列表) === */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 35px;
}

.grid-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.grid-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-cover-wrapper {
    display: block;
    width: 100%;
    height: 220px;
    background: #f5f5f5;
    overflow: hidden;
    position: relative;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.grid-card:hover .card-img {
    transform: scale(1.05);
}

.card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e9ecef 0%, #f5f5f5 100%);
    color: #888;
    font-weight: 700;
    font-size: 1.3rem;
}

.card-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.cat-tag {
    color: var(--c-primary);
    font-weight: 500;
}

.grid-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--text-main);
    font-weight: 600;
}

.grid-card h3 a {
    color: var(--text-main);
}

.grid-card h3 a:hover {
    color: var(--c-primary);
}

.excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
    flex-grow: 1;
    margin-bottom: 15px;
    line-height: 1.5;
}

.card-tags {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f1f1f1;
}

.tag-badge {
    font-size: 0.75rem;
    color: #666;
    margin-right: 8px;
    background: #f8f8f8;
    padding: 3px 10px;
    border-radius: 20px;
    transition: all 0.2s;
}

.tag-badge:hover {
    background: var(--c-primary);
    color: #fff;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 55px;
}

.page-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-main);
    background: var(--bg-white);
    font-weight: 500;
    transition: all 0.2s;
}

.page-btn:hover {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
}

.page-current {
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* === 文章详情页 === */
.single-post {
    background: var(--bg-white);
    padding: 50px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.single-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 25px;
    margin-bottom: 35px;
}

/* 修复：面包屑链接颜色优化 */
.breadcrumb {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
}
.breadcrumb a {
    color: #888;
    transition: color 0.2s;
}
.breadcrumb a:hover {
    color: var(--c-primary);
}

.single-header h1 {
    font-size: 2.4rem;
    color: var(--text-main);
    margin-bottom: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.meta-line {
    font-size: 0.9rem;
    color: #777;
    display: flex;
    gap: 25px;
}

/* === Markdown 内容样式 (修正版) === */
.markdown-body {
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.8;
}

.markdown-body h2 {
    font-size: 1.7rem;
    color: var(--text-main);
    margin: 1.8em 0 1em;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-weight: 600;
}

.markdown-body h3 {
    font-size: 1.4rem;
    margin: 1.5em 0 0.8em;
    font-weight: 600;
}

.markdown-body p {
    margin-bottom: 1.6em;
    line-height: 1.6;
}

/* 修复：恢复文章内的列表样式 */
.markdown-body ul {
    list-style: disc;
    padding-left: 2em;
    margin-bottom: 1.6em;
}

.markdown-body ol {
    list-style: decimal;
    padding-left: 2em;
    margin-bottom: 1.6em;
}

.markdown-body li {
    margin-bottom: 0.5em;
}

.markdown-body hr {
    margin: 1.8em 0 1em;
    height: 1px;
    border: none;
    background-color: var(--border-color);
}

.markdown-body img {
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 25px 0;
}

.markdown-body a {
    color: var(--c-accent);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.markdown-body a:hover {
    border-bottom-color: var(--c-accent);
}

.markdown-body blockquote {
    border-left: 4px solid var(--c-accent);
    background: #f8f9fa;
    padding: 18px 25px;
    color: #555;
    margin: 25px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* 新增：表格样式 */
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95rem;
}

.markdown-body th, 
.markdown-body td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

.markdown-body th {
    background-color: #f4f4f4;
    font-weight: 600;
}

/* === 详情页底部 === */
.post-tags-container {
    margin-top: 45px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.tags-label {
    font-weight: 600;
    margin-right: 10px;
    color: #555;
}

.tag-pill {
    display: inline-block;
    background: #f8f8f8;
    padding: 5px 12px;
    font-size: 0.85rem;
    color: #666;
    border-radius: 20px;
    margin-right: 8px;
    transition: all 0.2s;
}

.tag-pill:hover {
    background: var(--c-accent);
    color: #fff;
}

.post-cta {
    margin-top: 45px;
    background: #fafafa;
    padding: 35px;
    text-align: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.post-cta p {
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--text-main);
    margin-bottom: 15px;
}

.small-btn {
    font-size: 0.95rem;
    padding: 10px 28px;
    background: var(--c-accent);
    color: #fff;
    border-radius: 4px;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 45px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.nav-prev, .nav-next {
    display: flex;
    flex-direction: column;
    max-width: 45%;
}

.nav-prev small, .nav-next small {
    color: #888;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.nav-prev span, .nav-next span {
    color: var(--text-main);
    font-weight: 500;
    font-size: 1.05rem;
}

.nav-prev:hover span, .nav-next:hover span {
    color: var(--c-accent);
}

/* === FAQ & Footer === */
.faq-section {
    background: #fff;
    padding: 70px 0;
    border-top: 1px solid var(--border-color);
}

.faq-item {
    border-bottom: 1px solid #eee;
}

.faq-question {
    padding: 25px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: var(--text-main);
    font-size: 1.05rem;
}

.faq-question:hover {
    color: var(--c-accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
}

.faq-answer p {
    padding-bottom: 25px;
    color: var(--text-light);
    line-height: 1.6;
}

.site-footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 70px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 45px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 25px;
    font-size: 1.15rem;
    font-weight: 600;
}

.footer-col p {
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.footer-col a {
    display: block;
    margin-bottom: 12px;
    font-size: 0.95rem;
    transition: color 0.2s;
    color: #aaa;
}

.footer-col a:hover {
    color: var(--c-accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 35px;
    border-top: 1px solid #333;
    font-size: 0.85rem;
    color: #777;
}

/* === 响应式优化 === */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    .mobile-menu-trigger {
        display: block;
    }
    
    /* 修复：移动端 Banner 高度过大 */
    .hero-section {
        padding: 60px 0;
    }
    .hero-content h1 {
        font-size: 2.4rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 20px;
    }
    
    .single-post {
        padding: 25px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .post-cta {
        padding: 25px;
    }
    .info-grid {
        gap: 25px;
    }
    .info-card {
        padding: 35px;
    }
    .grid-card {
        height: auto;
    }
    .card-cover-wrapper {
        height: 180px;
    }
}