/* 佛山POS机网站 - 通用样式表 */

:root {
    --primary-color: #2c5aa0;
    --secondary-color: #4a90e2;
    --accent-color: #ff6b35;
    --highlight-color: #ffd700;
    --success-color: #10b981;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --hover-color: #1e3a8a;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text-dark);
    line-height: 1.8;
    background: var(--bg-light);
}

/* ============================================
   顶部导航
   ============================================ */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    color: var(--bg-white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
}

.nav-menu a {
    color: var(--bg-white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.15);
}

/* ============================================
   轮播图区域
   ============================================ */
.banner-section {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.banner-slider {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.banner-slider img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   主容器
   ============================================ */
.main-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.main-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

/* ============================================
   页面标题（文章列表页）
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 16px;
    opacity: 0.9;
}

/* ============================================
   章节标题
   ============================================ */
.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.module-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
}

/* ============================================
   搜索模块
   ============================================ */
.search-module {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 15px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.search-box button {
    padding: 14px 35px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-box button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.search-tags {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-tag {
    padding: 6px 16px;
    background: var(--bg-light);
    color: var(--text-light);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.search-tag:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* ============================================
   文章列表（首页）
   ============================================ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.article-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.article-card-content {
    padding: 24px;
}

.article-number {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

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

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

.article-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

.article-link {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.article-link:hover {
    color: var(--hover-color);
}

.article-link::after {
    content: ' →';
}

/* ============================================
   文章列表（列表页双列）
   ============================================ */
.articles-section {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

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

.article-item {
    background: var(--bg-light);
    padding: 24px;
    border-radius: 10px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.article-item:hover {
    background: var(--bg-white);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.article-item-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.5;
}

.article-item-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

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

.article-item-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 14px;
}

.article-item-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.article-item-link:hover {
    color: var(--hover-color);
}

.article-item-link::after {
    content: ' →';
}

/* ============================================
   文章详情页
   ============================================ */
.content-main {
    min-width: 0;
}

.article-container {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

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

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

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

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

.article-content {
    font-size: 16px;
    line-height: 2;
    color: var(--text-dark);
}

.article-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 30px 0 20px;
    padding-left: 12px;
    border-left: 4px solid var(--primary-color);
}

.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 25px 0 15px;
}

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

.article-content ul, 
.article-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

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

/* 文章内重点标记 */
.highlight {
    background: linear-gradient(120deg, #fef3c7 0%, #fde68a 100%);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    color: #92400e;
}

.important {
    color: var(--accent-color);
    font-weight: 700;
}

/* 文章内锚文本链接 */
.article-content a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

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

/* 文章对比表格 */
.comparison-table {
    width: 100%;
    margin: 30px 0;
    border-collapse: collapse;
    box-shadow: var(--shadow-sm);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.comparison-table th {
    padding: 15px;
    font-weight: 600;
    text-align: left;
    font-size: 15px;
}

.comparison-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.comparison-table tbody tr:hover {
    background: var(--bg-light);
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.table-highlight {
    background: #ecfdf5;
    font-weight: 600;
    color: var(--success-color);
}

.table-warning {
    background: #fef3c7;
    color: #92400e;
}

/* 文章导航（上一篇/下一篇） */
.article-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.nav-button {
    flex: 1;
    padding: 20px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-button:hover {
    background: var(--bg-white);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.nav-label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 600;
}

.nav-title {
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 600;
}

.nav-button.prev .nav-label::before {
    content: '← ';
}

.nav-button.next {
    text-align: right;
}

.nav-button.next .nav-label::after {
    content: ' →';
}

/* ============================================
   侧边栏
   ============================================ */
.sidebar {
    min-width: 0;
}

.sidebar-module {
    background: var(--bg-white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* 热门推荐 */
.hot-item {
    padding: 14px 0;
    border-bottom: 1px dashed var(--border-color);
    transition: all 0.3s;
}

.hot-item:last-child {
    border-bottom: none;
}

.hot-item:hover {
    padding-left: 8px;
}

.hot-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: var(--bg-light);
    color: var(--text-light);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    margin-right: 10px;
}

.hot-item:nth-child(1) .hot-number,
.hot-item:nth-child(2) .hot-number,
.hot-item:nth-child(3) .hot-number {
    background: linear-gradient(135deg, var(--accent-color), #ff8c61);
    color: white;
}

.hot-item a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.hot-item a:hover {
    color: var(--secondary-color);
}

/* 微信订阅 */
.wechat-subscribe {
    text-align: center;
}

.wechat-qr {
    width: 180px;
    height: 180px;
    margin: 0 auto 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.wechat-qr:hover {
    transform: scale(1.05);
}

.wechat-qr img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.wechat-tip {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.wechat-phone {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 10px;
}

/* ============================================
   侧边悬浮（桌面端）
   ============================================ */
.sidebar-float {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 999;
}

.float-item {
    background: var(--bg-white);
    padding: 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid var(--border-color);
}

.float-item:hover {
    transform: scale(1.05);
    border-color: var(--secondary-color);
}

.float-qr {
    width: 80px;
}

.float-qr img {
    width: 100%;
    border-radius: 8px;
}

.float-phone {
    background: linear-gradient(135deg, var(--accent-color), #ff8c61);
    color: white;
    font-weight: 600;
    padding: 12px 16px;
}

.float-phone a {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

/* ============================================
   客服漂浮
   ============================================ */
.customer-service {
    position: fixed;
    left: 20px;
    top: 200px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 998;
    animation: float 3s ease-in-out infinite;
    color: white;
    font-size: 24px;
}

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

.service-popup {
    display: none;
    position: fixed;
    left: 90px;
    top: 180px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.service-popup.active {
    display: block;
}

.service-popup img {
    width: 200px;
    border-radius: 8px;
}

/* ============================================
   底部
   ============================================ */
.footer {
    background: var(--text-dark);
    color: #cbd5e0;
    margin-top: 60px;
    padding: 40px 20px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-links a {
    color: #cbd5e0;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
}

.footer-bottom a {
    color: #cbd5e0;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--secondary-color);
}

/* ============================================
   移动端底部联系
   ============================================ */
.mobile-contact {
    display: none;
    background: var(--bg-white);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.mobile-contact img {
    width: 120px;
    margin: 10px auto;
    border-radius: 8px;
}

.mobile-contact-phone {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 10px;
}

/* ============================================
   模态框
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 968px) {
    .main-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: -1;
    }

    .articles-section .articles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-container {
        height: 60px;
    }

    .logo {
        font-size: 20px;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .nav-menu {
        gap: 15px;
    }

    .nav-menu a {
        font-size: 14px;
        padding: 6px 12px;
    }

    .page-header {
        padding: 25px;
    }

    .page-title {
        font-size: 24px;
    }

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

    .search-module,
    .articles-section {
        padding: 20px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .article-container {
        padding: 25px 20px;
    }

    .article-header .article-title {
        font-size: 24px;
    }

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

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

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

    .sidebar-float {
        display: none;
    }

    .mobile-contact {
        display: block;
    }

    .customer-service {
        width: 50px;
        height: 50px;
        font-size: 20px;
        left: 10px;
    }

    .service-popup {
        left: 70px;
    }

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

    .comparison-table th,
    .comparison-table td {
        padding: 10px 8px;
    }

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}