/*
 * Only what theme.json cannot express: sticky header, the white card surface,
 * the orange accent bar, the sponsor tiles and the nav item states.
 * Every colour resolves to a theme.json token.
 */

/* ---------- Header ---------- */

.cmv-header {
	position: sticky;
	top: 0;
	z-index: 40;
}

.cmv-header__inner {
	gap: 1rem;
}

/* Logo sits in a white rounded box, as in the original design. */
.cmv-logo .wp-block-site-logo,
.cmv-logo.wp-block-site-logo {
	background: #fff;
	border-radius: 8px;
	padding: 2px 4px;
	box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
	line-height: 0;
}

.cmv-logo img {
	block-size: auto;
	max-block-size: 56px;
	inline-size: auto;
	object-fit: contain;
}

/* ---------- Navigation ---------- */

.cmv-nav {
	flex: 1;
}

.cmv-nav .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	block-size: 2.5rem;
	padding-inline: 1rem;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.cmv-nav .wp-block-navigation-item__content:hover,
.cmv-nav .wp-block-navigation-item__content:focus-visible {
	background: rgb(0 0 0 / 0.10);
}

.cmv-nav .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
	background: rgb(0 0 0 / 0.16);
	font-weight: 600;
}

.cmv-nav--footer .wp-block-navigation-item__content {
	block-size: 2.25rem;
	padding-inline: 0.75rem;
}

/* ---------- Search ---------- */

.cmv-search .wp-block-search__input {
	border: 0;
	border-radius: 8px;
	padding: 0.4rem 0.75rem;
	font-size: 0.875rem;
	min-inline-size: 9rem;
}

.cmv-search .wp-block-search__button {
	border: 0;
	border-radius: 8px;
}

/* ---------- Card surface ---------- */

.is-style-kaart {
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	overflow: hidden;
}

/* Een afbeelding boven in een kaart loopt tot de randen door, zoals in het
   origineel (aspect-[16/9] w-full object-cover). De beeldverhouding zelf komt
   uit de blokinstellingen, zodat de redactie hem per pagina kan wijzigen. */
.is-style-kaart > figure.wp-block-image:first-child,
.is-style-kaart > .wp-block-post-featured-image:first-child {
	margin-block: 0 1.5rem;
	max-inline-size: none;
}

.is-style-kaart > figure.wp-block-image:first-child img,
.is-style-kaart > .wp-block-post-featured-image:first-child img {
	inline-size: 100%;
	display: block;
}

.is-style-kaart img {
	border-radius: 0;
}

/* ---------- Orange accent bar (h-3 w-20 rounded-full bg-primary) ---------- */

.cmv-accentbar {
	/* Het blok zelf loopt over de volle contentbreedte: WordPress' constrained
	   layout forceert `margin-inline: auto !important` op kinderen, dus een blok
	   met vaste breedte zou onvermijdelijk gecentreerd worden. Het streepje is
	   daarom een pseudo-element binnen dat volle blok. */
	block-size: 12px;
	margin-block-end: 1.25rem;
}

.cmv-accentbar::before {
	content: "";
	display: block;
	block-size: 12px;
	inline-size: 80px;
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
}

/* ---------- Hero ---------- */

.cmv-hero__image img {
	inline-size: 100%;
	border-radius: 12px;
	object-fit: cover;
}

/* ---------- Sponsor tiles ---------- */

.cmv-sponsors {
	gap: 1.5rem;
}

@media (max-width: 600px) {
	.cmv-sponsors {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

.cmv-sponsor {
	aspect-ratio: 3 / 2;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--wp--preset--color--background);
	border: 1px dashed var(--wp--preset--color--border);
	border-radius: 12px;
}

.cmv-sponsor p {
	margin: 0;
	color: var(--wp--preset--color--muted);
}

.cmv-sponsor img {
	max-block-size: 80%;
	max-inline-size: 80%;
	object-fit: contain;
}

/* ---------- News cards ---------- */

.cmv-cards {
	gap: 1.5rem;
}

.cmv-cards .wp-block-post-title {
	margin-block: 0.25rem 0.5rem;
}

.cmv-cards .wp-block-post-title a {
	text-decoration: none;
}

/* ---------- Agenda single ---------- */

.cmv-eventdate {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	color: var(--wp--preset--color--foreground);
	text-transform: capitalize;
}

/* Orange as a small accent dot rather than the text colour itself: orange text
   on the white card fails contrast (worse still with the lighter #FFB133),
   same reasoning as the header nav (see primary-contrast). */
.cmv-eventdate::before {
	content: "";
	display: inline-block;
	inline-size: 10px;
	block-size: 10px;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	flex-shrink: 0;
}

/* ---------- Accessibility ---------- */

:where(a:focus-visible, button:focus-visible, input:focus-visible) {
	outline: 2px solid var(--wp--preset--color--foreground);
	outline-offset: 2px;
}
