.ak_gallery-wrapper {
	position: relative;
}

.ak_video_gallery {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	gap: 15px;
	scroll-snap-type: x mandatory;
	padding-bottom: 10px;
}

.ak_video_gallery::-webkit-scrollbar {
	display: none;
}

.video-thumbnail {
	position: relative;
	flex: 0 0 auto;
	width: 300px;
	height: 180px;
	scroll-snap-align: start;
	cursor: pointer;
}

.thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 0;
}

.video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.3s ease;
	border-radius: 0;
}

.video-thumbnail:hover .video {
	opacity: 1;
}

.video-thumbnail:hover .thumb {
	opacity: 0;
}

/* Modal styles */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.video-modal-content {
    position: relative;
    width: 90vw;
    height: 90vh;
    max-width: 100%;
    max-height: 100%;
}

.video-modal-content video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
    background: black;
}

.video-modal-close {
   position: absolute;
    top: -15px;
    right: -10px;
    font-size: 32px;
    color: white;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    padding: 0 0;
    border-radius: 100%;
    line-height: 32px;
    z-index: 99;
    width: 35px;
    height: 35px;
    text-align: center;
}

/* Arrows for mobile */
.ak_slider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0,0,0,0.5);
	color: white;
	border: none;
	padding: 10px;
	font-size: 24px;
	cursor: pointer;
	z-index: 10;
	border-radius: 100%;
    width: 40px;
    height: 40px;
    line-height: 22px;
    text-align: center;
}

.ak_slider-arrow.left {
	left: 0;
}

.ak_slider-arrow.right {
	right: 0;
}

@media (min-width: 768px) {
	.ak_video_gallery {
		flex-wrap: wrap;
		overflow-x: visible;
		scroll-snap-type: none;
	}

	.video-thumbnail {
		width: calc(25% - 12px);
		height: auto;
	}

	.ak_slider-arrow {
		display: none;
	}
	.ak_slider-arrow.left {
	  left: -10px;
	}

	.ak_slider-arrow.right {
		right: -10px;
	}
}