.hfw-custom-widget {
    background: none;
    padding: 0;
    box-shadow: none;
    margin: 0;
    margin-bottom: 10px;
}

.hfw-posts-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hfw-post-list-item {
    overflow: hidden;
    border-radius: 5px; 
    flex: 1 1 calc(20% - 10px); 
    box-sizing: border-box; 
    margin-bottom: 1px; 
    position: relative; 
}

@media screen and (max-width: 768px) {
    .hfw-post-list-item {
        flex: 1 1 calc(50% - 10px); 
    }
}

.hfw-post-module-thumb img {
    width: 100%;
    height: 268px;
    object-fit: cover;
    border-radius: 5px; 
    transition: transform 0.3s ease; 
}

.hfw-post-module-thumb img:hover {
    transform: scale(1.1); 
}

.hfw-post-info {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.6) 100%);
    color: #fff;
    text-align: center;
    padding: 15px 0;
}

.hfw-post-info h2 {
    font-size: 1em;
    margin: 0;
    padding: 0 5px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hfw-post-info a {
    text-decoration: none;
    color: #fff;
}

.hfw-post-meta {
    position: absolute;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 5px;
    color: #fff;
}

.hfw-post-meta .hfw-post-views {
    padding: 2px 5px;
    border-radius: 3px;
    opacity: 0; 
    transition: opacity 0.3s ease; 
}

.hfw-post-module-thumb:hover .hfw-post-meta .hfw-post-views {
    opacity: 1; 
}

.hfw-post-meta .hfw-post-images {
    padding: 2px 5px;
    border-radius: 3px;
    color: #000;
}

.hfw-widget-title-wrapper {
    display: flex;
    height: 48px;
    justify-content: space-between;
    align-items: center; /* 确保h2垂直居中 */
    background-color: #ffffff;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 0 15px;
    overflow: visible; /* 避免背景图因偏移被裁剪 */
}

.hfw-widget-title-wrapper h2 {
    background-repeat: no-repeat; /* 禁止背景图重复（避免默认重复导致视觉异常） */
    background-size: 30px auto; /* 关键：设置背景图宽度（30px），高度自适应，确保在h2内显示完整 */
    background-position: left center; /* 关键：背景图靠h2左侧、垂直居中，替代原0px -110px（原定位可能让图片超出h2范围） */
    background-color: transparent; /* 确保背景透明，不遮挡图片（避免与容器背景色冲突） */

    /* 2. 保持h2垂直居中的基础样式 */
    position: relative;
    margin: 0; /* 清除默认margin干扰 */
    margin-left: -10px; /* 保留原水平左偏移需求 */
    margin-right: 20px; /* 与“更多”链接保持水平间距 */
    height: 37px; /* 固定h2高度，确保背景图有足够显示空间 */
    padding-left: 45px; /* 水平内边距：背景图宽度（30px）+ 15px间距，确保文字不遮挡图片 */
    padding-top: 0; /* 清除垂直偏移 */
    font-size: 22px;
    line-height: 37px; /* 文字垂直居中 */
    vertical-align: middle;
}

.hfw-sort-link {
    font-size: 0.9em;
    color: #0073aa;
    text-decoration: none;
    margin-right: 10px;
}

.hfw-sort-link:hover {
    text-decoration: underline;
}

.hfw-more-link {
    text-decoration: none;
    /* margin-top: 15px; */
}

.hfw-more-link:hover {
    text-decoration: none;
}
