/* ============================================================
   main.css — 通达信加密开发品牌样式
   适用于：主页（产品介绍）、博客列表、文章详情
   ============================================================ */

/* ============================================================
   1. CSS 变量与全局重置
   ============================================================ */
:root {
    --primary-blue: #2563eb;
    --primary-blue-dark: #1d4ed8;
    --primary-blue-light: #dbeafe;
    --text-dark: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --bg-body: #f8fafc;
    --bg-white: #ffffff;
    --border-light: #e2e8f0;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    color: var(--text-dark);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.7;
}

/* ============================================================
   2. 导航栏
   ============================================================ */
.navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    padding: 0.7rem 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}
.navbar .navbar-brand {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.2rem;
}
.navbar .navbar-brand i {
    margin-right: 8px;
    color: var(--primary-blue);
}
.navbar .navbar-brand .domain {
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.navbar .nav-link {
    color: var(--text-secondary);
    font-size: 0.92rem;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    transition: color 0.2s;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--primary-blue);
}
.navbar .btn-primary-custom {
    background: var(--primary-blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.4rem 1.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25s;
}
.navbar .btn-primary-custom:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

/* ============================================================
   3. 通用标题
   ============================================================ */
.section-title {
    font-weight: 700;
    font-size: 2rem;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}
.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}
.section-divider {
    width: 60px;
    height: 3px;
    background: var(--primary-blue);
    margin: 0.5rem auto 1.5rem;
    border-radius: 2px;
}

/* ============================================================
   4. 主页特有：Hero 区域
   ============================================================ */
.hero-section {
    padding: 5rem 0 4rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 50%, #f8fafc 100%);
    border-bottom: 1px solid var(--border-light);
}
.hero-section .badge-soft {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    padding: 0.3rem 1.2rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.hero-section h1 {
    font-weight: 800;
    font-size: 3rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text-dark);
}
.hero-section h1 .highlight {
    color: var(--primary-blue);
    position: relative;
}
.hero-section .lead {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
}
.hero-section .btn-primary-lg {
    background: var(--primary-blue);
    color: #fff;
    border: none;
    padding: 0.7rem 2.4rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.25s;
}
.hero-section .btn-primary-lg:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.3);
}
.hero-section .btn-outline-secondary-custom {
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    padding: 0.7rem 2.4rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.25s;
}
.hero-section .btn-outline-secondary-custom:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.04);
}
.hero-stats .stat-item {
    padding-right: 2.5rem;
}
.hero-stats .stat-item:last-child {
    padding-right: 0;
}
.hero-stats .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
}
.hero-stats .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================================
   5. 主页特有：截图卡片
   ============================================================ */
.screenshot-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    text-align: center;
}
.screenshot-card img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}
.screenshot-card .caption {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.screenshot-card .caption i {
    color: var(--primary-blue);
    margin-right: 4px;
}

/* ============================================================
   6. 主页特有：业务卡片
   ============================================================ */
.service-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
}
.service-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}
.service-card .icon-wrapper {
    width: 56px;
    height: 56px;
    background: var(--primary-blue-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary-blue);
    margin-bottom: 1.2rem;
}
.service-card h5 {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
}
.service-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
}
.service-card .feature-tag {
    display: inline-block;
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.15rem 0.9rem;
    border-radius: 12px;
}

/* ============================================================
   7. 主页特有：产品展示卡片
   ============================================================ */
.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.8rem 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
}
.product-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-hover);
}
.product-card .product-icon {
    font-size: 2rem;
    color: var(--primary-blue);
}
.product-card .badge-recommend {
    background: var(--primary-blue);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-weight: 600;
}
.product-card .badge-light {
    background: var(--border-light);
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-weight: 500;
}
.product-card h5 {
    font-weight: 600;
    color: var(--text-dark);
}
.product-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.product-card .price-tag {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-dark);
}
.product-card .price-tag small {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
}
.product-card .btn-primary-sm {
    background: var(--primary-blue);
    color: #fff;
    border: none;
    padding: 0.3rem 1.6rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.product-card .btn-primary-sm:hover {
    background: var(--primary-blue-dark);
}
.product-card .btn-outline-sm {
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    padding: 0.3rem 1.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.product-card .btn-outline-sm:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}
.product-card ul li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.2rem 0;
}
.product-card ul li i {
    color: var(--primary-blue);
    margin-right: 8px;
}

/* ============================================================
   8. 主页特有：关于我们
   ============================================================ */
.about-section {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: 4rem 0;
}
.about-section .stat-box {
    background: var(--bg-body);
    border-radius: 10px;
    padding: 1.2rem;
    text-align: center;
}
.about-section .stat-box .number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-blue);
}
.about-section .stat-box .label {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.advantage-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-light);
}
.advantage-list li:last-child {
    border-bottom: none;
}
.advantage-list li i {
    color: var(--primary-blue);
    margin-right: 10px;
}

/* ============================================================
   9. 主页特有：CTA 区域
   ============================================================ */
.cta-section {
    background: var(--primary-blue);
    padding: 3.5rem 0;
    color: #fff;
}
.cta-section h3 {
    font-weight: 700;
}
.cta-section p {
    opacity: 0.85;
    font-size: 1.05rem;
}
.cta-section .btn-cta-light {
    background: #fff;
    color: var(--primary-blue);
    border: none;
    padding: 0.6rem 2.4rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.25s;
}
.cta-section .btn-cta-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}
.cta-section .btn-cta-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0.6rem 2.4rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.25s;
}
.cta-section .btn-cta-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

/* ============================================================
   10. 博客 & 文章详情：侧边栏卡片
   ============================================================ */
.sidebar-card {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    margin-bottom: 1.5rem;
}
.sidebar-card h6 {
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}
.sidebar-card .list-group-item {
    border: none;
    padding: 0.3rem 0;
    background: transparent;
    font-size: 0.9rem;
}
.sidebar-card .list-group-item a {
    color: var(--text-secondary);
    text-decoration: none;
}
.sidebar-card .list-group-item a:hover {
    color: var(--primary-blue);
}
.sidebar-card .tag-cloud .badge {
    background: var(--bg-body);
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0.2rem 0.1rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}
.sidebar-card .tag-cloud .badge a {
    color: var(--text-secondary);
    text-decoration: none;
}
.sidebar-card .tag-cloud .badge a:hover {
    color: #fff;
    text-decoration: none;
}
.sidebar-card .tag-cloud .badge:hover {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
}
.sidebar-card .search-box .form-control {
    border-radius: 6px;
    border-color: var(--border-light);
}
.sidebar-card .search-box .btn-primary-sm {
    background: var(--primary-blue);
    color: #fff;
    border: none;
    padding: 0.3rem 1.2rem;
    border-radius: 6px;
    font-weight: 500;
}

/* ============================================================
   11. 博客特有：头部 & 文章列表
   ============================================================ */
.blog-header {
    padding: 2rem 0 1rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-white);
}
.blog-header h1 {
    font-weight: 700;
    font-size: 1.8rem;
}
.blog-header .breadcrumb {
    font-size: 0.9rem;
    background: transparent;
    padding: 0;
    margin: 0;
}
.blog-header .breadcrumb a {
    color: var(--primary-blue);
    text-decoration: none;
}
.blog-header .breadcrumb .active {
    color: var(--text-muted);
}

/* 文章列表容器（统一区块） */
.post-list-container {
    background: var(--bg-white);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    padding: 0;
    overflow: hidden;
}

/* 文章条目（在统一区块内，分割线） */
.post-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}
.post-item:last-child {
    border-bottom: none;
}
.post-item:hover {
    background: var(--bg-body);
}
.post-item .post-title {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-dark);
    text-decoration: none;
}
.post-item .post-title:hover {
    color: var(--primary-blue);
}
.post-item .post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.post-item .post-meta i {
    margin-right: 3px;
}
.post-item .post-summary {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0.4rem 0 0.3rem;
}
.post-item .post-tags .badge {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    font-weight: 400;
    font-size: 0.75rem;
    padding: 0.2rem 0.7rem;
    border-radius: 12px;
}

/* ============================================================
   12. 文章详情特有：文章详情容器
   ============================================================ */
.post-detail-header {
    padding: 1.5rem 0 0.5rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-white);
}
.post-detail-header .breadcrumb {
    font-size: 0.9rem;
    background: transparent;
    padding: 0;
    margin: 0;
}
.post-detail-header .breadcrumb a {
    color: var(--primary-blue);
    text-decoration: none;
}
.post-detail-header .breadcrumb .active {
    color: var(--text-muted);
}

.post-detail-container {
    background: var(--bg-white);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    padding: 2rem 2.5rem;
}
.post-detail-container .post-title {
    font-weight: 700;
    font-size: 2rem;
    color: var(--text-dark);
    line-height: 1.3;
}
.post-detail-container .post-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}
.post-detail-container .post-meta i {
    margin-right: 4px;
}
.post-detail-container .post-body {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.9;
}
.post-detail-container .post-body p {
    margin-bottom: 1.2rem;
}
.post-detail-container .post-body h3 {
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}
.post-detail-container .post-body blockquote {
    border-left: 4px solid var(--primary-blue);
    padding: 0.5rem 0 0.5rem 1.2rem;
    background: var(--bg-body);
    border-radius: 0 6px 6px 0;
    color: var(--text-secondary);
    margin: 1.2rem 0;
    font-style: italic;
}
.post-detail-container .post-body .img-placeholder {
    background: var(--bg-body);
    border: 1px dashed var(--border-light);
    border-radius: 8px;
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--text-muted);
    margin: 1.2rem 0;
}
.post-detail-container .post-body .img-placeholder i {
    font-size: 2.4rem;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}
.post-detail-container .post-tags {
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    margin-top: 1.5rem;
}
.post-detail-container .post-tags .badge {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    font-weight: 400;
    font-size: 0.8rem;
    padding: 0.3rem 0.9rem;
    border-radius: 12px;
    margin-right: 0.3rem;
}

.comment-section {
    background: var(--bg-white);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    padding: 2rem 2.5rem;
}

/* 文章导航（上一篇/下一篇） */
.post-nav {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-light);
}
.post-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}
.post-nav a:hover {
    color: var(--primary-blue);
}
.post-nav .nav-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.post-nav .nav-title {
    font-weight: 500;
}

/* 评论区 */
.comment-section {
    margin-top: 1.8rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}
.comment-section h5 {
    font-weight: 600;
    color: var(--text-dark);
}
.comment-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}
.comment-item:last-child {
    border-bottom: none;
}
.comment-item .comment-author {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--text-dark);
}
.comment-item .comment-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.comment-item .comment-body {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.2rem;
}
.comment-item .comment-reply {
    font-size: 0.85rem;
    color: var(--primary-blue);
    text-decoration: none;
}
.comment-item .comment-reply:hover {
    text-decoration: underline;
}
.comment-form .form-control {
    border-radius: 6px;
    border-color: var(--border-light);
}
.comment-form .btn-primary-sm {
    background: var(--primary-blue);
    color: #fff;
    border: none;
    padding: 0.4rem 1.8rem;
    border-radius: 6px;
    font-weight: 500;
}
.comment-form .btn-primary-sm:hover {
    background: var(--primary-blue-dark);
}

/* ============================================================
   13. 分页组件
   ============================================================ */
.pagination .page-link {
    color: var(--primary-blue);
    border-color: var(--border-light);
}
.pagination .page-item.active .page-link {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #fff;
}

/* ============================================================
   14. 页脚
   ============================================================ */
footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: 2.5rem 0 1.5rem;
    margin-top: 2rem;
}
footer h6 {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}
footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}
footer a:hover {
    color: var(--primary-blue);
}
footer .copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}
footer .footer-divider {
    border-color: var(--border-light);
}

/* ============================================================
   15. 响应式适配（通用 + 各页面特有）
   ============================================================ */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0 2.5rem;
    }
    .hero-section h1 {
        font-size: 2.2rem;
    }
    .hero-section .lead {
        font-size: 1rem;
    }
    .hero-stats .stat-item {
        padding-right: 1rem;
    }
    .section-title {
        font-size: 1.6rem;
    }
    .service-card {
        padding: 1.5rem;
    }
    .product-card {
        padding: 1.2rem;
    }
    .navbar .navbar-brand .domain {
        display: block;
        font-size: 0.75rem;
        margin-top: 2px;
    }

    /* 博客 & 文章详情 */
    .blog-header h1 {
        font-size: 1.4rem;
    }
    .post-item .post-title {
        font-size: 1rem;
    }
    .sidebar-card {
        padding: 1rem;
    }
    .post-item {
        padding: 1rem 1.2rem;
    }
    .post-detail-container {
        padding: 1.2rem;
    }
    .post-detail-container .post-title {
        font-size: 1.5rem;
    }
    .post-detail-container .post-body {
        font-size: 0.98rem;
    }
}

pre[class*="language-"] { background: #f5f5f5; }
code[class*="language-"] { background: none; }
.post-body img { max-width: 100%; height: auto; border:1px solid #ccc;box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); }

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.8rem;
    }
    .navbar .navbar-brand {
        font-size: 1rem;
    }
    .hero-stats .stat-item {
        padding-right: 0.8rem;
    }
    .hero-stats .stat-number {
        font-size: 1.4rem;
    }
    .post-item {
        padding: 0.8rem 1rem;
    }
    .post-detail-container {
        padding: 0.8rem;
    }
    .post-detail-container .post-title {
        font-size: 1.2rem;
    }
}