/* 相册页头 */
.gallery-hero {
    height: 50vh;
    background: linear-gradient(135deg, #d32f2f 0%, #ff6f00 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.gallery-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    animation: fadeInUp 1s ease-out;
}

.gallery-hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.gallery-hero-content p {
    font-size: 20px;
    opacity: 0.95;
}

/* 分类标签 */
.gallery-tabs {
    background: white;
    padding: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 70px;
    z-index: 100;
}

.tabs-wrapper {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tab-btn {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

/* 相册网格 */
.gallery-section {
    padding: 80px 0;
    background: var(--light-bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.gallery-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    opacity: 1;
    transform: scale(1);
}

.gallery-item.hidden {
    display: none;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(211, 47, 47, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 40px;
}

.gallery-caption {
    padding: 20px;
}

.gallery-caption h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.gallery-caption p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* 图片灯箱 */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    color: white;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.lightbox-close {
    top: 30px;
    right: 30px;
    font-size: 32px;
}

.lightbox-prev {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 18px;
    max-width: 80%;
    text-align: center;
}

/* 导航栏激活状态 */
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .gallery-hero {
        height: 40vh;
    }
    
    .gallery-hero-content h1 {
        font-size: 32px;
    }
    
    .gallery-hero-content p {
        font-size: 16px;
    }
    
    .gallery-tabs {
        top: 60px;
        padding: 20px 0;
    }
    
    .tab-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-section {
        padding: 40px 0;
    }
    
    .lightbox img {
        max-width: 95%;
        max-height: 80vh;
    }
    
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .lightbox-prev {
        left: 15px;
    }
    
    .lightbox-next {
        right: 15px;
    }
    
    .lightbox-caption {
        bottom: 15px;
        font-size: 14px;
        padding: 10px 20px;
        max-width: 90%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

