/**
 * Repeatable Box Content Image
 * Figma desktop: node-id=21234-6248
 * Figma mobile: file wxwuK7BpekIvd9pKAYnPC4, node-id=21363-5766 (rules in the max-width: 767px block)
 */

.repeatable-box-content-image {
	width: 100%;
}

.repeatable-box-content-image__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 40px;
	width: 100%;
	padding: 48px 20px;
	box-sizing: border-box;
}

.repeatable-box-content-image__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 100%;
	text-align: center;
}

.repeatable-box-content-image__label {
	margin: 0;
	width: 100%;
	color: var(--color-teal);
	font-family: var(--font-label);
	font-size: 14px;
	font-weight: var(--font-weight-medium);
	letter-spacing: 0.08em;
	line-height: 20px;
	text-transform: uppercase;
}

.repeatable-box-content-image__title {
	margin: 0;
	width: 100%;
	color: var(--color-black);
	font-family: var(--font-h2-family);
	font-size: var(--font-h2-size);
	font-style: var(--font-h2-style);
	font-weight: var(--font-h2-weight);
	letter-spacing: var(--font-h2-tracking);
	line-height: var(--font-h2-line);
	text-transform: capitalize;
}

.repeatable-box-content-image__list {
	display: flex;
	flex-direction: column;
	gap: 32px;
	width: 100%;
	max-width: 100%;
}

.repeatable-box-content-image__row {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
	filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.06));
}

.repeatable-box-content-image__content {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
	padding: 24px 20px;
	box-sizing: border-box;
	background-color: var(--color-white);
	border-radius: 24px;
}

.repeatable-box-content-image__heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
}

.repeatable-box-content-image__item-title {
	flex: 1 1 auto;
	margin: 0;
	min-width: 0;
	color: #151515;
	font-family: var(--font-primary);
	font-size: 24px;
	font-style: italic;
	font-weight: var(--font-weight-bold);
	letter-spacing: 0;
	line-height: 32px;
	text-transform: capitalize;
}

.repeatable-box-content-image__arrow {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 44px; /* Figma Frame 3258/3259 */
	height: 44px;
	padding: 4px; /* circle 36px inset within 44px */
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.repeatable-box-content-image__arrow:hover,
.repeatable-box-content-image__arrow:focus {
	opacity: 0.85;
}

.repeatable-box-content-image__arrow img {
	display: block;
	width: 36px; /* Figma Frame 1139 yellow circle */
	height: 36px;
	object-fit: contain;
}

.repeatable-box-content-image__body {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
}

.repeatable-box-content-image__richtext {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	color: var(--color-grey-800);
	font-family: var(--font-primary);
	font-size: var(--font-paragraph-size);
	font-weight: var(--font-paragraph-weight);
	letter-spacing: var(--font-paragraph-tracking);
	line-height: var(--font-paragraph-line);
}

.repeatable-box-content-image__richtext p,
.repeatable-box-content-image__callout-body p,
.repeatable-box-content-image__richtext blockquote p {
	margin: 0 0 1em;
	color: inherit;
	font: inherit;
}

.repeatable-box-content-image__richtext p:last-child,
.repeatable-box-content-image__callout-body p:last-child,
.repeatable-box-content-image__richtext blockquote p:last-child {
	margin-bottom: 0;
}

.repeatable-box-content-image__richtext a,
.repeatable-box-content-image__callout-body a,
.repeatable-box-content-image__richtext blockquote a,
.repeatable-box-content-image__richtext strong,
.repeatable-box-content-image__richtext b,
.repeatable-box-content-image__richtext em,
.repeatable-box-content-image__richtext i,
.repeatable-box-content-image__richtext u,
.repeatable-box-content-image__richtext ul,
.repeatable-box-content-image__richtext ol,
.repeatable-box-content-image__richtext li {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
	line-height: inherit;
}

.repeatable-box-content-image__richtext a,
.repeatable-box-content-image__callout-body a,
.repeatable-box-content-image__richtext blockquote a {
	color: inherit;
	text-decoration: underline;
}

.repeatable-box-content-image__richtext strong,
.repeatable-box-content-image__richtext b,
.repeatable-box-content-image__callout-body strong,
.repeatable-box-content-image__callout-body b,
.repeatable-box-content-image__richtext blockquote strong,
.repeatable-box-content-image__richtext blockquote b {
	font-weight: var(--font-weight-bold);
}

.repeatable-box-content-image__richtext em,
.repeatable-box-content-image__richtext i {
	font-style: italic;
}

.repeatable-box-content-image__richtext ul {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.repeatable-box-content-image__richtext ul li {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 0;
	padding: 0 0 0 30px;
	color: var(--color-grey-800);
}

.repeatable-box-content-image__richtext ul li::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 24px;
	height: 24px;
	background-image: var(--rbci-check);
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

/*
 * Figma blockquote / H6 — nodes 21234:6314 & 21234:6331
 * Structure: bg #f4f8ec | px 16 py 12 | gap 24 | 6px #507109 bar (text-height) | Lato Bold 16/24 #454545
 */
.repeatable-box-content-image__callout,
.repeatable-box-content-image__richtext blockquote {
	display: flex;
	align-items: center;
	gap: 24px;
	width: 100%;
	margin: 0;
	padding: 12px 16px;
	box-sizing: border-box;
	border: 0;
	background-color: #f4f8ec;
	color: #454545;
	font-family: var(--font-primary);
	font-size: 16px;
	font-style: normal;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 24px;
	quotes: none;
}

.repeatable-box-content-image__callout::before,
.repeatable-box-content-image__callout::after,
.repeatable-box-content-image__richtext blockquote::after {
	content: none;
}

/* 6px Bright Green bar — text-height (align-self: stretch), 24px gap via flex */
.repeatable-box-content-image__callout-bar,
.repeatable-box-content-image__richtext blockquote::before {
	content: "";
	display: block;
	flex-shrink: 0;
	align-self: stretch;
	width: 6px;
	min-height: 24px;
	background-color: #507109;
}

.repeatable-box-content-image__callout-body {
	flex: 1 1 auto;
	min-width: 0;
	color: inherit;
	font: inherit;
}

.repeatable-box-content-image__media picture {
	display: contents; /* the <img> keeps its own layout rules (mobile/desktop art direction) */
}

.repeatable-box-content-image__media {
	position: relative;
	display: flex;
	overflow: hidden;
	width: 100%;
	min-height: 220px;
	border-radius: 24px;
	isolation: isolate;
}

.repeatable-box-content-image__image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 220px;
	object-fit: cover;
	object-position: center;
}


/* Mobile — Figma 21363-5766 */
@media (max-width: 767px) {
	.repeatable-box-content-image__inner {
		gap: 32px;
		padding: 40px 20px;
	}

	.repeatable-box-content-image__label {
		font-size: var(--font-label-size);
		line-height: 24px; /* Figma label frame is 24px tall */
	}

	.repeatable-box-content-image__list {
		gap: 15px;
	}

	/* Image on top, card below, 10px apart */
	.repeatable-box-content-image__row {
		gap: 10px;
	}

	.repeatable-box-content-image__media {
		order: -1;
		min-height: 0;
		border-radius: 20px;
	}

	/* Rule #7 — full-row item images render complete (contain, natural aspect, no crop).
	   The Mobile Image field is uploaded at the Figma 335:275 crop, so it fills the frame. */
	.repeatable-box-content-image__image {
		height: auto;
		min-height: 0;
		object-fit: contain;
	}

	.repeatable-box-content-image__content {
		gap: 32px;
		border-radius: 20px;
	}

	.repeatable-box-content-image__heading {
		gap: 20px;
	}

	.repeatable-box-content-image__item-title {
		font-size: var(--font-h3-size); /* Mobile/H3 - M: 30/38 */
		line-height: var(--font-h3-line);
	}

	/* Figma: intro text -> callout 24px, callout -> paragraph 12px, paragraph -> list 12px */
	.repeatable-box-content-image__body {
		gap: 12px;
	}

	.repeatable-box-content-image__body > .repeatable-box-content-image__richtext:first-child:not(:only-child) {
		margin-bottom: 12px;
	}

	.repeatable-box-content-image__richtext p {
		margin: 0;
	}

	/* Figma: the list after a callout paragraph sits 24px below it */
	.repeatable-box-content-image__callout + .repeatable-box-content-image__richtext ul {
		margin-top: 12px;
	}

	.repeatable-box-content-image__callout {
		gap: 16px;
		padding: 8px 12px;
	}

	.repeatable-box-content-image__callout-bar {
		width: 4px;
	}
}

/* Tablet: mobile layout, desktop fonts */
@media (min-width: 768px) {
	.repeatable-box-content-image__inner {
		gap: 48px;
		padding: 64px 40px;
	}

	.repeatable-box-content-image__label {
		font-size: var(--font-label-size);
	}

	.repeatable-box-content-image__list {
		gap: 48px;
	}

	.repeatable-box-content-image__row {
		gap: 20px;
	}

	.repeatable-box-content-image__content {
		gap: 32px;
		padding: 32px 5%;
		border-radius: 32px;
	}

	.repeatable-box-content-image__item-title {
		font-size: var(--font-h3-size);
		line-height: var(--font-h3-line);
	}

	.repeatable-box-content-image__media {
		min-height: 320px;
		border-radius: 32px;
	}

	.repeatable-box-content-image__image {
		min-height: 320px;
	}
}

/* Desktop — side-by-side alternating rows */
@media (min-width: 1024px) {
	.repeatable-box-content-image__inner {
		gap: 60px;
		padding: 80px 11.111%; /* ~160px on 1440 */
	}

	.repeatable-box-content-image__header {
		padding: 0 8.333%;
		box-sizing: border-box;
	}

	.repeatable-box-content-image__list {
		gap: 60px;
	}

	.repeatable-box-content-image__row {
		flex-direction: row;
		align-items: stretch;
		gap: 1.786%; /* ~20px on 1120 */
	}

	.repeatable-box-content-image__row--image-left {
		flex-direction: row-reverse;
	}

	.repeatable-box-content-image__content {
		flex: 1 1 58.93%; /* ~660 / 1120 */
		width: 58.93%;
		min-width: 0;
		padding: 3.571%; /* ~40px on 1120 */
		border-radius: 40px;
		justify-content: center; /* Rule #1 — short content centers vertically */
	}

	/*
	 * Rule #1 — image height follows the content card, clamped 350–600px.
	 * Tall content: image stops at 600px and stays top-aligned (stretch clamps to start).
	 */
	.repeatable-box-content-image__media {
		position: relative;
		flex: 0 0 39.286%; /* ~440 / 1120 */
		width: 39.286%;
		min-height: 350px;
		max-height: 600px;
		align-self: stretch;
		border-radius: 40px;
	}

	.repeatable-box-content-image__image {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		min-height: 0;
		object-fit: cover;
	}

	.repeatable-box-content-image__heading {
		gap: 20px;
	}

	.repeatable-box-content-image__body {
		gap: 24px;
	}
}
