.mgt-gallery { 
	--mgt-thumb-ratio: 9/16;
	overflow: hidden;
}

.mgt-main { 
	overflow: hidden;
	width: calc(100% - 8px);
	margin: 0 auto;
}

.mgt-embed,
.mgt-html5-wrap {
	width: 100%;
}

.mgt-embed iframe {
	height: 100%;
}

.mgt-main .splide__slide { display:flex; }
.mgt-main img,
.mgt-main video {
	width: 100%;
	height: 400px;
	display: block;
	object-fit: cover;
}

.mgt-thumbs { margin-top: 14px; }
.mgt-thumbs .splide__track { overflow: visible; }

.mgt-thumbs .splide__list {
	padding-left: 4px !important;
	padding-right: 4px !important;
}

.mgt-thumb {
	position: relative;
	aspect-ratio: calc(1 / var(--mgt-thumb-ratio));
	overflow: hidden;
	border-radius: inherit;
	outline: 2px solid transparent;
	box-shadow: 0 0 0 2px transparent inset;
}

.mgt-gallery .splide__track--nav>.splide__list>.splide__slide,
.mgt-gallery .splide__track--nav>.splide__list>.splide__slide.is-active {
	border: 0;
}

.mgt-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* “Play” бейдж для відео */
.mgt-play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 42px; height: 42px;
	border-radius: 50%;
	display: grid; place-items: center;
	cursor: pointer;
}

/* Активний thumb — рамка #F8C12D */
.mgt-thumbs .splide__slide.is-active .mgt-thumb{
	outline-color: #F8C12D;
	outline-width: 4px;
	box-shadow: 0 0 0 2px #F8C12D inset;
}

/* легка підсвітка при hover */
.mgt-thumbs .splide__slide:hover .mgt-thumb{
	filter: brightness(1.02);
}

@media (max-width: 1024px) {
	.mgt-main img,
	.mgt-main video {
		height: 300px;
	}
}

@media (max-width: 768px) {
	.mgt-main img,
	.mgt-main video {
		height: 200px;
	}
	.mgt-thumb {
		aspect-ratio: 1/1;
	}
}