/**
 * Reusable Gutenberg patterns and block compositions.
 */

.inm-research-card {
	--inm-research-accent: var(--color-accent-light-green, #adffd1);
	position: relative;
	gap: clamp(.875rem, 2vw, 2.5rem);
	min-height: 120px;
	padding: 2rem !important;
	overflow: hidden;
}

.inm-research-card.is-accent-light-green {
	--inm-research-accent: var(--color-accent-light-green, #adffd1);
}

.inm-research-card.is-accent-dark-green {
	--inm-research-accent: var(--color-accent-dark-green, #00c3ae);
}

.inm-research-card.is-accent-blue {
	--inm-research-accent: var(--color-accent-blue, #7fe5ff);
}

.inm-research-card > .wp-block-image {
	flex: 0 0 clamp(74px, 7vw, 118px);
	width: clamp(74px, 7vw, 118px);
	margin: 0 !important;
}

.inm-research-card > .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
}

.inm-research-card > .wp-block-group {
	position: relative;
	flex: 1 1 auto;
	align-self: stretch;
	justify-content: center;
	min-width: 0;
	min-height: 82px;
}
.inm-research-card:hover > .wp-block-group {
	gap: 0;
}

.inm-research-card .title {
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	margin: 0 !important;
	font-size: clamp(1.35rem, 2vw, 2rem);
	font-weight: 900;
	line-height: 1.05;
	letter-spacing: 2px;
	text-transform: uppercase;
	transform: translateY(-50%) scale(1);
	transform-origin: left center;
	transition: transform 420ms cubic-bezier(.22,1,.36,1), top 420ms cubic-bezier(.22,1,.36,1);
}

.inm-research-card .description {
	max-width: 48rem;
	opacity: 0;
	font-size: clamp(.85rem, 1.15vw, 1rem);
	font-weight: 300;
	line-height: 1.3;
	transform: translateY(14px);
	transition: opacity 260ms ease 70ms, transform 420ms cubic-bezier(.22,1,.36,1);
    margin-top: 0.2rem !important;
}

.inm-research-card > .wp-block-buttons {
	position: relative;
	z-index: 2;
	flex: 0 0 50px;
	margin: 0;
}

.inm-research-card .wp-block-button.arrow,
.inm-research-card .wp-block-button.arrow .wp-block-button__link {
	width: 80px;
	min-width: 0;
	height: 80px;
	min-height: 0;
	margin: 0;
	padding: 0;
}

.inm-research-card .wp-block-button.arrow .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: var(--inm-research-accent);
	opacity: 1;
	transition: transform 350ms cubic-bezier(.22,1,.36,1), background-color 250ms ease;
}

.inm-research-card .wp-block-button.arrow .wp-block-button__link::after {
	position: absolute;
	inset: 0;
	content: "";
}

.inm-research-card .wp-block-button.arrow img {
	display: block;
	width: 29px !important;
	height: auto !important;
	margin: 0 !important;
	transform: translateX(0);
	transition: transform 350ms cubic-bezier(.22,1,.36,1);
}

.inm-research-card:hover .title,
.inm-research-card:focus-within .title {
	position: static;
    transform: none;
    font-size: 1.2rem;
    letter-spacing: 0;
    font-weight: 700;
}

.inm-research-card:hover .title br,
.inm-research-card:focus-within .title br {
	display: none;
}

.inm-research-card:hover .description,
.inm-research-card:focus-within .description {
	opacity: 1;
	transform: translateY(0);
}

.inm-research-card:hover .wp-block-button.arrow img,
.inm-research-card:focus-within .wp-block-button.arrow img {
	transform: translateX(3px);
}

/* Keep every editable field readable and selectable in Gutenberg. */
.editor-styles-wrapper .inm-research-card {
	overflow: visible;
}

.editor-styles-wrapper .inm-research-card > .wp-block-group {
	gap: .35rem;
	justify-content: center;
}

.editor-styles-wrapper .inm-research-card .title,
.editor-styles-wrapper .inm-research-card:hover .title,
.editor-styles-wrapper .inm-research-card:focus-within .title {
	position: static;
	transform: none;
	font-size: 1.15rem;
}

.editor-styles-wrapper .inm-research-card .title br,
.editor-styles-wrapper .inm-research-card:hover .title br,
.editor-styles-wrapper .inm-research-card:focus-within .title br {
	display: none !important;
}

.editor-styles-wrapper .inm-research-card .description,
.editor-styles-wrapper .inm-research-card:hover .description,
.editor-styles-wrapper .inm-research-card:focus-within .description {
	position: static;
	margin: 0;
	opacity: 1;
	transform: none;
	font-size: .85rem;
}

.editor-styles-wrapper .inm-research-card .wp-block-button.arrow {
	bottom: 0 !important;
}
.editor-styles-wrapper .inm-research-card .wp-block-button.arrow .wp-block-button__link {
	transform: none;

}
.editor-styles-wrapper .inm-research-card .wp-block-button.arrow .wp-block-button__link:after {
	display: none !important;
}

@media (min-width: 701px) and (max-width: 1080px) {
	.inm-research-card {
		gap: .875rem;
		min-height: 116px;
		padding: 1.25rem !important;
	}

	.inm-research-card > .wp-block-image {
		flex-basis: 68px;
		width: 68px;
	}

	.inm-research-card > .wp-block-group {
		min-height: 76px;
	}

	.inm-research-card .title {
		font-size: clamp(1rem, 2.1vw, 1.3rem) !important;
		line-height: 1.08;
	}

	.inm-research-card .description {
		margin-top: 2.4rem;
		font-size: .75rem;
		line-height: 1.2;
	}

	.inm-research-card > .wp-block-buttons {
		flex-basis: 56px;
	}

	.inm-research-card .wp-block-button.arrow,
	.inm-research-card .wp-block-button.arrow .wp-block-button__link {
		width: 56px;
		height: 56px;
	}

	.inm-research-card:hover .title,
	.inm-research-card:focus-within .title {
		transform: translateY(calc(-50% - 2.15rem)) scale(.7);
	}
}

@media (max-width: 700px) {
	.inm-research-card {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) 50px;
		align-items: center;
		gap: 1rem;
		min-height: 106px;
		border-radius: 15px;
		padding: 2rem 2.5rem !important;
	}

	.inm-research-card > .wp-block-image {
		display: none;
	}

	.inm-research-card > .wp-block-group {
		position: static;
		grid-column: 1;
		align-self: center;
		gap: .15rem;
		min-height: 0;
	}

	.inm-research-card .title,
	.inm-research-card:hover .title,
	.inm-research-card:focus-within .title {
		position: static;
		width: auto;
		font-size: 1.3rem !important;
		line-height: 1.15;
		text-transform: none;
		transform: none;
		transition: none;
		font-weight: 600;
		letter-spacing: 0;
	}

	.inm-research-card .title br {
		display: none;
	}

	.inm-research-card .description,
	.inm-research-card:hover .description,
	.inm-research-card:focus-within .description {
		margin: 0 !important;
		opacity: 1;
		font-size: 1.1rem;
		line-height: 1.2;
		transform: none;
		transition: none;
	}

	.inm-research-card > .wp-block-buttons {
		grid-column: 2;
		justify-self: end;
		flex-basis: 50px;
	}

	.inm-research-card .wp-block-button.arrow,
	.inm-research-card .wp-block-button.arrow .wp-block-button__link {
		width: 50px;
		height: 50px;
	}

	.inm-research-card:hover .wp-block-button.arrow img,
	.inm-research-card:focus-within .wp-block-button.arrow img {
		transform: none;
	}
	.inm-research-card > .wp-block-group {
		gap: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.inm-research-card *,
	.inm-research-card *::before,
	.inm-research-card *::after {
		transition-duration: .01ms !important;
	}
}

/* Facts & figures: supports the current Gutenberg structure and reusable classes. */
.inm-facts > .wp-block-heading {
	margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.inm-facts > .wp-block-group,
.inm-facts-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.5rem, 4vw, 1rem);
	margin: 0;
}

.inm-facts > .wp-block-group + .wp-block-group,
.inm-facts-row + .inm-facts-row {
    margin-top: clamp(2.5rem, 5vw, 6.5rem);
}

.inm-facts > .wp-block-group > .wp-block-group,
.inm-fact {
	display: flex;
	flex-direction: column;
    align-items: flex-start !important;
	justify-content: flex-start;
    gap: .4rem;
	width: 100%;
    min-width: 0;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid #f6f6f6;
}

.inm-facts > .wp-block-group > .wp-block-group h3,
.inm-fact h3 {
    margin: 0 !important;
    font-size: clamp(2rem, 3vw, 2.5rem);
    line-height: 1;
}

.inm-facts > .wp-block-group > .wp-block-group p,
.inm-fact p {
    margin: 0;
    line-height: 1.2;
	min-height: 46px;
}

@media (max-width: 700px) {
    .inm-facts > .wp-block-heading {
		margin-bottom: 2rem;
	}

    .inm-facts > .wp-block-group,
    .inm-facts-row {
        gap: 1.25rem;
    }

    .inm-facts > .wp-block-group + .wp-block-group,
    .inm-facts-row + .inm-facts-row {
        margin-top: 2rem;
    }

    .inm-facts > .wp-block-group > .wp-block-group h3,
    .inm-fact h3 {
        font-size: 2.5rem !important;
    }

    .inm-facts > .wp-block-group > .wp-block-group p,
    .inm-fact p {
        font-size: .875rem;
    }
}
