/**
 * Kubota Europe text card (WPBakery element `vc_kbeu_text_card`).
 *
 * Based on the Figma design 4481-1460 (the card with its eyebrow and title) and
 * 4481-1466 (the paragraph inside it): a light grey (#f6f6f6) rounded card
 * (14px radius) holding a small turquoise eyebrow (28px / Light), a large title
 * (64px / Roman, 1.2 line height) and a light paragraph (24px / Light, 1.55 line
 * height), all in black and aligned to the left — or to the right with the
 * `--right` modifier, plus an optional outlined button beside the texts
 * (`--has-button`, Figma 3727-9729). Same type scale as `vc_kbeu_product_intro`, so the two read
 * as one family when they share a page. Every part is optional: the margins are
 * set between siblings, so a missing eyebrow leaves no gap above the title.
 *
 * The card fills the width its WPBakery row/column gives it (no breakout, no own
 * max width): the row decides between site width and full width. Its padding
 * carries the design's inner distances (~115px above and below the texts, ~90px
 * to the sides @2560) as `clamp()`s whose maximum is the Figma value.
 *
 * Font family "Inter" is provided by the plugin's fonts
 * stylesheet (this handle depends on `kbeu-fonts`); we reference it through the
 * `--kbeu-font-principal` variable declared there. The bundled family ships the
 * 300 / 400 / 500 / 700 weights, so the design's 400 (Roman) title matches exactly.
 */

.kbeu-text-card {
	--kbeu-tc-teal: var( --kbeu-color-teal );
	--kbeu-tc-ink: #000;
	--kbeu-tc-surface: var( --kbeu-color-surface );

	/* Fills whatever width its WPBakery row/column gives it (no breakout, no
	   own max width): the row decides between site width and full width. */
	width: 100%;
	box-sizing: border-box;
	padding: clamp( 40px, 6.5vw, 115px ) clamp( 24px, 5vw, 90px );
	background: var( --kbeu-tc-surface );
	border-radius: 14px;
	font-family: var( --kbeu-font-principal );
	color: var( --kbeu-tc-ink );
	text-align: left;
}

/* Right-aligned variant: every text of the card moves to the right edge. */
.kbeu-text-card--right {
	text-align: right;
}

.kbeu-text-card__inner {
	width: 100%;
}

.kbeu-text-card__eyebrow {
	margin: 0;
	font-weight: 300;
	line-height: 1.2;
	font-size: clamp( 20px, 2vw, 28px );
	color: var( --kbeu-tc-teal );
}

.kbeu-text-card__title {
	margin: 0;
	/* Impreza gives every heading that is not a first child a 1.5rem padding-top;
	   the gap to the eyebrow is set below instead. */
	padding: 0;
	font-weight: 400;
	line-height: 1.2;
	font-size: clamp( 34px, 4.4vw, 64px );
	color: var( --kbeu-tc-ink );
	/* Long translations wrap instead of overflowing on narrow screens. */
	overflow-wrap: break-word;
}

/* Design: ~30px between the eyebrow's baseline and the title's cap height;
   the two line heights already add most of it. */
.kbeu-text-card__eyebrow + .kbeu-text-card__title {
	margin-top: clamp( 6px, 0.35vw, 8px );
}

.kbeu-text-card__text {
	margin: 0;
	font-weight: 300;
	line-height: 1.55;
	font-size: clamp( 17px, 1.7vw, 24px );
	color: var( --kbeu-tc-ink );
}

/* Design: ~60px between the title's last baseline and the paragraph's cap
   height (~34px once the line heights are discounted). Also applies when the
   paragraph follows the eyebrow directly (no title). */
.kbeu-text-card__eyebrow + .kbeu-text-card__text,
.kbeu-text-card__title + .kbeu-text-card__text {
	margin-top: clamp( 18px, 1.35vw, 34px );
}

/* --- Button (Figma 3727-9729, "Submit your story") --------------------------
   With a button the card becomes a row: the texts take the free width and the
   button sits at the opposite edge, level with the last line of text. The
   right-aligned variant mirrors it (button on the left). */

.kbeu-text-card--has-button .kbeu-text-card__inner {
	display: flex;
	align-items: flex-end;
	gap: clamp( 24px, 3vw, 80px );
}

.kbeu-text-card--has-button.kbeu-text-card--right .kbeu-text-card__inner {
	flex-direction: row-reverse;
}

.kbeu-text-card__body {
	flex: 1 1 auto;
	min-width: 0;
}

.kbeu-text-card__action {
	flex: 0 0 auto;
}

/* Context tweaks over `.kbeu-btn--outline`: the design's button has a 1px black
   outline, 26px side padding and a 20px / Roman label (the shared button is
   wider, thicker and smaller) — the Info CTA's button. */
.kbeu-text-card__btn {
	padding: clamp( 8px, 0.75vw, 12px ) clamp( 18px, 1.8vw, 26px );
	border-width: 1px;
	font-family: var( --kbeu-font-principal );
	font-size: clamp( 16px, 1.4vw, 20px );
	font-weight: 400;
	line-height: 1.5;
	white-space: nowrap;
}

@media ( max-width: 767px ) {
	.kbeu-text-card--has-button .kbeu-text-card__inner,
	.kbeu-text-card--has-button.kbeu-text-card--right .kbeu-text-card__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 24px;
	}

	.kbeu-text-card--has-button.kbeu-text-card--right .kbeu-text-card__inner {
		align-items: flex-end;
	}

	.kbeu-text-card--has-button .kbeu-text-card__body {
		width: 100%;
	}

	/* Narrower side padding so a long label still fits on one line on a 390px phone. */
	.kbeu-text-card__btn {
		padding-left: 14px;
		padding-right: 14px;
		white-space: normal;
	}
}

/* Placeholder shown in the WPBakery front-end editor when every text is empty. */
.kbeu-text-card__placeholder {
	margin: 0;
	padding: 24px;
	border: 1px dashed var( --kbeu-tc-teal );
	border-radius: 8px;
	font-weight: 300;
	font-size: 15px;
	color: var( --kbeu-color-gray-blue );
	text-align: left;
}
