/* ==========================================================================
   DIGITAL ART GALLERY STYLES
   ========================================================================== */

/* Header Adjustments */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.back-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

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

/* Gallery Header */
.gallery-header-section {
    text-align: center;
    padding: 4rem 0 2rem;
}

.gallery-title {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.gallery-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
}

/* Gallery Grid (Masonry-like using Grid) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
}

/* Gallery Item */
.gallery-item {
    position: relative;
    overflow: hidden;
    background-color: var(--bg-card);
    border-radius: 4px;
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* Subtle zoom on hover */
.gallery-item:hover .gallery-img {
    transform: scale(1.03);
}

/* Loading State */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    padding: 4rem 0;
    font-weight: 300;
}

.error-state {
    grid-column: 1 / -1;
    text-align: center;
    color: #ef4444;
    padding: 2rem 0;
}

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

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

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border-radius: 2px;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.5rem;
    transition: transform 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
