.realimo-mg {
	--realimo-bg: #f6f7f9;
	--realimo-bg-main: #121417;
	--realimo-thumb: #D4E3EC;
	--realimo-thumb-active: #ffffff;
	--realimo-text: #1c2330;
	--realimo-accent: #065154;
	--realimo-border: #d8dde4;
	--realimo-radius: 10px;
	font-family: inherit;
	color: var(--realimo-text);
	height: 100%;
	position: relative;
}

.realimo-mg__empty {
	margin: 0;
	padding: 1rem;
	color: inherit;
	opacity: 0.85;
}

.realimo-mg__layout {
	display: flex;
	gap: 10px;
	align-items: stretch;
	min-height: 500px;
	height: 100%;
}

/* ─── Main slide area ─────────────────────────────────────────────────────── */

.realimo-mg__main {
	min-width: 0;
	background: var(--realimo-bg-main);
	border-radius: var(--realimo-radius);
	overflow: hidden;
	position: relative;
	aspect-ratio: 1 / 1;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.realimo-mg__swiper {
	width: 100%;
	height: 100%;
	min-height: 0;
}

.realimo-mg__slide {
	height: 100%;
	display: flex;
	align-items: stretch;
}

.realimo-mg__slide-frame {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.realimo-mg__open-lb {
	appearance: none;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	cursor: pointer;
	color: inherit !important;
	width: 100% !important;
	height: 100% !important;
	display: block;
	text-align: left;
}

.realimo-mg__open-lb--full {
	min-height: 0;
}

.realimo-mg__nav  {
	display: flex;
}

.realimo-mg__open-lb--float {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 3;
	width: 44px;
	height: 44px;
	border-radius: 8px;
	background: rgba(18, 20, 23, 0.75);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.realimo-mg__open-lb--float:hover {
	background: var(--realimo-accent);
}

.realimo-mg__slide-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 0;
	background: var(--realimo-bg-main);
}

.realimo-mg__slide-media {
	display: block;
	width: 100%;
	height: 100% !important;
	max-height: none;
	object-fit: cover;
}

/* Obal médií: MP4 vyplní čtverec slidů; YT/Vimeo 16:9 uvnitř čtverce; 3D plná plocha. */
.realimo-mg__iframe-wrap,
.realimo-mg__video-wrap {
	width: 100%;
	min-height: 0;
	background: #111;
}

.realimo-mg__video-wrap {
	height: 100%;
}

.realimo-mg__iframe-wrap--tour {
	height: 100%;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.realimo-mg__iframe-wrap--video {
	aspect-ratio: 16 / 9;
	height: auto;
	max-height: 100%;
}

.realimo-mg__iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.realimo-mg__video {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
	background: #000;
}

/* ─── Swiper navigation arrows ───────────────────────────────────────────── */

.realimo-mg .swiper-button-prev,
.realimo-mg .swiper-button-next {
	color: #fff;
	width: 54px;
	height: 54px;
	margin-top: 0;
	top: auto;
	bottom: 14px;
	transform: none;
	background: rgba(18, 20, 23, 0.72);
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.24);
	z-index: 5;
	display: flex;
}

.realimo-mg .swiper-button-prev::after,
.realimo-mg .swiper-button-next::after {
	content: "";
	display: block;
	width: 16px;
	height: 16px;
	background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.6893 7.25L6.96967 1.53033L8.03033 0.469666L15.5607 8L8.03033 15.5303L6.96967 14.4697L12.6893 8.75H0.5V7.25H12.6893Z' fill='white'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}

.realimo-mg .swiper-button-prev:hover,
.realimo-mg .swiper-button-next:hover, 
.realimo-mg .swiper-button-prev:focus,
.realimo-mg .swiper-button-next:focus
{
	background: var(--realimo-accent);
	border-color: var(--realimo-accent);
}

.realimo-mg .swiper-button-prev {
	left: auto;
	right: 76px;
}

.realimo-mg .swiper-button-next {
	right: 14px;
}

.realimo-mg .swiper-button-prev::after {
	transform: rotate(180deg);
}

/* ─── Thumbnails ─────────────────────────────────────────────────────────── */

.realimo-mg__thumbs-wrap {
	flex: 0 0 120px;
	align-self: stretch;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.realimo-mg__thumbs {
	display: flex;
	gap: 8px;
	overflow: hidden;
	background: transparent;
	border-radius: var(--realimo-radius);
	padding: 0;
	min-height: 0;
}

.realimo-mg__thumbs--desktop {
	flex-direction: column;
	flex: 1 1 0;
	min-height: 0;
}

.realimo-mg__thumbs--mobile {
	display: none;
}

.realimo-mg__thumb {
	position: relative;
	width: 100%;
	flex: 1 1 0;
	height: auto;
	min-height: 0;
	padding: 0 !important;
	border: 0 !important;
	border-radius: var(--realimo-radius) !important;
	background: var(--realimo-thumb) !important;
	cursor: pointer;
	overflow: hidden;
	color: #3a4352;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	transition: all 0.2s ease;
}

.realimo-mg__thumb:hover img,
.realimo-mg__thumb:hover .realimo-mg__thumb-bg {
	transform: scale(1.05);
}

.realimo-mg__thumb-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	position: relative;
}

.realimo-mg__thumb-inner img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: .3s;
}

.realimo-mg__thumb-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0.92;
	filter: saturate(0.9);
	transition: .3s;
}

.realimo-mg__thumb-badge {
	position: relative;
	z-index: 1;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(18, 20, 23, 0.74);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.realimo-mg__thumb-badge--video svg {
	display: block;
	width: 18px;
	height: 18px;
}

.realimo-mg__thumb-badge--3d {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.realimo-mg__thumb--type-video .realimo-mg__thumb-inner,
.realimo-mg__thumb--type-tour_3d .realimo-mg__thumb-inner {
	justify-content: center;
}

.realimo-mg__thumb--type-video .realimo-mg__thumb-badge,
.realimo-mg__thumb--type-tour_3d .realimo-mg__thumb-badge {
	position: absolute;
	inset: auto auto 8px 8px;
}

.realimo-mg__thumb--type-tour_3d .realimo-mg__thumb-inner {
	background: linear-gradient(145deg, #e5ebf3, #cfd8e6);
}

.realimo-mg__thumb--type-tour_3d .realimo-mg__thumb-inner::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 70% 22%, rgba(255, 255, 255, 0.55), transparent 52%),
		linear-gradient(120deg, rgba(129, 147, 173, 0.18), rgba(33, 48, 72, 0.18));
}

.realimo-mg__thumb--type-tour_3d .realimo-mg__thumb-inner img {
	position: relative;
	z-index: 1;
}

.realimo-mg__thumb--more {
	display: flex;
	align-items: center;
	justify-content: center;
	text-transform: none;
	background: linear-gradient(145deg, #dfe5ed, #ced7e3) !important;
}

.realimo-mg__thumb-more-text {
	font-size: 12px;
	font-weight: 700;
	color: #1a212d;
}

/* ─── Custom lightbox ────────────────────────────────────────────────────── */

.realimo-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	outline: none;
}

.realimo-lb[hidden] {
	display: none;
}

.realimo-lb__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 12, 15, 0.92);
	cursor: pointer;
}

.realimo-lb__close {
	position: fixed;
	top: 18px;
	right: 18px;
	z-index: 2;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 50%;
	background: rgba(18, 20, 23, 0.72);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, border-color 0.2s;
}

.realimo-lb__close:hover {
	background: var(--realimo-accent);
	border-color: var(--realimo-accent);
}

.realimo-lb__prev,
.realimo-lb__next {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 54px;
	height: 54px;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 50%;
	background: rgba(18, 20, 23, 0.72);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}

.realimo-lb__prev {
	left: 18px;
}

.realimo-lb__next {
	right: 18px;
}

.realimo-lb__prev:hover,
.realimo-lb__next:hover {
	background: var(--realimo-accent);
	border-color: var(--realimo-accent);
}

.realimo-lb__prev:disabled,
.realimo-lb__next:disabled {
	opacity: 0.25;
	cursor: default;
	pointer-events: none;
}

.realimo-lb__stage {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: min(92vw, 1280px);
}

.realimo-lb__img {
	display: block;
	max-width: 100%;
	max-height: 90vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 6px;
}

.realimo-lb__iframe,
.realimo-lb__video {
	display: block;
	border: none;
	border-radius: 6px;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
}

.realimo-lb__flag {
	position: fixed;
	bottom: 52px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	max-width: min(92vw, 520px);
	padding: 6px 14px;
	border-radius: 20px;
	background: rgba(10, 12, 15, 0.72);
	color: rgba(255, 255, 255, 0.92);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.03em;
	text-align: center;
	line-height: 1.35;
	pointer-events: none;
}

.realimo-lb__counter {
	position: fixed;
	bottom: 22px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	color: rgba(255, 255, 255, 0.65);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	background: rgba(10, 12, 15, 0.55);
	padding: 4px 12px;
	border-radius: 20px;
}

/* Elementor lightbox — stejný štítek jako u vlastního lightboxu */
.realimo-mg-lb-caption {
	position: fixed;
	bottom: 56px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 100001;
	max-width: min(92vw, 520px);
	padding: 5px 20px;
	border-radius: 20px;
	background: #055B5F;
	color: #ffffff;
	font-family: "Rubik", Sans-serif;
    font-size: 14px;
    font-weight: 400;
	letter-spacing: 0.03em;
	text-align: center;
	line-height: 1.35;
	pointer-events: none;
}

.realimo-mg-lb-caption[hidden] {
	display: none;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
	.realimo-mg__layout {
		flex-direction: column;
	}

	.realimo-mg__thumbs-wrap {
		flex: 0 0 auto;
		width: 100%;
	}

	.realimo-mg__thumbs--desktop {
		display: none !important;
	}

	.realimo-mg__thumbs--mobile {
		display: flex !important;
		flex-direction: row;
		flex: 0 0 auto;
		width: 100%;
		max-height: none;
		overflow: hidden;
		gap: 6px;
		padding-bottom: 0;
		flex-wrap: nowrap;
		justify-content: space-between;
	}

	.realimo-mg__thumbs--mobile .realimo-mg__thumb {
		flex: 1 1 0;
		min-width: 0;
		width: auto;
		height: auto;
		min-height: 0;
		aspect-ratio: 1;
	}

	.realimo-mg__thumbs--mobile .realimo-mg__thumb--more .realimo-mg__thumb-more-text {
		font-size: clamp(10px, 2.8vw, 12px);
		line-height: 1.2;
		text-align: center;
		padding: 0 2px;
		hyphens: auto;
		overflow-wrap: anywhere;
	}

	.realimo-lb__prev {
		left: 8px;
	}

	.realimo-lb__next {
		right: 8px;
	}
}
