/* Homepage refinements for Seming. */

/* ── Hero video background ── */
.mf-hero-video-wrap {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	overflow: hidden;
}

.mf-hero-video-wrap video {
	position: absolute;
	top: 50%;
	left: 50%;
	min-width: 100%;
	min-height: 100%;
	width: auto;
	height: auto;
	transform: translate(-50%, -50%);
	object-fit: cover;
}

.mf-hero-video-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(
			175deg,
			rgba(21, 21, 21, 0.92) 0%,
			rgba(21, 21, 21, 0.65) 35%,
			rgba(21, 21, 21, 0.50) 55%,
			rgba(21, 21, 21, 0.82) 100%
		);
	backdrop-filter: saturate(1.1);
}

.mf-hero-video-overlay::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
	background-repeat: repeat;
	background-size: 256px 256px;
	pointer-events: none;
}

body.home .mf-home-hero {
	position: relative;
	min-height: 760px;
	padding: 150px 50px 76px !important;
	background: #151515 !important;
	background-image: none !important;
}

body.home .mf-home-hero > .e-con-inner {
	position: relative;
	z-index: 2;
	min-height: calc(760px - 226px);
	justify-content: space-between;
	gap: 70px !important;
	padding: 0 !important;
}

body.home .mf-home-hero::before {
	display: none !important;
}

.mf-hero-video-wrap video {
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
}

body.home .mf-home-hero > .mf-video-toggle {
	right: 24px;
	bottom: 18px;
}

@media (min-width: 1025px) {
	body.home .elementor-element-771e9a3 {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
		grid-template-areas:
			"title title"
			"desc video"
			"actions video";
		column-gap: 48px;
		row-gap: 30px;
		align-items: start;
	}
	body.home .elementor-element-1b9d3fc { grid-area: title; }
	body.home .elementor-element-daa52c6 { grid-area: desc; align-self: end; }
	body.home .elementor-element-9d4ab52 { grid-area: actions; align-self: start; }
	body.home .elementor-element-mfaboutvid { grid-area: video; align-self: center; }
	body.home .elementor-element-mfaboutvid .mf-video-block { margin-top: 0; }
	body.home .elementor-element-76d9ad4 {
		--width: 150px !important;
		width: 150px !important;
		flex: 0 0 150px !important;
	}
	body.home .elementor-element-771e9a3 {
		flex: 1 1 0 !important;
		width: auto !important;
		--width: auto !important;
	}
}

/* Flex column ignores the video's percentage-padding height on small screens; block flow keeps it. */
@media (max-width: 1024px) {
	body.home .elementor-element-771e9a3 { display: block !important; }
	body.home .elementor-element-771e9a3 > * + * { margin-top: 30px !important; }
	body.home .elementor-element-mfaboutvid { display: flow-root; }
}

@media (max-width: 767px) {
	body.home .mf-home-hero > .mf-video-toggle { right: 15px; bottom: 14px; }
}

/* Continuous client logo rail. */
.mf-client-marquee-section {
	overflow: hidden;
	border-block: 1px solid rgba(21, 21, 21, 0.1);
	background: #fff;
}

.mf-client-marquee {
	overflow: hidden;
	width: 100%;
	padding-block: 24px;
}

.mf-client-marquee__track {
	display: flex;
	width: max-content;
	animation: mf-client-rail 42s linear infinite;
}

.mf-client-marquee__group {
	display: flex;
	align-items: center;
	gap: 64px;
	padding-right: 64px;
}

.mf-client-marquee__item {
	display: grid;
	place-items: center;
	flex: 0 0 180px;
	height: 76px;
}

.mf-client-marquee__item img {
	display: block;
	max-width: 160px;
	max-height: 64px;
	width: auto;
	height: auto;
	object-fit: contain;
	filter: grayscale(1);
	opacity: 0.72;
	transition: filter 0.3s ease, opacity 0.3s ease;
}

.mf-client-marquee__item:hover img {
	filter: none;
	opacity: 1;
}

body.home .mf-client-marquee-section .mf-client-marquee__item img {
	filter: none;
	opacity: 1;
}

@keyframes mf-client-rail {
	to { transform: translateX(-50%); }
}

/* Service cards keep their entrance motion and gain a restrained hover state. */
body.home .mf-services-section .e-loop-item > .e-con {
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

body.home .mf-services-section .e-loop-item:hover > .e-con {
	transform: translateY(-5px);
	box-shadow: 0 18px 40px rgba(21, 21, 21, 0.1);
}

body.home .mf-services-section .e-loop-item .elementor-heading-title {
	transition: color 0.3s ease;
}

body.home .mf-services-section .e-loop-item:hover .elementor-heading-title {
	color: var(--mf-accent);
}

/* Compact service band – layout now in Elementor containers. */
body.home .mf-service-section {
	min-height: 450px;
	position: relative;
	overflow: hidden;
}

body.home .mf-service-section > .mf-servis-video-wrap {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	border-radius: inherit;
	background: #151515 center / cover no-repeat;
}

body.home .mf-service-section > .mf-servis-video-wrap video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
}

body.home .mf-service-section::before { z-index: 1; }
body.home .mf-service-section > .e-con-inner { position: relative; z-index: 2; }
body.home .mf-service-section > .mf-video-toggle { z-index: 3; }

/* References: clean gallery without a visible horizontal rail. */
.mf-reference-gallery {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	overflow: visible;
	padding: 0;
	scrollbar-width: none;
}

.mf-reference-gallery::-webkit-scrollbar { display: none; }

.mf-reference-gallery__item {
	position: relative;
	display: block;
	overflow: hidden;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 5px;
	background: #fff !important;
	color: inherit;
	cursor: zoom-in;
	line-height: 0;
	appearance: none;
	box-shadow: 0 0 0 1px rgba(21, 21, 21, 0.08);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.mf-reference-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: filter 0.25s ease, transform 0.25s ease;
}

.mf-reference-gallery__item:hover,
.mf-reference-gallery__item:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(21, 21, 21, 0.1);
}

.mf-reference-gallery__item:hover img,
.mf-reference-gallery__item:focus-visible img {
	transform: scale(1.01);
	filter: brightness(0.96);
}

.mf-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) 72px;
	place-items: center;
	padding: 32px;
	border: 0;
	background: rgba(0, 0, 0, 0.94);
}

.mf-lightbox[hidden] { display: none; }

.mf-lightbox__image {
	grid-column: 2;
	max-width: min(1400px, 100%);
	max-height: calc(100svh - 64px);
	width: auto;
	height: auto;
	object-fit: contain;
}

.mf-lightbox__button {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 4px;
	background: #111;
	color: #fff;
	font: 600 28px/1 Arial, sans-serif;
	cursor: pointer;
}

.mf-lightbox__button:hover,
.mf-lightbox__button:focus-visible {
	border-color: var(--mf-accent);
	background: var(--mf-accent);
	color: #151515;
}

.mf-lightbox__prev { grid-column: 1; grid-row: 1; }
.mf-lightbox__next { grid-column: 3; grid-row: 1; }
.mf-lightbox__close { position: absolute; top: 20px; right: 20px; font-size: 22px; }
body.mf-lightbox-open { overflow: hidden; }

/* Inquiry panel – layout now in Elementor containers. Form grid stays. */
body.home .mf-home-form .elementor-form-fields-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

body.home .mf-home-form .elementor-field-group { width: 100%; margin: 0; }
body.home .mf-home-form .elementor-field-type-textarea,
body.home .mf-home-form .e-form__buttons { grid-column: 1 / -1; }
body.home .mf-home-form textarea { min-height: 116px; resize: vertical; }

/* Certificates are intentionally static and cannot open in a lightbox. */
.mf-certificate-row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	width: 100%;
}

.mf-certificate-row__item {
	padding: 18px;
	border: 1px solid rgba(21, 21, 21, 0.12);
	border-radius: 5px;
	background: #fff;
}

.mf-certificate-row__item img {
	display: block;
	width: 100%;
	aspect-ratio: 0.71;
	object-fit: contain;
}

.elementor-location-footer .mf-footer-logo img {
	display: block;
	width: min(180px, 100%);
	height: auto;
}

.elementor-location-footer .elementor-widget.mf-footer-logo {
	width: min(200px, 100%);
	padding: 0;
	border-radius: 0;
	background: transparent !important;
}

.elementor-location-footer .elementor-widget-heading .elementor-heading-title {
	font-size: 18px !important;
	line-height: 1.25 !important;
}

.elementor-location-footer .elementor-widget-heading .elementor-heading-title.subscribe-title,
.elementor-location-footer .elementor-element-073668e .elementor-widget-container {
	font-size: inherit !important;
}

.elementor-location-footer .mf-credits {
	margin-left: auto;
	text-align: right;
}

.elementor-location-footer .mf-credits p {
	margin: 0;
}

/* Hero text must be light on the dark video overlay. */
body.home .mf-home-hero .elementor-heading-title,
body.home .mf-home-hero .elementor-widget-text-editor,
body.home .mf-home-hero .elementor-widget-text-editor p {
	color: #fff !important;
}

body.home .mf-home-hero .mf-pill .elementor-heading-title {
	border-color: rgba(255, 255, 255, 0.22);
	background-color: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.9) !important;
}

body.home .mf-home-hero .mf-hl {
	color: var(--mf-accent);
}

/* Hero buttons: the second one drops to a new row when the column is too narrow (e.g. 1024px tablets). */
body.home .mf-home-hero .elementor-element-e1622b4 {
	flex-wrap: wrap !important;
	row-gap: 12px !important;
}

/* Header nav on video: white text. */
body.home .elementor-location-header .mf-nav .elementor-item {
	color: #fff !important;
}

body.home .elementor-location-header .mf-nav .elementor-item:hover,
body.home .elementor-location-header .mf-nav .elementor-item-active {
	color: var(--mf-accent) !important;
}

body.home .elementor-location-header .mf-btn--light .elementor-button {
	color: #fff !important;
	border-color: rgba(255, 255, 255, 0.25) !important;
}


@media (max-width: 1024px) {
	body.home .mf-home-hero {
		min-height: 700px;
		padding: 122px 20px 62px !important;
	}

	body.home .mf-home-hero > .e-con-inner {
		min-height: calc(700px - 184px);
		gap: 50px !important;
	}

	.mf-reference-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	body.admin-bar.home .elementor-location-header { top: 46px; }

	body.home .mf-home-hero {
		min-height: 0;
		padding: 116px 15px 66px !important;
	}

	body.home .mf-home-hero > .e-con-inner {
		min-height: 0;
		gap: 32px !important;
	}

	body.home .mf-home-hero .elementor-element-797eec2 .elementor-heading-title {
		font-size: 44px;
		line-height: 1.02;
	}

	body.home .mf-home-hero .elementor-element-a0a587c {
		font-size: 17px;
		line-height: 1.5;
	}

	body.home .mf-home-hero .elementor-element-25b95f0 {
		display: none;
	}

	.mf-client-marquee { padding-block: 18px; }
	.mf-client-marquee__group { gap: 32px; padding-right: 32px; }
	.mf-client-marquee__item { flex-basis: 136px; height: 58px; }
	.mf-client-marquee__item img { max-width: 124px; max-height: 50px; }

	body.home .mf-service-section { min-height: 0; }

	.mf-reference-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.mf-lightbox { grid-template-columns: 48px minmax(0, 1fr) 48px; padding: 16px 8px; }
	.mf-lightbox__button { width: 40px; height: 40px; font-size: 23px; }

	body.home .mf-home-form .elementor-form-fields-wrapper { grid-template-columns: 1fr; }
	body.home .mf-home-form .elementor-field-type-textarea,
	body.home .mf-home-form .e-form__buttons { grid-column: auto; }

	.mf-certificate-row { grid-template-columns: 1fr; gap: 16px; }

	.elementor-location-footer .mf-credits {
		margin-left: 0;
		text-align: left;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mf-client-marquee__track { animation-play-state: paused; }
	body.home .mf-services-section .e-loop-item > .e-con,
	.mf-reference-gallery__item img { transition: none; }
}
