/**
 * DTR Vision Mission widget styles.
 *
 * Desktop shows two full width rows with an arrow shaped image on one side and
 * a badge medallion sitting on the seam. Tablet and mobile drop to box mode with
 * the image on top and the badge straddling the image edge. Colours, spacing and
 * typography are overridable from the Elementor panel.
 *
 * @package SH_DTR_Core
 */

.dtr-vm {
	--dtr-vm-blue: #1b6bf4;
	--dtr-vm-dark: #101828;
	--dtr-vm-gray: #667085;
	--dtr-vm-media-w: 44%;
	--dtr-vm-arrow: 46px;
	--dtr-vm-badge: 112px;
}

/* Header. */
.dtr-vm__header {
	max-width: 780px;
	margin: 0 auto 46px;
	text-align: center;
}

.dtr-vm__overline {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 16px;
	color: var(--dtr-vm-blue);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.dtr-vm__overline::before,
.dtr-vm__overline::after {
	content: "";
	width: 42px;
	height: 1px;
	background-color: currentColor;
	opacity: 0.5;
}

.dtr-vm__heading {
	margin: 0 0 16px;
	color: var(--dtr-vm-dark);
	font-size: 38px;
	font-weight: 800;
	line-height: 1.2;
}

.dtr-vm__heading-hl {
	color: var(--dtr-vm-blue);
}

.dtr-vm__subtitle {
	margin: 0 auto;
	max-width: 620px;
	color: var(--dtr-vm-gray);
	font-size: 16px;
	line-height: 1.7;
}

/* Rows. */
.dtr-vm__rows {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.dtr-vm__row {
	position: relative;
	display: flex;
	min-width: 0;
	background-color: #ffffff;
	border: 1px solid #d7e3fb;
	border-radius: 22px;
	box-shadow: 0 14px 40px rgba(16, 24, 40, 0.07);
	overflow: hidden;
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.dtr-vm__row--img-right {
	flex-direction: row-reverse;
}

/* Media column with the arrow shape. */
.dtr-vm__media {
	position: relative;
	flex: 0 0 var(--dtr-vm-media-w);
	max-width: var(--dtr-vm-media-w);
	min-height: 300px;
	overflow: hidden;
}

.dtr-vm__row--img-left .dtr-vm__media {
	clip-path: polygon(0 0, calc(100% - var(--dtr-vm-arrow)) 0, 100% 50%, calc(100% - var(--dtr-vm-arrow)) 100%, 0 100%);
}

.dtr-vm__row--img-right .dtr-vm__media {
	clip-path: polygon(var(--dtr-vm-arrow) 0, 100% 0, 100% 100%, var(--dtr-vm-arrow) 100%, 0 50%);
}

.dtr-vm__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

/* Badge medallion sitting on the seam. */
.dtr-vm__badge {
	--dtr-vm-badge-bg: #1b6bf4;
	--dtr-vm-badge-color: #ffffff;
	--dtr-vm-badge-ring: #a9c6ff;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: var(--dtr-vm-badge);
	height: var(--dtr-vm-badge);
	z-index: 3;
}

.dtr-vm__row--img-left .dtr-vm__badge {
	left: calc(var(--dtr-vm-media-w) - (var(--dtr-vm-badge) / 2));
}

.dtr-vm__row--img-right .dtr-vm__badge {
	right: calc(var(--dtr-vm-media-w) - (var(--dtr-vm-badge) / 2));
}

.dtr-vm__badge::before {
	content: "";
	position: absolute;
	inset: -9px;
	z-index: 1;
}

.dtr-vm__badge-inner {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	width: 100%;
	height: 100%;
	padding: 6px;
	color: var(--dtr-vm-badge-color);
	background-color: var(--dtr-vm-badge-bg);
	text-align: center;
	box-sizing: border-box;
}

.dtr-vm__badge-icon {
	display: inline-flex;
	font-size: 26px;
	line-height: 1;
}

.dtr-vm__badge-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.dtr-vm__badge-icon img {
	width: 1em;
	height: 1em;
	object-fit: contain;
}


/* Circle badge with a dashed ring. */
.dtr-vm__badge--circle .dtr-vm__badge-inner {
	border-radius: 50%;
}

.dtr-vm__badge--circle::before {
	border-radius: 50%;
	border: 2px dashed var(--dtr-vm-badge-ring);
}

/* Hexagon badge with an outline ring. */
.dtr-vm__badge--hexagon .dtr-vm__badge-inner {
	clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.dtr-vm__badge--hexagon::before {
	background-color: var(--dtr-vm-badge-ring);
	clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

/* Body and content. */
.dtr-vm__body {
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
	padding: 36px 40px;
}

.dtr-vm__content {
	--dtr-vm-accent: #1b6bf4;
	flex: 1 1 auto;
	min-width: 0;
}

.dtr-vm__row--img-left .dtr-vm__content {
	padding-left: calc((var(--dtr-vm-badge) / 2) + 8px);
}

.dtr-vm__row--img-right .dtr-vm__content {
	padding-right: calc((var(--dtr-vm-badge) / 2) + 8px);
}

/* Dot and line accent above the heading. */
.dtr-vm__accent {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
}

.dtr-vm__accent::before {
	content: "";
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background-color: var(--dtr-vm-accent);
}

.dtr-vm__accent::after {
	content: "";
	width: 52px;
	height: 2px;
	background: linear-gradient(to right, var(--dtr-vm-accent), rgba(27, 107, 244, 0));
}

.dtr-vm__label {
	display: block;
	margin-bottom: 12px;
	color: var(--dtr-vm-blue);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.dtr-vm__title {
	margin: 0 0 14px;
	color: var(--dtr-vm-dark);
	font-size: 27px;
	font-weight: 800;
	line-height: 1.25;
	overflow-wrap: break-word;
}

.dtr-vm__title .dtr-vm__hl {
	color: var(--dtr-vm-blue);
}

.dtr-vm__desc {
	margin: 0;
	color: var(--dtr-vm-gray);
	font-size: 15.5px;
	line-height: 1.75;
	overflow-wrap: break-word;
}

/* No image: content spans the full width. */
.dtr-vm__row--no-media .dtr-vm__body {
	flex: 1 1 100%;
}

.dtr-vm__row--no-media .dtr-vm__content {
	padding-left: 0;
	padding-right: 0;
}

/* No image: keep the badge in flow at the top of the content. */
.dtr-vm__row--no-media .dtr-vm__badge {
	position: static;
	transform: none;
	margin: 0 0 18px;
}

/* Hover defaults. */
.dtr-vm__row:hover {
	transform: translateY(-5px);
	box-shadow: 0 24px 55px rgba(16, 24, 40, 0.12);
}

.dtr-vm__row:hover .dtr-vm__img {
	transform: scale(1.06);
}

/*
 * Tablet and mobile: box mode. No arrow, image full width on top, badge
 * straddling the image edge.
 */
@media (max-width: 1024px) {
	.dtr-vm__row,
	.dtr-vm__row--img-right {
		flex-direction: column;
	}

	.dtr-vm__media {
		flex-basis: auto;
		max-width: none;
		width: 100%;
		min-height: 240px;
	}

	.dtr-vm__row--img-left .dtr-vm__media,
	.dtr-vm__row--img-right .dtr-vm__media {
		clip-path: none;
	}

	.dtr-vm__badge,
	.dtr-vm__row--img-left .dtr-vm__badge,
	.dtr-vm__row--img-right .dtr-vm__badge {
		position: static;
		left: auto;
		right: auto;
		transform: none;
		margin: calc((var(--dtr-vm-badge) / -2)) auto 14px;
	}

	.dtr-vm__row--img-left .dtr-vm__content,
	.dtr-vm__row--img-right .dtr-vm__content {
		padding-left: 0;
		padding-right: 0;
	}

	.dtr-vm__content {
		text-align: center;
	}

	.dtr-vm__accent {
		justify-content: center;
	}

	.dtr-vm__heading {
		font-size: 32px;
	}
}

/* Mobile: tighten spacing and headings. */
@media (max-width: 767px) {
	.dtr-vm__body {
		padding: 28px 22px;
	}

	.dtr-vm__heading {
		font-size: 27px;
	}

	.dtr-vm__title {
		font-size: 23px;
	}
}
