/* Mihi custom CSS: last resort only. One section per pattern, each with its reason. */

/* == mh01 hero / mh04 sustainability / mh10 product rows: slanted photos — reason: parallelogram crop + offset gradient frame; no block setting can clip an image to a polygon (agreed option b) == */
.mh-slant {
	position: relative;
	isolation: isolate;
}
.mh-slant img {
	display: block;
	width: 100%;
	object-fit: cover;
	object-position:bottom center;
	clip-path: polygon(var(--mh-slant) 0, 100% 0, calc(100% - var(--mh-slant)) 100%, 0 100%);
}
.mh-slant--hero,
.mh-slant--product {
	--mh-slant: 14.87%;
}
.mh-slant--hero img {
	aspect-ratio: 659 / 605;
}
.mh-slant--product img {
	aspect-ratio: 652 / 484;
}
.mh-slant--sust {
	--mh-slant: 7.88%;
}
.mh-slant--sust img {
	aspect-ratio: 609 / 323.5;
}
.mh-slant--hero::before,
.mh-slant--product::before,
.mh-slant--frame::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(var(--global-palette2), var(--global-palette1));
	clip-path: polygon(var(--mh-slant) 0, 100% 0, calc(100% - var(--mh-slant)) 100%, 0 100%);
}
.mh-slant--hero::before,
.mh-slant--product::before {
	transform: translate(-15px, -18px);
}
.mh-slant--frame::before {
	transform: translate(13px, 16px);
}

/* == mh03 steps — reason: dashed connector lines between the step icons (decorative, no block equivalent); horizontal on desktop, a dashed separator between the stacked steps on mobile (Figma home mobile) == */
@media (min-width: 768px) {
	.mh-steps > .kt-row-column-wrap > .wp-block-kadence-column {
		position: relative;
	}
	.mh-steps > .kt-row-column-wrap > .wp-block-kadence-column:not(:last-child)::after {
		content: "";
		position: absolute;
		top: 34px;
		left: calc(50% + 57px);
		width: calc(100% - 76px);
		height: 2px;
		background: repeating-linear-gradient(90deg, var(--global-palette2) 0 8px, transparent 8px 16px);
		pointer-events: none;
	}
}
@media (max-width: 767px) {
	.mh-steps > .kt-row-column-wrap > .wp-block-kadence-column:not(:last-child) > .kt-inside-inner-col::after {
		content: "";
		display: block;
		height: 2px;
		margin-top: 40px;
		background: repeating-linear-gradient(90deg, var(--global-palette2) 0 8px, transparent 8px 16px);
	}
}

/* == mh06 product cards — reason: image overlay + "View Details" button appear only on hover/focus; Kadence has no hover state for an image overlay or a child button == */
.mh-card > .kt-inside-inner-col {
	position: relative;
}
.mh-card .wp-block-kadence-image .kb-image-has-overlay::after,
.mh-card .mh-card__btn {
	visibility: hidden;
}
.mh-card .mh-card__btn {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	aspect-ratio: 16 / 9;
	z-index: 13;
	align-items: center;
	justify-content: center;
}
.mh-card:hover .wp-block-kadence-image .kb-image-has-overlay::after,
.mh-card:focus-within .wp-block-kadence-image .kb-image-has-overlay::after,
.mh-card:hover .mh-card__btn,
.mh-card:focus-within .mh-card__btn {
	visibility: visible;
}

/* == mh07 testimonials — reason: carousel arrows sit under the left column text (agreed), square outline arrows, and the progress rule under each quote; the testimonials block can't place or draw these == */
.mh-testimonials .kt-testimonial-item-wrap {
	position: relative;
	border-bottom: 1px solid color-mix(in srgb, var(--global-palette9) 40%, transparent);
}
.mh-testimonials .kt-testimonial-item-wrap::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 83px;
	height: 4px;
	background: var(--global-palette1);
}
.mh-testimonials .kt-testimonial-meta-wrap {
	margin-bottom: 40px;
}
.mh-testimonials .kt-blocks-carousel-init.splide {
	display: flex;
	flex-direction: column;
	padding: 0 !important; /* Kadence reserves 35px side space for its default arrows (higher-specificity :not() rule); ours are placed elsewhere */
}
.mh-testimonials .splide__arrows {
	order: 2;
	display: flex;
	gap: 16px;
	margin-top: 32px;
}
.mh-testimonials .splide .splide__arrow {
	position: static;
	transform: none;
	width: 54px;
	height: 54px;
	opacity: 1;
	border: 1px solid var(--global-palette9);
	border-radius: 0 !important; /* Kadence arrow style sets a round radius with higher specificity */
	background: transparent !important; /* same: arrow style background */
	color: var(--global-palette9);
}
.mh-testimonials .splide .splide__arrow svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}
/* light variant (cream section, e.g. industry pages): dark rule + arrows */
.mh-testimonials--light .kt-testimonial-item-wrap {
	border-bottom-color: color-mix(in srgb, var(--global-palette3) 40%, transparent);
}
.mh-testimonials--light .splide .splide__arrow {
	border-color: var(--global-palette3);
	color: var(--global-palette3);
}
@media (min-width: 768px) {
	/* arrows anchor to the 2-column row, bottom-left: the left column's 114px bottom padding keeps a 60px gap under its text whichever column is taller */
	.mh-testimonials-row .kt-inside-inner-col:has(> .mh-testimonials),
	.mh-testimonials-row .mh-testimonials,
	.mh-testimonials .kt-blocks-carousel,
	.mh-testimonials .kt-blocks-carousel-init {
		position: static;
	}
	.mh-testimonials-row > .kt-row-column-wrap {
		position: relative;
	}
	.mh-testimonials .splide__arrows {
		position: absolute;
		bottom: 0;
		left: 0;
		margin-top: 0;
	}
}

/* == mh08 CTA box — reason: slanted (parallelogram) photo box with offset gradient frame; columns can't be clipped to a polygon == */
.mh-slant-box {
	--mh-slant: 4.44%;
	isolation: isolate;
}
.mh-slant-box > .kt-inside-inner-col {
	position: relative;
	z-index: 1;
	clip-path: polygon(var(--mh-slant) 0, 100% 0, calc(100% - var(--mh-slant)) 100%, 0 100%);
}
.mh-slant-box::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	transform: translate(-11px, -12px);
	background: linear-gradient(var(--global-palette2), var(--global-palette1));
	clip-path: polygon(var(--mh-slant) 0, 100% 0, calc(100% - var(--mh-slant)) 100%, 0 100%);
}

/* == mh14 FAQ — reason: Figma pane background is white at 2% on dark (Kadence accordion colours can't apply opacity to a palette colour); Kadence's default header paints a palette8 background and a fixed 18px size, so the header is made transparent and inherits its type from the h3 wrapper (titleTag), which gets the H5 look under "heading levels (QA)" == */
.mh-faq .kt-accordion-pane {
	background-color: color-mix(in srgb, var(--global-palette9) 2%, transparent);
}
.mh-faq .kt-accordion-pane .kt-blocks-accordion-header,
.mh-faq .kt-accordion-pane .kt-blocks-accordion-header:hover {
	background-color: transparent;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	letter-spacing: inherit;
}

/* == footer (Kadence element) — reason: the theme's content-link style (.link-style-color-underline .entry-content p a) underlines every link inside page content; Figma's footer links have none, and Kadence's per-heading link style can't win/can't be set on the inline "Log in" link without a block deprecation == */
.mh-footer .kt-row-column-wrap .wp-block-kadence-advancedheading a,
.mh-footer .kt-row-column-wrap a.kb-advanced-heading-link,
.mh-footer-bottom .kt-row-column-wrap .wp-block-kadence-advancedheading a,
.mh-footer-bottom .kt-row-column-wrap a.kb-advanced-heading-link {
	text-decoration: none;
}

/* == mh17 contact form — reason: Gravity Forms output (plugin markup) can't be styled with block settings; Figma fields are borderless white with 16/24 padding, bold labels, green asterisk, 32px gaps, centred submit. Button keeps the theme .button style. Selectors repeat .gform_wrapper.gravity-theme to outrank GF/theme field rules (0,3,1). == */
.gform_wrapper.gravity-theme.mh-contact-form_wrapper .gform_required_legend {
	display: none;
}
.gform_wrapper.gravity-theme.mh-contact-form_wrapper .gform_fields {
	grid-column-gap: 32px;
	grid-row-gap: 32px;
}
.gform_wrapper.gravity-theme.mh-contact-form_wrapper .gfield_label {
	margin-bottom: 8px;
	font-size: inherit;
	color: var(--global-palette3);
}
.gform_wrapper.gravity-theme.mh-contact-form_wrapper .gfield_required {
	margin-left: 6px;
	font-size: inherit;
	color: var(--global-palette1);
}
.gform_wrapper.gravity-theme.mh-contact-form_wrapper input[type="text"],
.gform_wrapper.gravity-theme.mh-contact-form_wrapper input[type="email"],
.gform_wrapper.gravity-theme.mh-contact-form_wrapper input[type="tel"],
.gform_wrapper.gravity-theme.mh-contact-form_wrapper textarea {
	padding: 16px 24px;
	border: 0;
	border-radius: 0;
	background: var(--global-palette8);
	font-size: inherit;
	color: var(--global-palette3);
}
.gform_wrapper.gravity-theme.mh-contact-form_wrapper textarea.large {
	height: 227px;
}
.gform_wrapper.gravity-theme.mh-contact-form_wrapper ::placeholder {
	color: var(--global-palette6);
	opacity: 1;
}
.gform_wrapper.gravity-theme.mh-contact-form_wrapper input:focus,
.gform_wrapper.gravity-theme.mh-contact-form_wrapper textarea:focus {
	outline: 2px solid var(--global-palette1);
	outline-offset: 0;
}
.gform_wrapper.gravity-theme.mh-contact-form_wrapper .gform_footer {
	justify-content: center;
	margin-top: 40px;
	padding: 0;
}

/* == mh17 contact cards — reason: theme rule `.link-style-color-underline .entry-content p a` underlines the mailto/tel links and recolours them; Figma shows plain dark text == */
.link-style-color-underline .entry-content .mh-contact-cards p a {
	color: inherit;
	text-decoration: none;
}

/* == mn newsletter form (News archive) — reason: Gravity Forms output can't be styled with block settings; Figma shows the email field and Subscribe button on one line in a translucent white bar (palette9 at 14%), 435px wide and centred; stacked on mobile. Button keeps the theme .button style. == */
.gform_wrapper.gravity-theme.mh-newsletter-form_wrapper {
	max-width: 435px;
	margin: 0 auto;
}
.gform_wrapper.gravity-theme.mh-newsletter-form_wrapper form {
	display: flex;
	background: color-mix(in srgb, var(--global-palette9) 14%, transparent);
	backdrop-filter: blur(2px);
}
.gform_wrapper.gravity-theme.mh-newsletter-form_wrapper .gform-body {
	flex: 1 1 auto;
	min-width: 0;
}
.gform_wrapper.gravity-theme.mh-newsletter-form_wrapper .gform_fields,
.gform_wrapper.gravity-theme.mh-newsletter-form_wrapper .gfield {
	margin: 0;
	padding: 0;
}
.gform_wrapper.gravity-theme.mh-newsletter-form_wrapper .gform_footer {
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
}
.gform_wrapper.gravity-theme.mh-newsletter-form_wrapper .gform_footer .button {
	height: 100%;
	margin: 0;
}
.gform_wrapper.gravity-theme.mh-newsletter-form_wrapper input[type="email"] {
	height: 56px;
	padding: 0 20px;
	border: 0;
	border-radius: 0;
	background: transparent;
	font-size: inherit;
	color: var(--global-palette9);
}
.gform_wrapper.gravity-theme.mh-newsletter-form_wrapper ::placeholder {
	color: var(--global-palette9);
	opacity: 1;
}
.gform_wrapper.gravity-theme.mh-newsletter-form_wrapper input:focus {
	outline: 2px solid var(--global-palette1);
	outline-offset: -2px;
}
@media (max-width: 767px) {
	.gform_wrapper.gravity-theme.mh-newsletter-form_wrapper form {
		flex-direction: column;
	}
	.gform_wrapper.gravity-theme.mh-newsletter-form_wrapper .gform_footer .button {
		width: 100%;
	}
}

/* == ms single post (News) — reason: the post body is author content rendered through the template (dynamic post content), so separators and lists can't carry block settings per post; Figma shows full-width lime separators with 60px spacing and green slash bullets. The breadcrumb link is hit by the theme's content-link underline rule; Figma shows no underline. == */
.entry-content .mh-post-content hr.wp-block-separator:not(.is-style-dots) { /* outranks the theme's :not(.is-style-wide):not(.is-style-dots) width rule */
	width: 100%;
	max-width: none;
	margin: 60px 0;
	border: 0;
	border-top: 1px solid var(--global-palette2);
	opacity: 1;
}
.mh-post-content ul {
	margin-left: 0;
	padding-left: 0;
	list-style: none;
}
.mh-post-content ul li {
	position: relative;
	margin-bottom: 12px;
	padding-left: 22px;
}
.mh-post-content ul li::before {
	content: "";
	position: absolute;
	top: 0.35em;
	left: 4px;
	width: 5px;
	height: 0.95em;
	background: var(--global-palette1);
	transform: skewX(-20deg);
}
.link-style-color-underline .entry-content .mh-post-hero p a {
	text-decoration: none;
}


.osa-image-correction-412-1 img {
	object-position: 50% 35%;
}

.mh-image-correction img {
	object-position: center center!important;
}

/* == heading levels (QA) — reason: headings use the level a correct outline needs (cards/features/steps H3, FAQ titles H3, 404 title H1, single-post sidebar titles H2) but keep the Figma look of a smaller level; Kadence heading size comes only from the level and no preset matches. Mirrors Customizer H4 (1.722rem / 1.2) and H5 (1.389rem / 1.2): keep in sync if those change. FAQ: the pane title tag is the h3 wrapper and the header button inherits from it. == */
.wp-block-kadence-advancedheading.mh-h4-style {
	font-size: 1.722rem;
	line-height: 1.2;
}
.wp-block-kadence-advancedheading.mh-h5-style,
.mh-faq .kt-accordion-pane .kt-accordion-header-wrap {
	font-size: 1.389rem;
	line-height: 1.2;
}
