/* ==========================================================================
   HIMPEL Products — boxed two-column section
   --------------------------------------------------------------------------
   Everything is scoped under .himpel-prod (plus the two helper classes the
   overlap effect needs). Nothing targets the theme or any global element.
   ========================================================================== */

.himpel-prod {
	/* Brand tokens, overridden inline when global colours are bound. */
	--himpel-primary: #0b7347;
	--himpel-primary-dark: #095c39;
	--himpel-secondary: #f3f4ea;
	--himpel-white: #ffffff;
	--himpel-dark: #121212;

	position: relative;
	/* Sits above the pinned hero so it can scroll over the top of it. */
	z-index: 2;
	width: 100%;
	background-color: var(--hp-bg, var(--himpel-white));
	box-sizing: border-box;
}

.himpel-prod *,
.himpel-prod *::before,
.himpel-prod *::after {
	box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Overlap reveal
   The hero's own wrapper is made sticky by himpel-products.js, so the hero
   holds still while this section scrolls up over it — and slides back down to
   uncover it on the way up. Sticky rather than a scroll handler: the browser
   drives it, so it is smooth, reverses for free, and costs no JS per frame.
   -------------------------------------------------------------------------- */
/* The generated wrapper spans the hero plus this section, giving the sticky
   hero both room to travel and a bottom edge to release at. */
.himpel-overlap-wrap {
	position: relative;
}

.himpel-sticky-host {
	position: sticky;
	top: var(--himpel-sticky-top, 0px);
	z-index: 0;
}

/*
 * himpel-overlap.js re-parents both branches into this wrapper as a plain
 * block, which becomes a direct child of Elementor's flex container. A flex
 * item's default min-width is its content's own minimum, not 0 — Elementor
 * gives its own .elementor-widget children min-width: 0 to prevent exactly
 * this, but a script-inserted wrapper carries no such class. Left alone, the
 * wrapper stayed at its intrinsic desktop width and sat off screen to the
 * right on any viewport narrower than that.
 *
 * .himpel-sticky-host deliberately carries none of this — see himpel-overlap.css.
 */
.himpel-overlap-wrap {
	width: 100%;
	min-width: 0;
	max-width: 100%;
}

/* --------------------------------------------------------------------------
   Boxed shell
   -------------------------------------------------------------------------- */
.himpel-prod__inner {
	width: 100%;
	max-width: var(--hp-max, 1340px);
	margin: 0 auto;
	padding: var(--hp-py-d, 80px) var(--hp-px-d, 40px);
}

.himpel-prod__grid {
	display: grid;
	grid-template-columns: var(--hp-cols, 1fr 1fr);
	gap: var(--hp-gap, 48px);
	align-items: stretch;
}

/* --------------------------------------------------------------------------
   Left column — two blocks pushed to the top and bottom edges
   -------------------------------------------------------------------------- */
.himpel-prod__col--left {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 40px;
	min-height: 100%;
}

/* --- Pill eyebrow (an <h2>, styled as the pill itself) --- */
.himpel-prod__eyebrow {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	margin: 0 0 var(--hp-gap-eyebrow, 28px);
	padding: 8px 18px;
	border: 1px solid var(--hp-pill-border, rgba(18, 18, 18, 0.18));
	border-radius: 100px;
	color: var(--hp-pill-color, var(--himpel-dark));
	font-size: var(--hp-eyebrow-d, 14px);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.02em;
}

/* A small brand dot, purely decorative. */
.himpel-prod__eyebrow::before {
	content: "";
	width: 7px;
	height: 7px;
	margin-right: 9px;
	border-radius: 50%;
	background-color: var(--himpel-primary);
	flex: 0 0 auto;
}

.himpel-prod__title {
	margin: 0;
	padding: 0;
	color: var(--hp-title-color, var(--himpel-dark));
	/* No font-family: the heading inherits the Liquid theme's typography. */
	font-size: var(--hp-title-d, 42px);
	font-weight: 600;
	line-height: 1.18;
	letter-spacing: -0.4px;
	/* Fills the column by default. A ch value here would cap it well short of
	   the column on desktop and force the heading into four short lines. */
	max-width: var(--hp-title-mw, 100%);
}

.himpel-prod__desc {
	margin: 0 0 var(--hp-gap-desc, 32px);
	padding: 0;
	color: var(--hp-desc-color, rgba(18, 18, 18, 0.62));
	font-size: var(--hp-desc-d, 17px);
	font-weight: 400;
	line-height: 1.7;
	max-width: 46ch;
}

/* --------------------------------------------------------------------------
   Primary button — matches the hero's green pill with its arrow badge
   -------------------------------------------------------------------------- */
.himpel-prod__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	align-self: flex-start;
	padding: 8px 8px 8px 26px;
	border: 1px solid var(--himpel-primary);
	border-radius: 100px;
	background-color: var(--himpel-primary);
	color: var(--himpel-white);
	font-size: var(--hp-btn-d, 16px);
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.25s ease, border-color 0.25s ease,
		transform 0.25s ease;
}

.himpel-prod__btn:hover,
.himpel-prod__btn:focus-visible {
	background-color: var(--himpel-primary-dark);
	border-color: var(--himpel-primary-dark);
	color: var(--himpel-white);
	text-decoration: none;
	transform: translateY(-2px);
}

.himpel-prod__btn:focus-visible {
	outline: 2px solid var(--himpel-primary);
	outline-offset: 3px;
}

.himpel-prod__btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: var(--hp-icon-size, 34px);
	height: var(--hp-icon-size, 34px);
	border-radius: 50%;
	background-color: var(--himpel-white);
	color: var(--himpel-primary);
	transition: transform 0.25s ease;
}

.himpel-prod__btn-icon svg {
	display: block;
	width: 56%;
	height: 56%;
	stroke: currentColor;
	fill: none;
}

.himpel-prod__btn:hover .himpel-prod__btn-icon,
.himpel-prod__btn:focus-visible .himpel-prod__btn-icon {
	transform: translate(2px, -2px);
}

/* --------------------------------------------------------------------------
   Right column — image panel with a legibility scrim and a bottom card
   -------------------------------------------------------------------------- */
.himpel-prod__col--right {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: var(--hp-media-h, 520px);
	border-radius: var(--hp-radius, 20px);
	overflow: hidden;
	background-color: var(--himpel-dark);
	isolation: isolate;
}

.himpel-prod__media {
	position: absolute;
	inset: 0;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	z-index: 1;
}

/*
 * Grey-black gradient plus a blur that fades out upward, so the card below
 * reads clearly without flattening the whole photo. The mask keeps the blur
 * confined to the bottom; without it the hard top edge of the blurred box
 * would be visible across the image.
 */
.himpel-prod__scrim {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: var(--hp-scrim-h, 58%);
	z-index: 2;
	pointer-events: none;
	background-image: linear-gradient(
		to top,
		rgba(18, 18, 18, 0.88) 0%,
		rgba(18, 18, 18, 0.55) 42%,
		rgba(18, 18, 18, 0) 100%
	);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	-webkit-mask-image: linear-gradient(to top, #000 45%, transparent 100%);
	mask-image: linear-gradient(to top, #000 45%, transparent 100%);
}

.himpel-prod__card {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	width: 100%;
	padding: var(--hp-card-pad, 28px);
}

.himpel-prod__card-text {
	margin: 0;
	padding: 0;
	color: var(--himpel-white);
	font-size: var(--hp-card-d, 15px);
	font-weight: 400;
	line-height: 1.6;
	max-width: 46ch;
}

/* Circular arrow, pointing right. */
.himpel-prod__card-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: var(--hp-card-icon, 48px);
	height: var(--hp-card-icon, 48px);
	border-radius: 50%;
	background-color: var(--himpel-white);
	color: var(--hp-card-icon-color, var(--himpel-dark));
	text-decoration: none;
	transition: transform 0.25s ease, background-color 0.25s ease;
}

.himpel-prod__card-btn svg {
	display: block;
	width: 42%;
	height: 42%;
	stroke: currentColor;
	fill: none;
}

.himpel-prod__card-btn:hover,
.himpel-prod__card-btn:focus-visible {
	transform: translateX(3px);
	background-color: var(--himpel-secondary);
}

.himpel-prod__card-btn:focus-visible {
	outline: 2px solid var(--himpel-white);
	outline-offset: 3px;
}

/* ==========================================================================
   Scroll-in animation
   .is-revealing is printed server-side so the pre-animation state exists in
   the first paint. himpel-products.js removes it once GSAP has seeded the
   tween, and a safety timer removes it if GSAP never loads.
   ========================================================================== */
.himpel-prod.is-revealing .himpel-prod__eyebrow,
.himpel-prod.is-revealing .himpel-prod__title,
.himpel-prod.is-revealing .himpel-prod__desc,
.himpel-prod.is-revealing .himpel-prod__btn,
.himpel-prod.is-revealing .himpel-prod__col--right {
	opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
	.himpel-prod.is-revealing .himpel-prod__eyebrow,
	.himpel-prod.is-revealing .himpel-prod__title,
	.himpel-prod.is-revealing .himpel-prod__desc,
	.himpel-prod.is-revealing .himpel-prod__btn,
	.himpel-prod.is-revealing .himpel-prod__col--right {
		opacity: 1;
	}

	.himpel-prod__btn,
	.himpel-prod__btn-icon,
	.himpel-prod__card-btn {
		transition: none;
	}

	.himpel-prod__btn:hover,
	.himpel-prod__card-btn:hover {
		transform: none;
	}
}

/* ==========================================================================
   Responsive — breakpoints mirror Elementor's defaults
   ========================================================================== */

/* --- Tablet: up to 1024px. Columns stack; the media panel keeps a set
       height so it does not collapse to nothing. --- */
@media (max-width: 1024px) {
	.himpel-prod__inner {
		padding: var(--hp-py-t, 60px) var(--hp-px-t, 20px);
	}

	.himpel-prod__grid {
		grid-template-columns: 1fr;
		gap: var(--hp-gap-t, 36px);
	}

	.himpel-prod__col--left {
		gap: 32px;
	}

	.himpel-prod__title {
		font-size: var(--hp-title-t, 34px);
		max-width: 20ch;
	}

	.himpel-prod__desc {
		font-size: var(--hp-desc-t, 16px);
	}

	.himpel-prod__col--right {
		min-height: var(--hp-media-h-t, 420px);
	}

	/* The circle steps down with the panel; at the desktop 48px it sits too
	   heavy against the smaller card copy here. */
	.himpel-prod__card-btn {
		width: var(--hp-card-icon-t, 40px);
		height: var(--hp-card-icon-t, 40px);
	}
}

/* --- Mobile: up to 767px --- */
@media (max-width: 767px) {
	.himpel-prod__inner {
		padding: var(--hp-py-m, 40px) var(--hp-px-m, 15px);
	}

	.himpel-prod__grid {
		gap: var(--hp-gap-m, 28px);
	}

	.himpel-prod__col--left {
		gap: 26px;
	}

	.himpel-prod__eyebrow {
		margin-bottom: var(--hp-gap-eyebrow-m, 20px);
		font-size: var(--hp-eyebrow-m, 13px);
	}

	.himpel-prod__title {
		font-size: var(--hp-title-m, 27px);
		max-width: 100%;
	}

	.himpel-prod__desc {
		margin-bottom: var(--hp-gap-desc-m, 24px);
		font-size: var(--hp-desc-m, 15px);
		max-width: 100%;
	}

	.himpel-prod__btn {
		padding: 7px 7px 7px 20px;
		gap: 10px;
		font-size: var(--hp-btn-m, 14px);
		--hp-icon-size: 30px;
	}

	.himpel-prod__col--right {
		min-height: var(--hp-media-h-m, 340px);
		border-radius: var(--hp-radius-m, 16px);
	}

	/* The card stacks so the long line of copy is not squeezed beside the
	   circle on a narrow screen. */
	.himpel-prod__card {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
		padding: var(--hp-card-pad-m, 18px);
	}

	.himpel-prod__card-text {
		font-size: var(--hp-card-m, 14px);
	}

	.himpel-prod__card-btn {
		width: var(--hp-card-icon-m, 32px);
		height: var(--hp-card-icon-m, 32px);
		/* Sits under the start of the copy on mobile, not out on the edge. */
		align-self: flex-start;
	}

	.himpel-prod__scrim {
		height: var(--hp-scrim-h-m, 70%);
	}
}

/* Elementor editor: keep the sticky trick out of the preview canvas, where
   the hero and this section are edited in isolation. */
.elementor-editor-active .himpel-sticky-host {
	position: relative;
}
