.gallery {
    display: flex;
    overflow-x: scroll;
    white-space: nowrap;
    width: 1200px;
    box-sizing: border-box;
    cursor: default;
    overflow-y: hidden;
}

.gallery img {
    width: 400px;
    height: 225px;
    margin: 10px;
    border-radius: 10px;
    display: inline-block;
    cursor: pointer;
}


.gallery img.expanded {
    height: auto;
    width: 70vw;
    margin: 0;
    max-width: 80vw;
    z-index: 10000;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 500px rgb(0, 0, 0);
    pointer-events: auto;
}

body.no-scroll {
    overflow: hidden;
}

body.no-scroll .gallery img.expanded {
    pointer-events: auto;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Darken the background */
    z-index: 9999; /* Below the expanded image */
    display: none; /* Hidden by default */
    cursor: pointer;
}

.overlay.active {
    display: block; /* Show when active */
}

.gallery::-webkit-scrollbar {
    height: 8px; /* Adjust the height of the scrollbar */
}

.gallery::-webkit-scrollbar-track {
    background: #f1f1f1; /* Background of the scrollbar track */
    border-radius: 10px; /* Rounded corners for the track */
}

.gallery::-webkit-scrollbar-thumb {
    background: #888; /* Color of the scrollbar thumb */
    border-radius: 10px; /* Rounded corners for the thumb */
}

.gallery::-webkit-scrollbar-thumb:hover {
    background: #555; /* Color of the scrollbar thumb on hover */
}

.gallery {
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: #888888 #f1f1f1; /* For Firefox */
}

@media screen and (max-width: 1300px) {
    .gallery {
        width: 100%;
    }
    .gallery img.expanded {
        width: 90vw;
    }
}