/**
 * 壹手设计工具箱 - 文章瀑布流样式
 */

.iyesbox-waterfall-container {
    display: grid;
    grid-template-columns: repeat(var(--wf-col, 4), 1fr);
    gap: 15px;
    margin: 20px 0;
}

/* 去除可能的外来样式，但保留圆角 */
.iyesbox-waterfall-container,
.iyesbox-waterfall-container * {
    text-decoration: none !important;
    box-shadow: none !important;
}

.iyesbox-waterfall-item {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.iyesbox-waterfall-item:hover {
    transform: translateY(-4px);
}

.iyesbox-waterfall-item a {
    display: block !important;
    text-decoration: none !important;
    line-height: 0 !important;
}

/* 图片包装器 */
.iyesbox-waterfall-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.iyesbox-waterfall-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    transition: filter 0.35s ease, transform 0.35s ease !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 确保图片填满容器 */
.iyesbox-waterfall-item {
    line-height: 0 !important;
}

/* 遮罩层 */
.iyesbox-waterfall-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 60%, rgba(0, 0, 0, 0.7));
    color: #fff;
    padding: 15px;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
    border-radius: 8px;
}

.iyesbox-waterfall-item:hover .iyesbox-waterfall-overlay {
    opacity: 1;
}

.iyesbox-waterfall-overlay h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 500;
    color: #fff !important;
}

/* hover 图片效果 */
.iyesbox-waterfall-item:hover .iyesbox-waterfall-image-wrapper img {
    filter: brightness(0.65) blur(1.2px) !important;
    transform: scale(1.03) !important;
}

/* 响应式 */
@media (max-width: 768px) {
    .iyesbox-waterfall-container {
        grid-template-columns: repeat(var(--wf-col-768, 2), 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .iyesbox-waterfall-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* 暗色模式优化 */
html[data-theme="dark"] .iyesbox-waterfall-item {
    background: #2a2a2a;
}

html.dark .iyesbox-waterfall-item {
    background: #2a2a2a;
}
