/* ==========================================================================
   HIMPEL Global Recognition — boxed section, green panel, image + stats
   --------------------------------------------------------------------------
   Everything is scoped under .himpel-glob. Nothing targets the theme or any
   global element.
   ========================================================================== */

.himpel-glob {
	--himpel-primary: #0b7347;
	--himpel-primary-dark: #095c39;
	--himpel-secondary: #f3f4ea;
	--himpel-white: #ffffff;
	--himpel-dark: #121212;

	position: relative;
	z-index: 2;
	width: 100%;
	background-color: var(--hg-bg, var(--himpel-secondary));
	box-sizing: border-box;
}

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

.himpel-glob__inner {
	width: 100%;
	max-width: var(--hg-max, 1340px);
	margin: 0 auto;
	padding: var(--hg-py-d, 80px) var(--hg-px-d, 40px);
}

/* --------------------------------------------------------------------------
   The green panel that holds everything
   -------------------------------------------------------------------------- */
.himpel-glob__panel {
	background-color: var(--hg-panel-bg, var(--himpel-primary));
	padding: var(--hg-panel-pad, 20px);
	border-radius: var(--hg-panel-radius, 24px);
}

.himpel-glob__grid {
	display: grid;
	grid-template-columns: var(--hg-cols, 1fr 1fr);
	gap: var(--hg-gap, 20px);
	align-items: stretch;
}

/* --------------------------------------------------------------------------
   Left — image
   -------------------------------------------------------------------------- */
.himpel-glob__media {
	position: relative;
	min-height: var(--hg-media-h, 460px);
	border-radius: var(--hg-media-radius, 16px);
	overflow: hidden;
	background-color: var(--himpel-primary-dark);
	background-position: var(--hg-media-pos, center center);
	background-repeat: no-repeat;
	background-size: cover;
}

/* --------------------------------------------------------------------------
   Right — copy on top, stats pinned to the bottom
   -------------------------------------------------------------------------- */
.himpel-glob__content {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 32px;
	min-height: 100%;
	padding: var(--hg-content-pad, 20px 16px 0);
}

/* The <h2> is the pill itself. */
.himpel-glob__eyebrow {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	margin: 0 0 var(--hg-gap-eyebrow, 22px);
	padding: 8px 18px;
	border: 1px solid var(--hg-pill-border, rgba(255, 255, 255, 0.42));
	border-radius: 100px;
	color: var(--himpel-white);
	font-size: var(--hg-eyebrow-d, 14px);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.02em;
}

.himpel-glob__eyebrow::before {
	content: "";
	width: 7px;
	height: 7px;
	margin-right: 9px;
	border-radius: 50%;
	background-color: var(--himpel-white);
	flex: 0 0 auto;
}

.himpel-glob__title {
	margin: 0 0 var(--hg-gap-title, 16px);
	padding: 0;
	/* Inherits the Liquid theme's H3 typography; only scale is ours. */
	color: var(--himpel-white);
	font-size: var(--hg-title-d, 40px);
	font-weight: 600;
	line-height: 1.18;
	letter-spacing: -0.4px;
	text-wrap: balance;
}

.himpel-glob__desc {
	margin: 0;
	padding: 0;
	color: var(--himpel-white);
	font-size: var(--hg-desc-d, 17px);
	font-weight: 400;
	line-height: 1.7;
	opacity: 0.88;
	max-width: 48ch;
}

/* --------------------------------------------------------------------------
   Stat boxes
   -------------------------------------------------------------------------- */
.himpel-glob__stats {
	display: grid;
	grid-template-columns: repeat(var(--hg-stat-cols, 2), minmax(0, 1fr));
	gap: var(--hg-stat-gap, 16px);
}

.himpel-glob__stat {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: var(--hg-stat-inner-gap, 34px);
	min-height: var(--hg-stat-h, 190px);
	padding: var(--hg-stat-pad, 20px);
	border-radius: var(--hg-stat-radius, 14px);
	/* A translucent white reads as a lighter shade of whatever the panel
	   colour is, so the boxes stay in key if the green is ever changed. */
	background-color: var(--hg-stat-bg, rgba(255, 255, 255, 0.12));
}

.himpel-glob__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	align-self: flex-start;
	width: var(--hg-icon-size, 46px);
	height: var(--hg-icon-size, 46px);
	border-radius: 50%;
	background-color: var(--hg-icon-bg, var(--himpel-white));
}

.himpel-glob__icon img {
	display: block;
	width: var(--hg-icon-glyph, 52%);
	height: var(--hg-icon-glyph, 52%);
	object-fit: contain;
}

.himpel-glob__stat-title {
	margin: 0 0 6px;
	padding: 0;
	color: var(--himpel-white);
	font-size: var(--hg-stat-title-d, 27px);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.4px;
}

/* Locks the width while the counter runs, so the label beside it does not
   jitter as the digits change. */
.himpel-glob__count {
	display: inline-block;
	font-variant-numeric: tabular-nums;
}

.himpel-glob__stat-desc {
	margin: 0;
	padding: 0;
	color: var(--himpel-white);
	font-size: var(--hg-stat-desc-d, 14px);
	font-weight: 400;
	line-height: 1.5;
	opacity: 0.82;
}

/* ==========================================================================
   Scroll-in animation
   .is-revealing is printed server-side so the pre-animation state exists in
   the first paint; the script removes it once GSAP has seeded the tween.
   ========================================================================== */
.himpel-glob.is-revealing .himpel-glob__eyebrow,
.himpel-glob.is-revealing .himpel-glob__title,
.himpel-glob.is-revealing .himpel-glob__desc,
.himpel-glob.is-revealing .himpel-glob__stat,
.himpel-glob.is-revealing .himpel-glob__media {
	opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
	.himpel-glob.is-revealing .himpel-glob__eyebrow,
	.himpel-glob.is-revealing .himpel-glob__title,
	.himpel-glob.is-revealing .himpel-glob__desc,
	.himpel-glob.is-revealing .himpel-glob__stat,
	.himpel-glob.is-revealing .himpel-glob__media {
		opacity: 1;
	}
}

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

/* --- Tablet: up to 1024px --- */
@media (max-width: 1024px) {
	.himpel-glob__inner {
		padding: var(--hg-py-t, 60px) var(--hg-px-t, 20px);
	}

	.himpel-glob__grid {
		grid-template-columns: 1fr;
		gap: var(--hg-gap-t, 20px);
	}

	/*
	 * Stacked here, the panel is wide and only 320px tall, so a centred crop
	 * takes a band from roughly a quarter down and loses the HIMPEL sign — it
	 * sits about 14% down the photo. Anchoring to the top keeps it in frame at
	 * every tablet width.
	 */
	.himpel-glob__media {
		min-height: var(--hg-media-h-t, 320px);
		background-position: var(--hg-media-pos-t, center top);
	}

	.himpel-glob__content {
		padding: var(--hg-content-pad-t, 8px 6px 4px);
		gap: 28px;
	}

	.himpel-glob__title {
		font-size: var(--hg-title-t, 32px);
	}

	.himpel-glob__desc {
		font-size: var(--hg-desc-t, 16px);
		max-width: 100%;
	}

	.himpel-glob__stat {
		min-height: var(--hg-stat-h-t, 170px);
	}
}

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

	.himpel-glob__panel {
		padding: var(--hg-panel-pad-m, 14px);
		border-radius: var(--hg-panel-radius-m, 18px);
	}

	.himpel-glob__media {
		min-height: var(--hg-media-h-m, 230px);
		border-radius: var(--hg-media-radius-m, 12px);
		background-position: var(--hg-media-pos-m, center center);
	}

	.himpel-glob__content {
		gap: 24px;
	}

	.himpel-glob__eyebrow {
		margin-bottom: var(--hg-gap-eyebrow-m, 16px);
		font-size: var(--hg-eyebrow-m, 13px);
	}

	.himpel-glob__title {
		font-size: var(--hg-title-m, 26px);
	}

	.himpel-glob__desc {
		font-size: var(--hg-desc-m, 15px);
	}

	/* The two boxes stay side by side — stacking them makes the panel very
	   tall for very little gain. Type and padding step down instead. */
	.himpel-glob__stats {
		gap: var(--hg-stat-gap-m, 10px);
	}

	.himpel-glob__stat {
		gap: 20px;
		min-height: var(--hg-stat-h-m, 150px);
		padding: var(--hg-stat-pad-m, 14px);
	}

	.himpel-glob__icon {
		width: var(--hg-icon-size-m, 38px);
		height: var(--hg-icon-size-m, 38px);
	}

	.himpel-glob__stat-title {
		font-size: var(--hg-stat-title-m, 17px);
	}

	.himpel-glob__stat-desc {
		font-size: var(--hg-stat-desc-m, 12px);
		line-height: 1.4;
	}
}

/* Very narrow phones: give the boxes their own rows rather than squeezing
   two-word labels into ~140px. */
@media (max-width: 360px) {
	.himpel-glob__stats {
		grid-template-columns: 1fr;
	}

	.himpel-glob__stat {
		min-height: 0;
		gap: 16px;
	}
}
