/**
 * Kubota Europe media header (WPBakery element `vc_kbeu_media_header`, and the
 * markup of the product header `vc_kbeu_product_header`).
 *
 * Based on the Figma designs 4244-6165 (a rounded media band, 1896 × 826 at the
 * 2560 artboard, with the `pause_circle` button 4244-6169 at its bottom right)
 * and 4040-2125 (the product header: 1896 × 735, a dark overlay and a centred
 * catalog label over the product title). Sizes are `clamp()`s whose maximum is
 * the Figma value at 2560. The optional sticky bar printed below the band is the
 * product sticky menu's component (`kbeu-product-sticky-menu.css`).
 *
 * 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.
 */

.kbeu-media-header {
	--kbeu-mh-radius: 15px;
	--kbeu-mh-toggle-size: clamp( 44px, 2.9vw, 74px );
	--kbeu-mh-toggle-right: clamp( 16px, 3.16vw, 81px );
	--kbeu-mh-toggle-bottom: clamp( 16px, 3.31vw, 85px );

	position: relative;
	width: 100%;
	aspect-ratio: 1896 / 826;
	min-height: 360px;
	overflow: hidden;
	color: #fff;
	background: var( --kbeu-color-near-black );
	border-radius: var( --kbeu-mh-radius );
}

/* The product header's own ratio (Figma 4040-2125). */
.kbeu-media-header[data-height="banner"] {
	aspect-ratio: 1896 / 735;
}

.kbeu-media-header[data-height="tall"] {
	aspect-ratio: auto;
	height: 80vh;
	min-height: 480px;
}

.kbeu-media-header[data-height="fullscreen"] {
	aspect-ratio: auto;
	height: 100vh;
	min-height: 480px;
}

/* Only the top corners are rounded when the sticky bar continues the card below
   it: the product header (its sticky menu is the next element) and a media header
   printing its own bar (`--with-menu`; the bar has the rounded bottom corners). */
.kbeu-media-header--product,
.kbeu-media-header--with-menu {
	border-radius: var( --kbeu-mh-radius ) var( --kbeu-mh-radius ) 0 0;
}

/* --- Cover media ------------------------------------------------------ */

.kbeu-media-header__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
}

.kbeu-media-header__picture {
	display: block;
}

.kbeu-media-header__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.kbeu-media-header__overlay {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, var( --kbeu-mh-overlay, 0 ) );
	pointer-events: none;
}

/* --- Centered text ---------------------------------------------------- */

.kbeu-media-header__text {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 24px;
	text-align: center;
}

.kbeu-media-header__eyebrow {
	margin: 0;
	font-family: var( --kbeu-font-principal );
	font-weight: 300;
	line-height: 1.55;
	font-size: clamp( 16px, 1.7vw, 24px );
}

.kbeu-media-header__title {
	margin: 0;
	font-family: var( --kbeu-font-principal );
	font-weight: 500;
	line-height: 1.02;
	font-size: clamp( 34px, 5vw, 70px );
	color: #fff;
	padding-top: 0;
}

/* --- Video play/pause toggle ------------------------------------------ */

.kbeu-media-header__toggle {
	position: absolute;
	right: var( --kbeu-mh-toggle-right );
	bottom: var( --kbeu-mh-toggle-bottom );
	z-index: 3;
	width: var( --kbeu-mh-toggle-size );
	height: var( --kbeu-mh-toggle-size );
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.kbeu-media-header__toggle:hover,
.kbeu-media-header__toggle:focus-visible {
	opacity: 1;
	transform: scale( 1.05 );
}

.kbeu-media-header__icon {
	display: none;
}

/* The icons are the Figma export (and its play twin) as drawn: the glyph sits low
   in its 74px box, which is what lines it up with the design. */
.kbeu-media-header__icon img {
	display: block;
	width: 100%;
	height: auto;
}

.kbeu-media-header__toggle.is-playing .kbeu-media-header__icon--pause,
.kbeu-media-header__toggle.is-paused .kbeu-media-header__icon--play {
	display: block;
}
