/*
 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
*/

/* 全局布局 */
.homepage-layout .grid-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* 最新文章全局列表 */
.latest-global-posts-row {
    margin-bottom: 40px;
}
.global-post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.global-post-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.global-post-list li a {
    font-size: 15px;
    color: #222;
    text-decoration: none;
}
.global-post-list li a:hover {
    color: #007cba;
}
.global-post-list .post-date {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    margin-left: 10px;
}

/* 三列频道布局 */
.channel-three-col-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.channel-col {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 20px;
}
.channel-col-heading {
    font-size: 18px;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.channel-col-heading a {
    color: #222;
    text-decoration: none;
}
.channel-col-heading a:hover {
    color: #007cba;
}

/* 频道第一条：4:3 小banner */
.channel-featured-banner {
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.channel-featured-banner a {
    display: block;
}
.channel-featured-banner img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}
.channel-featured-banner h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 12px 15px;
    font-size: 15px;
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

/* 频道文章列表 */
.channel-post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.channel-post-item {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}
.channel-post-item:last-child {
    border-bottom: none;
}
.channel-post-item a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}
.channel-post-item a:hover {
    color: #007cba;
}

/* ==================== 频道页 + 详情页 布局样式（自动适配）==================== */
.site-content {
    max-width: 1240px;
    margin: 30px auto;
    padding: 0 15px;
}
.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: #007cba;
}

/* 侧边栏 */
.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: #007cba;
}

/* 详情页 */
.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: #007cba;
    text-decoration: none;
}

/* 响应式 */
@media(max-width: 992px){
    .category-row,
    .single-post-row {
        flex-direction: column;
    }
    .category-sidebar,
    .single-post-sidebar {
        width: 100%;
        min-width: auto;
    }
    .channel-three-col-row {
        grid-template-columns: 1fr;
    }
}
@media(max-width: 768px){
    .global-post-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}