.video-row { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin: 20px auto; max-width: 1000px; padding: 0 10px; } .video-column { position: relative; width: 128px; height: 128px; overflow: hidden; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; } .video-column:hover { transform: scale(1.1); box-shadow: 0 6px 18px rgba(0,0,0,0.3); } .video-bg { width: 100%; height: 100%; object-fit: cover; /* Crops to fill 128x128 */ border-radius: 12px; } /* Play button centered in 128x128 */ .play-button { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; background: rgba(255, 255, 255, 0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 2; } .play-button:before { content: ''; display: inline-block; margin-left: 3px; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #000; } /* Responsive: Stack on small screens */ @media (max-width: 480px) { .video-row { flex-direction: column; align-items: center; } .video-column { margin: 10px 0; } } Your browser does not support the video tag. Your browser does not support the video tag. Your browser does not support the video tag. // Optional: Click to pause/play document.querySelectorAll('.video-column').forEach(column => { const video = column.querySelector('video'); const button = column.querySelector('.play-button'); column.addEventListener('click', () => { if (video.paused) { video.play(); button.style.opacity = 0; } else { video.pause(); button.style.opacity = 1; } }); video.addEventListener('play', () => button.style.opacity = 0); video.addEventListener('pause', () => button.style.opacity = 1); });