/* ===== work.html 专用布局 (完美瀑布流错落版) ===== */

/* --- 主容器 --- */
.work-main {
    display: flex;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- 左侧侧边栏 (保持不变) --- */
.sidebar {
    width: 28%;
    min-width: 300px;
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    background-color: inherit;
    box-sizing: border-box;
    overflow-y: auto;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* --- 侧边栏内部样式 --- */
.profile-section {
    margin-bottom: 40px;
}

.profile-img-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 16px;
    background-color: #eee;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #1a1a1a;
}

.profile-location {
    font-size: 14px;
    color: #888;
    margin: 0;
}

/* --- 中间表单链接 --- */
.contact-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}
.contact-links p {
    font-size: 13px;
    color: #f17373;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.form-label {
    font-size: 13px;
    color: #888;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 10px;
}

.link-label {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    min-width: 70px;
}

.link-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #1a1a1a;
    padding: 4px 0;
    outline: none;
    font-family: inherit;
}

.link-input::placeholder {
    color: #ccc;
}

.sidebar-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #aaa;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

/* ===== ★★★ 核心修改：右侧瀑布流 (CSS Columns) ===== */
.gallery-section {
    width: 72%;
    padding: 0;
    box-sizing: border-box;
}

.gallery-grid {
    /* 核心：使用 CSS Columns 替代 Grid */
    column-count: 3;
    /* 默认 3 列 */
    column-gap: 0;
    /* 列与列之间没有间隙（如果需要间隙，改成 8px 等） */
    padding: 0;
    margin: 0;
}

.gallery-item {
    /* 关键：防止一个项目被拆分到两列中 */
    break-inside: avoid;
    /* 下面这行是让图片/视频之间完全贴合，不需要额外 margin */
    margin: 0;
    padding: 0;
    display: block;
    position: relative;
    overflow: hidden;
}

/* 视频和图片共用样式 - 自动适配，完美显示，不裁切 */
.media-item {
    width: 100%;
    /* 宽度自动填满所在列 */
    height: auto;
    /* 【关键】高度自动跟随比例，绝不裁切 */
    display: block;
    border-radius: 0;
    /* 完全无缝 */
    object-fit: contain;
    /* 保证内容完整显示，无变形 */
    transition: transform 0.3s ease;
    /* 如果希望图片之间也有极小的间隙，可以加 margin-bottom: 4px; */
}

/* 悬停微缩放 */
.media-item:hover {
    transform: scale(1.03);
    z-index: 1;
}

.gallery-item .hover-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 80px 18px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 240ms ease, transform 240ms ease;
    background: linear-gradient(180deg, rgba(87, 86, 86, 0) 0%, rgba(12, 12, 12, 0.95) 100%);
    color: #fcfcfc;
    font-size: 20px;
    line-height: 1.5;
    text-align: left;
}

.gallery-item:hover .hover-info {
    opacity: 1;
    transform: translateY(0);
}

/* --- 响应式适配 --- */
@media (max-width: 1024px) {
    .gallery-grid {
        column-count: 2;
        /* 平板：2列 */
    }
}

@media (max-width: 768px) {
    .work-main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        padding: 20px;
    }

    .gallery-section {
        width: 100%;
    }

    .gallery-grid {
        column-count: 2;
        /* 手机：2列 */
    }
}

