/* ====================
   POS机办理网站 - 统一样式表
   适用于：首页、列表页、文章详情页
   ==================== */

/* ====================
   1. CSS变量定义
   ==================== */
:root {
    --primary-color: #2563eb; /* 现代科技蓝 */
    --secondary-color: #1e40af; /* 深蓝 */
    --accent-color: #f97316; /* 活力橙 (用于按钮/强调) */
    --highlight-color: #dc2626; /* 高亮红色 */
    --text-main: #1f2937;
    --text-sub: #6b7280;
    --bg-light: #f3f4f6;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --container-width: 1200px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 8px;
    --nav-height: 60px;
}

/* ====================
   2. 基础重置
   ==================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* ====================
   3. 顶部导航栏
   ==================== */
header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-height);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    flex-shrink: 0;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    font-size: 16px;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: var(--radius);
    white-space: nowrap;
}

.nav-link.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.nav-link:not(.active):hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* ====================
   4. 面包屑导航
   ==================== */
.breadcrumb {
    background: var(--white);
    padding: 15px 0;
    font-size: 14px;
    color: var(--text-sub);
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--primary-color);
}

/* ====================
   5. 轮播图模块
   ==================== */
.carousel-section {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 1100px;
    margin: 20px auto;
    border-radius: var(--radius);
    aspect-ratio: 1100 / 401;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ====================
   6. 搜索模块
   ==================== */
.search-container {
    background: var(--bg-light);
    padding: 30px 0;
    text-align: center;
}

.search-box {
    display: inline-flex;
    width: 100%;
    max-width: 600px;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    overflow: hidden;
    background: var(--white);
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 16px;
}

.search-box button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0 30px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
}

/* 侧边栏搜索 */
.search-form {
    display: flex;
    gap: 5px;
}

.search-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 4px;
    cursor: pointer;
}

/* ====================
   7. 特色功能区 (首页)
   ==================== */
.features-section {
    padding: 50px 0;
}

.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 14px;
    color: var(--text-sub);
}

/* ====================
   8. 新闻列表 (首页)
   ==================== */
.news-section {
    padding: 30px 0;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    display: flex;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: 0.3s;
}

.news-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.news-content {
    padding: 20px;
    flex: 1;
}

.news-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-main);
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-desc {
    font-size: 14px;
    color: var(--text-sub);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: space-between;
}

/* ====================
   9. 新闻网格 (列表页)
   ==================== */
.main-content-area {
    display: flex;
    gap: 30px;
    padding: 30px 0;
}

.news-column {
    flex: 3;
}

.sidebar-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.news-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.news-card .news-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 48px;
}

.news-card .news-desc {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
    border-top: 1px dashed #eee;
    padding-top: 10px;
}

.read-btn {
    color: var(--primary-color);
    font-weight: 500;
}

/* ====================
   10. 文章详情页
   ==================== */
.article-column {
    flex: 3;
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.article-header {
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.article-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 15px;
    color: var(--text-main);
}

.article-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-sub);
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 文章内容样式 */
.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-main);
}

.article-content h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 30px 0 15px;
    padding-left: 12px;
    border-left: 4px solid var(--primary-color);
    color: var(--text-main);
}

.article-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 25px 0 12px;
    color: var(--secondary-color);
}

.article-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.article-content ul,
.article-content ol {
    margin: 15px 0;
    padding-left: 25px;
    list-style-position: inside;
}

.article-content ul {
    list-style-type: disc;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content li {
    margin-bottom: 8px;
}

/* 文章内锚文本链接 */
.article-content a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
}

.article-content a:hover {
    color: var(--secondary-color);
}

/* 重点标记 */
.highlight {
    color: var(--highlight-color);
    font-weight: 600;
}

/* 提示框 */
.important-box {
    background: #fef2f2;
    border-left: 4px solid var(--highlight-color);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.tip-box {
    background: #eff6ff;
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

/* 表格样式 */
.table-wrapper {
    overflow-x: auto;
    margin: 25px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    font-size: 14px;
}

th {
    background: var(--primary-color);
    color: var(--white);
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 12px;
    border: 1px solid var(--border-color);
}

tr:nth-child(even) {
    background: #f9fafb;
}

tr:hover {
    background: #f3f4f6;
}

/* 上下篇导航 */
.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px dashed var(--border-color);
    gap: 20px;
}

.nav-item {
    flex: 1;
    padding: 15px;
    background: var(--bg-light);
    border-radius: var(--radius);
    transition: all 0.3s;
}

.nav-item:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateX(5px);
}

.nav-item.prev:hover {
    transform: translateX(-5px);
}

.nav-label {
    font-size: 12px;
    color: var(--text-sub);
    margin-bottom: 5px;
}

.nav-item:hover .nav-label {
    color: rgba(255, 255, 255, 0.8);
}

.nav-title {
    font-size: 15px;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ====================
   11. 侧边栏组件
   ==================== */
.sidebar-widget {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-light);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

/* 微信订阅模块 */
.wx-widget {
    text-align: center;
}

.wx-widget img {
    width: 150px;
    margin: 0 auto 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 5px;
}

.wx-text {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 5px;
}

.wx-number {
    font-size: 18px;
    font-weight: bold;
    color: var(--accent-color);
    margin-top: 5px;
}

/* 热门推荐列表 */
.hot-list {
    list-style: none;
    padding: 0;
}

.hot-list li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
}

.hot-list li::before {
    content: '◆';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    top: 0;
}

.hot-list a {
    font-size: 14px;
    color: var(--text-main);
    display: block;
    line-height: 1.5;
}

.hot-list a:hover {
    color: var(--primary-color);
}

/* ====================
   12. 底部链接区
   ==================== */
.footer-links {
    background: #f8f9fa;
    padding: 40px 0;
    border-top: 1px solid #e5e7eb;
}

.link-group-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-main);
}

.city-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.city-links a {
    font-size: 13px;
    color: var(--text-sub);
    padding: 2px 0;
    margin-right: 15px;
}

.friendly-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ccc;
}

/* ====================
   13. 网站底部
   ==================== */
.site-footer {
    background: #1f2937;
    color: #d1d5db;
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
}

.site-footer a {
    color: #9ca3af;
}

.site-footer a:hover {
    color: var(--white);
}

/* ====================
   14. 悬浮组件
   ==================== */

/* 右侧悬浮条 (PC端) */
.float-right-bar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    box-shadow: var(--shadow-md);
    padding: 15px;
    border-radius: var(--radius);
    z-index: 999;
    text-align: center;
    display: none;
}

.float-right-bar img {
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
}

.float-right-bar .phone {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 16px;
}

/* 左侧客服图标 */
.float-left-kf {
    position: fixed;
    left: 20px;
    top: 50%;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
    animation: floatY 3s ease-in-out infinite;
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* 客服弹窗 */
.kf-modal {
    position: fixed;
    left: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 10px;
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    display: none;
    z-index: 1001;
}

.kf-modal img {
    width: 150px;
}

/* 手机端底部固定栏 */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    display: none;
}

.bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: var(--text-main);
    cursor: pointer;
}

.bottom-item img {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
}

/* 图片放大弹窗 */
.img-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
}

.img-modal img {
    max-width: 90%;
    max-height: 90%;
}

/* ====================
   15. 响应式布局
   ==================== */

/* PC端显示 */
@media (min-width: 769px) {
    .float-right-bar {
        display: block;
    }
    .mobile-bottom-bar {
        display: none;
    }
}

/* 平板适配 */
@media (max-width: 768px) {
    .logo {
        font-size: 18px;
    }

    .main-nav {
        gap: 5px;
    }

    .nav-link {
        font-size: 14px;
        padding: 5px 8px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-content-area {
        flex-direction: column;
        gap: 20px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-column {
        order: -1;
    }

    .article-column {
        padding: 20px;
    }

    .article-title {
        font-size: 22px;
    }

    .article-content {
        font-size: 15px;
    }

    .article-content h2 {
        font-size: 20px;
    }

    .article-content h3 {
        font-size: 17px;
    }

    .article-nav {
        flex-direction: column;
    }

    .news-title {
        font-size: 16px;
    }

    .news-content {
        padding: 15px;
    }

    .carousel-section {
        height: auto;
        aspect-ratio: 1100 / 401;
    }

    .float-right-bar {
        display: none;
    }

    .mobile-bottom-bar {
        display: flex;
    }

    .container {
        padding: 0 10px;
    }

    th, td {
        padding: 8px;
        font-size: 13px;
    }

    .table-wrapper {
        font-size: 12px;
    }
}

/* 小屏手机适配 */
@media (max-width: 480px) {
    .logo {
        font-size: 16px;
    }

    .nav-link {
        font-size: 12px;
        padding: 4px 6px;
    }

    .section-title {
        font-size: 22px;
    }

    .article-title {
        font-size: 20px;
    }

    .features-grid {
        gap: 15px;
    }

    .feature-card {
        padding: 15px;
    }
}