/* ============================================
   Lightbox - 图片查看器
   ============================================ */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    padding: 20px;
    line-height: 1;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.1em;
}

/* ============================================
   Gallery Grid
   ============================================ */

.gallery-section {
    padding: 60px 0 100px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.gallery-item {
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    background: var(--bg-card);
    aspect-ratio: 16/10;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

/* ============================================
   Project Header
   ============================================ */

.project-header {
    padding: 140px 0 60px;
    text-align: center;
    background: var(--bg-card);
}

.back-link {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--accent);
}

.project-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 500;
    margin-bottom: 12px;
}

.project-location {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

/* ============================================
   Project Navigation
   ============================================ */

.project-nav {
    padding: 60px 0;
    border-top: 1px solid var(--border-subtle);
}

.project-nav .container {
    display: flex;
    justify-content: space-between;
}

.project-nav-link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: color 0.3s ease;
}

.project-nav-link span {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.project-nav-link strong {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
}

.project-nav-link:hover {
    color: var(--accent);
}

.project-nav-link.next {
    text-align: right;
}

/* ============================================
   Mobile Responsive
   ============================================ */

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gallery-item {
        aspect-ratio: 1;
    }

    .lightbox-prev {
        left: 5px;
        font-size: 40px;
    }

    .lightbox-next {
        right: 5px;
        font-size: 40px;
    }

    .project-nav .container {
        flex-direction: column;
        gap: 32px;
    }

    .project-nav-link.next {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
