/* Gallery Styles - Unsplash风格瀑布流布局 */

.gallery-section {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.gallery-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.intro {
    text-align: center;
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* 瀑布流布局 - 使用CSS Grid实现 */
.masonry-gallery {
    column-count: 3;
    column-gap: 1rem;
    width: 100%;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8f9fa;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    display: none;
}

.loading.show {
    display: block;
}

/* 信息卡片 */
.info-card {
    margin-top: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.info-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.info-card p {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .masonry-gallery {
        column-count: 3;
    }
}

@media (max-width: 992px) {
    .masonry-gallery {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .masonry-gallery {
        column-count: 2;
        column-gap: 0.5rem;
    }
    
    .gallery-item {
        margin-bottom: 0.5rem;
    }

    .gallery-section h2 {
        font-size: 2rem;
    }

    .intro {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .masonry-gallery {
        column-count: 1;
    }
}

/* 图片淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    animation: fadeIn 0.5s ease-out;
}

/* 骨架屏加载效果 */
.gallery-item.loading-skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    min-height: 200px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

