/* Rabwin Machine Grid. Colours and fonts follow the site's Elementor global kit. */

.rmg-section {
	--rmg-navy: var(--e-global-color-accent, #0E1B3D);
	--rmg-primary: var(--e-global-color-primary, #1B3B8C);
	--rmg-sage: var(--e-global-color-sage, #5C7A4C);
	--rmg-ink-soft: var(--e-global-color-inksoft, #57607A);
	--rmg-line: var(--e-global-color-line, #E4E7EF);
	--rmg-paper: var(--e-global-color-paper, #F7F8FA);
	background: var(--rmg-bg, #FFFFFF);
	border-bottom: 1px solid var(--rmg-line);
	padding: 110px 32px;
	width: 100%;
	box-sizing: border-box;
}

.rmg-inner {
	max-width: 1300px;
	margin: 0 auto;
}

.rmg-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 48px;
}

.rmg-header-text {
	max-width: 640px;
}

.rmg-eyebrow {
	font-family: "Montserrat", sans-serif;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 2.2px;
	text-transform: uppercase;
	color: var(--rmg-sage);
	margin-bottom: 14px;
}

.rmg-section .rmg-heading {
	color: var(--rmg-navy);
	margin: 0;
}

.rmg-intro {
	color: var(--rmg-ink-soft);
	margin: 16px 0 0;
}

.rmg-all {
	flex-shrink: 0;
	font-family: "Montserrat", sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: var(--rmg-primary);
	text-decoration: none;
	white-space: nowrap;
}

.rmg-all:hover,
.rmg-all:focus-visible {
	text-decoration: underline;
}

.rmg-grid {
	display: grid;
	grid-template-columns: repeat(var(--rmg-columns, 3), minmax(0, 1fr));
	gap: 28px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.rmg-card {
	margin: 0;
}

.rmg-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #FFFFFF;
	border: 1px solid var(--rmg-line);
	border-radius: 12px;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.rmg-link:hover,
.rmg-link:focus-visible {
	transform: translateY(-4px);
	border-color: transparent;
	box-shadow: 0 18px 40px rgba(14, 27, 61, 0.12);
}

.rmg-link:focus-visible {
	outline: 2px solid var(--rmg-primary);
	outline-offset: 2px;
}

.rmg-media {
	aspect-ratio: 4 / 3;
	background: var(--rmg-paper);
	overflow: hidden;
}

.rmg-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.rmg-link:hover .rmg-media img {
	transform: scale(1.04);
}

.rmg-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 24px;
	box-sizing: border-box;
	background: linear-gradient(135deg, var(--rmg-navy), var(--rmg-primary));
	color: #FFFFFF;
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	font-size: 20px;
	text-align: center;
}

.rmg-body {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 22px 24px 24px;
}

.rmg-section .rmg-title {
	font-family: "Montserrat", sans-serif;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--rmg-navy);
	margin: 0 0 8px;
}

.rmg-summary {
	font-size: 15px;
	line-height: 1.6;
	color: var(--rmg-ink-soft);
	margin: 0 0 18px;
}

.rmg-more {
	margin-top: auto;
	font-family: "Montserrat", sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: var(--rmg-primary);
}

@media (max-width: 1024px) {
	.rmg-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 22px;
	}
}

@media (max-width: 767px) {
	.rmg-section {
		padding: 52px 20px;
	}

	.rmg-header {
		flex-direction: column;
		align-items: flex-start;
		margin-bottom: 32px;
	}

	.rmg-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.rmg-link,
	.rmg-media img {
		transition: none;
	}

	.rmg-link:hover,
	.rmg-link:hover .rmg-media img {
		transform: none;
	}
}
