/**
 * 南阳POS机办理中心 (nanyang.posbj.com) 通用样式表
 * 视觉风格：科技深蓝 & 活力橙
 * 布局系统：CSS Grid + Flexbox
 */

/* =========================================
   1. 全局变量与基础设置 (Global Variables)
   ========================================= */
:root {
    --primary: #0D47A1;         /* 科技深蓝 (主色调) */
    --primary-light: #E3F2FD;   /* 浅蓝背景 */
    --secondary: #FF6F00;       /* 活力橙 (强调色) */
    --text-dark: #263238;       /* 标题与主要文字 */
    --text-gray: #546E7A;       /* 次要与辅助文字 */
    --bg-light: #F5F7FA;        /* 全站背景色 */
    --white: #ffffff;
    --shadow: 0 8px 30px rgba(0,0,0,0.08); /* 柔和阴影 */
    --radius: 12px;             /* 统一圆角 */
    /* 采用本地系统字体栈，提高加载速度和阅读体验 */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

html, body { overflow-x: hidden; width: 100%; }

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* =========================================
   2. 顶部导航栏 (Header & Navigation)
   ========================================= */
.header {
    background: var(--white);
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap; /* 严格执行：保持在同一水平行 */
}

.logo {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0; /* 防止Logo被压缩 */
    display: flex;
    align-items: center;
}

.logo span { color: var(--secondary); margin-left: 2px; }

.main-nav {
    display: flex;
    align-items: center;
    flex-wrap: nowrap; /* 严格执行：导航菜单不换行 */
    margin-left: 10px;
}

.main-nav a {
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    border-radius: 6px;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary);
    background: rgba(13, 71, 161, 0.05);
}

/* =========================================
   3. 通用页面主体布局 (Main Layout)
   ========================================= */
.main-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: 3fr 1fr; /* 左侧内容占3份，右侧边栏占1份 */
    gap: 30px;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    font-weight: 800;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--secondary);
    border-radius: 2px;
}

/* =========================================
   4. 文章内容页专用样式 (Article Specific)
   ========================================= */
.article-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    min-width: 0; /* 修复Grid布局下长单词撑破容器 */
}

.article-title {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.4;
}

.article-meta {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 20px;
}

.content h2 { 
    margin: 40px 0 20px; 
    font-size: 1.5rem; 
    color: var(--primary); 
    border-left: 5px solid var(--secondary); 
    padding-left: 15px; 
    background: #f8faff; 
    padding-top: 10px; 
    padding-bottom: 10px;
}

.content h3 { margin: 25px 0 15px; font-size: 1.25rem; color: var(--text-dark); }
.content p { margin-bottom: 20px; font-size: 1.1rem; text-align: justify; line-height: 1.8; }
.content ul, .content ol { margin-left: 20px; margin-bottom: 20px; font-size: 1.05rem; }
.content li { margin-bottom: 8px; }

/* 重点标记 */
.highlight { color: var(--secondary); font-weight: bold; }
.highlight-red { color: #d32f2f; font-weight: bold; }
.highlight-gold { color: #f57c00; font-weight: bold; }
.color-mark { background: #fff3e0; padding: 0 4px; border-radius: 4px; border-bottom: 2px solid var(--secondary); }
.anchor-link { color: var(--primary); font-weight: bold; text-decoration: underline; }

/* 响应式表格 */
.table-wrap, .table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 30px 0;
    border-radius: 8px;
    border: 1px solid #eee;
}
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th { background: var(--primary); color: #fff; padding: 12px; text-align: left; }
td { padding: 12px; border-bottom: 1px solid #eee; font-size: 0.95rem; }
tr:nth-child(even) { background: #fafafa; }
tr:hover { background: #f0f7ff; }

/* 微信订阅模块 */
.wx-box, .wx-subscribe-box {
    background: linear-gradient(135deg, #f5f7fa 0%, #e3eeff 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 30px;
    margin: 40px 0;
    display: flex;
    align-items: center;
    gap: 25px;
}
.wx-box img, .wx-subscribe-box img { width: 120px; height: 120px; border: 3px solid #fff; border-radius: 8px; flex-shrink: 0; }
.wx-info h4, .wx-box-text h4 { font-size: 1.3rem; color: var(--primary); margin-bottom: 10px; }
.wx-info p, .wx-box-text p { font-size: 0.95rem; color: var(--text-gray); margin-bottom: 15px; line-height: 1.5; }
.btn-copy, .wx-btn-copy { 
    background: var(--secondary); color: #fff; padding: 8px 20px; 
    border-radius: 20px; border: none; cursor: pointer; font-weight: bold; 
    transition: 0.3s;
}
.btn-copy:hover, .wx-btn-copy:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(255, 111, 0, 0.3); }

/* 上下篇导航 */
.post-nav { margin-top: 50px; display: flex; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.nav-item, .nav-link { flex: 1; min-width: 250px; background: #f8f9fa; padding: 15px; border-radius: 8px; border: 1px solid #eee; display: block;}
.nav-item span, .nav-link span { display: block; font-size: 0.8rem; color: #999; margin-bottom: 5px; }
.nav-item a, .nav-link { font-weight: 600; font-size: 0.95rem; color: var(--text-dark); }
.nav-item:hover, .nav-link:hover { border-color: var(--primary); }

/* =========================================
   5. 侧边栏及通用组件 (Sidebar & Widgets)
   ========================================= */
.sidebar { display: flex; flex-direction: column; gap: 30px; }
.widget { background: var(--white); padding: 25px; border-radius: var(--radius); box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.widget-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary);
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
}
.widget-title::before {
    content: ''; display: inline-block; width: 4px; height: 16px; 
    background: var(--secondary); margin-right: 8px; border-radius: 2px;
}

/* 热门推荐列表 */
.hot-list li { margin-bottom: 15px; padding-left: 20px; position: relative; }
.hot-list li::before { content: '🔥'; position: absolute; left: 0; top: 0; font-size: 0.9rem; }
.hot-list a { font-size: 0.95rem; color: var(--text-dark); display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hot-list a:hover { color: var(--secondary); }

/* =========================================
   6. 悬浮与联系组件 (Floating Elements)
   ========================================= */
/* 左侧浮动客服 */
.float-left-cs {
    position: fixed; left: 20px; top: 50%; transform: translateY(-50%);
    z-index: 999; display: flex; flex-direction: column; gap: 10px;
    animation: bounce 3s infinite ease-in-out;
}
.cs-icon {
    width: 55px; height: 55px; background: var(--primary); color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 4px 15px rgba(13, 71, 161, 0.3); font-size: 12px; text-align: center;
    font-weight: bold; line-height: 1.2;
}

/* 右侧二维码 */
.float-right-qr {
    position: fixed; right: 20px; top: 50%; transform: translateY(-50%);
    background: var(--white); padding: 15px; border-radius: 10px;
    box-shadow: var(--shadow); z-index: 999; text-align: center; border: 1px solid #eee;
}
.float-right-qr img { width: 100px; height: 100px; cursor: pointer; margin-bottom: 8px; }

/* 手机端底部悬浮栏 */
.mobile-bottom-bar {
    display: none; position: fixed; bottom: 0; left: 0; width: 100%;
    background: var(--white); height: 65px; z-index: 1001;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    align-items: center; padding: 0 15px; justify-content: space-between;
}
.mob-wx-info { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.mob-wx-info img { width: 45px; height: 45px; border-radius: 4px; border: 1px solid #eee; }
.mob-call-btn {
    background: var(--secondary); color: white; padding: 10px 20px;
    border-radius: 30px; font-weight: bold; font-size: 0.95rem; box-shadow: 0 2px 8px rgba(255,111,0,0.3);
}

/* 模态框 (二维码大图) */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 2000; align-items: center; justify-content: center;
}
.modal img { max-width: 85%; max-height: 80vh; border: 5px solid #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }

/* 动画 */
@keyframes bounce { 
    0%, 100% { transform: translateY(-50%) translateY(0); } 
    50% { transform: translateY(-50%) translateY(-15px); } 
}

/* =========================================
   7. 页脚区域 (Footer)
   ========================================= */
.footer {
    background: #1a1a1a;
    color: #b0bec5;
    padding: 40px 0 20px;
    margin-top: 60px;
    text-align: center;
    font-size: 0.85rem;
}
.footer-bottom p { margin-bottom: 10px; }
.footer a { color: #cfd8dc; transition: 0.3s; }
.footer a:hover { color: var(--secondary); }

/* =========================================
   8. 响应式布局 (Responsive Media Queries)
   ========================================= */
@media (max-width: 900px) {
    .main-wrapper { grid-template-columns: 1fr; }
    .sidebar { order: 2; }
    .article-card { padding: 25px; }
    .article-title { font-size: 1.5rem; }
}

@media (max-width: 768px) {
    .header { height: 60px; }
    .logo { font-size: 1.15rem; }
    .main-nav a { padding: 5px 8px; font-size: 0.9rem; }
    .float-right-qr { display: none; }
    .mobile-bottom-bar { display: flex; }
    .wx-box, .wx-subscribe-box { flex-direction: column; text-align: center; }
    .post-nav { flex-direction: column; }
    .nav-item, .nav-link { width: 100%; }
}