/* =============================================
   HonComm 产品使用说明书 — 样式表
   配色: 深蓝灰 #1B2A4A / 暖灰 #F0F0F0 / 琥珀橙 #D4760A
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: #1e1e1e;
    background: #fafafa;
    line-height: 1.7;
    font-size: 18px;
}

/* --- Container --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* --- Sticky Nav --- */
.sticky-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(27, 42, 74, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.3s ease;
}
.sticky-nav.nav-hidden { transform: translateY(-100%); }
.nav-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center;
    padding: 0 24px; height: 56px;
}
.nav-brand {
    font-weight: 700; font-size: 18px;
    color: #fff; letter-spacing: 1px;
    margin-right: 32px;
}
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none; font-size: 14px;
    padding: 6px 14px; border-radius: 4px;
    transition: all 0.2s;
}
.nav-links a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-pdf {
    background: #D4760A; color: #fff; border: none;
    padding: 6px 18px; border-radius: 4px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: background 0.2s;
}
.btn-pdf:hover { background: #e8851a; }

/* --- Hero --- */
.hero {
    position: relative;
    padding: 120px 24px 80px;
}
.hero-bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #0f1a2e 0%, #1B2A4A 40%, #2a3f6a 70%, #1B2A4A 100%);
}
.hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(212, 118, 10, 0.08) 0%, transparent 60%);
}
.hero-content {
    position: relative; text-align: center; z-index: 1;
}
.hero-title {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 800; color: #fff;
    letter-spacing: 4px;
}
.hero-title small {
    display: block; font-size: 0.5em; font-weight: 400;
    color: rgba(255,255,255,0.7); letter-spacing: 8px;
    margin-top: 8px;
}
.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    color: #D4760A; font-weight: 600;
    margin-top: 16px; letter-spacing: 6px;
}
.hero-desc {
    color: rgba(255,255,255,0.5);
    margin-top: 12px; font-size: 15px; letter-spacing: 2px;
}
.hero-actions { margin-top: 40px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-primary, .btn-secondary {
    display: inline-block; padding: 12px 36px; border-radius: 6px;
    font-size: 15px; font-weight: 600; text-decoration: none;
    cursor: pointer; transition: all 0.25s; border: none;
}
.btn-primary {
    background: #D4760A; color: #fff;
    box-shadow: 0 4px 20px rgba(212, 118, 10, 0.35);
}
.btn-primary:hover { background: #e8851a; transform: translateY(-2px); }
.btn-secondary {
    background: rgba(255,255,255,0.1); color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
}
.btn-secondary:hover { background: rgba(255,255,255,0.18); }

/* --- Section Common --- */
.section {
    padding: 80px 0;
    border-bottom: 1px solid rgba(27,42,74,0.06);
}
/* 补偿固定导航栏遮挡锚点目标 */
.section[id] {
    scroll-margin-top: 72px;
}
.section-chain { padding: 60px 0 80px; }
.section:nth-child(even) { background: #fff; }
.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700; color: #1B2A4A;
    text-align: center;
    position: relative; padding-bottom: 16px;
}
.section-title::after {
    content: ''; display: block;
    width: 60px; height: 3px; background: #D4760A;
    margin: 12px auto 0; border-radius: 2px;
}
.section-desc {
    text-align: center; color: #666; font-size: 15px;
    max-width: 600px; margin: 0 auto 40px;
}

/* --- Chain Header --- */
.chain-header { margin-bottom: 32px; }

/* --- Overview Cards --- */
.overview-cards {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 24px; margin-top: 32px;
}
.overview-card {
    background: #fff; border-radius: 12px;
    padding: 32px 24px; text-decoration: none; color: inherit;
    border: 1px solid #e8e8e8;
    transition: all 0.3s;
    display: flex; flex-direction: column; align-items: center; text-align: center;
}
.overview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(27,42,74,0.1);
    border-color: #D4760A;
}
.oc-icon { color: #1B2A4A; margin-bottom: 16px; }
.overview-card h3 { font-size: 18px; font-weight: 700; color: #1B2A4A; margin-bottom: 12px; }
.oc-chain { font-size: 13px; color: #888; line-height: 1.6; }
.oc-link { margin-top: 16px; color: #D4760A; font-size: 13px; font-weight: 600; }

/* --- Chain Flow Indicator --- */
.chain-flow {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; margin-bottom: 48px; flex-wrap: wrap;
}
.chain-flow-item {
    padding: 8px 18px; border-radius: 20px;
    background: #e8eaed; color: #666;
    font-size: 13px; font-weight: 600; white-space: nowrap;
    transition: all 0.2s;
}
.chain-flow-item.active { background: #1B2A4A; color: #fff; }
.chain-flow-arrow { color: #D4760A; font-size: 20px; font-weight: 700; }

/* --- Chain Step --- */
.chain-step {
    display: flex; gap: 24px;
    margin-bottom: 48px; padding: 32px;
    background: #fff; border-radius: 12px;
    border: 1px solid #eef0f2;
    transition: box-shadow 0.3s;
}
.chain-step:hover { box-shadow: 0 4px 24px rgba(27,42,74,0.06); }
.step-number {
    flex-shrink: 0;
    width: 52px; height: 52px; border-radius: 50%;
    background: #1B2A4A; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700;
}
.step-body { flex: 1; min-width: 0; }
.step-title { font-size: 20px; font-weight: 700; color: #1B2A4A; margin-bottom: 16px; }
.step-desc { color: #444; font-size: 15px; line-height: 1.8; }
.step-desc p { margin-bottom: 12px; }
.step-desc ul, .step-desc ol { margin: 8px 0 12px 20px; }
.step-desc li { margin-bottom: 6px; }
.step-desc em { color: #888; font-size: 14px; }

/* --- Step Images --- */
.step-images {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px; margin-bottom: 20px;
}
.step-figure {
    border-radius: 8px; overflow: hidden;
    border: 1px solid #eef0f2;
    background: #f8f8f8;
}
.step-figure img {
    display: block; max-width: 100%;
}
.step-figure figcaption {
    padding: 8px 12px; font-size: 13px; color: #666;
    text-align: center; background: #fafafa;
}
/* Software screenshots grid */
.sw-screenshots {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px; margin-top: 24px;
}
.sw-screenshots .step-figure {
    background: #1a1a1a;
}
.sw-screenshots .step-figure img {
    max-width: 100%; margin: 0 auto;
}

/* --- Spec Table --- */
.spec-table {
    width: 100%; border-collapse: collapse;
    margin-top: 12px; font-size: 14px;
}
.spec-table th {
    background: #1B2A4A; color: #fff;
    padding: 10px 16px; text-align: left; font-weight: 600;
}
.spec-table td {
    padding: 10px 16px; border-bottom: 1px solid #e8eaed;
}
.spec-table tr:nth-child(even) td { background: #f8f9fa; }
.spec-table tr:hover td { background: #f0f2f5; }

/* --- Footer --- */
.footer {
    background: #1B2A4A; color: rgba(255,255,255,0.6);
    text-align: center; padding: 32px 24px; font-size: 14px;
}
.footer-meta { margin-top: 6px; font-size: 12px; color: rgba(255,255,255,0.35); }

/* =============================================
   打印 / PDF 样式
   ============================================= */
@media print {
    /* 全局 */
    @page { size: A4; margin: 15mm; }
    @page :first { @bottom-center { content: none; } }
    @page { @bottom-center { content: counter(page) " / " counter(pages); font-size: 9px; color: #999; } }
    body { font-size: 14px; color: #000; background: #fff; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

    /* 隐藏交互元素 */
    .sticky-nav, .btn-primary, .btn-secondary, .btn-pdf,
    .hero-actions, .chain-flow { display: none !important; }

    /* Hero */
    .hero {
        min-height: auto; padding: 30px 0 20px;
        background: #1B2A4A !important;
    }
    .hero-bg { display: none; }
    .hero-title { font-size: 24px; color: #fff; }
    .hero-title small { font-size: 0.5em; }
    .hero-subtitle { font-size: 16px; }
    .hero-desc { font-size: 12px; }

    /* Sections — 每个章节从新页开始 */
    .section { padding: 24px 0; break-before: page; }
    .section:first-of-type { break-before: auto; }
    .section-title { font-size: 18px; }
    .section-title::after { width: 40px; height: 2px; }

    /* 角色卡片 */
    .overview-cards { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .overview-card {
        break-inside: avoid; padding: 16px;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
    .overview-card:hover { transform: none; }

    /* 链条步骤 — 内容紧随章节标题，允许跨页 */
    .chain-step {
        padding: 16px; margin-bottom: 20px;
        border: 1px solid #ccc; box-shadow: none;
        display: flex; gap: 16px;
    }
    .chain-step:hover { box-shadow: none; }
    .step-number {
        width: 36px; height: 36px; font-size: 14px;
        background: #1B2A4A !important; color: #fff !important;
    }
    .step-title { font-size: 15px; }
    .step-desc { font-size: 12px; }

    /* 图片 */
    .step-figure {
        break-inside: avoid; border: 1px solid #ddd;
        background: #f8f8f8;
    }
    .step-figure img { max-width: 100%; }
    .step-figure img[style*="height:260px"] { max-height: 200px; width: auto; }
    .step-figure img[style*="max-height:280px"] { max-height: 200px; width: auto; }
    .step-figure figcaption { font-size: 11px; padding: 4px 8px; }

    /* 软件截图 */
    .sw-screenshots { grid-template-columns: repeat(3, 1fr); gap: 12px; }

    /* 规格表 */
    .spec-table th {
        background: #1B2A4A !important; color: #fff !important;
    }

    /* 底部 */
    .footer { padding: 16px; background: #1B2A4A !important; color: rgba(255,255,255,0.6); }
    .footer-meta { font-size: 11px; }
}

/* =============================================
   响应式
   ============================================= */
@media (max-width: 768px) {
    .overview-cards { grid-template-columns: 1fr; }
    .chain-step { flex-direction: column; padding: 20px; }
    .step-number { width: 44px; height: 44px; font-size: 15px; }
    .step-images { grid-template-columns: repeat(2, 1fr); }
    .sw-screenshots { grid-template-columns: repeat(2, 1fr); }
    .nav-links { gap: 2px; }
    .nav-links a { font-size: 12px; padding: 4px 8px; }
    .chain-flow { gap: 4px; }
    .chain-flow-item { font-size: 11px; padding: 5px 10px; }
    .chain-flow-arrow { font-size: 14px; }
}

@media (max-width: 480px) {
    .step-images { grid-template-columns: 1fr; }
    .sw-screenshots { grid-template-columns: 1fr; }
    .nav-brand { font-size: 14px; margin-right: 12px; }
    .container { padding: 0 16px; }
    .section { padding: 40px 0; }
}
