/*
 * Layout pieces shared by the page templates: section header, text link,
 * rounded colour bands, button row, event rows.
 */

/* ------------------------------------------------------------ Section header */

.section-head {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}

/* The eyebrow sits a little closer to the title than the gap. */
.section-head > .eyebrow {
	margin-bottom: -10px;
}

.section-head__title {
	text-wrap: balance;
}

.section-head__text > :last-child {
	margin-bottom: 0;
}

.section-head__text.lead {
	max-width: 520px;
}

/* Medium title (picker, agenda): 30px on mobile, 44px on desktop. */
.section-head--md {
	gap: 14px;
}

.section-head--md .section-head__title {
	font-size: clamp(30px, calc(30px + 14 * (100vw - 390px) / 1050), 44px);
	line-height: 1.14;
	letter-spacing: -0.025em;
}

.section {
	margin-block: 0;
	padding-block: var(--rbnl-section-gap);
}

.section--flush-bottom {
	padding-bottom: 0;
}

.textlink {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	color: var(--rbnl-ink);
	font-size: 17px;
	font-weight: 500;
	text-decoration: none;
}

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

.textlink:hover {
	color: var(--rbnl-orange-dark);
}

.textlink:hover svg {
	transform: translateX(4px);
}

.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 6px;
}

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pill--lilac {
	background: var(--rbnl-lilac);
	color: var(--rbnl-ink);
	font-weight: 500;
}

/* --------------------------------------------------------------- Colour bands */

.band {
	margin-inline: 8px;
	border-radius: var(--rbnl-radius-section);
}

.band--peach {
	background: var(--rbnl-peach);
}

.band--sand {
	background: var(--rbnl-sand);
}

.band--white {
	background: var(--rbnl-white);
}

.band--steps {
	padding-block: var(--rbnl-section-pad);
}

.band__inner {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.band__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
}

@media (min-width: 1024px) {
	.band {
		margin-inline: 16px;
	}

	.band__inner {
		gap: 44px;
	}
}

/* -------------------------------------------------------------- Event rows */

.events {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.event {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 12px 14px;
	padding: 16px;
	border-radius: 24px;
	background: var(--rbnl-white);
	box-shadow: var(--rbnl-shadow-card);
	transition:
		transform var(--rbnl-dur) var(--rbnl-ease),
		box-shadow var(--rbnl-dur) var(--rbnl-ease);
}

.event--teaser:hover,
.event--teaser:focus-within {
	transform: translateY(-3px);
	box-shadow:
		0 1px 0 var(--rbnl-line),
		0 18px 36px rgba(33, 30, 100, 0.08);
}

/* On mobile the home row ends in a thin footer line with the action. */
.event--teaser {
	padding-bottom: 10px;
	row-gap: 14px;
}

.event__date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	width: 70px;
	height: 70px;
	border-radius: 22px;
	background: var(--rbnl-orange-strong);
	box-shadow: 0 10px 22px rgba(192, 87, 12, 0.28);
	color: var(--rbnl-white);
	font-family: var(--rbnl-font-heading);
	font-weight: 700;
	text-align: center;
	transform: rotate(-3deg);
}

.event {
	scroll-margin-top: var(--rbnl-header-offset);
}

.event__day {
	font-size: 32px;
	line-height: 1;
	letter-spacing: -0.02em;
}

.event__month {
	font-size: 17px;
	line-height: 1;
}

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

/* Category, weekday and time above the title. */
.event__kicker {
	display: flex;
	flex-wrap: wrap;
	column-gap: 0.35em;
	margin: 0;
	color: var(--rbnl-mute);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
}

.event__type {
	color: var(--rbnl-orange-dark);
	font-weight: 600;
}

.event__sep {
	color: var(--rbnl-mute);
}

.event__title {
	font-size: clamp(20px, calc(20px + 4 * (100vw - 390px) / 1050), 24px);
	line-height: 1.2;
	letter-spacing: -0.01em;
}

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

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

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

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

.event__where {
	margin: 0;
	color: var(--rbnl-text);
	font-size: 15px;
	line-height: 1.4;
}

.event__cta {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 10px;
	border-top: 1px solid var(--rbnl-line);
	color: var(--rbnl-ink);
	font-size: 15px;
	font-weight: 500;
}

.event__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--rbnl-sand);
	transition:
		background-color 0.35s var(--rbnl-ease),
		color 0.35s var(--rbnl-ease),
		transform 0.35s var(--rbnl-ease);
}

.event--teaser:hover .event__arrow {
	background: var(--rbnl-ink);
	color: var(--rbnl-white);
	transform: translateX(3px);
}

@media (min-width: 1024px) {
	.event {
		grid-template-columns: auto minmax(0, 1fr) auto;
		align-items: center;
		gap: 22px;
		padding: 16px 20px 16px 16px;
		border-radius: 26px;
	}

	.event__date {
		width: 82px;
		height: 82px;
	}

	.event__day {
		font-size: 36px;
	}

	.event__month {
		font-size: 19px;
	}

	.event__cta {
		grid-column: auto;
		justify-content: flex-end;
		padding-top: 0;
		border-top: 0;
	}

	.event__arrow {
		width: 44px;
		height: 44px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.event,
	.event__arrow {
		transition: none;
	}
}

/* Back link above a page title (arrow plus text). */
.crumb {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	min-height: 44px;
	color: var(--rbnl-ink);
	font-weight: 500;
	text-decoration: none;
	transition: color 0.3s var(--rbnl-ease);
}

.crumb:hover {
	color: var(--rbnl-orange);
}

/* Breadcrumbs (own markup and Rank Math's .rank-math-breadcrumb look the same). */
.crumbs p {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin: 0;
	font-size: 15px;
	font-weight: 500;
}

.crumbs a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--rbnl-mute);
	text-decoration: none;
	transition: color 0.3s var(--rbnl-ease);
}

.crumbs a:hover {
	color: var(--rbnl-orange-dark);
}

.crumbs__sep,
.crumbs .separator {
	color: var(--rbnl-peach-2);
}

.crumbs__current,
.crumbs .last {
	color: var(--rbnl-ink);
}

/* Crumb links are at least 44px wide as well. */
.crumbs a {
	min-width: 44px;
}
