/* =========================================================
 * JHR Media Carousel
 * ======================================================= */

.jhr-media-carousel {
	--jhr-mc-arrow-size: 20px;
	--jhr-mc-arrow-color: #ffffff;
	--jhr-mc-dot-size: 6px;
	--jhr-mc-dot-gap: 6px;
	--jhr-mc-dot-color: rgba(0, 0, 0, .35);
	--jhr-mc-dot-active-color: rgba(0, 0, 0, .85);
	--jhr-mc-fraction-size: 14px;
	--jhr-mc-play-size: 48px;
	--jhr-mc-play-color: #ffffff;

	position: relative;
	max-width: 100%;
}

.jhr-mc-wrapper-link {
	display: block;
	text-decoration: none;
}

/* ---------------------------------------------------------
 * Scoped Swiper core rules.
 *
 * The module does not enqueue Elementor's Swiper stylesheet — the v5 and v8
 * builds ship different class names and loading the wrong one silently breaks
 * the layout. Everything Swiper needs is duplicated here under
 * .jhr-media-carousel, so nothing leaks out to Elementor's own carousels.
 * ------------------------------------------------------ */
.jhr-media-carousel .jhr-mc-swiper {
	position: relative;
	overflow: hidden;
	list-style: none;
	padding: 0;
	margin: 0 auto;
	z-index: 1;
	display: block;
}

.jhr-media-carousel .swiper-wrapper {
	position: relative;
	width: 100%;
	height: 100%;
	z-index: 1;
	display: flex;
	box-sizing: content-box;
	transition-property: transform;
	transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
	transform: translate3d(0px, 0, 0);
}

.jhr-media-carousel .swiper-slide {
	flex-shrink: 0;
	width: 100%;
	height: 100%;
	position: relative;
	transition-property: transform;
	display: block;
}

.jhr-media-carousel .swiper-slide-invisible-blank {
	visibility: hidden;
}

.jhr-media-carousel .swiper-android .swiper-slide,
.jhr-media-carousel .swiper-wrapper {
	transform: translate3d(0px, 0, 0);
}

/* 3D effects — coverflow, cube, flip */
.jhr-media-carousel .swiper-3d {
	perspective: 1200px;
}

.jhr-media-carousel .swiper-3d .swiper-wrapper,
.jhr-media-carousel .swiper-3d .swiper-slide,
.jhr-media-carousel .swiper-3d .swiper-cube-shadow {
	transform-style: preserve-3d;
}

.jhr-media-carousel .swiper-css-mode > .swiper-wrapper {
	overflow: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.jhr-media-carousel .swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {
	display: none;
}

/* Fade effect */
.jhr-media-carousel .swiper-fade .swiper-slide {
	pointer-events: none;
	transition-property: opacity;
}

.jhr-media-carousel .swiper-fade .swiper-slide .swiper-slide {
	pointer-events: none;
}

.jhr-media-carousel .swiper-fade .swiper-slide-active,
.jhr-media-carousel .swiper-fade .swiper-slide-active .swiper-slide-active {
	pointer-events: auto;
}

/* Flip / cube */
.jhr-media-carousel .swiper-flip .swiper-slide,
.jhr-media-carousel .swiper-cube .swiper-slide {
	pointer-events: none;
	backface-visibility: hidden;
	z-index: 1;
}

.jhr-media-carousel .swiper-flip .swiper-slide-active,
.jhr-media-carousel .swiper-cube .swiper-slide-active {
	pointer-events: auto;
}

.jhr-media-carousel .swiper-notification {
	position: absolute;
	left: 0;
	top: 0;
	pointer-events: none;
	opacity: 0;
	z-index: -1000;
}

/* ---------------------------------------------------------
 * Slide
 * ------------------------------------------------------ */
.jhr-media-carousel .jhr-mc-slide-inner {
	display: block;
	position: relative;
	width: 100%;
	height: 400px;
	overflow: hidden;
	border-width: 0;
	border-style: solid;
	border-color: transparent;
	box-sizing: border-box;
	text-decoration: none;
}

.jhr-media-carousel .jhr-mc-has-lightbox,
.jhr-media-carousel a.jhr-mc-slide-inner {
	cursor: pointer;
}

.jhr-media-carousel .jhr-mc-image {
	position: absolute;
	inset: 0;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	transition: transform .3s;
}

/* ---------------------------------------------------------
 * Play icon overlay
 * ------------------------------------------------------ */
.jhr-media-carousel .jhr-mc-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: var(--jhr-mc-play-size);
	height: var(--jhr-mc-play-size);
	color: var(--jhr-mc-play-color);
	pointer-events: none;
	z-index: 2;
	transition: opacity .3s, transform .3s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.jhr-media-carousel .jhr-mc-play svg {
	width: 100%;
	height: 100%;
	display: block;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .35));
}

/* ---------------------------------------------------------
 * Text overlay
 * ------------------------------------------------------ */
.jhr-media-carousel .jhr-mc-overlay-text {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 15px;
	color: #fff;
	background-color: rgba(0, 0, 0, .5);
	text-align: center;
	z-index: 2;
	pointer-events: none;
	transition: opacity .3s;
	box-sizing: border-box;
}

/* Reveal overlays only on hover, when enabled */
.jhr-media-carousel.jhr-mc-overlay-hover .jhr-mc-overlay-text,
.jhr-media-carousel.jhr-mc-overlay-hover .jhr-mc-slide:not(.jhr-mc-slide-video) .jhr-mc-play {
	opacity: 0;
}

.jhr-media-carousel.jhr-mc-overlay-hover .jhr-mc-slide-inner:hover .jhr-mc-overlay-text,
.jhr-media-carousel.jhr-mc-overlay-hover .jhr-mc-slide-inner:hover .jhr-mc-play {
	opacity: 1;
}

/* ---------------------------------------------------------
 * Arrows
 * ------------------------------------------------------ */
.jhr-media-carousel .jhr-mc-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: calc(var(--jhr-mc-arrow-size) * 1.6);
	height: calc(var(--jhr-mc-arrow-size) * 1.6);
	color: var(--jhr-mc-arrow-color);
	cursor: pointer;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	transition: opacity .2s;
	/* Neutralise Elementor's own swiper button styling */
	margin: 0;
	padding: 0;
}

.jhr-media-carousel .jhr-mc-arrow::after {
	content: none !important;
}

.jhr-media-carousel .jhr-mc-arrow svg {
	width: var(--jhr-mc-arrow-size);
	height: var(--jhr-mc-arrow-size);
	display: block;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3));
}

.jhr-media-carousel .jhr-mc-prev {
	left: 10px;
	right: auto;
}

.jhr-media-carousel .jhr-mc-next {
	right: 10px;
	left: auto;
}

.jhr-media-carousel .jhr-mc-arrow.swiper-button-disabled {
	opacity: .35;
	cursor: default;
}

/* ---------------------------------------------------------
 * Pagination
 * ------------------------------------------------------ */
.jhr-media-carousel .jhr-mc-pagination.swiper-pagination {
	position: static;
	width: 100%;
	text-align: center;
	line-height: 1;
	margin-top: 10px;
	z-index: 5;
}

.jhr-media-carousel.jhr-mc-pagination-inside .jhr-mc-pagination.swiper-pagination {
	position: absolute;
	bottom: 10px;
	left: 0;
	margin-top: 0;
}

.jhr-media-carousel .jhr-mc-pagination .swiper-pagination-bullet {
	width: var(--jhr-mc-dot-size);
	height: var(--jhr-mc-dot-size);
	background: var(--jhr-mc-dot-color);
	opacity: 1;
	margin: 0 calc(var(--jhr-mc-dot-gap) / 2) !important;
	display: inline-block;
	border-radius: 50%;
	cursor: pointer;
	transition: background .2s;
}

.jhr-media-carousel .jhr-mc-pagination .swiper-pagination-bullet-active {
	background: var(--jhr-mc-dot-active-color);
}

.jhr-media-carousel .jhr-mc-pagination.swiper-pagination-fraction {
	font-size: var(--jhr-mc-fraction-size);
	color: var(--jhr-mc-dot-active-color);
}

.jhr-media-carousel .jhr-mc-pagination.swiper-pagination-progressbar {
	height: 4px;
	background: var(--jhr-mc-dot-color);
	position: relative;
	overflow: hidden;
}

.jhr-media-carousel .jhr-mc-pagination .swiper-pagination-progressbar-fill {
	background: var(--jhr-mc-dot-active-color);
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	transform: scale(0);
	transform-origin: left top;
}

.jhr-media-carousel.jhr-mc-pagination-inside .jhr-mc-pagination.swiper-pagination-progressbar {
	bottom: 0;
}

/* =========================================================
 * Lightbox
 * ======================================================= */
.jhr-mc-lightbox {
	--jhr-lb-bg: rgba(0, 0, 0, .8);
	--jhr-lb-ui: #ffffff;
	--jhr-lb-ui-hover: #d4d4d4;
	--jhr-lb-video-width: 100%;

	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
}

.jhr-mc-lightbox.jhr-mc-lb-open {
	display: flex;
}

.jhr-mc-lightbox .jhr-mc-lb-bg {
	position: absolute;
	inset: 0;
	background-color: var(--jhr-lb-bg);
}

.jhr-mc-lightbox .jhr-mc-lb-inner {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 70px;
	box-sizing: border-box;
}

.jhr-mc-lightbox .jhr-mc-lb-stage {
	position: relative;
	max-width: 100%;
	max-height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.jhr-mc-lightbox .jhr-mc-lb-stage img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
}

.jhr-mc-lightbox .jhr-mc-lb-video {
	position: relative;
	width: var(--jhr-lb-video-width);
	max-width: 100%;
	aspect-ratio: 16 / 9;
	max-height: 100%;
	background: #000;
}

.jhr-mc-lightbox .jhr-mc-lb-video iframe,
.jhr-mc-lightbox .jhr-mc-lb-video video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.jhr-mc-lightbox button {
	position: absolute;
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
	color: var(--jhr-lb-ui);
	transition: color .2s;
	z-index: 2;
	line-height: 0;
}

.jhr-mc-lightbox button:hover,
.jhr-mc-lightbox button:focus-visible {
	color: var(--jhr-lb-ui-hover);
}

.jhr-mc-lightbox button svg {
	width: 100%;
	height: 100%;
	display: block;
}

.jhr-mc-lightbox .jhr-mc-lb-close {
	top: 15px;
	right: 20px;
	width: 32px;
	height: 32px;
}

.jhr-mc-lightbox .jhr-mc-lb-prev,
.jhr-mc-lightbox .jhr-mc-lb-next {
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
}

.jhr-mc-lightbox .jhr-mc-lb-prev {
	left: 15px;
}

.jhr-mc-lightbox .jhr-mc-lb-next {
	right: 15px;
}

.jhr-mc-lightbox.jhr-mc-lb-single .jhr-mc-lb-prev,
.jhr-mc-lightbox.jhr-mc-lb-single .jhr-mc-lb-next,
.jhr-mc-lightbox.jhr-mc-lb-single .jhr-mc-lb-counter {
	display: none;
}

.jhr-mc-lightbox .jhr-mc-lb-footer {
	position: absolute;
	bottom: 15px;
	left: 0;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	color: var(--jhr-lb-ui);
	font-size: 13px;
	padding: 0 20px;
	box-sizing: border-box;
	pointer-events: none;
}

body.jhr-mc-lb-active {
	overflow: hidden;
}

@media (max-width: 767px) {

	.jhr-mc-lightbox .jhr-mc-lb-inner {
		padding: 50px 15px;
	}

	.jhr-mc-lightbox .jhr-mc-lb-prev {
		left: 5px;
	}

	.jhr-mc-lightbox .jhr-mc-lb-next {
		right: 5px;
	}
}
