/* * Theme: Modern Publishing & Books
 * Style: Literary / Elegant / Warm / Minimalist
 */

/* 引入 Google Fonts: 衬线体(用于标题) 和 无衬线体(用于正文) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&family=Lato:wght@400;700&family=Playfair+Display:ital,wght@0,600;1,600&display=swap');

:root {
    /* --- 书业现代配色 --- */
    --c-primary: #1a4731;       /* 森林墨绿：稳重、知识、经典 */
    --c-primary-light: #2d6a4f; /* 悬停亮绿 */
    --c-secondary: #5e503f;     /* 咖啡/树皮色：辅助文字 */
    --c-accent: #bc6c25;        /* 陶土/复古金：强调色 */
    --c-border: #e3d5ca;        /* 边框：像旧纸张边缘 */

    /* --- 背景与文字 --- */
    --bg-body: #faf9f6;         /* 暖白/雪花石膏色：护眼，像高级纸张 */
    --bg-white: #ffffff;        /* 纯白 */
    --bg-light-paper: #f0efe9;  /* 浅灰纸张色 */
    
    --text-main: #2b2d42;       /* 深黑蓝：比纯黑柔和的墨水色 */
    --text-light: #5f6368;      /* 次要灰 */
    
    /* --- 字体栈 --- */
    /* 标题使用衬线体，营造书卷气 */
    --font-heading: "Playfair Display", "Noto Serif SC", "Songti SC", serif;
    /* 正文使用易读的无衬线体 */
    --font-body: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* --- 布局参数 --- */
    --radius-sm: 2px;           /* 极小圆角，模拟书本硬朗边缘 */
    --radius-md: 4px;
    --header-height: 80px;
    --max-width: 1100px;        /* 稍微收窄内容区，增加阅读聚焦感 */
    
    /* --- 阴影：模仿纸张层叠感 --- */
    --shadow-paper: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
    --shadow-hover: 0 10px 25px rgba(26, 71, 49, 0.15); /* 悬停带一点绿色晕影 */
}

/* === 全局重置 === */
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.75; /* 增加行高，提升阅读体验 */
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul, li { list-style: none; }
img { display: block; max-width: 100%; height: auto; }

/* 标题通用样式 */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--c-primary);
    font-weight: 700;
    line-height: 1.3;
}

/* === 容器 === */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* === 头部导航 (雅致风格) === */
.site-header {
    background: var(--bg-body); /* 与背景融合 */
    height: var(--header-height);
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--c-primary);
    letter-spacing: -0.5px;
    /* Logo 旁的装饰 */
    position: relative;
    padding-left: 15px;
    border-left: 4px solid var(--c-accent); 
}

.desktop-nav { 
    display: flex; 
    align-items: center; 
    gap: 30px; 
}

.desktop-nav a {
    font-size: 0.95rem; 
    font-weight: 600;
    color: var(--c-secondary);
    letter-spacing: 0.5px;
    position: relative;
    padding: 5px 0;
}

/* 导航悬停效果：底部线条 */
.desktop-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--c-accent);
    transition: width 0.3s;
}

.desktop-nav a:hover, 
.desktop-nav a.active {
    color: var(--c-primary);
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    width: 100%;
}

/* 移动端菜单开关 */
.mobile-menu-trigger { display: none; font-size: 1.6rem; cursor: pointer; color: var(--c-primary); }
.mobile-menu-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-body); z-index: 9999;
    flex-direction: column; padding: 40px;
}
.mobile-menu-header { display: flex; justify-content: space-between; width: 100%; margin-bottom: 40px; border-bottom: 1px solid var(--c-border); padding-bottom: 20px;}
.logo-mobile { font-family: var(--font-heading); font-weight: bold; font-size: 1.6rem; color: var(--c-primary); }
.close-btn { font-size: 2.2rem; cursor: pointer; color: var(--c-secondary); }
.mobile-nav-links { display: flex; flex-direction: column; gap: 25px; text-align: center; }
.mobile-nav-links a { font-family: var(--font-heading); font-size: 1.4rem; color: var(--c-primary); }

/* === Hero Section (现代出版社风格) === */
/* 不再使用整块渐变背景，改用极简的大版式设计 */
.hero-section {
    background-color: var(--bg-light-paper);
    padding: 120px 0 100px;
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    overflow: hidden;
}

/* 装饰背景字 */
.hero-section::before {
    content: 'BOOKS';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15rem;
    font-weight: 900;
    color: rgba(227, 213, 202, 0.4); /* 极淡的背景字 */
    z-index: 0;
    font-family: var(--font-heading);
    letter-spacing: 20px;
}

.hero-content {
    position: relative; /* 确保在背景字之上 */
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 25px;
    color: var(--c-primary);
    font-weight: 700;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 50px;
    color: var(--c-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-family: var(--font-heading);
    font-style: italic; /* 斜体增加叙述感 */
}

.hero-buttons { display: flex; justify-content: center; gap: 20px; }

.btn {
    display: inline-block; padding: 14px 35px; font-size: 1rem;
    border-radius: 50px; /* 胶囊按钮 */
    font-weight: 600; cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
    font-family: var(--font-body);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.primary-btn {
    background: var(--c-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(26, 71, 49, 0.3);
}
.primary-btn:hover {
    background: var(--c-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 71, 49, 0.4);
}

.secondary-btn {
    background: transparent;
    border: 2px solid var(--c-primary);
    color: var(--c-primary);
}
.secondary-btn:hover {
    background: var(--c-primary);
    color: #fff;
}

/* === Info Section (核心价值) === */
.info-section { margin-bottom: 100px; }
.center-header { text-align: center; margin-bottom: 60px; }
.center-header h2 { 
    font-size: 2.2rem; 
    color: var(--c-primary); 
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}
/* 标题下方的装饰线 */
.center-header h2::after {
    content: "§"; /* 使用特殊符号作为装饰 */
    display: block;
    margin-top: 10px;
    font-size: 1.5rem;
    color: var(--c-accent);
    font-weight: 400;
}

.center-header p { display: none; } /* 隐藏原来的英文小字，保持极简 */

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.info-card {
    background: var(--bg-white);
    padding: 50px 40px;
    border-radius: var(--radius-sm); /* 书本硬边 */
    border: 1px solid var(--bg-light-paper); /* 极淡边框 */
    text-align: left;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

/* 顶部加一条彩条，像书签 */
.info-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--c-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.info-card:hover { 
    transform: translateY(-5px); 
    box-shadow: var(--shadow-hover); 
    border-color: transparent;
}
.info-card:hover::before { transform: scaleX(1); }

.info-card .icon { font-size: 2rem; margin-bottom: 25px; opacity: 0.8; }
.info-card h3 { font-size: 1.5rem; color: var(--c-primary); margin-bottom: 20px; }
.info-card p { color: var(--text-light); margin-bottom: 30px; line-height: 1.8; }
.read-more { 
    color: var(--c-primary); 
    font-weight: 700; 
    font-size: 0.9rem; 
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid transparent;
}
.read-more:hover { border-bottom-color: var(--c-primary); }

/* === Main Content Area === */
.main-content-area { min-height: 400px; margin-bottom: 100px; }
.section-header { 
    margin-bottom: 40px; 
    border-left: none; /* 去除原本的左边框 */
    padding-left: 0;
    display: flex;
    align-items: baseline;
    gap: 15px;
    border-bottom: 1px solid var(--c-border);
    padding-bottom: 15px;
}
.section-header h2 { 
    font-size: 2rem; 
    color: var(--c-primary); 
}
.cat-desc { 
    color: var(--c-secondary); 
    font-family: var(--font-heading); 
    font-style: italic;
    font-size: 1rem;
}

/* === Post Grid (类书架布局) === */
.post-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 40px; 
}

.grid-card {
    background: transparent; /* 去除卡片背景色 */
    border-radius: 0;
    overflow: visible;
    box-shadow: none; /* 去除阴影，让它看起来像放在桌上 */
    border: none;
    display: flex; 
    flex-direction: column;
    transition: transform 0.3s;
}
.grid-card:hover { transform: translateY(-3px); }

/* 封面图处理：像一本书 */
.card-cover-wrapper {
    display: block;
    width: 100%;
    /* 将高度改为比例，看起来更像书或杂志 */
    aspect-ratio: 4/3; 
    height: auto;
    background: #eee;
    overflow: hidden;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* 图片本身带阴影 */
    margin-bottom: 20px;
    position: relative;
}

/* 图片边框纹理 */
.card-cover-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(0,0,0,0.05);
    pointer-events: none;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.grid-card:hover .card-img { transform: scale(1.08); }

/* 无图时的占位 */
.card-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background-color: var(--c-primary);
    color: rgba(255,255,255,0.7); 
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
}

.card-body { padding: 0; display: flex; flex-direction: column; flex: 1; }

.card-meta { 
    display: flex; 
    justify-content: flex-start; 
    gap: 15px;
    font-size: 0.8rem; 
    color: var(--c-secondary); 
    margin-bottom: 10px; 
    text-transform: uppercase;
    letter-spacing: 1px;
}
.cat-tag { 
    color: var(--c-accent); 
    font-weight: 700; 
}

.grid-card h3 { 
    font-size: 1.4rem; 
    margin-bottom: 10px; 
    line-height: 1.3; 
    color: var(--text-main); 
    font-family: var(--font-heading);
}
.grid-card h3 a { 
    background-image: linear-gradient(var(--c-primary), var(--c-primary));
    background-size: 0% 1px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.3s;
}
.grid-card h3 a:hover { 
    color: var(--c-primary); 
    background-size: 100% 1px; /* 文字下划线动画 */
}

.excerpt { 
    font-size: 0.95rem; 
    color: var(--text-light); 
    flex-grow: 1; 
    margin-bottom: 15px; 
    line-height: 1.6;
}

.card-tags { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--c-border); }
.tag-badge { 
    font-size: 0.75rem; 
    color: var(--text-light); 
    margin-right: 8px; 
    background: #eaeaea;
    padding: 2px 6px;
    border-radius: 2px;
}
.tag-badge:hover { color: #fff; background: var(--c-primary); }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 15px; margin-top: 60px; }
.page-btn {
    width: 45px; height: 45px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--c-border); 
    border-radius: 50%; /* 圆形分页 */
    color: var(--c-primary);
    background: transparent;
    font-family: var(--font-heading);
    transition: all 0.3s;
}
.page-btn:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.page-current { 
    display: flex; align-items: center; padding: 0 10px; 
    font-weight: bold; font-family: var(--font-heading); font-size: 1.1rem;
    color: var(--c-primary);
}

/* === 文章详情页 (沉浸式阅读) === */
.single-post { 
    background: var(--bg-white); 
    padding: 60px 80px; /* 增加内边距 */
    box-shadow: var(--shadow-paper); 
    border: 1px solid var(--bg-light-paper);
    max-width: 900px; /* 限制宽度以提升阅读体验 */
    margin: 0 auto;
}

.single-header { border-bottom: 4px double var(--c-border); padding-bottom: 30px; margin-bottom: 40px; text-align: center; }
.breadcrumb { font-size: 0.85rem; color: var(--text-light); margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px;}
.single-header h1 { 
    font-size: 2.5rem; 
    color: var(--c-primary); 
    margin-bottom: 20px; 
    line-height: 1.25; 
}
.meta-line { 
    font-size: 0.95rem; 
    color: var(--c-secondary); 
    display: flex; 
    justify-content: center; 
    gap: 30px; 
    font-family: var(--font-heading);
    font-style: italic;
}

/* Markdown 内容样式 */
.markdown-body { color: #333; font-size: 1.125rem; line-height: 1.9; font-family: var(--font-heading); /* 正文也可用衬线体，或保持Lato */ }
/* 如果觉得正文用衬线体太累，可以覆盖回 Lato: */
.markdown-body p { font-family: var(--font-body); margin-bottom: 1.8em; text-align: justify; }

.markdown-body h2 { 
    font-size: 1.8rem; 
    color: var(--c-primary); 
    margin: 2em 0 1em; 
    border-bottom: none;
    position: relative;
    padding-left: 20px;
}
.markdown-body h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px; bottom: 5px;
    width: 4px;
    background: var(--c-accent);
}

.markdown-body img { 
    max-width: 100%; 
    border-radius: 2px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.08); 
    margin: 30px 0; 
    border: 5px solid #fff; /* 照片边框 */
    outline: 1px solid #eee;
}

.markdown-body blockquote { 
    border-left: none; /* 去除常规竖线 */
    position: relative;
    background: transparent; 
    padding: 20px 40px; 
    color: var(--c-primary); 
    margin: 30px 0; 
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-style: italic;
    text-align: center;
}
.markdown-body blockquote::before {
    content: "“";
    font-size: 4rem;
    color: var(--c-accent);
    position: absolute;
    top: -20px; left: 0;
    opacity: 0.3;
}

.post-tags-container { margin-top: 50px; padding-top: 20px; border-top: 1px solid var(--c-border); text-align: center; }
.tags-label { font-weight: bold; margin-right: 10px; color: var(--c-secondary); font-family: var(--font-heading); }
.tag-pill { 
    display: inline-block; background: transparent; border: 1px solid var(--c-border);
    padding: 6px 15px; font-size: 0.85rem; color: var(--c-secondary); 
    border-radius: 20px; margin-right: 8px; transition: all 0.2s;
}
.tag-pill:hover { border-color: var(--c-primary); color: var(--c-primary); }

/* --- Post CTA (禁止深色背景，改为浅色羊皮纸风格) --- */
.post-cta {
    margin-top: 50px; 
    background-color: #f5f1e8; /* 浅米色/羊皮纸色 */
    padding: 40px; 
    text-align: center; 
    border-radius: 2px;
    border: 2px solid #eaddcf; /* 稍深一点的米色边框 */
    box-shadow: inset 0 0 20px rgba(0,0,0,0.02);
}
.post-cta p { 
    font-family: var(--font-heading); 
    font-weight: 700; 
    font-size: 1.3rem; 
    color: var(--c-primary); /* 深色文字 */
    margin-bottom: 20px; 
}
.small-btn { 
    font-size: 0.9rem; padding: 10px 30px; 
    background: var(--c-accent); /* 使用醒目的陶土色按钮 */
    color: white; border-radius: 50px;
    letter-spacing: 1px;
}
.small-btn:hover {
    background: #a65d1b;
}

.post-navigation { display: flex; justify-content: space-between; margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--c-border); }
.nav-prev, .nav-next { display: flex; flex-direction: column; max-width: 45%; text-decoration: none; }
.nav-prev small, .nav-next small { color: var(--c-accent); margin-bottom: 8px; font-size: 0.8rem; font-weight: bold; text-transform: uppercase;}
.nav-prev span, .nav-next span { color: var(--c-primary); font-family: var(--font-heading); font-size: 1.1rem; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.nav-prev:hover span, .nav-next:hover span { border-bottom-color: var(--c-primary); }

/* === FAQ & Footer === */
.faq-section { background: var(--bg-white); padding: 80px 0; border-top: 1px solid var(--c-border); }
.faq-item { border-bottom: 1px solid #eee; padding: 10px 0; }
.faq-question { padding: 20px 0; cursor: pointer; display: flex; justify-content: space-between; font-weight: 700; color: var(--c-primary); font-family: var(--font-heading); font-size: 1.1rem; }
.faq-question:hover { color: var(--c-accent); }
.faq-answer p { padding-bottom: 25px; color: var(--text-light); line-height: 1.8; }

/* 底部区域：深色，营造沉稳收尾 */
.site-footer { 
    background: #1e1e1e; /* 极深灰，不是纯黑 */
    color: #999; 
    padding: 80px 0 40px; 
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 50px; margin-bottom: 60px; }
.footer-col h4 { 
    color: #e0e0e0; 
    margin-bottom: 25px; 
    font-size: 1.2rem; 
    font-family: var(--font-heading); 
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    display: inline-block;
}
.footer-col p { margin-bottom: 15px; font-size: 0.95rem; line-height: 1.8; }
.footer-col a { display: block; margin-bottom: 12px; font-size: 0.95rem; transition: color 0.2s; color: #bbb; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { 
    text-align: center; 
    padding-top: 30px; 
    border-top: 1px solid #333; 
    font-size: 0.85rem; 
    color: #666;
}

/* === 响应式 === */
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-menu-trigger { display: block; }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-section::before { font-size: 8rem; } /* 移动端背景字调小 */
    .single-post { padding: 30px 20px; }
    .post-grid { gap: 30px; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .section-header { flex-direction: column; gap: 5px; }
}