.gallery-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding-bottom: 32px;
}

.image-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.image-grid img {
    position: relative;
    margin: 0;
    padding: 0;
    width: 80%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    cursor: pointer;
    justify-self: start;
    max-height: 80vh;
    transition: transform 0.5s ease-in-out;
}

.image-grid img:hover {
    transform: scale(95%);
}

.image-grid img.portrait {
    object-fit: cover;
    max-height: none;
    width: auto;
    height: 100%;
}

.credit-text {
    position: fixed;
    bottom: 64px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--news-banner-background);
    background-color: var(--works);
    font-weight: 600;
    padding: 5px;
    padding-left: 16px;
    padding-right: 12px;
    border-radius: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    visibility: visible;
    z-index: 1000;
}

@media (max-width: 710px) {
    .image-grid img {
        width: 100%;
        justify-self: center;
    }
}