/*
Theme Name: Twenty Sixteen Child - Vincedeck
Description: 子主题，用于自定义首页布局：文章和碎片左右分栏
Template: twentysixteen
Version: 1.0.5
*/

/* 移除页面最外层的黑边框 */
html, body {
    border: none !important;
    outline: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important; /* 覆盖黑色背景 */
    background-color: #ffffff !important;
}

#page, .site {
    border: none !important;
    outline: none !important;
}

.site-inner {
    border: none !important;
    outline: none !important;
}

/* 自定义首页双栏布局样式 */
body.home .content-area {
    width: 100% !important;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

body.home .site-main {
    display: flex !important;
    gap: 30px;
    align-items: stretch;
}

body.home .posts-column {
    flex: 2 !important; /* 文章列表占2份宽度 */
    min-width: 0; /* 防止flex item溢出 */
    border-right: 1px solid #e5e5e5;
    padding-right: 30px;
    display: flex;
    flex-direction: column;
}

body.home .fragments-column {
    flex: 1 !important; /* 碎片列表占1份宽度 */
    min-width: 0; /* 防止flex item溢出 */
    padding-left: 30px;
    display: flex;
    flex-direction: column;
}

body.home .column-header {
    border-bottom: none !important; /* 强制移除底部边框 */
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    font-family: Montserrat, "Helvetica Neue", sans-serif; /* 分栏标题字体 */
}

body.home .column-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1a1a1a;
    font-weight: 500 !important;
    font-family: Montserrat, "Helvetica Neue", sans-serif; /* 标题字体 */
}

/* 文章列表样式 */
.home .post-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    font-family: "SimSun", "宋体", serif;
}

.home .post-item:last-child {
    border-bottom: none;
}

.home .post-item .entry-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-family: Montserrat, "Helvetica Neue", sans-serif;
}

.home .post-item .entry-title a {
    color: #2b2b2b;
    text-decoration: none;
}

.home .post-item .entry-title a:hover {
    color: #007acc;
}

.home .post-item .entry-meta {
    font-size: 0.9rem;
    color: #686868;
    margin-bottom: 0.5rem;
    font-family: "SimSun", "宋体", serif;
}

.home .post-item .entry-excerpt {
    line-height: 1.6;
    color: #1a1a1a;
    font-family: "SimSun", "宋体", serif;
}

/* 碎片样式 */
.home .fragment-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 5px;
    border-left: none !important; /* 强制移除蓝色边框 */
    font-family: "SimSun", "宋体", serif; /* 碎片使用宋体 */
}

.home .fragment-item .fragment-content {
    line-height: 1.6;
    margin-bottom: 0.5rem;
    font-family: "SimSun", "宋体", serif;
}

.home .fragment-item .fragment-meta {
    font-size: 0.85rem;
    color: #686868;
    font-family: "SimSun", "宋体", serif;
}

.home .fragment-item .fragment-meta .fragment-title {
    font-size: 0.85rem; /* 与日期相同字号 */
    font-weight: normal; /* 与日期相同字重 */
    color: #686868; /* 与日期相同颜色 */
    font-family: "SimSun", "宋体", serif; /* 与日期相同字体 */
}

.home .fragment-item .fragment-meta .fragment-separator {
    font-size: 0.85rem;
    color: #686868;
}

.home .fragment-item .fragment-meta .fragment-date {
    margin-right: 0.5rem;
}

.home .fragment-item .fragment-meta a {
    color: #686868;
    text-decoration: none;
}

.home .fragment-item .fragment-meta a:hover {
    color: #007acc;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    body.home .site-main {
        flex-direction: column;
        gap: 20px;
    }
    
    body.home .posts-column {
        border-right: none;
        padding-right: 0;
        padding-left: 0;
        border-bottom: none;
        padding-bottom: 20px;
    }
    
    body.home .fragments-column {
        padding-left: 0;
    }
    
    body.home .content-area {
        padding: 0 15px;
    }

    /* 调整页头内边距，使其与内容对齐 */
    .site-header {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .site-header-main {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* 分页样式 */
.home .posts-column .pagination,
.home .fragments-column .pagination {
    margin-top: auto;
    padding-top: 0 !important; /* 让黑线紧贴内容 */
    border-top: 4px solid #1a1a1a; /* 顶部粗黑线 */
    /* 重置父主题的相对定位和边距 */
    position: static !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    min-height: auto !important;
    text-align: left !important; /* 确保内容靠左 */
}

/* 移除父主题在 .pagination 上生成的两个黑色背景块 */
.home .pagination:before,
.home .pagination:after {
    content: none !important;
    display: none !important;
}

/* 移除父主题在 .nav-links 上生成的箭头图标 */
.home .pagination .nav-links:before,
.home .pagination .nav-links:after {
    content: none !important;
    display: none !important;
}

/* 彻底隐藏空的分页容器 */
.home .pagination:empty,
.home div.pagination:empty {
    display: none !important;
}

.home .pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start; /* 顶部对齐，紧贴黑线 */
    justify-content: flex-start; /* 内容靠左 */
    width: 100%;
    /* 重置父主题的右内边距 */
    padding-right: 0 !important;
}

.home .pagination .page-numbers.current {
    color: #1a1a1a !important;
}

/* 页码样式 - 纯数字，靠左 */
.home .pagination .page-numbers:not(.prev):not(.next) {
    order: 1;
    padding: 0 15px 0 0; /* 右侧留点间距 */
    color: #007acc;
    font-family: Montserrat, "Helvetica Neue", sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    background: transparent !important;
    border: none !important;
    margin: 0;
    height: 44px;
    line-height: 44px;
    display: inline-block;
}


.home .pagination .page-numbers:not(.prev):not(.next):hover {
    color: #1a1a1a;
    background: transparent;
}

/* 箭头按钮 - 靠右，黑色方块 */
.home .pagination .prev,
.home .pagination .next {
    order: 2;
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    background-color: #1a1a1a !important; /* 黑色背景 */
    color: #ffffff !important; /* 白色箭头 */
    border: none !important;
    border-radius: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important; /* 清除内边距 */
    width: 44px !important;
    height: 44px !important;
    line-height: 1 !important; /* 防止行高影响垂直居中 */
    text-decoration: none !important;
    transition: background-color 0.2s;
    box-shadow: none !important;
    position: relative; /* 用于微调内部元素 */
    /* 确保没有其他背景干扰 */
    background-image: none !important;
    right: auto !important; /* 强制覆盖内联样式 */
    left: auto !important; /* 强制覆盖内联样式 */
}

/* 强制清除箭头按钮内部所有元素的样式（解决灰色圆角底色问题） */
.home .pagination .prev *,
.home .pagination .next * {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: inherit !important; /* 继承外层的白色 */
    font-weight: normal !important;
}

/* 微调箭头垂直位置（解决靠上问题） */
.home .pagination .prev span[aria-hidden="true"],
.home .pagination .next span[aria-hidden="true"] {
    position: relative;
    top: 1px; /* 稍微往下移一点，实现视觉居中 */
    display: block; /* 确保 transform/top 生效 */
}

/* 移除箭头按钮上的伪元素 */
.home .pagination .prev:before,
.home .pagination .prev:after,
.home .pagination .next:before,
.home .pagination .next:after {
    content: none !important;
    display: none !important;
}

/* 箭头悬停样式 */
.home .pagination .prev:hover,
.home .pagination .next:hover {
    background-color: #007acc !important;
    color: #ffffff !important;
}

/* 箭头定位逻辑 */
/* 1. 默认情况下，箭头都尝试往右推 */
.home .pagination .prev,
.home .pagination .next {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* 2. 如果同时存在上一页和下一页，下一页紧贴上一页（取消自动左边距） */
body.home .pagination .nav-links .prev ~ .next {
    margin-left: 1px !important; /* 两个箭头之间留一点点空隙 */
}

/* 隐藏空的分页链接 */
.home .pagination .nav-links a:empty,
.home .pagination .nav-links span:empty {
    display: none !important;
}

/* 碎片单页样式 */
.fragment-single .entry-content {
    font-family: "SimSun", "宋体", serif;
}
