/* 容器左右两列 */
.container.tech-hub {
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 15px;
    display: flex;
    gap: 30px; /* 左右列间距 */
}

/* 左侧主内容 70% */
.tech-hub-content {
    flex: 7;
    display: flex;
    flex-direction: column;
    gap: 40px; /* 板块间距 */
}

/* 右侧侧边栏 30% */
.page-sidebar-right {
    flex: 3;
}

/* 每个板块 */
.tech-category {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* 板块标题 */
.category-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #1a73e8;
    border-bottom: 2px solid #1a73e8;
    padding-bottom: 5px;
}

/* 文章列表 */
.category-posts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px; /* 文章间距 */
}

/* 单篇文章改为浮动布局 */
.tech-post {
    overflow: hidden; /* 清除浮动 */
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* 最后一篇文章去掉下边框 */
.tech-post:last-child {
    border-bottom: none;
}

/* 缩略图浮动在左侧 */
.post-thumbnail {
    width: 120px;
    float: left;           /* 浮动左侧 */
    margin-right: 15px;    /* 图片与文字间距 */
    border-radius: 8px;
}

.post-thumbnail img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

/* 文章内容环绕图片 */
.post-title,
.post-excerpt,
.post-meta {
    overflow: hidden; /* 清除文字溢出 */
}

/* 保持标题一行显示 */
.post-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-title a {
    color: #333;
    text-decoration: none;
    display: inline-block;
    max-width: 100%;
}

.post-title a:hover {
    color: #1a73e8;
    text-decoration: underline;
}

.post-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}


.post-meta {
    margin-top: 8px;
    font-size: 12px;
    color: #888;           /* 文字灰色 */
    display: flex;
    gap: 15px;             /* 元信息间距 */
    flex-wrap: wrap;       /* 避免太长换行 */
    align-items: center;   /* 垂直居中 */
}

/* 所有图标垂直居中并统一颜色 */
.post-meta i {
    color: #ff5722;        /* 图标橙色 */
    vertical-align: middle; /* 垂直对齐 */
    display: inline-flex;   /* 保证 flex 内居中 */
    align-items: center;
    justify-content: center;
    font-size: 12px;        /* 图标大小 */
    margin-right: 4px;      /* 图标与文字间距 */
}

/* 单独控制评论数量样式 */
.post-comments {
    color: #888;           
    font-weight: 500;      
    display: flex;
    align-items: center;    /* 图标文字垂直居中 */
    gap: 4px;               /* 图标与文字间距 */
}

.post-comments:hover {
    text-decoration: underline;
    cursor: pointer;
}





/* 响应式布局 */

/* 平板及小屏桌面：小于992px */
@media (max-width: 992px) {
    .container.tech-hub {
        flex-direction: column; /* 左右列堆叠 */
        padding: 20px 15px;
    }

    .tech-hub-content,
    .page-sidebar-right {
        flex: 1;
    }

    .tech-hub-content {
        margin-bottom: 30px; /* 主内容和侧边栏间距 */
    }

    .tech-post {
        flex-direction: column;
        gap: 10px;
    }

    .post-thumbnail {
        width: 100%;
    }
}

/* 手机竖屏：小于768px */
@media (max-width: 768px) {
    .container.tech-hub {
        padding: 15px 10px;
    }

    .category-title {
        font-size: 20px;
    }

    .post-title {
        font-size: 16px;
    }

    .post-excerpt {
        font-size: 13px;
    }

    .post-meta {
        font-size: 11px;
        gap: 10px;
        flex-wrap: wrap;
    }
}

/* 小屏手机：小于576px */
@media (max-width: 576px) {
    .container.tech-hub {
        padding: 10px 5px;
    }

    .category-title {
        font-size: 18px;
    }

    .post-title {
        font-size: 14px;
    }

    .post-excerpt {
        font-size: 12px;
    }

    .post-meta {
        font-size: 10px;
    }

    .tech-post {
        gap: 8px;
    }
}