/* ====[S风格设计]==== */
/* 
 * 设计参数:
 * - 风格: S (现代简洁)
 * - 布局: C (响应式)
 * - 主色调: #1a237e
 * - 副色调: #0288d1
 * - 强调色: #00bcd4
 * - 背景色: #fafafa
 * - 文字色: #212121
 */

/* ==================== CSS变量定义 ==================== */
:root {
    --pb-primary: #1a237e;
    --pb-secondary: #0288d1;
    --pb-accent: #00bcd4;
    --pb-bg: #fafafa;
    --pb-text: #212121;
    --pb-text-light: #757575;
    --pb-border-radius: 8px;
    --pb-container-width: 1200px;
    --pb-font-base: 16px;
    --pb-line-height: 1.6;
    --pb-spacing: 20px;
    --pb-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --pb-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
    --pb-transition: all 0.3s ease;
}

/* ==================== 全局重置 ==================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--pb-font-base);
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: var(--pb-line-height);
    color: var(--pb-text);
    background-color: var(--pb-bg);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--pb-transition);
}

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

ul, ol {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ==================== 容器 ==================== */
.pb-container {
    max-width: var(--pb-container-width);
    margin: 0 auto;
    padding: 0 var(--pb-spacing);
    width: 100%;
}

/* ==================== 页头 ==================== */
.pb-header {
    position: relative;
    background: linear-gradient(135deg, var(--pb-primary) 0%, var(--pb-secondary) 100%);
    box-shadow: var(--pb-shadow);
    z-index: 1000;
}

/* ==================== 导航 ==================== */
.pb-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    padding: 0 var(--pb-spacing);
    flex-wrap: wrap;
}

.pb-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    position: absolute;
    right: var(--pb-spacing);
    top: 50%;
    transform: translateY(-50%);
}

.pb-nav-toggle::before,
.pb-nav-toggle::after,
.pb-nav-toggle span {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition: var(--pb-transition);
}

.pb-nav-brand {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-right: auto;
}

.pb-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pb-nav-link {
    padding: 10px 18px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    border-radius: var(--pb-border-radius);
    position: relative;
    overflow: hidden;
}

.pb-nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background-color: var(--pb-accent);
    transition: var(--pb-transition);
}

.pb-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.pb-nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* ==================== 英雄区 ==================== */
.pb-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pb-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--pb-primary) 0%, var(--pb-secondary) 50%, var(--pb-accent) 100%);
    z-index: 1;
}

.pb-hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(30deg, rgba(255,255,255,0.1) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.1) 87.5%, rgba(255,255,255,0.1)),
        linear-gradient(150deg, rgba(255,255,255,0.1) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.1) 87.5%, rgba(255,255,255,0.1)),
        linear-gradient(30deg, rgba(255,255,255,0.1) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.1) 87.5%, rgba(255,255,255,0.1)),
        linear-gradient(150deg, rgba(255,255,255,0.1) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.1) 87.5%, rgba(255,255,255,0.1));
    background-size: 80px 140px;
    opacity: 0.5;
}

.pb-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--pb-spacing);
    max-width: 800px;
}

.pb-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.pb-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== 主内容区 ==================== */
.pb-main {
    padding: 48px 0;
    min-height: calc(100vh - 200px);
}

/* ==================== 侧边栏 ==================== */
.pb-sidebar {
    width: 300px;
    padding: var(--pb-spacing);
    background: #fff;
    border-radius: var(--pb-border-radius);
    box-shadow: var(--pb-shadow);
}

/* ==================== 内容区块 ==================== */
.pb-content {
    background: #fff;
    border-radius: var(--pb-border-radius);
    padding: var(--pb-spacing);
    box-shadow: var(--pb-shadow);
}

.pb-content-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #eee;
}

.pb-content-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pb-primary);
    position: relative;
    display: inline-block;
}

.pb-content-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--pb-secondary), var(--pb-accent));
    border-radius: 2px;
}

.pb-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* ==================== 文章卡片 ==================== */
.pb-article-card {
    background: #fff;
    border-radius: var(--pb-border-radius);
    overflow: hidden;
    box-shadow: var(--pb-shadow);
    transition: var(--pb-transition);
    border: 1px solid #eee;
}

.pb-article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--pb-shadow-hover);
}

.pb-article-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
}

.pb-article-thumb-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--pb-transition);
}

.pb-article-card:hover .pb-article-thumb-img {
    transform: scale(1.05);
}

.pb-article-body {
    padding: var(--pb-spacing);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pb-article-category {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pb-accent);
    background: rgba(0, 188, 212, 0.1);
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.pb-article-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pb-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.pb-article-desc {
    font-size: 0.9375rem;
    color: var(--pb-text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pb-article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8125rem;
    color: var(--pb-text-light);
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.pb-article-date,
.pb-article-author {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pb-article-footer {
    padding: var(--pb-spacing);
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pb-article-action {
    display: flex;
    gap: 8px;
}

/* ==================== 文章正文 ==================== */
.pb-article-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--pb-text);
}

.pb-article-content p {
    margin-bottom: 1.5em;
}

.pb-article-content img {
    max-width: 100%;
    border-radius: var(--pb-border-radius);
    margin: 1.5em auto;
}

.pb-article-content h2,
.pb-article-content h3,
.pb-article-content h4 {
    margin: 1.5em 0 0.75em;
    color: var(--pb-primary);
    font-weight: 700;
}

.pb-article-content ul,
.pb-article-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.pb-article-content li {
    margin-bottom: 0.5em;
    list-style: disc;
}

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

/* ==================== 文章列表项 ==================== */
.pb-post-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    transition: var(--pb-transition);
}

.pb-post-item:hover {
    background: rgba(0, 188, 212, 0.02);
}

.pb-post-thumb {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: var(--pb-border-radius);
    overflow: hidden;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
}

.pb-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--pb-transition);
}

.pb-post-item:hover .pb-post-thumb img {
    transform: scale(1.1);
}

.pb-post-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--pb-text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.pb-post-title:hover {
    color: var(--pb-secondary);
}

.pb-post-summary {
    font-size: 0.875rem;
    color: var(--pb-text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.pb-post-date {
    font-size: 0.8125rem;
    color: var(--pb-text-light);
}

/* ==================== 侧边栏小部件 ==================== */
.pb-widget {
    background: #fff;
    border-radius: var(--pb-border-radius);
    padding: var(--pb-spacing);
    box-shadow: var(--pb-shadow);
    margin-bottom: 24px;
}

.pb-widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--pb-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--pb-accent);
    position: relative;
}

.pb-widget-body {
    color: var(--pb-text);
}

/* ==================== 标签列表 ==================== */
.pb-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pb-tag-item {
    padding: 6px 14px;
    font-size: 0.8125rem;
    color: var(--pb-text);
    background: #f0f0f0;
    border-radius: 20px;
    transition: var(--pb-transition);
}

.pb-tag-item:hover {
    background: var(--pb-accent);
    color: #fff;
}

/* ==================== 分类列表 ==================== */
.pb-category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pb-category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8f8f8;
    border-radius: var(--pb-border-radius);
    transition: var(--pb-transition);
}

.pb-category-item:hover {
    background: rgba(2, 136, 209, 0.1);
    color: var(--pb-secondary);
}

/* ==================== 按钮 ==================== */
.pb-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--pb-primary), var(--pb-secondary));
    border-radius: var(--pb-border-radius);
    border: none;
    cursor: pointer;
    transition: var(--pb-transition);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
}

.pb-btn-primary:hover {
    background: linear-gradient(135deg, var(--pb-secondary), var(--pb-primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.4);
}

.pb-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--pb-primary);
    background: transparent;
    border: 2px solid var(--pb-primary);
    border-radius: var(--pb-border-radius);
    cursor: pointer;
    transition: var(--pb-transition);
    backdrop-filter: blur(10px);
}

.pb-btn-secondary:hover {
    background: var(--pb-primary);
    color: #fff;
    transform: translateY(-2px);
}

.pb-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--pb-secondary);
    background: rgba(2, 136, 209, 0.1);
    border: 1px solid var(--pb-secondary);
    border-radius: var(--pb-border-radius);
    cursor: pointer;
    transition: var(--pb-transition);
}

.pb-btn-ghost:hover {
    background: var(--pb-secondary);
    color: #fff;
}

/* ==================== 阅读更多 ==================== */
.pb-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--pb-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--pb-transition);
}

.pb-read-more::after {
    content: '→';
    transition: var(--pb-transition);
}

.pb-read-more:hover {
    color: var(--pb-primary);
    text-decoration: underline;
}

.pb-read-more:hover::after {
    transform: translateX(4px);
}

/* ==================== 面包屑导航 ==================== */
.pb-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.875rem;
    color: var(--pb-text-light);
    padding: 16px 0;
}

.pb-breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

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

.pb-breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: #ccc;
}

.pb-breadcrumb-sep {
    margin: 0 4px;
    color: #ccc;
}

.pb-breadcrumb-item:last-child {
    color: var(--pb-text);
    font-weight: 500;
}

/* ==================== 分页 ==================== */
.pb-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.pb-pagination a,
.pb-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--pb-text);
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: var(--pb-border-radius);
    transition: var(--pb-transition);
}

.pb-pagination a:hover {
    background: var(--pb-accent);
    color: #fff;
    border-color: var(--pb-accent);
}

.pb-pagination .active {
    background: var(--pb-primary);
    color: #fff;
    border-color: var(--pb-primary);
}

.pb-page-info {
    font-size: 0.875rem;
    color: var(--pb-text-light);
    margin-top: 16px;
    text-align: center;
}

/* ==================== 区块标题 ==================== */
.pb-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pb-primary);
    text-align: center;
    margin-bottom: 12px;
}

.pb-section-subtitle {
    font-size: 1rem;
    color: var(--pb-text-light);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 32px;
}

/* ==================== 分割线 ==================== */
.pb-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
    margin: 32px 0;
    border: none;
}

/* ==================== 文本工具类 ==================== */
.pb-text-center {
    text-align: center;
}

.pb-text-primary {
    color: var(--pb-primary);
}

.pb-text-secondary {
    color: var(--pb-text-light);
}

/* ==================== 产品网格 ==================== */
.pb-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.pb-product-item {
    background: #fff;
    border-radius: var(--pb-border-radius);
    overflow: hidden;
    box-shadow: var(--pb-shadow);
    transition: var(--pb-transition);
    border: 1px solid #eee;
}

.pb-product-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--pb-shadow-hover);
}

.pb-product-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--pb-text);
    padding: 16px 16px 8px;
}

.pb-product-name:hover {
    color: var(--pb-secondary);
}

.pb-product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pb-accent);
    padding: 0 16px 16px;
}

/* ==================== 底部 ==================== */
.pb-footer {
    background: linear-gradient(135deg, var(--pb-primary) 0%, #0d1447 100%);
    color: rgba(255, 255, 255, 0.9);
    padding: 48px 0 24px;
    text-align: center;
}

.pb-footer .pb-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ==================== 响应式设计 ==================== */

/* PC ≥1200px */
@media (min-width: 1200px) {
    .pb-content-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .pb-product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .pb-main .pb-container {
        display: flex;
        gap: 32px;
    }
    
    .pb-main .pb-content {
        flex: 1;
    }
    
    .pb-sidebar {
        flex-shrink: 0;
    }
}

/* 平板 768-1199px */
@media (max-width: 1199px) {
    .pb-nav {
        justify-content: space-between;
    }
    
    .pb-nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--pb-primary);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
    }
    
    .pb-nav-links.active {
        display: flex;
    }
    
    .pb-nav-toggle {
        display: flex;
    }
    
    .pb-nav-link {
        width: 100%;
        text-align: center;
    }
    
    .pb-nav-link::after {
        display: none;
    }
    
    .pb-hero {
        min-height: 400px;
    }
    
    .pb-content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pb-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 手机 <768px */
@media (max-width: 767px) {
    :root {
        --pb-spacing: 16px;
    }
    
    .pb-nav {
        height: 60px;
    }
    
    .pb-nav-brand {
        font-size: 1.25rem;
    }
    
    .pb-nav-toggle {
        width: 24px;
        height: 18px;
    }
    
    .pb-hero {
        min-height: 300px;
    }
    
    .pb-hero-title {
        font-size: 2rem;
    }
    
    .pb-hero-subtitle {
        font-size: 0.9375rem;
    }
    
    .pb-main {
        padding: 32px 0;
    }
    
    .pb-content-grid {
        grid-template-columns: 1fr;
    }
    
    .pb-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .pb-post-item {
        flex-direction: column;
    }
    
    .pb-post-thumb {
        width: 100%;
        height: 160px;
    }
    
    .pb-sidebar {
        width: 100%;
        margin-top: 32px;
    }
    
    .pb-article-meta {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .pb-pagination a,
    .pb-pagination span {
        min-width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .pb-section-title {
        font-size: 1.5rem;
    }
    
    .pb-content-title {
        font-size: 1.5rem;
    }
    
    .pb-btn-primary,
    .pb-btn-secondary,
    .pb-btn-ghost {
        padding: 10px 20px;
        font-size: 0.875rem;
        width: 100%;
    }
    
    .pb-footer {
        padding: 32px 0 16px;
    }
    
    .pb-footer .pb-container {
        gap: 16px;
    }
}

/* ==================== 辅助动画 ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pb-article-card,
.pb-product-item,
.pb-post-item {
    animation: fadeIn 0.5s ease forwards;
}

/* 卡片延迟动画 */
.pb-content-grid .pb-article-card:nth-child(1) { animation-delay: 0.1s; }
.pb-content-grid .pb-article-card:nth-child(2) { animation-delay: 0.2s; }
.pb-content-grid .pb-article-card:nth-child(3) { animation-delay: 0.3s; }
.pb-content-grid .pb-article-card:nth-child(4) { animation-delay: 0.4s; }
.pb-content-grid .pb-article-card:nth-child(5) { animation-delay: 0.5s; }
.pb-content-grid .pb-article-card:nth-child(6) { animation-delay: 0.6s; }