/* BP How To Use widget styles
 *
 * Centered eyebrow + title sits above a single row of four
 * premium visual step cards. Each card is a flex column with
 * a wide landscape image, a dark-green number badge that
 * overlaps the bottom edge of the image, an uppercase title
 * and a short centered description. The grid is 4 cols on
 * desktop, 2x2 on tablet, 1 col on mobile, with equal card
 * heights via grid + flex stretch. All rules stay under
 * .bp-how-to-use. Logical properties keep LTR/RTL aligned.
 */

.bp-how-to-use {
	--bp-h2u-fg:           #374F37;
	--bp-h2u-muted:        #5C6A5C;
	--bp-h2u-pad:          32px;
	--bp-h2u-inner-max:    1200px;
	--bp-h2u-gap:          20px;
	--bp-h2u-card-radius:  12px;
	--bp-h2u-card-border:  1px solid #E4DCCB;
	--bp-h2u-card-bg:      #FBF6EC;
	--bp-h2u-number-size:  52px;
	--bp-h2u-image-height: 200px; /* fixed pixel height so every card image is identical */
	--bp-h2u-font:         var(--bp-font-body, 'Manrope', system-ui, sans-serif);
	--bp-h2u-display:      var(--bp-font-display, 'DM Serif Display', Georgia, serif);

	/* Transparent section so the page background shows through;
	 * no border, no radius, no shadow. Only vertical padding is
	 * kept to preserve breathing room above/below the cards. */
	color: var(--bp-h2u-fg);
	font-family: var(--bp-h2u-font);
	padding-block: var(--bp-h2u-pad);
	padding-inline: 0;
}

.bp-how-to-use__inner {
	max-inline-size: var(--bp-h2u-inner-max);
	margin-inline: auto;
}

/* ---- Heading ---- */
.bp-how-to-use__head {
	text-align: center;
	margin-block-end: 36px;
}

.bp-how-to-use__eyebrow {
	margin: 0 0 10px;
	font-family: var(--bp-h2u-font);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--bp-h2u-fg);
}

.bp-how-to-use__title {
	margin: 0;
	font-family: var(--bp-h2u-display);
	font-weight: 400;
	font-size: clamp(28px, 3.4vw, 40px);
	line-height: 1.15;
	letter-spacing: 0.01em;
	color: var(--bp-h2u-fg);
	text-transform: uppercase;
}

/* ---- Cards grid ----
 * CSS grid with stretch on the cross axis so all four cards
 * are the same height regardless of description length. The
 * default 4-column track is collapsed to 2 columns on tablet
 * and 1 on mobile. */
.bp-how-to-use__steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--bp-h2u-gap);
	align-items: stretch;
}

/* ---- Card ----
 * The card is a flex column. The image takes the top, the
 * number badge is absolutely positioned so it can overlap the
 * image bottom edge, the body takes the rest. flex-grow on
 * the body makes sure the title/description sit at the
 * bottom of the card no matter how tall the card is. */
.bp-how-to-use__card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-inline-size: 0;
	background-color: var(--bp-h2u-card-bg);
	border: var(--bp-h2u-card-border);
	border-radius: var(--bp-h2u-card-radius);
	overflow: hidden;
	isolation: isolate;
}

/* Image wrapper: fixed pixel `block-size` so every card has
 * the exact same image height regardless of column width or
 * natural image dimensions. The wrapper keeps
 * `overflow: visible` so the absolutely positioned number
 * badge can still overflow downward onto the body (its
 * positioning must not change). The `<img>` uses
 * `object-fit: cover` + `object-position: center` so the
 * photo always fills the fixed area cleanly. */
.bp-how-to-use__image {
	position: relative;
	inline-size: 100%;
	block-size: var(--bp-h2u-image-height);
	overflow: visible;
	border-start-start-radius: var(--bp-h2u-card-radius);
	border-start-end-radius:   var(--bp-h2u-card-radius);
	background-color: rgba(184, 178, 90, 0.08); /* subtle olive tint placeholder */
}

.bp-how-to-use__image img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	object-position: center;
	border-start-start-radius: var(--bp-h2u-card-radius);
	border-start-end-radius:   var(--bp-h2u-card-radius);
}

/* Number badge: dark-green circle sitting exactly on the image
 * bottom edge. Anchored to the image wrapper (its positioning
 * context) and pushed down by half its own height so the seam
 * between image and body runs through the middle of the badge.
 * z-index 2 keeps it above the image. */
.bp-how-to-use__number {
	position: absolute;
	inset-inline-start: 50%;
	inset-block-end: 0;
	transform: translate(-50%, 50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: var(--bp-h2u-number-size);
	block-size: var(--bp-h2u-number-size);
	border-radius: 50%;
	background-color: var(--bp-h2u-fg);
	color: #FFFFFF;
	font-weight: 700;
	font-size: 18px;
	line-height: 1;
	z-index: 2;
	box-shadow: 0 4px 10px rgba(31, 42, 31, 0.18);
}

.bp-how-to-use__card-body {
	/* Reserve room at the top so the overlapping number never
	 * collides with the title. */
	padding-block-start: calc(var(--bp-h2u-number-size) / 2 + 18px);
	/* Comfortable bottom padding so the description never sits
	 * flush against the card's bottom border. Logical inline
	 * padding keeps LTR/RTL aligned. `!important` is required
	 * because the legacy `card_padding` Elementor control
	 * outputs a `padding` shorthand that would otherwise win on
	 * specificity and collapse the top/bottom spacing. */
	padding-block-end: 24px !important;
	padding-inline: 22px !important;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 6px;
	flex: 1 1 auto;
}

.bp-how-to-use__step-title {
	margin: 0;
	font-family: var(--bp-h2u-font);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	color: var(--bp-h2u-fg);
	line-height: 1.3;
}

.bp-how-to-use__step-desc {
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: var(--bp-h2u-muted);
	max-inline-size: 28ch;
}

/* ---- Tablet: 2 x 2 ---- */
@media (max-width: 1024px) {
	.bp-how-to-use {
		--bp-h2u-pad: 24px;
		--bp-h2u-gap: 18px;
	}

	.bp-how-to-use__steps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.bp-how-to-use__step-desc {
		max-inline-size: none;
	}
}

/* ---- Mobile: 1 per row ---- */
@media (max-width: 600px) {
	.bp-how-to-use {
		--bp-h2u-pad: 20px;
		--bp-h2u-gap: 14px;
		--bp-h2u-number-size: 46px;
	}

	.bp-how-to-use__steps {
		grid-template-columns: minmax(0, 1fr);
	}

	.bp-how-to-use__card-body {
		/* Slightly reduced but still comfortable bottom
		 * padding for the stacked single-column layout. */
		padding-block-end: 18px !important;
	}

	.bp-how-to-use__step-desc {
		font-size: 12px;
		max-inline-size: none;
	}
}
