.tf-hfw-widget-shell {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.hfw-custom-widget.tf-hfw-widget {
    background: none;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.tf-hfw-widget .hfw-widget-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tf-hfw-widget .hfw-widget-title-main {
    display: inline-flex;
    align-items: center;
    position: relative;
    min-width: 0;
    overflow: visible;
    margin-left: 0;
}

.tf-hfw-widget .hfw-widget-title-main.has-divider {
    min-height: 56px;
    padding-left: 56px;
    padding-right: 10px;
}

.tf-hfw-widget .hfw-widget-title-wrapper .widget-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
    position: relative;
    z-index: 2;
}

.tf-hfw-widget .hfw-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    text-decoration: none;
}

.tf-hfw-widget .tf-hfw-title-divider {
    margin-top: 0;
    line-height: 0;
    pointer-events: none;
    --tf-hfw-divider-slices: 8;
    --tf-hfw-divider-origin-w: 151;
    --tf-hfw-divider-origin-h: 430;
    --tf-hfw-divider-w: 151px;
    --tf-hfw-divider-h: calc(var(--tf-hfw-divider-w) * var(--tf-hfw-divider-origin-h) / var(--tf-hfw-divider-origin-w) / var(--tf-hfw-divider-slices));
    width: var(--tf-hfw-divider-w);
    height: var(--tf-hfw-divider-h);
    position: absolute;
    left: 0;
    top: 55%;
    transform: translateY(-50%);
    overflow: hidden;
    background-repeat: no-repeat;
    background-position: 0 calc((var(--tf-hfw-divider-index, 5) - 1) * -1 * var(--tf-hfw-divider-h));
    background-size: var(--tf-hfw-divider-w) calc(var(--tf-hfw-divider-h) * var(--tf-hfw-divider-slices));
    z-index: 1;
}

.tf-hfw-widget .hfw-posts-row.tf-hfw-posts-row {
    display: grid;
    grid-template-columns: repeat(var(--tf-hfw-cols, 3), minmax(0, 1fr));
    gap: 12px;
    position: relative;
    overflow: visible;
    isolation: isolate;
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.tf-hfw-widget.tf-hfw-width-custom .hfw-posts-row.tf-hfw-posts-row {
    grid-template-columns: repeat(auto-fill, minmax(min(var(--tf-hfw-width, 260px), 100%), 1fr));
}

.tf-hfw-widget .hfw-post-list-item.tf-hfw-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--tf-hfw-radius, 12px);
    height: var(--tf-hfw-height, 250px);
    transform: translateZ(0);
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.22s ease, box-shadow 0.2s ease;
    clip-path: inset(0 round var(--tf-hfw-radius, 12px));
    -webkit-clip-path: inset(0 round var(--tf-hfw-radius, 12px));
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    isolation: isolate;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    background: transparent;
    z-index: 1;
}

.tf-hfw-widget .hfw-post-list-item.tf-hfw-card:hover {
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.14);
}

.tf-hfw-widget.tf-hfw-orientation-portrait .hfw-post-list-item.tf-hfw-card {
    height: auto;
    aspect-ratio: var(--tf-hfw-ratio, 9 / 16);
}

.tf-hfw-widget.tf-hfw-orientation-portrait .hfw-post-info {
    opacity: 1;
    transform: translateY(0);
    padding: 30px 10px 12px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.58));
}

.tf-hfw-widget .hfw-post-list-item.tf-hfw-card:hover,
.tf-hfw-widget .hfw-post-list-item.tf-hfw-card:focus-within,
.tf-hfw-widget .hfw-post-list-item.tf-hfw-card.tf-hfw-active {
    z-index: 30;
}

.tf-hfw-widget .hfw-item-in,
.tf-hfw-widget .hfw-post-module-thumb,
.tf-hfw-widget .hfw-thumb-link {
    height: 100%;
}

.tf-hfw-widget .hfw-item-in.tf-hfw-item-in {
    border-radius: inherit;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.tf-hfw-widget .hfw-post-module-thumb {
    position: relative;
    border-radius: inherit;
    overflow: hidden;
}

.tf-hfw-widget .hfw-post-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    transition: transform 0.22s ease;
    filter: none;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: none;
    will-change: transform;
}

.tf-hfw-widget .hfw-post-list-item:hover .hfw-post-thumb {
    transform: none;
}

.tf-hfw-widget .hfw-post-module-thumb::after {
    display: none;
    content: none;
}

.tf-hfw-widget .hfw-post-meta {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
}

.tf-hfw-widget .hfw-post-images {
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.24);
}

.tf-hfw-widget .hfw-post-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    opacity: 0;
    transform: translateY(14px);
    transition: all 0.28s ease;
    padding: 12px 10px;
    color: #fff;
    text-align: center;
}

.tf-hfw-widget .hfw-post-list-item:hover .hfw-post-info {
    opacity: 1;
    transform: translateY(0);
}

.tf-hfw-widget .hfw-post-info h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.tf-hfw-widget .hfw-post-info a {
    color: #fff;
    text-decoration: none;
}

.tf-hfw-widget .hfw-post-info .tengfei-title-badge {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    padding: 0 3px;
    height: 16px;
    line-height: 16px;
    font-size: 13px;
    margin-right: 2px;
    vertical-align: middle;
}

.tf-hfw-widget .hfw-post-info .tengfei-title-badge::before {
    content: "";
    position: absolute;
    left: -150%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: tf-hfw-badge-sweep 2.6s ease-in-out infinite;
}

@keyframes tf-hfw-badge-sweep {
    0% {
        left: -150%;
    }
    100% {
        left: 150%;
    }
}

@media (max-width: 768px) {
    .tf-hfw-widget .hfw-posts-row.tf-hfw-posts-row {
        grid-template-columns: repeat(var(--tf-hfw-cols-sm, 2), minmax(0, 1fr));
        gap: 10px;
        margin-left: 0;
    }

    .tf-hfw-widget.tf-hfw-width-custom .hfw-posts-row.tf-hfw-posts-row {
        grid-template-columns: repeat(auto-fill, minmax(min(var(--tf-hfw-width-sm, 170px), 100%), 1fr));
    }

    .tf-hfw-widget .hfw-post-list-item.tf-hfw-card {
        height: var(--tf-hfw-height-sm, 215px);
    }

    .tf-hfw-widget.tf-hfw-orientation-portrait .hfw-post-list-item.tf-hfw-card {
        height: auto;
        aspect-ratio: var(--tf-hfw-ratio, 9 / 16);
    }

    .tf-hfw-widget .hfw-widget-title-wrapper .widget-title {
        font-size: 19px;
    }

    .tf-hfw-widget .hfw-widget-title-main {
        margin-left: 0;
    }

    .tf-hfw-widget .hfw-widget-title-main.has-divider {
        min-height: 50px;
        padding-left: 48px;
        padding-right: 8px;
    }

    .tf-hfw-widget .tf-hfw-title-divider {
        --tf-hfw-divider-w: 136px;
        left: 0;
        top: 56%;
    }

    .tf-hfw-widget .hfw-post-info h2 {
        font-size: 14px;
    }
}

@media (max-width: 420px) {
    .tf-hfw-widget .hfw-widget-title-wrapper {
        margin-bottom: 8px;
    }

    .tf-hfw-widget .hfw-post-info {
        padding: 10px 8px;
    }
}
