/******************* MASONRY AND ARTWORK STYLES *******************/

/* Utility classes */
.margin-top {
    margin-top: 2.25rem;
}

/******************* IMAGE LOADING STATES *******************/

/* Pixel thumbnail state - used during initial loading */
img.pixel-thumbnail,
.pixel-thumbnail img {
    image-rendering: pixelated;
}

/* Full image state - used after lazy loading completes */
img.full-image,
.full-image img {
    /* Remove pixelated rendering for smooth full-res images */
    image-rendering: auto;
}

/* Base artwork image styling */
.artwork-image {
    width: 100%;
    height: auto;
    display: block;
    /* Start with pixelated rendering for all artwork images */
    image-rendering: pixelated;
}

/* Full image state - remove pixelated rendering when full res loads */
.artwork-image.full-image {
    image-rendering: auto;
}

/******************* MASONRY LAYOUT *******************/

.masonry-grid {
    display: flex;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 6rem 0;
}

@media (min-width: 1200px) {
    .masonry-grid {
        gap: 1.5rem;
        /* Larger gap for large screens */
    }
}

.masonry-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.artwork-item {
    margin-bottom: 0;
    display: block;
    width: 100%;
}

.artwork-container {
    margin-bottom: 0;
}

.artwork-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 0.25rem 0.3rem 0.25rem;
}

.artwork-title {
    font-size: 0.8rem;
    margin: 0;
    text-align: left;
}

.artwork-year {
    font-size: 0.8rem;
    text-align: right;
}

.artwork-card {
    border: 1px solid black;
    -webkit-transition: all 200ms ease;
    transition: all 200ms ease;
    cursor: pointer;
}

.artwork-card.hover-extrude-md:hover {
    border: 1px solid var(--bs-primary);
    -webkit-transform: translate(3px, -3px);
    -moz-transform: translate(3px, -3px);
    -ms-transform: translate(3px, -3px);
    transform: translate(3px, -3px);
    box-shadow: -5px 5px 0 var(--bs-primary);
}

.artwork-item img {
    width: 100%;
    height: auto;
    display: block;
}

.artwork-placeholder {
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/******************* ANIMATIONS *******************/

/* Loading animations */
.artwork-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/******************* RESPONSIVE UTILITIES *******************/

@media(min-width: 576px) {
    .grid.grid-normal-button-width {
        display: flex;
        justify-content: center
    }
}