/* 图片尺寸修复 - 保证统一的长宽比 */

/* 顶部大幻灯片 - 宽高比约 1170:500 (42.7%) */
.top-slider-section .news-post.image-post {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 42.7% !important;
    overflow: hidden !important;
}

.top-slider-section .news-post.image-post img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* 确保hover-post覆盖整个图片区域 */
.top-slider-section .news-post.image-post .hover-post {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* 侧边栏轮播图片 - 宽高比约 1:1.5 (150%) */
.sidebar .features-widget .news-post.image-post {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 150% !important;
    overflow: hidden !important;
}

.sidebar .features-widget .news-post.image-post > img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* 侧边栏轮播的hover层也需要绝对定位 */
.sidebar .features-widget .news-post.image-post .hover-post {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* 热门文章（Trending Posts）大卡片图片 - 宽高比约 350:284 (81.14%) */
.fresh-section2 .news-post.standard-post .image-holder {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 81.14% !important;
    overflow: hidden !important;
}

.fresh-section2 .news-post.standard-post .image-holder img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* 推荐文章（Featured Posts/原热门视频）图片 - 宽高比约 350:255 (72.86%) */
.video-section .news-post.video-post .image-holder,
.video-box .news-post.video-post .image-holder {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 72.86% !important;
    overflow: hidden !important;
}

.video-section .news-post.video-post .image-holder img,
.video-box .news-post.video-post .image-holder img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* 最新文章第一篇大图 - 宽高比约 555:288 (51.92%) */
.blog-section .news-post.article-post .image-holder {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 51.92% !important;
    overflow: hidden !important;
}

.blog-section .news-post.article-post .image-holder img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* 最新文章小卡片图片（第2-5篇） - 宽高比约 263:213 (81.14%) */
.blog-section .col-md-6 .news-post .image-holder {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 81.14% !important;
    overflow: hidden !important;
}

.blog-section .col-md-6 .news-post .image-holder img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* 热门文章小列表图片 - 固定尺寸 60x62 */
.list-thumb-posts .image-holder,
.fresh-section2 .list-thumb-posts .image-holder {
    width: 60px !important;
    height: 62px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    position: relative !important;
}

.list-thumb-posts .image-holder img,
.fresh-section2 .list-thumb-posts .image-holder img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* 侧边栏Instagram/最新图片 - 正方形 70x70 */
.instagram-widget li a img {
    width: 70px !important;
    height: 70px !important;
    object-fit: cover !important;
    display: block !important;
}

/* 侧边栏Instagram/最新图片布局 - 3x2网格 */
.sidebar .widget ul.insta-list {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -5px;
}

.sidebar .widget ul.insta-list li {
    width: calc(33.33% - 7px) !important;
    margin-right: 10px !important;
    margin-bottom: 10px !important;
    list-style: none;
}

.sidebar .widget ul.insta-list li:nth-child(3n) {
    margin-right: 0 !important;
}

/* 文字溢出修复 */
.news-post h2 {
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    word-break: break-all;
    hyphens: auto;
    max-width: 100%;
}

.news-post .post-description,
.news-post p {
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-all;
    max-width: 100%;
}

/* 文章卡片标题和摘要的行高调整 */
.news-post h2 a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 关于博主小部件样式 - 全新设计 */
.author-widget {
    background: #fff;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.author-widget > h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e74c3c;
    color: #292929;
}

.author-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.author-widget .author-avatar {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #f5f5f5;
}

.author-widget .author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.author-info {
    flex: 1;
    min-width: 0;
}

.author-info .author-name {
    font-size: 16px;
    font-weight: 600;
    color: #292929;
    margin: 0 0 8px 0;
}

.author-info .author-description {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 多级菜单箭头颜色修复 */
.main-menu li.menu-item-has-children > a:after {
    color: inherit;
}

/* 单篇文章页主图片尺寸修复 */
.single-post-content > img {
    width: 100% !important;
    height: 400px !important;
    display: block;
    margin-bottom: 20px;
    object-fit: cover !important;
}

/* 评论样式修复 - 按照原模板 */
.comments__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 评论列表项 - 使用浮动布局而不是flex */
.comments__list-item {
    list-style: none !important;
    margin-bottom: 30px !important;
    padding-top: 30px !important;
    border-top: 1px solid #eeeeee !important;
    overflow: hidden; /* 清除浮动 */
}

.comments__list-item:first-child {
    padding-top: 0 !important;
    border-top: none !important;
}

/* 评论头像 - 左浮动 */
.comments__list-item-image {
    float: left !important;
    width: 50px !important;
    height: 50px !important;
    margin-right: 20px !important;
    border-radius: 3px !important;
    object-fit: cover !important;
}

/* 评论内容区 - 使用overflow清除浮动 */
.comments__list-item-content {
    overflow: hidden !important;
}

/* 评论作者名 */
.comments__list-item-title {
    color: #333333 !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 20px !important;
    margin: 0 !important;
}

/* 作者徽章 */
.comment-author-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 3px;
    font-size: 12px;
    margin-left: 5px;
    font-weight: normal;
}

/* 评论日期 */
.comments__list-item-date {
    display: inline-block !important;
    color: #ccc !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 20px !important;
    margin: 0 0 16px !important;
}

/* 回复按钮 - 右浮动 */
.comments__list-item-reply {
    float: right !important;
    padding: 4px 8px !important;
    color: #999 !important;
    margin: -5px 0 20px !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 16px !important;
    text-decoration: none !important;
    border: 1px solid #ebebeb !important;
    border-radius: 20px !important;
}

.comments__list-item-reply:hover {
    color: #e74c3c !important;
}

.comments__list-item-reply i {
    font-size: 12px !important;
    float: left !important;
    margin-right: 4px !important;
    margin-top: 2px !important;
}

/* 评论内容 */
.comments__list-item-description {
    font-size: 14px !important;
    line-height: 1.7 !important;
    color: #555 !important;
    margin: 0 !important;
}

/* 子评论缩进 */
.comment-children {
    margin-left: 70px !important;
    margin-top: 0 !important;
    list-style: none !important;
    padding: 0 !important;
}

/* 评论等待审核提示 */
.comment-awaiting-moderation {
    display: inline-block;
    padding: 3px 10px;
    background: #fff3cd;
    color: #856404;
    font-size: 12px;
    border-radius: 3px;
    margin-left: 10px;
}
