/* * TxtPress Theme - Outdoor Exploration Edition
 * Style: Modern Outdoor / Gorpcore / High-End
 * Fixed & Verified Version
 */

:root {
    /* --- 户外机能配色系统 --- */
    --c-brand: #2c3e50;         /* 深岩灰：主视觉色 */
    --c-brand-dark: #1a252f;    /* 深夜黑：强调背景 */
    --c-accent: #e67e22;        /* 警示橙：活力点缀/按钮 */
    --c-nature: #27ae60;        /* 森林绿：辅助标识 */
    
    /* --- 背景色调 --- */
    --bg-body: #f4f6f7;         /* 极地灰白：页面背景 */
    --bg-surface: #ffffff;      /* 纯白：卡片表面 */
    --bg-light-panel: #ecf0f1;  /* 浅灰面板 */

    /* --- 文字系统 --- */
    --text-primary: #2d3436;    /* 主要阅读文字 */
    --text-secondary: #636e72;  /* 次要信息 */
    --text-meta: #b2bec3;       /* 元数据/极浅 */

    /* --- 布局与物理属性 --- */
    --radius-hard: 2px;         /* 硬朗微圆角，模拟装备质感 */
    --radius-pill: 50px;        /* 胶囊按钮 */
    --header-h: 72px;
    --max-w: 1240px;            /* 更宽的视野 */
    
    /* --- 深度与动效 --- */
    --shadow-base: 0 4px 20px rgba(44, 62, 80, 0.06);
    --shadow-lift: 0 15px 35px rgba(44, 62, 80, 0.12);
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* === 全局重置与排版 === */
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

body {
    background-color: var(--bg-body);
    color: var(--text-secondary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: all 0.2s var(--ease-out); }
img { display: block; max-width: 100%; height: auto; }

/* === 容器系统 === */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* === 头部导航 (机能风格) === */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: var(--header-h);
    border-bottom: 1px solid 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 修正与样式重塑 */
.logo a {
    font-size: 1.4rem; /* 修正后的尺寸 */
    font-weight: 800;
    color: var(--c-brand);
    letter-spacing: -0.5px;
    text-transform: uppercase;
    position: relative;
    padding-left: 0;
    display: flex;
    align-items: center;
}

/* 强制移除 Logo 前的圆点/伪元素 */
.logo a::before {
    display: none !important;
    content: none !important;
}

.desktop-nav { 
    display: flex; 
    align-items: center; 
    gap: 30px; 
}

.desktop-nav a {
    font-size: 0.85rem; 
    font-weight: 600;
    text-transform: uppercase; /* 标签化风格 */
    letter-spacing: 1px;
    color: var(--text-primary);
    padding: 8px 0;
    position: relative;
}

/* 导航悬停线条动效 */
.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--c-accent);
    transition: width 0.3s var(--ease-out);
}
.desktop-nav a:hover::after,
.desktop-nav a.active::after { width: 100%; }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--c-brand); }

/* 移动端菜单按钮 */
.mobile-menu-trigger { display: none; font-size: 1.2rem; cursor: pointer; color: var(--c-brand); padding: 10px; border: 1px solid #eee; border-radius: var(--radius-hard); }

/* 移动端菜单层 */
.mobile-menu-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-surface); z-index: 9999;
    flex-direction: column; padding: 40px;
}
.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 50px; }
.close-btn { font-size: 2.5rem; color: var(--text-primary); font-weight: 100; cursor: pointer; }
.mobile-nav-links { display: flex; flex-direction: column; gap: 25px; }
.mobile-nav-links a { font-size: 1.5rem; font-weight: 700; color: var(--c-brand); }

/* === Hero Section (探索风格 Banner) === */
.hero-section {
    position: relative;
    /* 使用深色渐变模拟夜晚山野 */
    background: linear-gradient(160deg, #1e2a36 0%, #2c3e50 100%);
    color: #fff;
    padding: 140px 0 120px;
    text-align: left;
    margin-bottom: 80px;
    overflow: hidden;
}

/* 装饰性背景纹理 */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 90% 10%, rgba(255,255,255,0.05) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content { position: relative; z-index: 2; }

.hero-content h1 { 
    font-size: 3.5rem; 
    line-height: 1.1; 
    margin-bottom: 25px; 
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-subtitle { 
    font-size: 1.1rem; 
    margin-bottom: 50px; 
    opacity: 0.8; 
    max-width: 600px; 
    font-weight: 400;
    border-left: 3px solid var(--c-accent); /* 橙色装饰线 */
    padding-left: 20px;
    margin-left: 0;
}

.hero-buttons { display: flex; gap: 20px; }

/* 按钮系统 */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 36px; font-size: 0.95rem;
    border-radius: var(--radius-hard); font-weight: 600; cursor: pointer;
    transition: all 0.3s var(--ease-out);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.primary-btn { 
    background: var(--c-accent); 
    color: #fff; 
    border: 2px solid var(--c-accent);
}
.primary-btn:hover { 
    background: transparent; 
    color: var(--c-accent); 
}

.secondary-btn { 
    background: transparent; 
    border: 2px solid rgba(255,255,255,0.3); 
    color: #fff; 
}
.secondary-btn:hover { 
    background: #fff; 
    border-color: #fff; 
    color: var(--c-brand); 
}

/* === Info Section (核心价值) === */
.info-section { margin-bottom: 100px; }

.center-header { text-align: left; margin-bottom: 60px; display: flex; align-items: baseline; gap: 20px; border-bottom: 1px solid #e0e0e0; padding-bottom: 20px; }
.center-header h2 { font-size: 2rem; color: var(--c-brand); font-weight: 800; letter-spacing: -1px; }
.center-header p { color: var(--c-accent); font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 2px; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }

.info-card {
    background: var(--bg-surface);
    padding: 40px;
    border-radius: var(--radius-hard);
    box-shadow: var(--shadow-base);
    transition: transform 0.4s var(--ease-out);
    border-top: 4px solid transparent;
    position: relative;
}

.info-card:hover { 
    transform: translateY(-8px); 
    border-top-color: var(--c-accent);
    box-shadow: var(--shadow-lift);
}

.info-card .icon { font-size: 2rem; margin-bottom: 25px; filter: grayscale(100%); transition: filter 0.3s; }
.info-card:hover .icon { filter: grayscale(0%); }

.info-card h3 { font-size: 1.25rem; color: var(--c-brand); margin-bottom: 15px; font-weight: 700; }
.read-more { display: inline-block; margin-top: 15px; color: var(--c-brand); font-weight: 700; font-size: 0.85rem; border-bottom: 2px solid var(--c-accent); padding-bottom: 2px; }

/* === Main Content Area === */
.main-content-area { min-height: 600px; margin-bottom: 120px; }

.section-header { 
    margin-bottom: 40px; 
    border-left: none; 
    padding-left: 0; 
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.section-header h2 { font-size: 1.8rem; color: var(--c-brand); font-weight: 800; }
.cat-desc { font-size: 0.9rem; color: var(--text-secondary); max-width: 50%; text-align: right; }

/* === Post Grid (装备/资讯卡片) === */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 40px; }

.grid-card {
    background: var(--bg-surface);
    border-radius: var(--radius-hard);
    overflow: hidden;
    box-shadow: none; /* 移除默认阴影，更扁平 */
    transition: all 0.4s var(--ease-out);
    border: 1px solid rgba(0,0,0,0.08);
    display: flex; flex-direction: column;
}

.grid-card:hover { 
    transform: translateY(-5px); 
    box-shadow: var(--shadow-lift); 
    border-color: transparent;
}

/* 封面图处理 */
.card-cover-wrapper {
    display: block;
    width: 100%;
    height: 240px; 
    background: #e0e6e8;
    overflow: hidden;
    position: relative;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
    filter: brightness(0.95);
}

.grid-card:hover .card-img { 
    transform: scale(1.08); 
    filter: brightness(1.05);
}

/* 无图占位 */
.card-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: var(--c-brand);
    color: rgba(255,255,255,0.2); 
    font-weight: 800; font-size: 1.5rem; text-transform: uppercase;
}

.card-body { padding: 30px; display: flex; flex-direction: column; flex: 1; }

.card-meta { 
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    margin-bottom: 15px; 
    font-weight: 600;
}
.date { color: var(--text-meta); }
.cat-tag { color: var(--c-accent); }

.grid-card h3 { 
    font-size: 1.35rem; 
    margin-bottom: 12px; 
    line-height: 1.3; 
    color: var(--c-brand); 
    font-weight: 700;
}
.grid-card h3 a { background-image: linear-gradient(transparent 95%, var(--c-accent) 95%); background-size: 0 100%; background-repeat: no-repeat; transition: background-size .4s; }
.grid-card:hover h3 a { background-size: 100% 100%; }

.excerpt { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 25px; line-height: 1.6; }

.card-tags { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(0,0,0,0.05); }
.tag-badge { 
    font-size: 0.7rem; color: var(--text-secondary); margin-right: 10px; 
    background: #f1f2f6; padding: 4px 10px; border-radius: 4px; font-weight: 500;
    transition: all 0.2s;
}
.tag-badge:hover { background: var(--c-brand); color: #fff; }

/* 分页 */
.pagination { margin-top: 80px; gap: 15px; }
.page-btn {
    width: 44px; height: 44px; 
    border: 2px solid #e0e0e0; 
    border-radius: var(--radius-hard); 
    color: var(--c-brand);
    background: transparent;
    font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}
.page-btn:hover { border-color: var(--c-brand); background: transparent; }
.page-current { font-weight: 800; color: var(--c-brand); font-size: 1.1rem; display: flex; align-items: center; }

/* === 文章详情页 === */
.single-post { 
    background: var(--bg-surface); 
    padding: 0; 
    border-radius: 0; 
    box-shadow: none; 
    background: transparent;
}

.single-header { 
    border-bottom: 1px solid rgba(0,0,0,0.1); 
    padding-bottom: 40px; margin-bottom: 40px; 
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.breadcrumb { font-size: 0.85rem; color: var(--text-meta); margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }

.single-header h1 { 
    font-size: 2.8rem; 
    color: var(--c-brand); 
    margin-bottom: 25px; 
    line-height: 1.2; 
    font-weight: 800; 
}

.meta-line { 
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.9rem; 
    color: var(--text-secondary); 
    font-weight: 500;
}

/* Markdown 内容样式 - 优化阅读体验 */
.markdown-body { 
    color: var(--text-primary); 
    font-size: 1.15rem; 
    line-height: 1.9; 
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 60px;
    border-radius: var(--radius-hard);
    box-shadow: var(--shadow-base);
}

.markdown-body h2 { 
    font-size: 1.8rem; 
    color: var(--c-brand); 
    margin: 2em 0 1em; 
    border-bottom: none;
    position: relative;
    padding-left: 20px;
}
.markdown-body h2::before {
    content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; background: var(--c-accent);
}

.markdown-body p { margin-bottom: 1.8em; }
.markdown-body strong { color: var(--c-brand); font-weight: 700; }

.markdown-body hr {
    margin: 3em 0;
    height: 1px;
    background-color: #eee;
}

.markdown-body img { 
    border-radius: var(--radius-hard); 
    margin: 40px 0; 
    width: 100%;
}

.markdown-body blockquote { 
    border-left: 2px solid var(--c-brand); 
    background: #f8f9fa; 
    padding: 30px; 
    color: var(--c-brand);
    font-style: italic;
    margin: 30px 0; 
    font-size: 1.1rem;
}

.post-tags-container { max-width: 800px; margin: 60px auto 0; padding-top: 30px; border-top: 1px solid #eee; }

/* === CTA 区域 (限制：背景必须明亮) === */
.post-cta {
    margin: 80px auto 0; 
    max-width: 900px;
    /* 严格遵守：明亮背景 */
    background: #f0f4f8; 
    padding: 50px; 
    text-align: center; 
    border-radius: var(--radius-hard);
    border: 1px solid #dceefb;
    position: relative;
    overflow: hidden;
}

/* 增加淡色装饰图案 */
.post-cta::before {
    content: 'CONTACT';
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 6rem;
    font-weight: 900;
    color: rgba(0,0,0,0.03);
    z-index: 0;
    pointer-events: none;
}

.post-cta p { 
    font-weight: 700; font-size: 1.4rem; color: var(--c-brand); margin-bottom: 25px; position: relative; z-index: 1;
}
.small-btn { 
    position: relative; z-index: 1;
    display: inline-flex;
    font-size: 0.9rem; padding: 12px 32px; background: var(--c-brand); color: white; border-radius: var(--radius-pill);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.2);
}
.small-btn:hover { background: var(--c-accent); transform: translateY(-2px); }

/* 文章导航 */
.post-navigation { max-width: 900px; margin: 0 auto; margin-top: 60px; display: flex; justify-content: space-between; }
.post-navigation a { max-width: 45%; }
.post-navigation small { display: block; color: var(--text-meta); font-weight: 600; margin-bottom: 5px; text-transform: uppercase; }
.post-navigation span { display: block; color: var(--c-brand); font-weight: 700; line-height: 1.3; }

/* === FAQ Section (修复版) === */
.faq-section { background: var(--bg-surface); padding: 100px 0; border-top: 1px solid #eee; }

.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
    border-bottom: 1px solid #eee;
}

.faq-question { 
    padding: 25px 0; 
    font-size: 1.1rem;
    cursor: pointer; /* 修复手型光标 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--c-brand);
    font-weight: 600;
    transition: color 0.2s;
}

.faq-question:hover { color: var(--c-accent); }

.faq-question .arrow { 
    font-family: monospace; 
    font-weight: bold; 
    background: #f1f2f6; 
    color: var(--c-brand);
    width: 32px; 
    height: 32px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    flex-shrink: 0;
    margin-left: 20px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

/* 激活状态样式 - 对应 JS 的 .active 类 */
.faq-question.active .arrow {
    background: var(--c-accent);
    color: #fff;
    /* JS 会将 + 变为 -, 这里只需配合颜色变化 */
}

/* 必须添加 max-height 过渡，配合 JS 脚本 */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer p {
    padding-bottom: 25px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === Footer (修复版 Grid 布局) === */
.site-footer { 
    background: #111; 
    color: #888; 
    padding: 100px 0 50px; 
    font-size: 0.9rem;
}

/* 修复核心：找回 Grid 系统 */
.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 60px; 
    margin-bottom: 80px; 
}

.footer-col h4 { 
    color: #fff; 
    margin-bottom: 30px; 
    font-size: 1rem; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    border-bottom: 2px solid var(--c-accent);
    display: inline-block;
    padding-bottom: 5px;
}

/* 修复核心：让链接换行 */
.footer-col a { 
    display: block; 
    color: #999; 
    margin-bottom: 12px; 
    transition: all 0.2s;
}
.footer-col a:hover { color: #fff; padding-left: 5px; }

.footer-bottom { 
    border-top: 1px solid #222; 
    padding-top: 40px; 
    display: flex; 
    justify-content: space-between; 
    opacity: 0.5; 
}

/* === 响应式调整 === */
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-menu-trigger { display: block; }
    
    .header-inner { padding: 0 10px; }
    
    .hero-content h1 { font-size: 2.5rem; }
    .hero-buttons { flex-direction: column; }
    .btn { width: 100%; }
    
    .center-header { flex-direction: column; gap: 10px; align-items: flex-start; }
    .section-header { flex-direction: column; align-items: flex-start; }
    .cat-desc { max-width: 100%; text-align: left; margin-top: 10px; }
    
    .markdown-body { padding: 30px 20px; font-size: 1rem; }
    .single-header h1 { font-size: 2rem; }
    
    .post-cta { padding: 30px 20px; }
    .post-cta p { font-size: 1.2rem; }
    .post-cta::before { font-size: 3rem; }
    
    /* 移动端 Footer 优化 */
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
}