/* ==========================================================================
   Home page
   ========================================================================== */

.xm-home ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.xm-section-title {
	margin: 0 0 32px;
	font-size: 32px;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	color: var(--xm-text);
}

/* Hero slider -------------------------------------------------------------- */

.xm-hero {
	position: relative;
	overflow: hidden;
	background: var(--xm-bg-base);
}

.xm-hero__track {
	display: grid;
}

.xm-hero__slide {
	grid-area: 1 / 1;
	display: block;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease, visibility 0.6s;
}
.xm-hero__slide.is-current {
	opacity: 1;
	visibility: visible;
}
.xm-hero__slide img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
}

.xm-hero__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.12);
	color: #fff;
	font-size: 22px;
	cursor: pointer;
	opacity: 0;
	transform: translateY(-50%);
	transition: opacity 0.3s, background-color 0.2s;
}
.xm-hero:hover .xm-hero__arrow,
.xm-hero__arrow:focus-visible {
	opacity: 1;
}
.xm-hero__arrow:hover,
.xm-hero__arrow:focus {
	background: rgba(0, 0, 0, 0.3);
	color: #fff;
}
.xm-hero__arrow svg {
	display: block;
}
.xm-hero__arrow--prev {
	left: 40px;
}
.xm-hero__arrow--next {
	right: 40px;
}
.xm-hero__arrow--next svg {
	transform: rotate(180deg);
}

/* Progress-line indicators, as on mi.com. */
.xm-hero__dots {
	position: absolute;
	bottom: 22px;
	left: 50%;
	z-index: 2;
	display: flex;
	gap: 12px;
	transform: translateX(-50%);
}
.xm-hero__dot {
	display: block;
	width: 64px;
	height: 14px;
	padding: 6px 0;
	border: 0;
	border-radius: 0;
	background: none;
	cursor: pointer;
}
.xm-hero__dot:hover,
.xm-hero__dot:focus {
	background: none;
}
.xm-hero__dot span {
	position: relative;
	display: block;
	height: 2px;
	overflow: hidden;
	background: rgba(25, 25, 25, 0.18);
}
.xm-hero__dot span::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--xm-primary);
	transform: scaleX(0);
	transform-origin: left;
}
.xm-hero__dot.is-current span::after {
	animation: xm-hero-progress var(--xm-hero-delay, 6s) linear forwards;
}
.xm-hero.is-paused .xm-hero__dot.is-current span::after {
	animation-play-state: paused;
}
@keyframes xm-hero-progress {
	to {
		transform: scaleX(1);
	}
}

@media (max-width: 600px) {
	/* Slides without a mobile image are desktop-only. */
	.xm-hero__slide--pc-only,
	.xm-hero__dot--pc-only {
		display: none !important;
	}
}
@media (max-width: 767px) {
	.xm-hero__arrow {
		display: none;
	}
	.xm-hero__dots {
		bottom: 12px;
		gap: 8px;
	}
	.xm-hero__dot {
		width: 36px;
	}
}

/* Focus products ----------------------------------------------------------- */

.xm-focus {
	padding: 80px 16px;
	background: var(--xm-bg-base);
}

.xm-focus__box {
	max-width: 1104px;
	margin: 0 auto;
	padding: 20px;
	background: #fff;
	border-radius: 16px;
}

.xm-focus__main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	min-height: 300px;
	overflow: hidden;
	border-radius: 12px;
	background: #fafafa;
	color: var(--xm-text);
}
.xm-focus__main-img {
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: #f2f2f2;
}
.xm-focus__main-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.xm-focus__main-img.is-contain {
	padding: 24px;
	background: #fafafa;
}
.xm-focus__main-img.is-contain img {
	object-fit: contain;
}
.xm-focus__main:hover .xm-focus__main-img img {
	transform: scale(1.03);
}
.xm-focus__main-text {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 40px 32px;
	text-align: center;
}
.xm-focus__main-name {
	font-size: 34px;
	font-weight: 600;
	line-height: 1.2;
}
.xm-focus__main-tagline {
	font-size: 17px;
	font-weight: 500;
}

.xm-btn-dark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 10px;
	padding: 8px 20px;
	border-radius: 8px;
	background: var(--xm-text);
	color: #fff;
	font-size: 15px;
	font-weight: 500;
	transition: background-color 0.2s;
}
.xm-focus__main:hover .xm-btn-dark {
	background: #444;
}

.xm-focus__cards {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	margin-top: 20px !important;
}
.xm-focus__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	padding: 32px 18px 40px;
	border-radius: 12px;
	background: #fafafa;
	text-align: center;
	color: var(--xm-text);
}
.xm-focus__card-img {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 130px;
	margin-bottom: 24px;
}
.xm-focus__card-img img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	transition: transform 0.4s ease;
}
.xm-focus__card:hover .xm-focus__card-img img {
	transform: scale(1.06);
}
.xm-focus__card-name {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
}
.xm-focus__card-tagline {
	margin-top: 12px;
	font-size: 14px;
	line-height: 1.4;
}

@media (max-width: 1023px) {
	.xm-focus__cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
		margin-top: 12px !important;
	}
}
@media (max-width: 767px) {
	.xm-section-title {
		margin-bottom: 20px;
		font-size: 24px;
	}
	.xm-focus {
		padding: 48px 12px;
	}
	.xm-focus__box {
		padding: 12px;
	}
	.xm-focus__main {
		grid-template-columns: 1fr;
	}
	.xm-focus__main-img {
		aspect-ratio: 16 / 10;
	}
	.xm-focus__main-text {
		gap: 10px;
		padding: 24px 16px 28px;
	}
	.xm-focus__main-name {
		font-size: 24px;
	}
	.xm-focus__main-tagline {
		font-size: 15px;
	}
	.xm-focus__card {
		padding: 20px 10px 24px;
	}
	.xm-focus__card-img {
		height: 96px;
		margin-bottom: 14px;
	}
	.xm-focus__card-name {
		font-size: 15px;
	}
	.xm-focus__card-tagline {
		margin-top: 6px;
		font-size: 12px;
	}
}

/* Videos ------------------------------------------------------------------- */

.xm-videos {
	padding: 80px 16px 88px;
	background: #fff;
}

.xm-videos__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	max-width: 1226px;
	margin: 0 auto !important;
}

.xm-video {
	display: block;
	color: var(--xm-text);
}
.xm-video__img {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 12px;
	background: #111;
}
.xm-video__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.xm-video:hover .xm-video__img img {
	transform: scale(1.04);
}
.xm-video__img::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.12);
	transition: background-color 0.3s;
}
.xm-video:hover .xm-video__img::after {
	background: rgba(0, 0, 0, 0.25);
}
.xm-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	padding-left: 4px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.2);
	color: #fff;
	font-size: 30px;
	transform: translate(-50%, -50%);
	transition: background-color 0.3s, border-color 0.3s;
}
.xm-video:hover .xm-video__play {
	background: var(--xm-primary);
	border-color: var(--xm-primary);
}
.xm-video__title {
	display: block;
	margin-top: 14px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	text-align: center;
}

@media (max-width: 767px) {
	.xm-videos {
		padding: 48px 12px 56px;
	}
	.xm-videos__list {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	.xm-video__title {
		margin-top: 10px;
		font-size: 15px;
	}
}

/* Video modal -------------------------------------------------------------- */

.xm-vmodal {
	width: min(1100px, calc(100% - 32px));
	max-width: none;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: #000;
	overflow: visible;
}
.xm-vmodal::backdrop {
	background: rgba(0, 0, 0, 0.8);
}
.xm-vmodal__frame {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 12px;
}
.xm-vmodal__frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}
.xm-vmodal__close {
	position: absolute;
	top: -44px;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 22px;
	cursor: pointer;
}
.xm-vmodal__close:hover,
.xm-vmodal__close:focus {
	background: rgba(255, 255, 255, 0.3);
	color: #fff;
}
.xm-vmodal__close svg {
	display: block;
}
