* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: #fff;
    padding: 10px;
}

img, video {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    display: inline-block;
}

.grid-wrapper > div, .video-gallery > div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid-wrapper > div > img, 
.video-gallery > div > video {
    width: auto; /* instead of 100% */
    height: auto;
    max-width: 100%;
    object-fit: contain; /* instead of cover */
}

.grid-wrapper {
    display: grid;
    grid-gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-flow: dense;
    /* removed grid-auto-rows */
}

.video-gallery {
    display: grid;
    grid-gap: 40px; /* Increased gap between videos */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-rows: 200px;
    grid-auto-flow: dense;
    margin-top: 40px; /* Add space above the video gallery */
}

.grid-wrapper .wide, .video-gallery .wide {
    grid-column: span 2;
}

.grid-wrapper .tall, .video-gallery .tall {
    grid-row: span 2;
}

.grid-wrapper .big, .video-gallery .big {
    grid-column: span 2;
    grid-row: span 2;
}
