/*
 * Photo hero: sand panel with a photo (right on desktop, on top on mobile),
 * eyebrow, h1, lead and an optional white card ("aside").
 */

.photo-hero {
	padding: 8px 8px 0;
}

.photo-hero__panel {
	position: relative;
	max-width: 1408px;
	margin-inline: auto;
	overflow: clip;
	border-radius: var(--rbnl-radius-section);
	background: var(--rbnl-sand);
}

.photo-hero__image {
	position: absolute;
	inset: 0 0 auto;
	height: 240px;
}

.photo-hero__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.photo-hero__fade {
	position: absolute;
	inset: 0 0 auto;
	height: 242px;
	/* Photo shows at the top, is almost sand where the text starts (176px). */
	background: linear-gradient(
		180deg,
		rgba(243, 235, 223, 0) 22%,
		rgba(243, 235, 223, 0.55) 48%,
		rgba(243, 235, 223, 0.92) 66%,
		var(--rbnl-sand) 78%
	);
	pointer-events: none;
}

.photo-hero__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 176px 16px 16px;
}

/*
 * "Stoppen met rijden?" is one line in the fallback font but two in Degular on a phone. Reserve the
 * two lines from the start so the form below does not jump when the font arrives (layout shift).
 */
@media (max-width: 440px) {
	.photo-hero--sm .photo-hero__title {
		min-height: 1.96em;
	}
}

/* Without a photo the text starts at the top. */
.photo-hero__panel:not(:has(.photo-hero__image)) .photo-hero__inner {
	padding-top: 40px;
}

.photo-hero__text {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
	padding-inline: 4px;
}

.photo-hero__text > .eyebrow {
	margin-bottom: -10px;
}

.photo-hero__title {
	font-size: clamp(46px, calc(46px + 34 * (100vw - 390px) / 1050), 80px);
	line-height: 0.98;
	letter-spacing: -0.035em;
}

.photo-hero__text .lead {
	max-width: 500px;
	margin: 0;
}

.photo-hero__aside {
	min-width: 0;
}

@media (min-width: 1024px) {
	.photo-hero {
		padding: 24px 16px 0;
	}

	/* The text column ends at ~58% of the panel, so the sand has to stay (almost)
	   solid up to there and only then fade out over the photo. */
	.photo-hero__image {
		inset: 0 0 0 auto;
		width: 62%;
		height: auto;
	}

	.photo-hero__image img {
		object-position: 70% center;
	}

	.photo-hero__fade {
		inset: 0;
		height: auto;
		background: linear-gradient(
			90deg,
			var(--rbnl-sand) 54%,
			rgba(243, 235, 223, 0.86) 62%,
			rgba(243, 235, 223, 0.45) 72%,
			rgba(243, 235, 223, 0.12) 82%,
			rgba(243, 235, 223, 0) 90%
		);
	}

	.photo-hero__inner {
		display: grid;
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		align-items: end;
		gap: 40px;
		min-height: 480px;
		padding: 48px 40px 32px 56px;
	}

	.photo-hero__text {
		align-self: center;
		gap: 26px;
		padding-inline: 0;
	}

	/* Lower variants (Contact, Opzeggen). */
	.photo-hero--md .photo-hero__inner {
		min-height: 420px;
	}

	.photo-hero--sm .photo-hero__inner {
		min-height: 340px;
	}

	.photo-hero__panel:not(.has-aside) .photo-hero__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.photo-hero__panel:not(:has(.photo-hero__image)) .photo-hero__inner {
		min-height: 0;
		padding-block: 64px;
	}
}

/* "Eerstvolgende event" card inside a hero. */
.next-card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 18px;
	border-radius: 24px;
	background: var(--rbnl-white);
	box-shadow: 0 20px 40px rgba(33, 30, 100, 0.14);
}

.next-card__label {
	margin: 0;
	color: var(--rbnl-orange-dark);
	font-size: 14px;
	font-weight: 600;
}

.next-card__row {
	display: flex;
	align-items: center;
	gap: 16px;
}

.next-card .event__date {
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
}

.next-card .event__day {
	font-size: 28px;
}

.next-card .event__month {
	font-size: 15px;
}

.next-card__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.next-card__title {
	margin: 0;
	font-size: 20px;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.next-card__meta {
	margin: 0;
	font-size: 15px;
	line-height: 1.4;
}

/* The buttons share one row, as in the event list. */
.next-card .btn-row {
	flex-wrap: nowrap;
	margin-top: 0;
	gap: 8px;
}

.next-card .btn-row .btn {
	flex: 1 1 auto;
	min-width: 0;
	gap: 8px;
	padding-inline: 12px;
}

/* Narrow phones: tighter buttons; on the smallest ones the icons make room. */
@media (max-width: 389.98px) {
	.next-card .btn-row .btn {
		gap: 6px;
		padding-inline: 9px;
		font-size: 14px;
	}
}

@media (max-width: 359.98px) {
	.next-card .btn-row .btn svg {
		display: none;
	}
}

@media (min-width: 1024px) {
	.next-card {
		padding: 24px;
	}

	.next-card__title {
		font-size: 24px;
	}
}

/* Round check badge instead of an eyebrow (thank-you page). */
.photo-hero__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	border-radius: 50%;
	background: var(--rbnl-white);
	box-shadow: 0 12px 26px rgba(33, 30, 100, 0.1);
}

.photo-hero__badge > span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--rbnl-orange);
	color: var(--rbnl-white);
}
