/* 作品展示区域样式 */
.our-work-section {
    padding: 60px 0;
    background-color: #fff;
    position: relative;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

.our-work-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 40px;
    box-sizing: border-box;
}

/* 头部样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.header-left {
    max-width: 60%;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #000;
}

.section-desc {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.5;
}

.section-nav {
    display: flex;
    align-items: center;
}

.nav-count {
    margin-right: 20px;
    font-size: 1.4rem;
    color: #333;
    font-weight: 300;
    letter-spacing: 1px;
    position: relative;
    padding-right: 15px;
    border-right: 1px solid #eaeaea;
}

.current-slide {
    font-weight: 600;
    color: #000;
    font-size: 1.8rem;
    margin-right: 3px;
    position: relative;
    top: 2px;
}

.total-slides {
    color: #888;
    font-weight: 300;
}

.nav-arrows {
    display: flex;
    gap: 15px;
}

.nav-arrow {
    width: 44px;
    height: 44px;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    color: #555;
    position: relative;
    overflow: hidden;
}

.arrow-icon {
    position: relative;
    font-size: 1.2rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.prev-work .arrow-icon {
    margin-left: -2px;
}

.next-work .arrow-icon {
    margin-right: -2px;
}

.nav-arrow:hover .arrow-icon {
    transform: scale(1.2);
}

.nav-arrow:hover {
    background: #f7f7f7;
    border-color: #ccc;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.nav-arrow:active {
    transform: translateY(0);
    box-shadow: none;
}

.nav-arrow::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.05);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.nav-arrow:hover::before {
    transform: scale(1);
}

/* 作品展示区 */
.work-showcase {
    display: flex;
    gap: 20px;
    position: relative;
    height: 600px;
    width: 100%;
    max-width: 100%;
}

/* 左侧主要项目 */
.work-main {
    flex: 0 0 65%;
    width: 65%;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 所有幻灯片的基本样式 */
.work-main .work-item {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    border-radius: 8px;
    transform: translateX(100%); /* 默认从右侧进入 */
}

/* 当前活动幻灯片 */
.work-main .work-item.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 2;
}

/* 上一张幻灯片 */
.work-main .work-item.prev {
    transform: translateX(-100%);
    opacity: 0;
    z-index: 1;
}

/* 下一张幻灯片 */
.work-main .work-item.next {
    transform: translateX(100%);
    opacity: 0;
    z-index: 1;
}

/* 右侧缩略图区域 */
.work-thumbnails {
    flex: 0 0 33%;
    width: 33%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

.work-thumbnails .work-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s ease;
    height: 48%;
}

.work-thumbnails .work-item:hover {
    transform: translateY(-5px);
}

.work-thumbnails .work-item:first-child {
    height: 55%;
}

.work-thumbnails .work-item:nth-child(2) {
    height: 45%;
}

/* 图片样式 */
.work-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-item:hover .work-image img {
    transform: scale(1.05);
}

/* 内容覆盖层 */
.work-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    z-index: 3;
}

.work-content h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.work-content p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 90%;
}

/* "查看我们的项目"按钮 */
.see-projects {
    display: inline-flex;
    align-items: center;
    color: #000;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 40px;
}

.see-projects:hover {
    background: #f5f5f5;
}

.see-projects .arrow {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.see-projects:hover .arrow {
    transform: translateX(5px);
}

/* 淡入淡出动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 从左向右滑动 */
@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* 从右向左滑动 */
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* 向左滑出 */
@keyframes slideOutLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

/* 向右滑出 */
@keyframes slideOutRight {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

/* 应用动画的类 */
.slide-in-left {
    animation: slideInLeft 0.7s forwards;
}

.slide-in-right {
    animation: slideInRight 0.7s forwards;
}

.slide-out-left {
    animation: slideOutLeft 0.7s forwards;
}

.slide-out-right {
    animation: slideOutRight 0.7s forwards;
}

.fade-in {
    animation: fadeIn 0.5s forwards;
}

.fade-out {
    animation: fadeOut 0.5s forwards;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .work-showcase {
        flex-direction: column;
        height: auto;
    }
    
    .work-main {
        flex: none;
        height: 500px;
        width: 100%;
    }
    
    .work-thumbnails {
        flex: none;
        flex-direction: row;
        height: 250px;
        width: 100%;
    }
    
    .work-thumbnails .work-item {
        height: 100%;
        width: 48%;
    }
    
    .work-thumbnails .work-item:first-child {
        height: 100%;
        width: 52%;
    }
    
    .work-thumbnails .work-item:nth-child(2) {
        height: 100%;
        width: 48%;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    /* 确保work-item的内容正确布局 */
    .work-main .work-item {
        height: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .our-work-container {
        padding: 0 20px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-left {
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-desc {
        font-size: 1rem;
    }
    
    .work-main {
        height: 400px;
        width: 100%;
        border-radius: 8px;
        overflow: hidden;
        touch-action: pan-y;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .work-main:active {
        cursor: grabbing;
    }
    
    .work-thumbnails {
        height: auto;
        width: 100%;
        display: none; /* 在移动端隐藏缩略图区域 */
    }
    
    .work-thumbnails .work-item {
        height: 200px;
    }
    
    .work-content h3 {
        font-size: 1.4rem;
    }
    
    /* 修复移动端work-item显示问题 */
    .work-main .work-item {
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 8px;
        overflow: hidden;
        will-change: transform, opacity;
        backface-visibility: hidden;
    }
    
    .work-image {
        width: 100%;
        height: 100%;
        border-radius: 8px;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }
    
    .work-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scale(1.01); /* 防止图片边缘出现白边 */
    }
    
    /* 增强内容可读性 */
    .work-content {
        background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.1) 100%);
        padding-top: 60px; /* 增加渐变区域 */
        bottom: 0;
        border-radius: 0 0 8px 8px;
    }
}

/* 为移动端添加更多细节优化 */
@media (max-width: 576px) {
    .work-main {
        height: 350px;
    }
    
    .work-main .work-item {
        height: 100%;
    }
    
    .work-image {
        height: 100%;
        position: relative;
    }
    
    .work-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transform: scale(1.01); /* 防止图片边缘出现白边 */
    }
    
    .work-content {
        padding: 40px 15px 15px;
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 80%, rgba(0,0,0,0) 100%);
    }
    
    .work-content h3 {
        font-size: 1.2rem;
        margin-bottom: 5px;
        text-shadow: 0 1px 3px rgba(0,0,0,0.8); /* 增加文字阴影提高可读性 */
    }
    
    .work-content p {
        font-size: 0.9rem;
        max-width: 100%;
        text-shadow: 0 1px 2px rgba(0,0,0,0.8); /* 增加文字阴影提高可读性 */
    }
    
    .section-nav {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-count {
        margin-right: 15px;
        font-size: 1.2rem;
    }
    
    .nav-arrow {
        width: 36px;
        height: 36px;
    }
    
    .see-projects {
        padding: 8px 16px;
        font-size: 0.9rem;
        margin-top: 20px;
    }
    
    /* 平滑过渡效果 */
    .work-main .work-item.active {
        transition: transform 0.5s ease, opacity 0.4s ease;
    }
    
    /* 处理超小屏幕 */
    @media (max-width: 320px) {
        .work-main {
            height: 280px;
        }
        
        .work-content h3 {
            font-size: 1.1rem;
        }
        
        .work-content p {
            font-size: 0.85rem;
        }
    }
}

/* 图片加载状态 */
.work-image img.loading {
    opacity: 0.7;
    filter: blur(5px);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.work-image img.loaded {
    opacity: 1;
    filter: blur(0);
} 