/* Gallery Page Styles */

.gallery-page {
    padding: var(--spacing-4xl) 0;
    min-height: 100vh;
}

/* Gallery Header */
.gallery-header {
    margin-bottom: var(--spacing-3xl);
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.back-button:hover {
    transform: translateX(-5px);
}

.back-button svg {
    width: 28px;
    height: 28px;
}

.gallery-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: var(--font-size-6xl);
    line-height: 1.017;
    color: var(--color-white);
    text-transform: uppercase;
    margin: 0;
}

/* Gallery Credit */
.gallery-credit {
    margin-bottom: var(--spacing-3xl);
    text-align: center;
    padding-bottom: var(--spacing-2xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-credit-text {
    font-family: 'Helvetica Now Display', sans-serif;
    font-weight: 400;
    font-size: var(--font-size-base);
    color: var(--color-white);
    margin: 0;
    line-height: 1.6;
}

/* Gallery Grid - Dynamic Masonry Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

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

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.4s ease;
    cursor: pointer;
}

/* Dynamic sizing for more interesting layout */
.gallery-item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item-wide {
    grid-column: span 2;
}

.gallery-item-tall {
    grid-row: span 2;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

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

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 10001;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev svg,
.lightbox-next svg {
    width: 24px;
    height: 24px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 18px;
        max-width: 100%;
    }
    
    .gallery-item-large {
        grid-column: span 2;
    }
    
    .gallery-title {
        font-size: 38px;
    }
}

@media (max-width: 968px) {
    .gallery-page {
        padding: var(--spacing-2xl) 0;
    }
    
    .gallery-header {
        margin-bottom: var(--spacing-2xl);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .gallery-item-large,
    .gallery-item-wide {
        grid-column: span 1;
    }
    
    .gallery-title {
        font-size: 32px;
    }
    
    .lightbox-close {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev {
        left: 20px;
    }
    
    .lightbox-next {
        right: 20px;
    }
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .gallery-item-large,
    .gallery-item-wide,
    .gallery-item-tall {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .gallery-title {
        font-size: 28px;
    }
    
    .gallery-header {
        gap: var(--spacing-md);
    }
    
    .lightbox-image {
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .gallery-title {
        font-size: 24px;
    }
}

