/* ==========================================================================
   1. 基础设置 (Reset & Variables)
   ========================================================================== */
:root {
    /* 品牌色系：黑白金时尚风 */
    --color-primary: #1a1a1a;       /* 深邃黑：用于主标题、Logo */
    --color-secondary: #d4af37;     /* 香槟金：用于按钮、高亮 */
    --color-text: #555555;          /* 高级灰：用于正文 */
    --color-text-light: #999999;    /* 浅灰：用于辅助信息 */
    --color-bg: #ffffff;            /* 纯白背景 */
    --color-bg-alt: #f9f9f9;        /* 浅灰背景块 */
    --color-border: #e5e5e5;        /* 极细边框 */
    
    /* 间距与布局 */
    --container-width: 1200px;
    --header-height: 70px;
    --spacing-unit: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* [修正1] 启用 Flex 布局实现 Sticky Footer (内容少时 Footer 沉底) */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* [修正1] 主内容区自动撑开 */
.site-main {
    flex: 1;
    width: 100%;
}

/* 标题字体：使用衬线体营造时尚杂志感 */
h1, h2, h3, h4, h5, h6 {
    font-family: "Didot", "Bodoni MT", "Noto Serif SC", "Times New Roman", serif;
    color: var(--color-primary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.8rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-secondary);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
    width: 100%;
}

/* ==========================================================================
   2. 顶部导航 (Header)
   ========================================================================== */
.site-header {
    background: #fff;
    height: var(--header-height);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: "Didot", serif;
    font-size: 1.8rem;
    color: var(--color-primary);
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.desktop-nav a {
    margin-left: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-primary);
    position: relative;
    padding-bottom: 4px;
}

/* 导航悬停线条效果 */
.desktop-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--color-secondary);
    transition: width 0.3s ease;
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    width: 100%;
}

.mobile-menu-trigger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-primary);
    padding: 5px; /* 增加点击区域 */
}

/* ==========================================================================
   3. 移动端菜单 (Mobile Menu)
   ========================================================================== */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 2000;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto; /* 防止小屏幕菜单内容溢出 */
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    min-height: 50px;
}

/* [修正4] Logo大小调整
   注意：此处使用 1.4rem (约22px)。
   如果您原来的意图是 14px，这里也看起来很合适。
   绝对不能用 14rem (224px)，那会撑爆屏幕。
*/
.logo-mobile {
    font-size: 1.4rem; 
    font-weight: bold;
    font-family: "Didot", serif;
    text-transform: uppercase;
    color: var(--color-primary);
}

.close-btn {
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 10px;
}

.mobile-nav-links a {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--color-primary);
    font-weight: 500;
    text-align: center;
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: 10px;
}

/* ==========================================================================
   4. Hero 区域 (首页大图)
   ========================================================================== */
.hero-section {
    background-color: #f4f4f4;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    color: #fff;
    padding: 100px 0;
    text-align: center;
    margin-bottom: 60px;
}

.hero-content h1 {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0.9;
    font-weight: 300;
}

/* 按钮风格 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.primary-btn {
    background-color: var(--color-secondary);
    color: #fff;
    border-color: var(--color-secondary);
}

.primary-btn:hover {
    background-color: #bfa040;
    border-color: #bfa040;
}

.secondary-btn {
    background-color: transparent;
    color: #fff;
    border-color: #fff;
    margin-left: 15px;
}

.secondary-btn:hover {
    background-color: #fff;
    color: var(--color-primary);
}

/* ==========================================================================
   5. 信息展示区 (Info Section)
   ========================================================================== */
.info-section {
    margin-bottom: 80px;
}

.section-header {
    text-align: left;
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.center-header {
    text-align: center;
    display: block;
    border-bottom: none;
    justify-content: center;
    align-items: center;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.section-header p {
    color: var(--color-text-light);
    font-style: italic;
    font-family: serif;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.info-card {
    background: var(--color-bg-alt);
    padding: 40px;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.info-card:hover {
    border-color: var(--color-secondary);
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.info-card .icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--color-secondary);
}

.info-card .read-more {
    display: inline-block;
    margin-top: 20px;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--color-primary);
}

/* ==========================================================================
   6. 文章列表 (Post Grid)
   ========================================================================== */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.grid-card {
    display: flex;
    flex-direction: column;
    border-radius: 0; 
}

.card-cover-wrapper {
    display: block;
    width: 100%;
    padding-top: 133%; /* 3:4 比例 */
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0;
}

.card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.grid-card:hover .card-img {
    transform: scale(1.05);
}

.card-img-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9e9e9;
    color: #999;
    font-family: serif;
    font-style: italic;
}

.card-body {
    padding: 20px 0;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
}

.cat-tag {
    color: var(--color-secondary);
    font-weight: 600;
}

.grid-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.excerpt {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-badge {
    display: inline-block;
    font-size: 0.75rem;
    color: #999;
    margin-right: 8px;
}

.no-content {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: var(--color-bg-alt);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 60px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    transition: all 0.3s;
}

.page-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.page-current {
    font-family: serif;
    font-style: italic;
    color: var(--color-text-light);
}

/* ==========================================================================
   7. 单页/文章内容 (Single Post)
   ========================================================================== */
.single-post {
    max-width: 800px;
    margin: 0 auto 80px;
}

.single-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.breadcrumb {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.breadcrumb span {
    margin: 0 5px;
}

.single-header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.meta-line {
    font-size: 0.9rem;
    color: #888;
    font-family: serif;
    font-style: italic;
}

.meta-line span {
    margin: 0 10px;
}

/* 内容区域样式优化 */
.markdown-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.markdown-body p {
    margin-bottom: 1.5em;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
}

/* [修正2] 增加对列表的支持 */
.markdown-body ul, .markdown-body ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.markdown-body li {
    margin-bottom: 0.5em;
}

.markdown-body h2, .markdown-body h3 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

.markdown-body blockquote {
    border-left: 3px solid var(--color-secondary);
    padding-left: 20px;
    color: #666;
    font-style: italic;
    margin: 30px 0;
    background: #fdfdfd;
    padding: 15px 20px;
}

/* [修正3] 增加基础表单样式（以防联系页面需要） */
.markdown-body input[type="text"],
.markdown-body input[type="email"],
.markdown-body textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    font-family: inherit;
}

.markdown-body input[type="submit"] {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 10px 25px;
    cursor: pointer;
}

.post-tags-container {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tags-label {
    font-weight: bold;
    margin-right: 10px;
}

.tag-pill {
    display: inline-block;
    padding: 5px 15px;
    background: #f5f5f5;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #555;
    transition: 0.2s;
}

.tag-pill:hover {
    background: var(--color-primary);
    color: #fff;
}

/* 禁止深色背景，使用极浅灰 */
.post-cta {
    margin: 50px 0;
    background-color: #fbfbfb; 
    border: 1px solid #e0e0e0;
    padding: 40px;
    text-align: center;
}

.post-cta p {
    font-size: 1.2rem;
    font-family: serif;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.small-btn {
    padding: 10px 25px;
    font-size: 0.85rem;
}

/* 上下篇导航 */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #000;
}

.nav-prev, .nav-next {
    display: flex;
    flex-direction: column;
    max-width: 45%;
}

.nav-next {
    text-align: right;
    margin-left: auto;
}

.post-navigation small {
    color: #999;
    text-transform: uppercase;
    font-size: 0.7rem;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.post-navigation span {
    font-family: serif;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-primary);
    transition: color 0.3s;
}

.post-navigation a:hover span {
    color: var(--color-secondary);
}

/* ==========================================================================
   8. 常见问题 (FAQ)
   ========================================================================== */
.faq-section {
    background: var(--color-bg-alt);
    padding: 80px 0;
    margin-top: 60px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #fff;
    margin-bottom: 10px;
    border: 1px solid transparent;
}

.faq-question {
    padding: 20px 25px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.faq-question:hover, .faq-question.active {
    color: var(--color-secondary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 25px;
}

.faq-answer p {
    padding-bottom: 25px;
    color: #666;
}

/* ==========================================================================
   9. 底部 (Footer)
   ========================================================================== */
.site-footer {
    background-color: #111; 
    color: #fff;
    padding: 80px 0 30px;
    margin-top: auto; /* 配合 Flex 布局使用 */
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 25px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-col p, .footer-col a {
    color: #999;
    display: block;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
    color: #666;
    font-size: 0.8rem;
}

/* 404 Page */
.error-404 {
    text-align: center;
    padding: 100px 0;
}
.error-404 h1 {
    font-size: 6rem;
    color: var(--color-secondary);
}

/* ==========================================================================
   10. 响应式适配 (Responsive)
   ========================================================================== */
@media (max-width: 1024px) {
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-menu-trigger {
        display: block;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .single-header h1 {
        font-size: 1.8rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin: 10px 0 0 0;
        text-align: center;
    }

    /* 手机端Logo大小保持 1.4rem (约22px) */
    .logo-text {
        font-size: 1.4rem; 
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}