/* ===== 模块：首页瀑布流 ===== */

/* 0. 顶部蓝色搜索大区已移除，瀑布流与顶部导航留出 32px 呼吸空间 */
.home-last-post {
    margin-top: 32px !important;
}

/* 1. 容器加宽：100% 宽、尽量靠边
      左侧留出 78px 给移到左边的悬浮工具栏（.rollbar 宽 45px + left:14px） */
.home-last-post section.container,
body.search main section.container {
    max-width: none !important;
    width: 96%;
    padding-left: 78px;
    padding-right: 0;
}
.home-last-post .posts-warp,
body.search main .posts-warp {
    margin-left: 0;
    margin-right: 0;
    --bs-gutter-x: 0;
}

/* 1.5 搜索结果页：归档大图横幅收掉，只留一行「搜索到 N 条」 */
body.search .archive-hero {
    background: none !important;
    padding: 6px 0 2px;
}
body.search .archive-hero .archive-hero-bg {
    display: none !important;
}
body.search .archive-hero .archive-title {
    color: inherit;
    font-size: 18px;
}
body.search .archive-hero .archive-desc {
    color: #9aa0a6;
    font-size: 13px;
    margin-top: 2px !important;
}

/* 2. 瀑布流容器 */
.ohc-masonry {
    position: relative;
    display: block;
    height: auto;
}
.ohc-masonry > .col {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none;
    flex: none;
    will-change: transform;
}

/* 3. 卡片：图片 */
.ohc-masonry .post-item {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 12px;
    overflow: hidden;
}
.ohc-masonry .post-item .entry-media.ratio {
    --bs-aspect-ratio: none;
}
.ohc-masonry .post-item .entry-media.ratio::before {
    display: none;
}
.ohc-masonry .post-item .entry-media {
    border-radius: 12px;
    overflow: hidden;
    background: #f2f3f5;
}
.ohc-masonry .post-item .media-img {
    background-size: cover;
    background-position: center;
    transition: transform .35s ease;
}
.ohc-masonry .post-item:hover .media-img {
    transform: scale(1.04);
}

/* 4. 卡片：信息区（在图片下方，去掉白块 / 去掉盖在图片上的黑色渐变与悬停滑走） */
.ohc-masonry .post-item .entry-wrapper {
    position: static !important;
    bottom: auto !important;
    opacity: 1 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 8px 2px 0 !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.ohc-masonry .post-item:hover .entry-wrapper {
    opacity: 1 !important;
    bottom: auto !important;
}

/* 5. 隐藏不需要的元素：分类标签、摘要、日期、浏览量、价格 */
.ohc-masonry .post-item .entry-cat-dot,
.ohc-masonry .post-item .entry-desc,
.ohc-masonry .post-item .entry-meta .meta-date,
.ohc-masonry .post-item .entry-meta .meta-views,
.ohc-masonry .post-item .entry-meta .meta-price {
    display: none !important;
}

/* 6. 标题（信息区在图片下方 → 颜色跟随主题，深浅色都可读） */
.ohc-masonry .post-item .entry-title {
    flex: 0 0 100%;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 4px !important;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ohc-masonry .post-item .entry-title a {
    color: #2b2f38 !important;
}
.ohc-masonry .post-item .entry-title a:hover {
    color: #2163e8 !important;
}

/* 7. 作者（头像 + 名称），由 template-parts/loop/item.php 输出，默认隐藏 */
.entry-author {
    display: none;
}
.ohc-masonry .post-item .entry-author {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    margin: 2px 0 0;
}
.ohc-masonry .post-item .author-avatar-img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
}
.ohc-masonry .post-item .author-name {
    font-size: 12px;
    color: #8a8f9a;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 8. 点赞 / 收藏（靠右） */
.ohc-masonry .post-item .entry-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    margin: 2px 0 0 !important;
}
.ohc-masonry .post-item .entry-meta span {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: #9aa0a6;
}
.ohc-masonry .post-item .entry-meta i {
    margin-right: 3px;
}

/* 9. 小屏时工具栏隐藏，左侧留白收回 */
@media (max-width: 991.98px) {
    .home-last-post section.container,
    body.search main section.container {
        padding-left: 0;
    }
}

@media (max-width: 767.98px) {
    .home-last-post section.container,
    body.search main section.container {
        width: 98%;
    }
    .ohc-masonry .post-item .entry-title {
        font-size: 13px;
    }
}

/* ===== 暗色模式：文字 / 底色跟随主题 ===== */
html[data-bs-theme="dark"] .ohc-masonry .post-item .entry-media {
    background: #22262e;
}
html[data-bs-theme="dark"] .ohc-masonry .post-item .entry-title a {
    color: #e8eaef !important;
}
html[data-bs-theme="dark"] .ohc-masonry .post-item .entry-title a:hover {
    color: #7aa2f7 !important;
}
html[data-bs-theme="dark"] .ohc-masonry .post-item .author-name {
    color: #9aa3b2;
}
html[data-bs-theme="dark"] .ohc-masonry .post-item .entry-meta span {
    color: #9aa3b2;
}
html[data-bs-theme="dark"] body.search .archive-hero .archive-desc {
    color: #8b93a2;
}
