/* 图片展示相关样式 */

/* 图片库 */
.image-gallery {
    display: grid;
    /* 调整为固定3列布局，适合电脑端显示 */
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* 添加高度自适应 */
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 220px; /* 稍微增加高度使图片更加突出 */
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* 轮播图 */
.slider-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto 30px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.slider-wrapper {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    overflow: hidden;
}

.slider-item.active {
    opacity: 1;
    visibility: visible;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.slider-caption span {
    display: block;
    font-size: 18px;
    font-weight: 500;
    padding: 5px 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.slider-item:hover .slider-caption {
    transform: translateY(0);
}

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
    padding: 0;
    margin: 0;
}

.slider-dot.active {
    background: #fff;
}

.slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
    border: none;
}

.slider-control:hover {
    background: rgba(0,0,0,0.7);
}

.slider-control.prev {
    left: 10px;
}

.slider-control.next {
    right: 10px;
}

.slider-control svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* 弹出层/灯箱 */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.show {
    opacity: 1;
    visibility: visible;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.lightbox-close:hover {
    color: #ddd;
}

.lightbox-caption {
    margin-top: 15px;
    color: #fff;
    text-align: center;
    font-size: 16px;
    max-width: 600px;
    padding: 10px;
    background: rgba(0,0,0,0.7);
    border-radius: 4px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 查看全部图片按钮 */
.view-all-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto 30px;
    text-align: center;
}

.view-all-btn a,
.btn-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 10px 20px;
    border-radius: 30px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    border: 1px solid #dedede;
}

.view-all-btn a:hover,
.btn-view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    color: #6a0dad; /* 紫色 */
}

.view-all-btn a svg,
.view-all-btn a .icon-arrow-right,
.btn-view-all svg,
.btn-view-all .icon-arrow-right {
    width: 24px;
    height: 24px;
    margin-left: 10px;
    stroke: #6a0dad; /* 紫色 */
    transition: transform 0.3s ease;
}

.view-all-btn a:hover svg,
.view-all-btn a:hover .icon-arrow-right,
.btn-view-all:hover svg,
.btn-view-all:hover .icon-arrow-right {
    transform: translateX(5px);
}

/* 创意图库样式 */
.creative-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 固定3列布局 */
    gap: 20px;
    margin-bottom: 30px;
}

/* 首页图集专用样式 */
.gallery-homepage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.creative-gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 250px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.creative-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.creative-gallery-image {
    width: 100%;
    height: 100%;
}

.creative-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.creative-gallery-item:hover .creative-gallery-image img {
    transform: scale(1.05);
}

.creative-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    padding: 10px;
    color: #fff;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.creative-gallery-item:hover .creative-gallery-caption {
    transform: translateY(0);
}

.creative-gallery-caption h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 响应式样式 */
@media (max-width: 992px) {
    .creative-gallery,
    .gallery-homepage {
        grid-template-columns: repeat(2, 1fr); /* 平板端显示2列 */
        gap: 15px;
    }
    
    .creative-gallery-item {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .creative-gallery,
    .gallery-homepage {
        grid-template-columns: repeat(2, 1fr); /* 小平板保持2列 */
        gap: 10px;
    }
    
    .creative-gallery-item {
        height: 180px;
    }
    
    .creative-gallery-caption h3 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    /* 通用图集样式 */
    .creative-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
        width: 100%;
    }
    
    /* 首页图集专用样式 */
    .gallery-homepage {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
        width: 100%;
    }
    
    .gallery-homepage .creative-gallery-item {
        height: 150px !important;
        max-height: 150px;
        min-height: 150px;
        width: 100%;
        margin: 0;
    }
    
    .gallery-homepage .creative-gallery-image {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
    
    .gallery-homepage .creative-gallery-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
    }
    
    /* 首页图集标题样式 */
    .gallery-homepage .creative-gallery-caption {
        transform: translateY(0);
        padding: 8px 5px;
        background: rgba(0,0,0,0.7);
    }
    
    .gallery-homepage .creative-gallery-caption h3 {
        font-size: 14px;
        margin: 0;
    }
}

/* 查看历史记录按钮美化 */
.view-history-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 6px;
    background: linear-gradient(135deg, #2980b9, #1c5f8e);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.view-history-btn:before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.7s ease;
}

.view-history-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.view-history-btn:hover:before {
    left: 100%;
}

.view-history-btn svg {
    width: 20px;
    height: 20px;
    margin-left: 8px;
    fill: none;
    stroke: #fff;
    transition: transform 0.3s ease;
}

.view-history-btn:hover svg {
    transform: translateX(3px);
}

/* 响应式样式 */
@media (max-width: 480px) {
    .view-history-btn {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .view-history-btn svg {
        width: 18px;
        height: 18px;
        margin-left: 6px;
    }
} 