/* YOJASO Hero Media — desktop carousel / mobile video */

.yjs-hero {
	--yjs-hero-h: 1000px;
	--yjs-hero-mobile-h: 100vh;
	--yjs-hero-dots-bottom: 36px;
	position: relative;
	width: 100%;
	overflow: hidden;
}

.yjs-hero__desktop,
.yjs-hero__mobile {
	position: relative;
	width: 100%;
}

.yjs-hero__desktop {
	display: block;
}

.yjs-hero__mobile {
	display: none;
}

.yjs-hero__swiper {
	position: relative;
	width: 100%;
	height: var(--yjs-hero-h);
}

.yjs-hero__swiper .swiper-wrapper,
.yjs-hero__swiper .swiper-slide {
	height: 100%;
}

.yjs-hero__slide {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
}

.yjs-hero__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	transform: scale(1.02);
	transition: transform 6.5s ease-out;
	will-change: transform;
}

.swiper-slide-active .yjs-hero__img,
.swiper-slide-duplicate-active .yjs-hero__img {
	transform: scale(1.06);
}

.yjs-hero__content {
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 2;
	transform: translate(-50%, -50%);
	width: min(920px, calc(100% - 48px));
	text-align: center;
	pointer-events: none;
}

.yjs-hero__heading {
	margin: 0 0 14px;
	color: #fff;
	font-size: 48px;
	font-weight: 700;
	line-height: 1.15;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.yjs-hero__desc {
	margin: 0 auto 22px;
	max-width: 720px;
	color: rgba(255, 255, 255, 0.92);
	font-size: 16px;
	line-height: 1.6;
}

.yjs-hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 28px;
	border: 1.5px solid #fff;
	border-radius: 2px;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.yjs-hero__arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin-top: -24px;
	padding: 0;
	border: 1.5px solid rgba(255, 255, 255, 0.85);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.18);
	color: #fff;
	cursor: pointer;
	transition: background 0.25s ease, border-color 0.25s ease;
}

.yjs-hero__arrow:hover,
.yjs-hero__arrow:focus-visible {
	background: rgba(0, 0, 0, 0.45);
	outline: none;
}

.yjs-hero__arrow--prev {
	left: 24px;
}

.yjs-hero__arrow--next {
	right: 24px;
}

.yjs-hero__pagination {
	position: absolute;
	left: 0;
	right: 0;
	bottom: var(--yjs-hero-dots-bottom, 36px) !important;
	top: auto !important;
	z-index: 3;
	display: flex;
	justify-content: center;
	gap: 8px;
	margin: 0 !important;
	padding: 0;
	width: 100%;
	transform: none !important;
}

.yjs-hero__pagination .swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	margin: 0 !important;
	opacity: 1;
	background: rgba(255, 255, 255, 0.45);
	border-radius: 50%;
	transition: width 0.25s ease, background 0.25s ease, border-radius 0.25s ease;
}

.yjs-hero__pagination .swiper-pagination-bullet-active {
	width: 28px;
	border-radius: 999px;
	background: #ffffff;
}

.yjs-hero__video-wrap {
	position: relative;
	width: 100%;
	height: var(--yjs-hero-mobile-h);
	overflow: hidden;
	background: #000;
}

.yjs-hero__mobile-swiper {
	position: relative;
	width: 100%;
	height: var(--yjs-hero-mobile-h);
}

.yjs-hero__mobile-swiper .swiper-wrapper,
.yjs-hero__mobile-swiper .swiper-slide {
	height: 100%;
}

.yjs-hero__video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

/* Force-hide native controls when switch is off (iOS/Android WebKit). */
.yjs-hero__video--no-controls::-webkit-media-controls {
	display: none !important;
	-webkit-appearance: none;
}

.yjs-hero__video--no-controls::-webkit-media-controls-enclosure,
.yjs-hero__video--no-controls::-webkit-media-controls-panel,
.yjs-hero__video--no-controls::-webkit-media-controls-play-button,
.yjs-hero__video--no-controls::-webkit-media-controls-start-playback-button,
.yjs-hero__video--no-controls::-webkit-media-controls-timeline,
.yjs-hero__video--no-controls::-webkit-media-controls-current-time-display,
.yjs-hero__video--no-controls::-webkit-media-controls-time-remaining-display,
.yjs-hero__video--no-controls::-webkit-media-controls-mute-button,
.yjs-hero__video--no-controls::-webkit-media-controls-toggle-closed-captions-button,
.yjs-hero__video--no-controls::-webkit-media-controls-volume-slider {
	display: none !important;
	opacity: 0 !important;
	pointer-events: none !important;
	width: 0 !important;
	height: 0 !important;
}

.yjs-hero__iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	pointer-events: none;
}

.yjs-hero--has-controls .yjs-hero__iframe {
	pointer-events: auto;
}

.yjs-hero--empty {
	padding: 40px;
	text-align: center;
	color: #6b7280;
	background: #f3f4f6;
}

.yjs-hero__swiper.swiper-fade .swiper-slide {
	pointer-events: none;
}

.yjs-hero__swiper.swiper-fade .swiper-slide-active {
	pointer-events: auto;
}

/* Hide parent container leftover video bg if any */
.elementor-element:has(> .elementor-widget-yojaso-hero-media) > .elementor-background-video-container {
	display: none !important;
}

@media (max-width: 1024px) {
	.yjs-hero {
		--yjs-hero-h: 591px;
	}

	.yjs-hero__heading {
		font-size: 36px;
	}

	.yjs-hero__arrow {
		width: 42px;
		height: 42px;
		margin-top: -21px;
	}

	.yjs-hero__arrow--prev {
		left: 14px;
	}

	.yjs-hero__arrow--next {
		right: 14px;
	}
}

/* Desktop/mobile swap fallback (inline style uses data-bp; keep 767 fallback). */
@media (max-width: 767px) {
	.yjs-hero[data-bp="0"] .yjs-hero__desktop,
	.yjs-hero[data-bp=""] .yjs-hero__desktop,
	.yjs-hero:not([data-bp]) .yjs-hero__desktop {
		display: none !important;
	}

	.yjs-hero[data-bp="0"] .yjs-hero__mobile,
	.yjs-hero[data-bp=""] .yjs-hero__mobile,
	.yjs-hero:not([data-bp]) .yjs-hero__mobile {
		display: block;
	}

	.yjs-hero__img {
		transform: none;
		transition: none;
	}

	.swiper-slide-active .yjs-hero__img,
	.swiper-slide-duplicate-active .yjs-hero__img {
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.yjs-hero__img,
	.swiper-slide-active .yjs-hero__img,
	.swiper-slide-duplicate-active .yjs-hero__img {
		transform: none !important;
		transition: none !important;
	}
}
