/*
 * Cards. One base component; page templates add content, not new card styles.
 *
 * <article class="card card--link">
 *   <div class="card__media"><img></div>
 *   <h3 class="card__title"><a class="card__link" href>Title</a></h3>
 *   <p>…</p>
 *   <span class="card__more">Lees meer <svg class="card__arrow"></span>
 * </article>
 *
 * The whole card is clickable through the stretched link (.card__link::after),
 * so the heading stays a heading and the link text stays short.
 */

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	padding: 24px;
	border-radius: var(--rbnl-radius-card);
	background: var(--rbnl-white);
	box-shadow: var(--rbnl-shadow-card);
	color: var(--rbnl-ink);
	transition:
		transform var(--rbnl-dur) var(--rbnl-ease),
		box-shadow var(--rbnl-dur) var(--rbnl-ease);
}

/* Cards on sand/peach get no outline. */
.card--sand {
	background: var(--rbnl-sand);
	box-shadow: none;
}

.card--peach {
	background: var(--rbnl-peach);
	box-shadow: none;
}

.card--raised {
	box-shadow: var(--rbnl-shadow-raised);
}

.card__media {
	overflow: hidden;
	border-radius: calc(var(--rbnl-radius-card) - 8px);
}

.card__media img {
	width: 100%;
	transition: transform var(--rbnl-dur-slow) var(--rbnl-ease);
}

.card__title {
	font-size: var(--rbnl-fs-h3);
}

.card__link {
	color: inherit;
	text-decoration: none;
}

.card__link::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.card__link:focus-visible {
	outline: none;
}

.card:has(.card__link:focus-visible) {
	outline: 3px solid var(--rbnl-ink);
	outline-offset: 3px;
}

.card__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	font-size: 15px;
	font-weight: 500;
}

.card__arrow {
	transition: transform 0.35s var(--rbnl-ease);
}

.card--link:hover {
	transform: translateY(-6px);
	box-shadow: 0 22px 44px rgba(33, 30, 100, 0.1);
}

.card--link:hover .card__media img {
	transform: scale(1.06);
}

.card--link:hover .card__arrow {
	transform: translateX(4px);
}

.card--link:hover .card__link {
	color: var(--rbnl-ink);
}

/* Placeholder card (peach): "Jouw manege binnenkort hier?" */

.mcard-ph {
	display: flex;
	height: 100%;
	color: var(--rbnl-ink);
	text-decoration: none;
	transition: transform var(--rbnl-dur) var(--rbnl-ease);
}

.mcard-ph:hover,
.mcard-ph:focus-visible {
	transform: translateY(-6px);
}

.mcard-ph__box {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	justify-content: space-between;
	gap: 16px;
	min-height: 220px;
	padding: 24px;
	border-radius: 30px;
	background: var(--rbnl-peach);
	transition: background-color 0.4s var(--rbnl-ease);
}

.mcard-ph:hover .mcard-ph__box,
.mcard-ph:focus-visible .mcard-ph__box {
	background: var(--rbnl-peach-2);
}

.mcard-ph__title {
	font-family: var(--rbnl-font-heading);
	font-size: 28px;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.mcard-ph__go {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 500;
}

.mcard-ph__arrow {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--rbnl-ink);
	color: var(--rbnl-white);
	transition: transform 0.4s var(--rbnl-ease);
}

.mcard-ph:hover .mcard-ph__arrow {
	transform: translateX(4px);
}

/* ------------------------------------------------- Photo card (maneges, news) */

.card-photo {
	height: 100%;
}

.card-photo__link {
	display: flex;
	flex-direction: column;
	gap: 16px;
	height: 100%;
	padding: 10px 10px 22px;
	border-radius: 30px;
	background: var(--rbnl-white);
	color: var(--rbnl-ink);
	text-decoration: none;
	transition:
		transform var(--rbnl-dur) var(--rbnl-ease),
		box-shadow var(--rbnl-dur) var(--rbnl-ease);
}

.card-photo__link:hover,
.card-photo__link:focus-visible {
	transform: translateY(-6px);
	box-shadow: 0 22px 44px rgba(33, 30, 100, 0.1);
}

.card-photo__media {
	display: block;
	height: var(--cp-media, 200px);
	overflow: clip;
	border-radius: 22px;
	background: var(--rbnl-sand);
}

.card-photo__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card-photo__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	padding-inline: 12px;
}

.card-photo__place {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--rbnl-orange-dark);
	font-size: 14px;
	font-weight: 600;
}

.card-photo__title {
	margin: 0;
	font-size: 22px;
	line-height: 1.15;
	letter-spacing: -0.01em;
	hyphens: auto;
}

.card-photo__text {
	color: var(--rbnl-text);
	font-size: 15px;
}

.card-photo__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 6px;
	font-size: 15px;
	font-weight: 500;
}

.card-photo__arrow {
	display: inline-flex;
	transition: transform 0.35s var(--rbnl-ease);
}

.card-photo__link:hover .card-photo__arrow {
	transform: translateX(4px);
}


@media (min-width: 1024px) {
	.card-photo {
		--cp-media: 260px;
	}

	.card-photo__title {
		font-size: 24px;
	}
}

/* News variant: 240px photo, category pill and date above the title. */
.card-photo--news {
	--cp-media: 240px;
}

/* The preview of a news post stops after three lines. */
.card-photo--news .card-photo__text {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

.card-photo__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
}

.card-photo__date {
	color: var(--rbnl-mute);
	font-size: 14px;
}

.card-photo__media--empty {
	background: var(--rbnl-sand);
}
