/* ==========================================================================
   De Rips – agenda (overzicht en detailpagina)
   ========================================================================== */

/* Organisatiekleur: een gekleurd bolletje */
.org-dot {
	display: inline-block;
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--org-color, var(--c-blue));
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.org-name {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}

/* Label met organisatie in de paginakop */
.label--org {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	color: var(--c-ink);
	box-shadow: var(--shadow-sm);
	text-transform: none;
	letter-spacing: 0;
	font-size: 0.8125rem;
}

.label--org::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--org-color, var(--c-blue));
}

a.label--org:hover {
	color: var(--c-blue);
	filter: none;
}

/* Werkbalk
   ========================================================================== */
.agenda-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	margin-bottom: 32px;
}

.segmented {
	display: inline-flex;
	padding: 4px;
	border-radius: 999px;
	background: var(--c-bg-soft);
}

.segmented__item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 18px;
	border-radius: 999px;
	color: var(--c-ink-soft);
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
	transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.segmented__item .icon {
	width: 18px;
	height: 18px;
}

.segmented__item:hover {
	color: var(--c-ink);
}

.segmented__item.is-active {
	background: #fff;
	color: var(--c-blue);
	box-shadow: var(--shadow-sm);
}

.agenda-filter select {
	min-height: 48px;
	max-width: 100%;
	padding: 0 44px 0 16px;
	border: 1px solid var(--c-line);
	border-radius: 999px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5565' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px;
	font-weight: 500;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.agenda-filter select:focus {
	border-color: var(--c-blue);
	outline: none;
	box-shadow: 0 0 0 3px var(--c-blue-soft);
}

.agenda-toolbar__add {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	color: var(--c-blue);
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
}

.agenda-toolbar__add:hover {
	text-decoration: underline;
}

.agenda-toolbar__add .icon {
	width: 18px;
	height: 18px;
}

@media (max-width: 767.98px) {
	.agenda-filter {
		flex: 1 1 100%;
	}

	.agenda-filter select {
		width: 100%;
	}

	.agenda-toolbar__add {
		margin-left: 0;
	}
}

/* Lijstweergave
   ========================================================================== */
.agenda-month-title {
	margin: 40px 0 14px;
	font-size: clamp(1.25rem, 2vw, 1.5rem);
}

.agenda-list-view > .agenda-month-title:first-child {
	margin-top: 0;
}

.agenda-rows {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.agenda-row {
	position: relative;
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	align-items: start;
	gap: 18px;
	padding: 16px;
	border-radius: var(--radius);
	background: #fff;
	box-shadow: var(--shadow);
	transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

/* Gekleurde rand in de kleur van de organisatie */
.agenda-row::before {
	content: "";
	position: absolute;
	left: 0;
	top: 14px;
	bottom: 14px;
	width: 4px;
	border-radius: 0 4px 4px 0;
	background: var(--org-color, var(--c-blue));
}

.agenda-row:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

.agenda-row:focus-within {
	box-shadow: var(--shadow-lg), 0 0 0 3px var(--c-blue);
}

@media (min-width: 768px) {
	.agenda-row {
		grid-template-columns: 72px minmax(0, 1fr) auto;
		gap: 24px;
		padding: 18px 20px 18px 22px;
	}
}

.date-badge--lg {
	width: 64px;
	height: 76px;
}

@media (min-width: 768px) {
	.date-badge--lg {
		width: 72px;
		height: 80px;
	}
}

.date-badge__weekday {
	color: var(--c-ink-soft);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.date-badge--lg .date-badge__day {
	margin: 2px 0;
	font-size: 1.75rem;
}

.date-badge--lg .date-badge__month {
	line-height: 1;
}

.agenda-row__title {
	margin: 2px 0 8px;
	font-size: 1.125rem;
	line-height: 1.3;
}

.agenda-row__link {
	color: var(--c-ink);
	text-decoration: none;
}

.agenda-row__link::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.agenda-row__link:focus-visible {
	outline: none;
}

.agenda-row:hover .agenda-row__link {
	color: var(--c-blue);
}

.agenda-row__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--c-ink-soft);
	font-size: 0.875rem;
}

.agenda-row__meta li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.agenda-row__meta .icon {
	width: 15px;
	height: 15px;
	color: var(--c-muted);
}

.agenda-row__summary {
	margin: 8px 0 0;
	color: var(--c-ink-soft);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.agenda-row__thumb {
	display: none;
}

@media (min-width: 768px) {
	.agenda-row__thumb {
		display: block;
		width: 140px;
		aspect-ratio: 4 / 3;
		overflow: hidden;
		border-radius: 10px;
		background: var(--c-bg-tint);
	}

	.agenda-row__thumb img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
}

.agenda-pager {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-top: 36px;
}

/* Maandkalender
   ========================================================================== */
.cal__head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
}

.cal__title {
	min-width: 9ch;
	margin: 0 6px;
	font-size: clamp(1.375rem, 2.4vw, 1.75rem);
	text-align: center;
}

.cal__nav {
	border: 1px solid var(--c-line);
	background: #fff;
}

.cal__today {
	margin-left: auto;
	padding: 8px 16px;
	border: 1px solid var(--c-line);
	border-radius: 999px;
	color: var(--c-ink);
	font-weight: 600;
	font-size: 0.875rem;
	text-decoration: none;
}

.cal__today:hover {
	border-color: var(--c-blue);
	color: var(--c-blue);
}

.cal__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	overflow: hidden;
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	background: var(--c-line);
	gap: 1px;
}

.cal__weekday {
	padding: 10px 12px;
	background: var(--c-bg-soft);
	color: var(--c-ink-soft);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.cal__day {
	min-height: 124px;
	padding: 8px;
	background: #fff;
}

.cal__day.is-outside {
	background: #fafbfc;
}

.cal__day.is-outside .cal__num {
	color: #b4bcc8;
}

.cal__date {
	margin-bottom: 6px;
}

.cal__num {
	display: inline-grid;
	place-items: center;
	min-width: 28px;
	height: 28px;
	padding: 0 4px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.875rem;
}

.cal__day.is-today .cal__num {
	background: var(--c-blue);
	color: #fff;
}

.cal__full {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.cal__events {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cal__event {
	display: block;
	padding: 4px 6px 4px 8px;
	border-left: 3px solid var(--org-color, var(--c-blue));
	border-radius: 4px;
	background: color-mix(in srgb, var(--org-color, #1668d6) 12%, #fff);
	color: var(--c-ink);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cal__event:hover {
	background: color-mix(in srgb, var(--org-color, #1668d6) 22%, #fff);
}

.cal__time {
	margin-right: 4px;
	color: var(--c-ink-soft);
	font-weight: 500;
}

.cal__day.is-past .cal__event {
	opacity: 0.6;
}

.cal__empty {
	margin: 16px 0 0;
	color: var(--c-muted);
	text-align: center;
}

.cal__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
}

.cal__legend a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--c-ink-soft);
	text-decoration: none;
}

.cal__legend a:hover {
	color: var(--c-blue);
}

/* Mobiel: alleen dagen met activiteiten, onder elkaar */
@media (max-width: 767.98px) {
	.cal__grid {
		display: block;
		border: 0;
		background: none;
	}

	.cal__weekday,
	.cal__day:not(.has-events),
	.cal__day.is-outside {
		display: none;
	}

	.cal__day {
		display: grid;
		grid-template-columns: 92px minmax(0, 1fr);
		gap: 12px;
		min-height: 0;
		padding: 14px 0;
		border-bottom: 1px solid var(--c-line);
		background: none;
	}

	.cal__num {
		display: none;
	}

	.cal__full {
		position: static;
		width: auto;
		height: auto;
		clip: auto;
		white-space: normal;
		font-weight: 700;
		font-size: 0.875rem;
		line-height: 1.3;
	}

	.cal__day.is-today .cal__full {
		color: var(--c-blue);
	}

	.cal__event {
		padding: 8px 10px;
		font-size: 0.875rem;
		white-space: normal;
	}
}

/* Detailpagina
   ========================================================================== */
.event__grid {
	display: grid;
	gap: 32px;
}

@media (min-width: 1000px) {
	.event__grid {
		grid-template-columns: minmax(0, 1fr) 360px;
		gap: 56px;
		align-items: start;
	}

	.event__aside {
		position: sticky;
		top: 24px;
	}
}

.event__main {
	max-width: 760px;
}

.event__notice {
	padding: 12px 16px;
	border-radius: var(--radius-sm);
	background: #fff6dd;
	color: #6b5100;
	font-weight: 600;
}

.event__flyer {
	margin: 0 0 28px;
}

.event__flyer a {
	display: block;
	overflow: hidden;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
}

.event__flyer img {
	width: 100%;
	transition: transform 0.4s var(--ease);
}

.event__flyer a:hover img {
	transform: scale(1.02);
}

.event__lead {
	margin: 0 0 20px;
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.5;
}

.event__dates {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--c-line);
}

.event__dates h2 {
	margin-bottom: 14px;
	font-size: 1.25rem;
}

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

.event__dates a {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--c-line);
	border-radius: 999px;
	color: var(--c-ink);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}

.event__dates a:hover {
	border-color: var(--c-blue);
	color: var(--c-blue);
}

.event__more-dates {
	margin: 10px 0 0;
	color: var(--c-muted);
	font-size: 0.875rem;
}

.event__back {
	margin-top: 40px;
}

.info-card {
	padding: 24px;
	border-radius: var(--radius-lg);
	background: #fff;
	box-shadow: var(--shadow-lg);
}

.info-card__list {
	display: grid;
	gap: 18px;
	margin: 0;
}

.info-card__list > div {
	display: grid;
	gap: 4px;
}

.info-card__list dt {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--c-muted);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.info-card__list dt .icon {
	width: 16px;
	height: 16px;
	color: var(--c-blue);
}

.info-card__list dd {
	margin: 0;
	font-weight: 600;
	line-height: 1.45;
}

.info-card__sub {
	display: block;
	margin-top: 2px;
	color: var(--c-ink-soft);
	font-size: 0.875rem;
	font-weight: 500;
}

a.info-card__sub {
	color: var(--c-blue);
}

.info-card__actions {
	display: grid;
	gap: 10px;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--c-line);
}

.info-card__actions .button {
	width: 100%;
}

.info-card__actions .button--light {
	border: 1px solid var(--c-line);
}

/* Mobiel en tablet: flyer, dan praktische info, dan de tekst */
@media (max-width: 999.98px) {
	.event__grid {
		display: flex;
		flex-direction: column;
		gap: 0;
	}

	.event__main {
		display: contents;
	}

	.event__notice { order: 0; }
	.event__flyer { order: 1; }
	.event__aside { order: 2; margin-bottom: 28px; }
	.event__lead,
	.event__main > .entry-content,
	.event__dates,
	.event__back { order: 3; }
}
