.collect {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-image: url('../img/org_bg.jpg');
    background-repeat: no-repeat; /* 背景图片不重复 */
    background-size: cover; /* 背景图片覆盖整个容器 */
    background-position: center; /* 背景图片居中显示 */
}


.collect-container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 800px; /* 最小高度而非固定高度 */
    height: auto; /* 自适应高度 */
    padding: 20px 0; /* 添加内边距使内容不贴边 */
}

.collect .section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #ffffff;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: #c89f63;
    margin: 15px auto;
}


/* 图片网格布局 - 一行展示8个 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    padding: 50px 50px 50px 50px;
    background-color: white; /* 添加白色背景 */
}

/* 图片项样式 */
.image-item {
    overflow: hidden;
    box-shadow: none; /* 移除阴影 */
    transition: transform 0.3s ease;
    cursor: pointer;
}


.image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 10; /* 确保悬停时图片在最上层 */
}

.image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 20px;
}

.modal-slider {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 80%;
}

.modal-image {
    max-width: 120%;
    max-height: 120%;
    object-fit: contain;
    padding: 10px 10px 10px 10px;
    background-color: white;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    padding: 16px;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
    z-index: 1001;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close:hover {
    color: #ccc;
}

.modal-indicators {
    color: white;
    font-size: 18px;
    font-weight: 500;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
    z-index: 1001;
    margin-top: -20px; /* 从20px减小到10px，使提示更靠近图片 */
}

/* 响应式设计 - 在小屏幕上调整列数 */
@media (max-width: 1200px) {
    .image-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 992px) {
    .image-grid {
        grid-template-columns: repeat(4, 1fr);
    }

}

@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1px; /* 在小屏幕上减小间隙 */
    }

    .image-item img {
        height: 120px;
    }

    .modal-image {
        max-width: 95%;
        max-height: 70%;
    }

    .prev, .next {
        width: 40px;
        height: 40px;
        font-size: 18px;
        padding: 12px;
    }

    .close {
        font-size: 30px;
        top: 15px;
        right: 20px;
    }

    .modal-indicators {
        font-size: 16px;
        bottom: 15px;
    }
}

@media (max-width: 576px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-slider {
        height: 70%;
    }

    .prev {
        left: 10px;
    }

    .next {
        right: 10px;
    }
}