/**
 * Kubota Europe country office (WPBakery element `vc_kbeu_country_office`).
 *
 * Based on the contact page of the Figma design (3727-12010 … 3727-12107): the
 * map (919 × 447, 14px corners) on the left and the text column on the right,
 * 182px apart on a 1863px content column at 2560 — a 919 / 182 / 762 split, kept
 * as proportions so the block follows whatever width its row gives it. The text
 * column is the heading template (turquoise 28px / Light eyebrow, 24px / Light
 * paragraph) whose title is drawn here at the office's 64px / Roman instead of
 * the heading's 70px / Medium; below it two equal columns — "Address" and
 * "Contact details" — each a 32px / Bold sub-heading (#161618, −2% tracking)
 * over 24px / Light lines, 58px under the paragraph and 28px under the heading.
 *
 * Sizes are `clamp()`s whose maximum is the Figma value at 2560px. Side by
 * side, the map stretches to the height of the text column (as in the Kubota
 * Finance block, Figma 4166-7514) with a floor so a short text never leaves a
 * strip; stacked, it keeps the design's 919 / 447 proportion. The map stacks
 * over the text on tablets, the two detail columns on phones.
 *
 * Font family "Inter" comes from the plugin's fonts stylesheet
 * (this handle depends on `kbeu-fonts`), referenced via `--kbeu-font-principal`;
 * the handle also depends on `kbeu-heading` so the title override below wins.
 */

.kbeu-country-office {
	--kbeu-co-radius: 14px;
	--kbeu-co-gap: clamp( 24px, 9.8%, 182px );

	display: grid;
	grid-template-columns: minmax( 0, 919fr ) minmax( 0, 762fr );
	column-gap: var( --kbeu-co-gap );
	align-items: start;
	width: 100%;
	margin: 0;
	font-family: var( --kbeu-font-principal );
	color: #000;
}

.kbeu-country-office,
.kbeu-country-office *,
.kbeu-country-office *::before,
.kbeu-country-office *::after {
	box-sizing: border-box;
}

/* No map (none configured or hidden): the text takes the whole width. */
.kbeu-country-office[data-map='0'] {
	grid-template-columns: minmax( 0, 1fr );
}

/* --- Map -------------------------------------------------------------------- */

.kbeu-country-office__map {
	overflow: hidden;
	aspect-ratio: 919 / 447;
	border-radius: var( --kbeu-co-radius );
	background: var( --kbeu-color-surface-alt );
}

.kbeu-country-office__iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Side by side: as tall as the text column (the iframe fills it). */
@media ( min-width: 861px ) {
	.kbeu-country-office__map {
		align-self: stretch;
		aspect-ratio: auto;
		min-height: clamp( 300px, 22vw, 560px );
	}
}

/* --- Text column ------------------------------------------------------------ */

.kbeu-country-office__body {
	min-width: 0;
}

/* The heading partial with the office's title metrics (64px / Roman). */
.kbeu-country-office .kbeu-heading__title {
	font-weight: 400;
	font-size: clamp( 34px, 4.4vw, 64px );
	line-height: 1.2;
}

/* Same margin as a section title under an eyebrow (see kbeu-heading.css). */
.kbeu-country-office .kbeu-heading__eyebrow + .kbeu-heading__title {
	margin-top: clamp( 2px, 0.2vw, 3px );
}

.kbeu-country-office__details {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	column-gap: clamp( 16px, 1.5vw, 32px );
	row-gap: clamp( 20px, 1.6vw, 40px );
	margin-top: clamp( 28px, 2.3vw, 58px );
}

.kbeu-country-office__detail-title {
	margin: 0 0 clamp( 12px, 1.1vw, 28px );
	font-family: var( --kbeu-font-principal );
	font-weight: 700;
	line-height: 1.2;
	font-size: clamp( 22px, 1.25vw, 32px );
	letter-spacing: -0.02em;
	color: #161618;
}

.kbeu-country-office__lines {
	margin: 0;
	font-family: var( --kbeu-font-principal );
	font-weight: 300;
	line-height: 1.55;
	font-size: clamp( 17px, 0.95vw, 24px );
	color: #000;
}

.kbeu-country-office__lines a {
	color: inherit;
	text-decoration: none;
}

/* A phone number never breaks across lines; it moves to the next line whole. */
.kbeu-country-office__lines a[href^="tel:"] {
	white-space: nowrap;
}

.kbeu-country-office__lines a:hover,
.kbeu-country-office__lines a:focus-visible {
	color: var( --kbeu-color-teal );
}

/* Placeholder shown in the WPBakery front-end editor when the country has no office. */
.kbeu-country-office__placeholder {
	margin: 0;
	padding: 24px;
	border: 1px dashed var( --kbeu-color-teal );
	border-radius: 8px;
	font-family: var( --kbeu-font-principal );
	font-weight: 300;
	font-size: 15px;
	color: var( --kbeu-color-gray-blue );
}

/* --- Narrow screens --------------------------------------------------------- */

/* Tablets: the map stacks over the text. */
@media ( max-width: 860px ) {
	.kbeu-country-office {
		grid-template-columns: minmax( 0, 1fr );
		row-gap: clamp( 24px, 4vw, 40px );
	}
}

/* Phones: one detail column. */
@media ( max-width: 640px ) {
	.kbeu-country-office__details {
		grid-template-columns: minmax( 0, 1fr );
	}
}
