/* ==========================================================================
   王乾源官网 V9.0 - 终极完整版样式表 (The Ultimate Version)
   风格：新中式 · 黑金雅致 · 理性结构
   包含：全局、导航、页面适配、图表、电子书、弹窗
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 核心变量 (CSS Variables)
   -------------------------------------------------------------------------- */
:root {
    /* --- 核心色盘 --- */
    --color-bg: #f8f9fa;             /* 全局背景：极淡的灰，护眼 */
    --color-white: #ffffff;          /* 纯白 */
    --color-black: #1a1a1a;          /* 深墨色：用于主标题、导航文字 */
    --color-gold: #c6a87c;           /* 雅致金：用于Logo、高亮、按钮悬停 */
    --color-gold-light: #f4efe6;     /* 浅金：用于背景装饰 */
    --color-grey-text: #666666;      /* 正文灰：用于段落文字 */
    --color-grey-light: #e5e5e5;     /* 浅灰边框 */

    /* --- 布局参数 --- */
    --container-width: 1100px;       /* 内容最大宽度 */
    --header-height: 72px;           /* 导航栏高度 */
    --radius-card: 12px;             /* 卡片圆角 */
    
    /* --- 动效与阴影 --- */
    --shadow-sm: 0 5px 15px rgba(0,0,0,0.03);    /* 静止阴影 */
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.08); /* 悬停阴影 */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* 平滑过渡 */
}

/* --------------------------------------------------------------------------
   2. 全局重置 (Reset & Base)
   -------------------------------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, serif;
    background-color: var(--color-bg);
    color: var(--color-black);
    line-height: 1.8;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }

/* --------------------------------------------------------------------------
   3. 通用布局工具类 (Layout Utilities)
   -------------------------------------------------------------------------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.section { padding: 80px 0; }
.section-bg-white { background-color: var(--color-white); }
.section-bg-gold { background-color: var(--color-gold-light); }
.section-bg-dark { background-color: var(--color-black); color: var(--color-white); }

/* 网格系统 */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }

/* --------------------------------------------------------------------------
   4. 标题体系 (Typography)
   -------------------------------------------------------------------------- */
.section-header {
    text-align: center; margin-bottom: 60px; max-width: 700px; margin-left: auto; margin-right: auto;
}

.section-title {
    font-size: 32px; font-weight: 700; margin-bottom: 16px; position: relative;
    display: block; /* 强制独占一行，修复排版问题 */
    color: var(--color-black);
}

.section-title::after {
    content: ''; display: block; width: 40px; height: 3px;
    background: var(--color-gold); margin: 12px auto 0; border-radius: 2px;
}

.section-desc { color: var(--color-grey-text); font-size: 16px; }
.text-highlight { color: var(--color-gold); font-weight: 600; }

/* --------------------------------------------------------------------------
   5. 导航栏 (Header) - V8.5 双字优化版
   -------------------------------------------------------------------------- */
.header {
    position: fixed; top: 0; left: 0; right: 0; height: var(--header-height);
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
    z-index: 1000; border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}
.header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.05); }

.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 100%; }

/* Logo */
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo img { height: 40px; width: auto; }
.logo-text-main { font-size: 20px; font-weight: 700; color: var(--color-black); letter-spacing: 2px; }

/* 菜单 */
.nav-menu { display: flex; gap: 25px; /* 缩短间距适配更多栏目 */ }

.nav-link {
    font-size: 15px; color: var(--color-grey-text); font-weight: 500;
    position: relative; padding: 10px 0; letter-spacing: 1px;
}
.nav-link.active, .nav-link:hover { color: var(--color-black); }
.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 0; height: 2px; background: var(--color-gold); transition: var(--transition);
}
.nav-link.active::after, .nav-link:hover::after { width: 100%; }

/* "预约"按钮高亮样式 */
.nav-btn-highlight {
    background: var(--color-black); color: #fff !important;
    padding: 6px 18px !important; border-radius: 50px; transition: all 0.3s ease;
}
.nav-btn-highlight:hover { background: var(--color-gold); transform: translateY(-2px); }
.nav-btn-highlight::after { display: none; }

.menu-toggle { display: none; font-size: 24px; cursor: pointer; color: var(--color-black); }

/* --------------------------------------------------------------------------
   6. 基础组件 (Buttons & Cards)
   -------------------------------------------------------------------------- */
.btn {
    display: inline-block; padding: 12px 36px; border-radius: 50px;
    font-weight: 600; font-size: 15px; cursor: pointer;
    transition: var(--transition); text-align: center;
}
.btn-primary { background: var(--color-black); color: #fff; border: 1px solid var(--color-black); }
.btn-primary:hover {
    background: var(--color-gold); border-color: var(--color-gold);
    transform: translateY(-2px); box-shadow: 0 5px 15px rgba(198, 168, 124, 0.4);
}
.btn-outline { background: transparent; border: 1px solid var(--color-grey-light); color: var(--color-black); }
.btn-outline:hover {
    border-color: var(--color-black); background: var(--color-black);
    color: #fff; transform: translateY(-2px);
}

.card {
    background: var(--color-white); padding: 40px 30px;
    border-radius: var(--radius-card); box-shadow: var(--shadow-sm);
    transition: var(--transition); border: 1px solid transparent;
    height: 100%; display: flex; flex-direction: column;
}
.card:hover {
    transform: translateY(-8px); box-shadow: var(--shadow-hover);
    border-color: var(--color-gold);
}
.card-icon { font-size: 36px; color: var(--color-gold); margin-bottom: 20px; }
.card h3 { font-size: 20px; margin-bottom: 12px; color: var(--color-black); }
.card p { font-size: 14px; color: var(--color-grey-text); line-height: 1.7; }

/* --------------------------------------------------------------------------
   7. 首页专用 (Hero)
   -------------------------------------------------------------------------- */
.hero {
    padding-top: 160px; padding-bottom: 100px; text-align: center;
    background: radial-gradient(circle at 50% 30%, rgba(198, 168, 124, 0.1) 0%, rgba(255,255,255,0) 60%);
}
.hero-tag {
    display: inline-block; padding: 6px 16px; background: rgba(198, 168, 124, 0.1);
    color: var(--color-gold); border-radius: 50px; font-size: 13px; font-weight: 700;
    letter-spacing: 1px; margin-bottom: 20px; text-transform: uppercase;
}
.hero-title { font-size: 48px; font-weight: 700; line-height: 1.2; margin-bottom: 25px; color: var(--color-black); }
.hero-subtitle { font-size: 18px; color: #666; max-width: 700px; margin: 0 auto 40px; }
.btn-group { display: flex; gap: 20px; justify-content: center; }

/* 核心版图列表 */
.business-card-header { text-align: center; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px dashed #eee; }
.business-card-header span { display: block; font-size: 48px; margin-bottom: 10px; }
.business-list li { margin-bottom: 10px; padding-left: 20px; position: relative; font-size: 14px; color: #555; }
.business-list li::before { content: '•'; color: var(--color-gold); position: absolute; left: 0; font-weight: bold; }

/* --------------------------------------------------------------------------
   8. 专栏/洞察页专用 (Content/Insights)
   -------------------------------------------------------------------------- */
.article-list { display: flex; flex-direction: column; gap: 20px; max-width: 900px; margin: 0 auto; }

.article-card {
    background: #fff; padding: 30px; border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); cursor: pointer;
    border: 1px solid transparent; border-left: 4px solid transparent;
    transition: all 0.3s ease; display: block;
}
.article-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.08); }
.article-card.active { border-color: var(--color-gold); border-left: 4px solid var(--color-gold); background: #fffbf5; }

.article-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.article-title-row { flex: 1; }
.article-title-row h3 { font-size: 20px; margin-bottom: 12px; color: var(--color-black); line-height: 1.4; }
.article-idx { font-size: 32px; font-weight: 700; color: #e0e0e0; font-family: 'Georgia', serif; line-height: 1; }
.article-card.active .article-idx { color: var(--color-gold); opacity: 0.5; }

.article-meta { font-size: 13px; color: #999; display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.article-tag { background: #eee; padding: 2px 8px; border-radius: 4px; color: #555; font-weight: 500; }

.article-detail {
    display: none; margin-top: 25px; padding-top: 25px;
    border-top: 1px dashed #dcdcdc; animation: slideDown 0.4s ease forwards;
}
.article-card.active .article-detail { display: block; }

.action-box {
    background: rgba(198, 168, 124, 0.15); padding: 20px;
    border-radius: 8px; margin-top: 25px; border-left: 3px solid var(--color-gold);
}
.action-title { font-weight: 700; color: #b08d55; font-size: 14px; margin-bottom: 8px; display: block; }

/* --- 图表系统 (Charts) --- */
.chart-box {
    background: #fff; border: 1px solid #eee; border-radius: 8px;
    padding: 25px; margin: 25px 0; text-align: center;
}
.chart-title {
    font-size: 12px; color: #bbb; text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 20px; display: block;
}
/* 流程图 */
.flow-chart { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.flow-node { background: #fff; border: 1px solid #ddd; color: #333; padding: 8px 12px; border-radius: 4px; font-size: 13px; }
.flow-arrow { color: #ccc; }
/* 柱状图 */
.bar-chart { display: flex; align-items: flex-end; justify-content: center; height: 120px; gap: 15px; }
.bar { width: 24px; background: var(--color-gold); border-radius: 4px 4px 0 0; position: relative; opacity: 0.8; }
.bar span { position: absolute; bottom: -25px; left: 50%; transform: translateX(-50%); font-size: 12px; color: #666; white-space: nowrap; }
/* 阶梯图 */
.step-chart {
    display: flex; align-items: flex-end; justify-content: center; gap: 8px;
    height: 120px; margin: 20px auto; max-width: 300px;
    border-bottom: 1px solid #eee; padding-bottom: 5px;
}
.step-bar { flex: 1; background: #e0e0e0; border-radius: 4px 4px 0 0; position: relative; transition: all 0.3s ease; }
.step-bar:hover { background: #d0d0d0; transform: translateY(-2px); }
.step-bar.highlight { background: var(--color-gold); box-shadow: 0 4px 10px rgba(198, 168, 124, 0.3); }
/* 同心圆图 */
.circle-chart {
    width: 140px; height: 140px; border-radius: 50%;
    background: rgba(198, 168, 124, 0.1); border: 1px dashed var(--color-gold);
    margin: 20px auto; display: flex; align-items: center; justify-content: center;
    position: relative; animation: pulse 3s infinite ease-in-out;
}
.circle-inner {
    width: 70px; height: 70px; border-radius: 50%; background: var(--color-black); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); z-index: 2;
}
/* 辐射图 */
.radiation-chart {
    width: 200px; height: 100px; margin: 20px auto; position: relative;
    display: flex; align-items: center; justify-content: center;
}
.radiation-core {
    width: 50px; height: 50px; background: var(--color-gold); border-radius: 50%;
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 12px; z-index: 10; box-shadow: 0 0 20px rgba(198, 168, 124, 0.6);
}
.radiation-ring {
    position: absolute; border: 1px solid var(--color-gold); border-radius: 50%;
    opacity: 0; animation: ripple 2s linear infinite;
}
.radiation-ring:nth-child(1) { width: 60px; height: 60px; animation-delay: 0s; }
.radiation-ring:nth-child(2) { width: 100px; height: 100px; animation-delay: 0.6s; }
.radiation-ring:nth-child(3) { width: 140px; height: 140px; animation-delay: 1.2s; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 12px; margin: 60px 0; }
.page-btn {
    width: 44px; height: 44px; border: 1px solid #ddd; background: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.3s; font-family: serif; font-size: 16px;
}
.page-btn:hover { border-color: var(--color-gold); color: var(--color-gold); }
.page-btn.active {
    background: var(--color-black); color: #fff; border-color: var(--color-black);
    transform: scale(1.1); box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

/* --------------------------------------------------------------------------
   9. 预约页专用 (Contact Page)
   -------------------------------------------------------------------------- */
.price-tag { font-size: 42px; font-weight: 700; color: var(--color-black); font-family: serif; }
.price-unit { font-size: 16px; color: #999; font-weight: normal; font-family: sans-serif; }

.info-template {
    background: #fff; border: 1px dashed var(--color-gold); padding: 30px; border-radius: 8px; position: relative; margin-top: 20px;
}
.info-template::before {
    content: '资料模板'; position: absolute; top: -12px; left: 20px; background: #fff; padding: 0 10px; font-size: 12px; color: var(--color-gold);
}
.info-item { display: flex; margin-bottom: 12px; font-size: 14px; color: #555; border-bottom: 1px solid #f5f5f5; padding-bottom: 8px; }
.info-label { width: 100px; font-weight: 600; color: var(--color-black); flex-shrink: 0; }

.timeline-container { position: relative; padding-left: 20px; margin-top: 30px; }
.timeline-container::before {
    content: ''; position: absolute; top: 10px; bottom: 10px; left: 6px; width: 2px;
    background: linear-gradient(to bottom, var(--color-gold) 0%, rgba(198, 168, 124, 0.2) 100%);
}
.timeline-step { position: relative; padding-left: 40px; margin-bottom: 40px; }
.timeline-marker {
    position: absolute; left: 0; top: 0; width: 14px; height: 14px; border-radius: 50%;
    background: var(--color-gold); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--color-gold);
}
.timeline-content {
    background: #fff; border: 1px solid #f0f0f0; border-radius: 8px; padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.step-num { font-size: 12px; font-weight: 700; color: var(--color-gold); margin-bottom: 5px; display: block; }
.step-head { font-size: 18px; font-weight: 600; color: var(--color-black); margin-bottom: 8px; }

.wechat-card-highlight { border: 2px solid var(--color-gold); background: linear-gradient(145deg, #ffffff 0%, #fffbf5 100%); }
.wechat-id-box {
    background: #f0f0f0; padding: 10px 20px; border-radius: 4px; font-family: monospace;
    font-size: 18px; font-weight: 600; color: #333; display: inline-block; margin: 15px 0;
}

/* --------------------------------------------------------------------------
   10. 电子手册专用 (Handbook)
   -------------------------------------------------------------------------- */
.paper-container {
    max-width: 800px; margin: -80px auto 60px; position: relative; z-index: 10;
    background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,0.08); 
    padding: 0; overflow: hidden;
}
.book-cover {
    background: var(--color-black); color: #fff; padding: 100px 60px; text-align: center;
    background-image: radial-gradient(circle at 50% 30%, rgba(198, 168, 124, 0.15) 0%, rgba(0,0,0,0) 60%);
}
.cover-tag { border: 1px solid var(--color-gold); color: var(--color-gold); padding: 4px 12px; font-size: 12px; margin-bottom: 20px; display: inline-block; }
.cover-title { font-size: 48px; font-weight: 700; margin-bottom: 20px; font-family: serif; letter-spacing: 2px; line-height: 1.2; }
.cover-subtitle { font-size: 18px; color: #ccc; font-weight: 300; margin-bottom: 60px; }
.cover-footer { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 30px; font-size: 13px; color: #666; display: flex; justify-content: space-between; }

.book-toc { padding: 60px; background: #fffbf5; border-bottom: 1px solid #eee; }
.toc-header { font-size: 14px; font-weight: 700; color: #b08d55; margin-bottom: 30px; }
.toc-link { display: flex; justify-content: space-between; padding: 15px 0; border-bottom: 1px dashed #e0d0b0; color: #333; cursor: pointer; transition: 0.2s; }
.toc-link:hover { color: var(--color-gold); padding-left: 10px; }

.chapter { padding: 60px; border-bottom: 1px solid #f5f5f5; }
.ch-num { font-size: 80px; font-weight: 700; color: rgba(0,0,0,0.03); line-height: 0.5; font-family: serif; }
.ch-title { font-size: 28px; font-weight: 700; color: var(--color-black); margin-top: -30px; position: relative; z-index: 1; }
.content-text { font-size: 16px; line-height: 1.9; color: #444; text-align: justify; }
.note-box { background: #f8f9fa; border-left: 4px solid var(--color-black); padding: 20px; margin: 30px 0; font-style: italic; color: #555; }

/* 悬浮下载按钮 */
.float-dl-btn {
    position: fixed; bottom: 40px; right: 40px; z-index: 100;
    background: var(--color-gold); color: #fff; padding: 12px 25px;
    border-radius: 50px; font-weight: 600; box-shadow: 0 10px 20px rgba(198, 168, 124, 0.4);
    cursor: pointer; display: flex; align-items: center; gap: 8px; transition: 0.3s; border: none;
}
.float-dl-btn:hover { background: var(--color-black); transform: translateY(-3px); }

/* --------------------------------------------------------------------------
   11. 弹窗与二维码 (Modals)
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px);
    z-index: 2000; display: none; opacity: 0; transition: opacity 0.3s ease;
    align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; opacity: 1; }

.modal-card {
    background: #fff; width: 90%; max-width: 400px;
    border-radius: 12px; padding: 30px; position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3); transform: translateY(20px);
    transition: transform 0.3s ease; text-align: center; border: 1px solid var(--color-gold);
}
.modal-overlay.active .modal-card { transform: translateY(0); }

.modal-close {
    position: absolute; top: 10px; right: 15px; font-size: 24px; color: #999; cursor: pointer;
}
.qr-container { margin: 20px 0; display: flex; justify-content: center; gap: 20px; }
.qr-img { width: 150px; height: 150px; border: 1px solid #eee; padding: 5px; border-radius: 8px; margin-bottom: 10px; }
.qr-label { font-size: 12px; color: #666; display: flex; align-items: center; justify-content: center; gap: 5px; }
.pay-card { border-top: 4px solid var(--color-gold); }
.zsxq-card { border-top: 4px solid #1e80ff; }

/* --------------------------------------------------------------------------
   12. 页脚与动画
   -------------------------------------------------------------------------- */
.footer { background: var(--color-black); color: #999; padding: 60px 0 30px; text-align: center; margin-top: auto; }
.footer-links { display: flex; justify-content: center; gap: 30px; margin-bottom: 30px; }
.footer-links a { font-size: 14px; color: #bbb; }
.footer-links a:hover { color: var(--color-gold); }
.copyright { font-size: 13px; border-top: 1px solid #333; padding-top: 30px; }

.fade-up { opacity: 0; transform: translateY(30px); transition: 0.8s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes ripple { 0% { transform: scale(0.8); opacity: 1; border-width: 2px; } 100% { transform: scale(1.5); opacity: 0; border-width: 0px; } }

/* --------------------------------------------------------------------------
   13. 移动端适配 (Mobile)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .section { padding: 50px 0; }
    .hero-title { font-size: 32px; }
    .menu-toggle { display: block; }
    
    .nav-menu {
        position: fixed; top: var(--header-height); left: 0; right: 0; background: #fff;
        flex-direction: column; padding: 40px 20px; gap: 15px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05); transform: translateY(-150%);
        transition: 0.3s; z-index: 999;
    }
    .nav-menu.active { transform: translateY(0); }
    
    .nav-link {
        font-size: 18px; font-weight: 600; display: block; width: 100%;
        padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.03);
    }
    .nav-link:last-child { border-bottom: none; }
    
    .nav-btn-highlight {
        background: var(--color-gold); color: #fff !important; margin-top: 10px;
        display: inline-block; width: auto; padding: 10px 40px !important;
    }

    .grid-3, .grid-2 { grid-template-columns: 1fr; gap: 20px; }
    
    .article-header { flex-direction: column-reverse; align-items: flex-start; gap: 10px; }
    .article-idx { font-size: 24px; color: #eee; margin-bottom: -10px; }
    .bar-chart { height: 100px; gap: 8px; }
    .bar { width: 15px; }
    
    /* 手册打印适配 */
    @media print {
        .header, .footer, .float-dl-btn, .btn-group { display: none !important; }
        .paper-container { margin: 0; box-shadow: none; max-width: 100%; }
    }
}