/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:   Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* 全局基础样式 */
body {
    background-color: #fff;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 隐藏 GeneratePress 原生网站标题、Logo、网站描述（核心！） */
.site-header .site-branding,
.site-header .site-logo,
.site-header .site-title,
.site-header .site-description {
    display: none !important;
}
/* 让主题头部不占用多余空间 */
.site-header {
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    min-height: 0 !important;
}

/* 顶部固定导航 - 全屏铺开 + 加粗 + 阴影 */
.homepage-nav {
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 1px solid #eee;
    z-index: 999;
    padding: 10px 0;
    width: 100%;
}
.homepage-nav ul {
    list-style: none;
    margin: 0;
    padding: 0 20px;
    display: flex;
    justify-content: space-around;
    max-width: 1200px;
    margin: 0 auto;
}
.homepage-nav a {
    color: #2196F3;
    text-decoration: none;
    font-weight: bold;
    text-shadow: 2px 2px 3px rgba(0,0,0,0.1);
    padding: 5px 10px;
}
.homepage-nav a:hover {
    text-decoration: underline;
}

/* 首页模块通用样式 */
.homepage-section {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}
.inside-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 关键：左右分栏布局 */
.section-row {
    display: flex;
    align-items: center;
    gap: 40px;
    min-height: 120px;
}
.section-title {
    flex: 0 0 220px;
    font-weight: bold;
}
.section-content {
    flex: 1;
}

/* 标题样式 */
.section-title h1 {
    font-size: 32px;
    color: #21409a;
    margin: 0;
    line-height: 1.3;
}
.section-title h2 {
    font-size: 28px;
    color: #222;
    margin: 0;
    line-height: 1.3;
}

/* 正文样式 */
.homepage-section p,
.homepage-section li {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin: 0 0 10px 0;
}

/* 厂商/价格/免费列表 */
.vendor-list,
.free-list,
.price-list {
    list-style: decimal;
    padding-left: 20px;
    margin: 0;
}

/* ===== 文章模块修改部分 ===== */
#articles .articles-header {
    margin-bottom: 30px;
}
#articles .articles-header h2 {
    font-size: 28px;
    color: #222;
    margin: 0;
    line-height: 1.3;
    text-align: center;
}

#articles .articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.article-channel .channel-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #222;
    font-weight: 600;
}
.article-channel ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}
.article-channel a {
    color: #2196F3;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 100%;
}
.article-channel a:hover {
    text-decoration: underline;
}

/* 锚点跳转平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .section-row {
        flex-direction: column;
        gap: 20px;
    }
    .section-title {
        flex: none;
    }
}

/* ====================== 顶部LOGO + SLOGAN 样式（已修复） ====================== */
.top-banner {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    width: 100%;
}
.banner-flex {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
    flex-wrap: nowrap;       /* 强制不换行，保持一行 */
}
.logo-left img {
    width: 500px;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    display: block;
}
.slogan-right {
    font-size: 26px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
    white-space: nowrap;     /*  slogan 不换行 */
}
@media (max-width: 768px) {
    .banner-flex {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .slogan-right {
        white-space: normal;
    }
}
/* 强制首页内容区全屏宽度，不被侧边栏布局影响 */
.full-width-homepage {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
}
/* 重置 GeneratePress 给内容区的默认左右边距 */
.full-width-homepage .inside-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
/* 确保 banner 不受浮动影响 */
.top-banner {
    clear: both;
    width: 100%;
}
/* ===== PCB打样科普模块 ===== */
.section-title-block {
    margin-bottom: 30px;
    text-align: center; /* 标题和描述居中 */
}
.section-title-block h2 {
    font-size: 28px;
    color: #222;
    margin: 0 0 10px;
}
.section-desc {
    font-size: 16px;
    color: #666;
    margin: 0;
}
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;

}
.knowledge-col ul {
    list-style: none; /* 去掉列表圆点 */
    padding-left: 20px;
    margin: 0;
    text-align: center; /* 整体居中 */
}
.knowledge-col li {
    margin-bottom: 10px;
}
.knowledge-col a {
    color: #2196F3;
    text-decoration: none;
}
.knowledge-col a:hover {
    text-decoration: underline;
}

/* ===== PCB打样抄板模块 ===== */
.copy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: stretch; /* 关键：让两列高度自动等高 */
}
.copy-left {
    display: flex; /* 让子元素撑满高度 */
}
.copy-block {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    width: 100%; /* 撑满父容器宽度 */
    height: 100%; /* 撑满父容器高度，和右侧对齐 */
    box-sizing: border-box;
}
.copy-block h3 {
    margin-top: 0;
    font-size: 20px;
    color: #222;
}
.copy-right .copy-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.copy-half {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
}
.copy-half h4 {
    margin-top: 0;
    font-size: 18px;
    color: #222;
}

/* ===== PCB打样流程模块 - 最终正确版 ===== */
.process-banner {
    background: #1E3A8A;        /* 你要的深蓝色 */
    max-width: 600px;           /* 整个蓝色块宽度 600px */
    margin: 0 auto 30px auto;   /* 居中 + 底部间距 */
    padding: 20px 20px;         /* 内边距 */
    border-radius: 6px;         /* 可选：轻微圆角更好看 */
}
.process-banner p {
    margin: 0;
    text-align: center;
    font-size: 16px;
    color: #FFFFFF !important;  /* 纯白文字 */
    line-height: 1.6;
}
.process-slider {
    overflow-x: auto;
    padding-bottom: 10px;
}
.process-images {
    display: flex;
    gap: 20px;
}
.process-images img {
    height: 300px;    /* 你要的高度 */
    width: auto;
    border-radius: 4px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .knowledge-grid {
        grid-template-columns: 1fr;
    }
    .copy-grid {
        grid-template-columns: 1fr;
    }
    .copy-right .copy-row {
        grid-template-columns: 1fr;
    }
    .process-banner .inside-section {
        max-width: 100%;
    }
}

/* ==================== PCBTrend 频道页 + 详情页 样式 ==================== */
.site-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}
.category-row,
.single-post-row {
    display: flex;
    gap: 30px;
}
.category-main,
.single-post-main {
    flex: 1;
    min-width: 0;
}
.category-sidebar,
.single-post-sidebar {
    width: 320px;
    min-width: 320px;
}

/* 频道头部 */
.category-header h1 {
    font-size: 24px;
    margin: 0 0 10px;
}
.category-header h2 {
    font-size: 16px;
    font-weight: normal;
    color: #666;
    margin: 0 0 20px;
}

/* 频道大图 */
.category-banner-section {
    margin-bottom: 20px;
}
.category-banner-item a {
    display: block;
    position: relative;
}
.category-banner-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}
.category-banner-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 18px;
    border-radius: 0 0 6px 6px;
}

/* 频道文章列表 */
.category-post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-post-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}
.category-post-list li a {
    font-size: 16px;
    color: #222;
    text-decoration: none;
}
.category-post-list li a:hover {
    color: #2196F3;
}

/* 侧边栏 */
.sidebar-widget {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 20px;
}
.sidebar-widget-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-widget li {
    padding: 6px 0;
    border-bottom: 1px dashed #f1f1f1;
}
.sidebar-widget li a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}
.sidebar-widget li a:hover {
    color: #2196F3;
}

/* 详情页 */
.single-post-main h1 {
    font-size: 26px;
    margin: 0 0 20px;
    line-height: 1.4;
}
.single-post-content {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}
.breadcrumbs {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}
.breadcrumbs a {
    color: #2196F3;
    text-decoration: none;
}

/* ===== 频道页分页导航 ===== */
.category-pagination {
    margin: 30px 0;
    text-align: center;
}
.category-pagination .page-numbers {
    display: inline-block;
    padding: 6px 14px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.2s;
}
.category-pagination .page-numbers:hover {
    background: #f0f0f0;
    border-color: #bbb;
}
.category-pagination .page-numbers.current {
    background: #2196F3;
    border-color: #2196F3;
    color: #fff;
    font-weight: bold;
}
.category-pagination .page-numbers.dots {
    border-color: transparent;
    background: none;
    padding: 6px 8px;
}

@media(max-width: 992px){
    .category-row, .single-post-row {
        flex-direction: column;
    }
    .category-sidebar, .single-post-sidebar {
        width: 100%;
        min-width: auto;
    }
}
/* ====================== PCB打样是什么 - 子标题样式 ====================== */
.intro-subheading {
    font-size: 20px !important;        /* 比普通文字大，比h2小 */
    font-weight: 700;
    color: #21409a;
    margin: 32px 0 14px 0;
    line-height: 1.4;
}

/* 移动端稍微调整 */
@media (max-width: 768px) {
    .intro-subheading {
        font-size: 18px;
        margin: 28px 0 12px 0;
    }
}
/* ====================== PCB打样厂商 - 厂家名称样式 ====================== */
.vendor-name {
    font-size: 20px !important;
    font-weight: 700;
    color: #21409a;
    margin: 32px 0 14px 0;
    line-height: 1.4;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .vendor-name {
        font-size: 18px;
        margin: 28px 0 12px 0;
    }
}

/* ====================== PCB打样抄板模块 - 新样式 ====================== */

/* 抄板是什么标题 */
.copy-main-title {
    font-size: 20px;
    font-weight: bold;
    color: #2196F3;
    margin: 0 0 16px 0;
}

/* 优点/缺点/争议点/适用场景标题 */
.copy-sub-title {
    font-size: 18px;
    font-weight: bold;
    color: #2196F3;
    margin: 0 0 12px 0;
}

/* 重点修改：加大蓝底模块与上方抄板内容的间距 */
.process-banner {
    margin-top: 30px !important;   /* 增加上方间距 */
}
/* ====================== PCB打样流程模块 - 描述文字左对齐 ====================== */


#pcb-process .section-title-block p {
    text-align: left;
    margin-bottom: 15px;
}
/* 移动端适配 */
@media (max-width: 768px) {
    .copy-controversy {
        margin-top: 40px;
        padding-top: 25px;
    }
    
    .copy-main-title {
        font-size: 18px;
    }
    
    .copy-sub-title {
        font-size: 17px;
    }
    
    .process-banner {
        margin-top: 20px !important;
    }
}