/* ==========================================================================
   HIMPEL About "why choose" — brand card beside an image
   --------------------------------------------------------------------------
   Everything is scoped under .himpel-achoose. Nothing targets the theme or any
   global element.
   ========================================================================== */

.himpel-achoose {
	/* 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;
	z-index: 2;
	width: 100%;
	background-color: var(--hac-bg, var(--himpel-white));
	box-sizing: border-box;
}

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

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

/*
 * Both panels are grid items, so `stretch` — the default — makes each take the
 * full height of the row. Whichever of the two is taller sets that height and
 * the other follows, which is what keeps the card and the photo level without
 * either needing a fixed height.
 */
.himpel-achoose__grid {
	display: grid;
	grid-template-columns: var(--hac-cols, 1fr 1fr);
	gap: var(--hac-gap, 24px);
	align-items: stretch;
}

/* --------------------------------------------------------------------------
   Left — the brand card
   -------------------------------------------------------------------------- */
.himpel-achoose__panel {
	display: flex;
	flex-direction: column;
	/* A grid item's automatic minimum size is its content's; without this a
	   long word could widen the column past its share. */
	min-width: 0;
	padding: var(--hac-panel-pad, 48px 44px);
	border-radius: var(--hac-radius, 24px);
	background-color: var(--hac-panel-bg, var(--himpel-primary));
}

.himpel-achoose__head {
	margin-bottom: var(--hac-head-gap, 44px);
}

.himpel-achoose--head-center .himpel-achoose__head {
	text-align: center;
}

.himpel-achoose--head-left .himpel-achoose__head {
	text-align: left;
}

/*
 * The <h2> is the pill itself, same as every other section — but sitting on
 * the brand colour rather than on a light ground, so the border and the dot
 * are white instead of dark.
 */
.himpel-achoose__eyebrow {
	display: inline-flex;
	align-items: center;
	margin: 0 0 var(--hac-eyebrow-gap, 18px);
	padding: 8px 18px;
	border: 1px solid var(--hac-pill-border, rgba(255, 255, 255, 0.42));
	border-radius: 100px;
	color: var(--himpel-white);
	font-size: var(--hac-eyebrow-d, 14px);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.02em;
	/* The pill is inline-flex, so text-align on the head centres it. */
	text-align: left;
}

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

.himpel-achoose__title {
	margin: 0;
	padding: 0;
	/* Inherits the Liquid theme's H3 typography; only scale and colour here. */
	color: var(--himpel-white);
	font-size: var(--hac-title-d, 32px);
	font-weight: 600;
	line-height: 1.22;
	letter-spacing: -0.2px;
	text-wrap: balance;
}

/* --------------------------------------------------------------------------
   The icon points
   -------------------------------------------------------------------------- */
/*
 * The list follows the heading directly. It is deliberately not pushed to the
 * foot of the card: the photo beside it is taller, and spending all of that
 * slack in one gap under the heading left the two apart enough to read as
 * unrelated. Any spare height falls at the bottom of the card instead.
 */
.himpel-achoose__list {
	display: flex;
	flex-direction: column;
	gap: var(--hac-item-gap, 30px);
}

.himpel-achoose__item {
	display: flex;
	align-items: flex-start;
	gap: var(--hac-item-inner-gap, 16px);
}

.himpel-achoose__glyph {
	display: block;
	flex: 0 0 auto;
	width: var(--hac-icon, 26px);
	height: var(--hac-icon, 26px);
	/* Aligns the glyph's optical centre with the first line of the title
	   rather than with the very top of its box. */
	margin-top: 2px;
	/* A mask rather than an <img>, so the icon paints white on the card
	   whatever colour the source file is drawn in. */
	background-color: var(--hac-glyph-color, var(--himpel-white));
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

/* Without mask support the glyph would paint as a solid white square, so drop
   the fill and show nothing rather than a block. */
@supports not ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
	.himpel-achoose__glyph {
		background-color: transparent;
	}
}

.himpel-achoose__item-body {
	min-width: 0;
}

.himpel-achoose__item-title {
	margin: 0 0 6px;
	padding: 0;
	color: var(--himpel-white);
	font-size: var(--hac-ititle-d, 17px);
	font-weight: 600;
	line-height: 1.3;
}

.himpel-achoose__item-text {
	margin: 0;
	padding: 0;
	color: var(--himpel-white);
	font-size: var(--hac-itext-d, 14px);
	font-weight: 400;
	line-height: 1.6;
	opacity: 0.82;
}

/* --------------------------------------------------------------------------
   Right — the image
   -------------------------------------------------------------------------- */
.himpel-achoose__media {
	min-width: 0;
	min-height: var(--hac-media-h, 560px);
	border-radius: var(--hac-radius, 24px);
	/* Shows through while the image loads, so the column never flashes as a
	   white hole beside the green card. */
	background-color: var(--himpel-secondary);
	background-position: var(--hac-media-pos, center center);
	background-repeat: no-repeat;
	background-size: cover;
}

/* ==========================================================================
   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-achoose.is-revealing .himpel-achoose__panel,
.himpel-achoose.is-revealing .himpel-achoose__media,
.himpel-achoose.is-revealing .himpel-achoose__title,
.himpel-achoose.is-revealing .himpel-achoose__eyebrow,
.himpel-achoose.is-revealing .himpel-achoose__item {
	opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
	.himpel-achoose.is-revealing .himpel-achoose__panel,
	.himpel-achoose.is-revealing .himpel-achoose__media,
	.himpel-achoose.is-revealing .himpel-achoose__title,
	.himpel-achoose.is-revealing .himpel-achoose__eyebrow,
	.himpel-achoose.is-revealing .himpel-achoose__item {
		opacity: 1;
	}
}

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

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

	.himpel-achoose__panel {
		padding: var(--hac-panel-pad-t, 34px 28px);
	}

	.himpel-achoose__title {
		font-size: var(--hac-title-t, 27px);
	}

	.himpel-achoose__media {
		min-height: var(--hac-media-h-t, 400px);
		background-position: var(--hac-media-pos-t, center center);
	}
}

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

	/*
	 * One column. minmax(0, 1fr) rather than 1fr: the plain keyword is
	 * minmax(auto, 1fr), and an auto floor lets a wide child push the column
	 * past the screen.
	 */
	.himpel-achoose__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--hac-gap-m, 20px);
	}

	.himpel-achoose__panel {
		padding: var(--hac-panel-pad-m, 28px 22px);
		border-radius: var(--hac-radius-m, 16px);
	}

	.himpel-achoose__list {
		gap: var(--hac-item-gap-m, 24px);
	}

	.himpel-achoose__head {
		margin-bottom: var(--hac-head-gap-m, 30px);
	}

	.himpel-achoose__title {
		font-size: var(--hac-title-m, 23px);
		line-height: 1.24;
	}

	.himpel-achoose__eyebrow {
		font-size: var(--hac-eyebrow-m, 13px);
	}

	.himpel-achoose__glyph {
		width: var(--hac-icon-m, 22px);
		height: var(--hac-icon-m, 22px);
	}

	.himpel-achoose__media {
		min-height: var(--hac-media-h-m, 280px);
		border-radius: var(--hac-radius-m, 16px);
		background-position: var(--hac-media-pos-m, center center);
	}
}
