/* Cards: the rca-card component, and the older .card with its horizontal, e-book and presenter versions. */

/*
 * Card: a white box with a border. template-parts/components/features.php uses it.
 * Modifier: rca-card--accent-top (a green bar along the top).
 */
.rca-card {
	position: relative;
	overflow: hidden;
	padding: 30px 26px 32px;
	border: 1px solid #e3e9ee;
	border-radius: var(--rca-radius-sm);
	background: #fff;

	@media (max-width: 600px) {
		padding: 26px 22px 28px;
	}
}

.rca-card--accent-top::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 4px;
	background: #8cc814;
}

/* The size, weight and colour come from the global h3 rule. */
.rca-card__title {
	margin: 0 0 12px;
	line-height: 1.25;
}

/* Editor content with the normal paragraph and list styles. The space below is the same whatever the last element is. */
.rca-card__body {
	margin-bottom: 24px;

	& > :last-child {
		margin-bottom: 0;
	}
}

/**
 * Card element
 **/
.card {
	box-shadow: -3px 4px 10px 2px rgba(00, 00, 00, 0.04);
	clear: both;
	height: 100%;
	min-width: 100%;
	position: relative;
	background: white;
}

.card .card-content {
	padding: 30px 30px 80px 30px;
}

.card .card-content .card__title.fw-bold.truncate-title {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.4em;
	max-height: calc(1.4em * 3);
}

.card .button-link-underline {
	position: absolute;
	bottom: 40px;
}

.card-image.card-image--service img {
	aspect-ratio: 56 / 18;
	object-fit: cover;
	width: 100%;
}

.card-image.card-image--shrinked img {
	aspect-ratio: 43 / 12;
	object-fit: cover;
	width: 100%;
}

@media (max-width: 992px) {
	.card {
		height: auto;
	}
}

/**
 * Horizontal card
 **/
.card--horizontal {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	padding: 0px;
	margin-bottom: 45px;
	width: 100%;
	min-height: 236px;
}

.card--horizontal .button-link-underline {
	position: relative;
	top: unset;
	bottom: unset;
	left: unset;
	right: unset;
	display: inline-block;
	margin-top: 20px;
}

.card--horizontal .card-image img {
	object-fit: cover;
	object-position: center;
	height: 100%;
	width: 100%;
}

.card--horizontal .card-content {
	padding: 30px 40px 40px 40px;
}

@media (max-width: 1023px) {
	.card--horizontal {
		flex-direction: column;
		margin-bottom: 12px;
	}
	.card--horizontal .card-content {
		padding: 20px;
	}
}

/**
 * Case study card in the e-book style
 */
.card--ebook {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	padding-left: 30px;
	padding-right: 10px;
	margin-bottom: 30px;
	box-shadow: none;
}

.card--ebook .card-image {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 110px;
	flex-shrink: 0;
}

.card--ebook .taxonomy-label {
	margin-bottom: 0px;
}

.card--ebook .card-content {
	padding-bottom: 50px;
}

@media (max-width: 1023px) {
	.card--ebook {
		padding: 25px;
	}
}

/**
 * Presenters
 */
.card.card--presenter {
	box-shadow: none;
	padding-top: 30px;
}

.card.card--presenter .card__image {
	width: 135px;
	height: 135px;
	object-fit: contain;
	border-radius: 80px;
	display: block;
	margin-left: 30px;
	flex-shrink: 0;
}

.card.card--presenter .presenter-name {
	font-size: 20px;
}

.card.card--presenter .presenter-title {
	font-size: 16px;
}

@media (min-width: 1023px) {
	.card.card--presenter.orientation-horizontal {
		display: flex;
	}
	.card.card--presenter.orientation-horizontal .card-content {
		padding-top: 0px !important;
	}
}
