/* home.css */

.articles-section {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    margin-top: 20px; /* 顶部间距 */
}

/* 文章列表项样式 (Inside Java / Ruby China 风格) */
.article-list-item {
    display: flex;
    justify-content: space-between; /* 左右两端对齐 */
    align-items: center; /* 垂直居中 */
    padding: 15px 0; /* 垂直内边距 */
    border-bottom: 1px solid #eee; /* 更细的底部实线分隔 */
    font-size: 0.9em; /* 整体字体缩小 */
}

.article-list-item:last-child {
    border-bottom: none; /* 最后一个不显示底部边框 */
}

.article-list-item .content {
    flex-grow: 1; /* 标题部分占据剩余空间 */
    display: flex;
    align-items: baseline; /* 标题和作者信息基线对齐 */
    gap: 10px; /* 标题和作者信息的间距 */
    flex-wrap: wrap; /* 标题过长时换行 */
}

.article-list-item .content h2 {
    margin: 0;
    font-size: 1.2em; /* 标题字体缩小 */
    font-weight: 500; /* 标题粗细 */
    line-height: 1.4;
}

.article-list-item .content h2 a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.article-list-item .content h2 a:hover {
    color: #007bff; /* 鼠标悬停变色 */
}

.article-list-item .meta-info {
    flex-shrink: 0; /* 不压缩，确保日期完整显示 */
    font-size: 0.85em; /* 元信息字体更小 */
    color: #999;
    white-space: nowrap; /* 不换行 */
}

.article-list-item .content .author {
    color: #777;
}

.article-list-item .content .author a {
    color: #007bff;
    text-decoration: none;
}

/* 移动设备适配 */
@media (max-width: 768px) {
    .articles-section {
        padding: 15px;
    }

    .article-list-item {
        flex-direction: column; /* 堆叠显示 */
        align-items: flex-start; /* 左对齐 */
        padding: 12px 0;
    }

    .article-list-item .content {
        width: 100%; /* 占据整行 */
        margin-bottom: 5px; /* 底部和元信息隔开 */
        flex-direction: column; /* 标题和作者在移动端堆叠 */
        align-items: flex-start;
        gap: 5px;
    }

    .article-list-item .content h2 {
        font-size: 1.1em;
    }

    .article-list-item .meta-info {
        width: 100%; /* 占据整行 */
        text-align: left;
        margin-top: 5px; /* 顶部和内容隔开 */
        border-top: 1px dotted #eee; /* 上方增加虚线 */
        padding-top: 8px;
    }
}