#split-cell-8 {
    width: 100%;
    height: 100%;
    display: block;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

#split-cell-8::-webkit-scrollbar {
    display: none;
}

#gallery-container {
    column-count: 4;
    column-gap: 0.75rem;
    padding: 5%;
    width: 100%;
    min-height: 100%;
    background: var(--color-bg);
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 0.75rem;
    position: relative;
    overflow: hidden;
    background: var(--color-bg);
    border: 1px solid var(--color-grid-line);
}

.gallery-item img,
.gallery-item video {
    display: block;
    width: 100%;
    height: auto;
    transition: filter 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
    filter: blur(6px);
}

.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 1.25rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover .caption {
    transform: translateY(0);
}

@media (max-width: 1100px) {
    #gallery-container {
        column-count: 3;
        min-height: auto;
    }

    #split-cell-8 {
        height: auto;
        overflow-y: visible;
    }
}

@media (max-width: 800px) {
    #gallery-container {
        column-count: 2;
    }
}

@media (max-width: 500px) {
    #gallery-container {
        column-count: 1;
    }
}