/* =========================================================================
   GELREMAN — theme.css
   Recreates the React/Vite prototype design system for the block theme.
   All colours come from theme.json presets (var(--wp--preset--color--*)).
   ========================================================================= */

/* ---- Tokens not expressible in theme.json ---- */
:root {
	--gm-base: var(--wp--preset--color--base, #0a0e1a);
	--gm-surface: var(--wp--preset--color--surface, #0f1626);
	--gm-red: var(--wp--preset--color--red, #cc2229);
	--gm-gold: var(--wp--preset--color--gold, #f0c000);
	--gm-blue: var(--wp--preset--color--blue, #1e72be);
	--gm-contrast: var(--wp--preset--color--contrast, #f9fafb);
	--gm-muted: var(--wp--preset--color--muted, #9ca3af);
	--gm-border: rgba(249, 250, 251, 0.10);
	--gm-card: linear-gradient(180deg, rgba(17, 24, 39, 0.55) 0%, rgba(17, 24, 39, 0.28) 100%);
	--gm-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.8);
	--gm-display: var(--wp--preset--font-family--display, "Bebas Neue", Impact, sans-serif);
	--gm-heading: var(--wp--preset--font-family--heading, Outfit, sans-serif);
	--gm-body: var(--wp--preset--font-family--body, Inter, sans-serif);
}

html { scroll-behavior: smooth; }

body {
	background: var(--gm-base);
	color: var(--gm-contrast);
	font-family: var(--gm-body);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

/* Subtle ambient glow behind everything, like the prototype's vignette. */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background:
		radial-gradient(60% 50% at 80% -10%, rgba(30, 114, 190, 0.16), transparent 70%),
		radial-gradient(50% 40% at 0% 0%, rgba(204, 34, 41, 0.12), transparent 70%);
}
.wp-site-blocks { position: relative; z-index: 1; }

/* =========================================================================
   TYPOGRAPHY HELPERS
   ========================================================================= */
.gm-eyebrow {
	font-family: var(--gm-heading);
	font-weight: 700;
	font-size: 0.75rem;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--gm-red);
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
}
.gm-eyebrow::before {
	content: "";
	width: 2rem;
	height: 2px;
	background: var(--gm-red);
}
.gm-eyebrow.is-center { justify-content: center; }

.gm-display {
	font-family: var(--gm-display);
	text-transform: uppercase;
	line-height: 0.9;
	letter-spacing: 0.01em;
}

.gm-text-gold { color: var(--gm-gold); }
.gm-text-red { color: var(--gm-red); }
.gm-text-blue { color: var(--gm-blue); }
.gm-text-muted { color: var(--gm-muted); }

/* Animated shine sweep across display headings (the "GELREMAN" effect).
   A white->gold->white gradient is clipped to the text and slid across with
   background-position. Matches the prototype's .title-shine 1:1. */
.title-shine {
	color: var(--gm-contrast); /* fallback if background-clip:text unsupported */
	background: linear-gradient(100deg, #f9fafb 30%, #f0c000 50%, #f9fafb 70%);
	background-size: 200% auto;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	animation:
		gm-title-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both,
		gm-title-shift 5s ease-in-out 1.2s infinite alternate;
}
@supports not ((background-clip: text) or (-webkit-background-clip: text)) {
	.title-shine { -webkit-text-fill-color: currentColor; background: none; }
}
@keyframes gm-title-in {
	0% { opacity: 0; transform: translateY(56px) scaleX(0.96); }
	100% { opacity: 1; transform: none; }
}
@keyframes gm-title-shift {
	0% { background-position: 0% center; }
	100% { background-position: 100% center; }
}
@media (prefers-reduced-motion: reduce) {
	.title-shine { animation: none; }
}

/* Legacy two-tone split (kept for backwards compatibility). */
.gm-split-word b { font-weight: inherit; color: var(--gm-gold); }

/* =========================================================================
   BUTTONS
   ========================================================================= */
.wp-block-button__link,
.gm-btn {
	font-family: var(--gm-heading);
	font-weight: 700;
	font-size: 0.8125rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.95rem 1.6rem;
	border-radius: 10px;
	text-decoration: none;
	transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
	border: 1px solid transparent;
	line-height: 1;
}
.gm-btn-primary,
.is-style-gm-primary .wp-block-button__link {
	background: var(--gm-red);
	color: var(--gm-contrast);
	box-shadow: 0 12px 30px -12px rgba(204, 34, 41, 0.7);
}
.gm-btn-primary:hover,
.is-style-gm-primary .wp-block-button__link:hover {
	background: #e23b42;
	transform: translateY(-2px);
	color: #fff;
}
.gm-btn-ghost,
.is-style-gm-ghost .wp-block-button__link {
	background: rgba(249, 250, 251, 0.04);
	border-color: var(--gm-border);
	color: var(--gm-contrast);
	backdrop-filter: blur(8px);
}
.gm-btn-ghost:hover,
.is-style-gm-ghost .wp-block-button__link:hover {
	border-color: rgba(249, 250, 251, 0.35);
	transform: translateY(-2px);
}
.gm-btn .gm-arrow { transition: transform 0.2s ease; }
.gm-btn:hover .gm-arrow { transform: translateX(4px); }

/* Gold inline "Meer info ›" link */
.gm-more {
	font-family: var(--gm-heading);
	font-weight: 600;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--gm-gold);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}
.gm-more:hover { color: var(--gm-contrast); }
.gm-more::after { content: "›"; font-size: 1.1em; transition: transform 0.2s ease; }
.gm-more:hover::after { transform: translateX(3px); }

/* =========================================================================
   SECTION / LAYOUT
   ========================================================================= */
.gm-section { padding-block: clamp(4rem, 3rem + 6vw, 8rem); position: relative; }
.gm-section-head { max-width: 640px; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.gm-section-head.is-center { margin-inline: auto; text-align: center; }
.gm-section-head h2 { margin: 1rem 0 0.75rem; }
.gm-section-head p { color: var(--gm-muted); font-size: 1.0625rem; }

.gm-rule {
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--gm-border), transparent);
	border: 0;
}

/* Vertical red accent line down the left edge of dark sections. */
.gm-accent-line { position: relative; }
.gm-accent-line::before {
	content: "";
	position: absolute;
	left: max(1rem, 4vw);
	top: 0;
	bottom: 0;
	width: 2px;
	background: linear-gradient(180deg, transparent, var(--gm-red) 20%, var(--gm-red) 80%, transparent);
	opacity: 0.5;
}

/* =========================================================================
   GLASS CARD
   ========================================================================= */
.gm-card {
	background: var(--gm-card);
	border: 1px solid var(--gm-border);
	border-radius: 20px;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	backdrop-filter: blur(14px);
	box-shadow: var(--gm-shadow);
	position: relative;
	overflow: hidden;
}
.gm-card-hover { transition: transform 0.3s ease, border-color 0.3s ease; }
.gm-card-hover:hover { transform: translateY(-4px); border-color: rgba(249, 250, 251, 0.22); }

/* =========================================================================
   HEADER
   ========================================================================= */
.gm-header {
	position: sticky;
	top: 0;
	z-index: 50;
	transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
	border-bottom: 1px solid transparent;
}
.gm-header.is-scrolled {
	background: rgba(10, 14, 26, 0.85);
	backdrop-filter: blur(14px);
	border-bottom-color: var(--gm-border);
}
.gm-header .gm-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	max-width: 1200px;
	margin-inline: auto;
	padding: 0.9rem max(1rem, 4vw);
}
.gm-header .gm-brand {
	font-family: var(--gm-display);
	font-size: 1.6rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--gm-contrast);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	line-height: 1;
}
.gm-header .gm-brand .gm-brand-mark { color: var(--gm-blue); }

.gm-primary-nav ul {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 1.75rem;
	margin: 0;
	padding: 0;
}
.gm-primary-nav a {
	color: var(--gm-contrast);
	text-decoration: none;
	font-family: var(--gm-heading);
	font-weight: 500;
	font-size: 0.95rem;
	transition: color 0.2s ease;
}
.gm-primary-nav a:hover { color: var(--gm-gold); }
/* top red hairline like the prototype */
.gm-header::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: var(--gm-red);
}

.gm-nav-toggle { display: none; }

/* =========================================================================
   HERO
   ========================================================================= */
.gm-hero {
	position: relative;
	min-height: 100svh;
	display: flex;
	align-items: flex-end;
	padding-bottom: clamp(3rem, 6vw, 6rem);
	overflow: hidden;
}
.gm-hero-media {
	position: absolute;
	inset: 0;
	z-index: -1;
}
.gm-hero-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.gm-hero-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10, 14, 26, 0.45) 0%, rgba(10, 14, 26, 0.55) 40%, rgba(10, 14, 26, 0.92) 100%);
}
.gm-hero-inner { max-width: 1200px; margin-inline: auto; width: 100%; padding-inline: max(1rem, 4vw); }
.gm-hero h1 {
	font-family: var(--gm-display);
	font-size: clamp(4rem, 1rem + 13vw, 12rem);
	line-height: 0.82;
	margin: 0.5rem 0 0;
}
.gm-hero .gm-hero-sub {
	font-family: var(--gm-display);
	font-size: clamp(1.5rem, 0.8rem + 3vw, 3rem);
	color: var(--gm-red);
	letter-spacing: 0.04em;
	margin: 0.25rem 0 1.25rem;
}
.gm-hero .gm-hero-lead { max-width: 32rem; color: rgba(249, 250, 251, 0.85); font-size: 1.0625rem; }

/* =========================================================================
   COUNTDOWN BLOCK
   ========================================================================= */
.gm-countdown { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.gm-countdown .gm-cd-unit {
	background: rgba(17, 24, 39, 0.55);
	border: 1px solid var(--gm-border);
	border-radius: 16px;
	padding: 1rem 1.25rem;
	min-width: 5.25rem;
	text-align: center;
	backdrop-filter: blur(10px);
}
.gm-countdown .gm-cd-value {
	font-family: var(--gm-display);
	font-size: clamp(2.25rem, 1rem + 4vw, 3.5rem);
	line-height: 1;
	color: var(--gm-contrast);
	display: block;
}
.gm-countdown .gm-cd-label {
	font-family: var(--gm-heading);
	font-size: 0.6875rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--gm-muted);
	margin-top: 0.4rem;
	display: block;
}
.gm-countdown.is-finished .gm-cd-value { color: var(--gm-gold); }

/* =========================================================================
   TICKER / MARQUEE BLOCK (CSS only — no JS needed)
   ========================================================================= */
.gm-ticker {
	border-block: 1px solid var(--gm-border);
	background: rgba(15, 22, 38, 0.6);
	overflow: hidden;
	padding-block: 1.1rem;
}
.gm-ticker__track {
	display: flex;
	width: max-content;
	gap: 2.5rem;
	animation: gm-marquee 40s linear infinite;
}
.gm-ticker:hover .gm-ticker__track { animation-play-state: paused; }
.gm-ticker__item {
	font-family: var(--gm-display);
	font-size: 1.5rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(249, 250, 251, 0.8);
	display: inline-flex;
	align-items: center;
	gap: 2.5rem;
	white-space: nowrap;
}
.gm-ticker__item::after { content: "·"; color: var(--gm-red); }
@keyframes gm-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
	.gm-ticker__track { animation: none; flex-wrap: wrap; justify-content: center; }
}

/* =========================================================================
   DISTANCE CARDS
   ========================================================================= */
.gm-distances { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, 1fr); }
.gm-distance { display: flex; flex-direction: column; gap: 1rem; }
.gm-distance.is-featured { border-color: rgba(240, 192, 0, 0.4); }
.gm-distance .gm-distance-tag {
	font-family: var(--gm-heading);
	font-size: 0.7rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--gm-gold);
}
.gm-distance h3 { font-size: 2rem; margin: 0; }
.gm-distance .gm-distance-km {
	font-family: var(--gm-display);
	font-size: 3rem;
	line-height: 1;
	color: var(--gm-red);
}
.gm-distance ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.gm-distance li { display: flex; align-items: center; gap: 0.6rem; color: var(--gm-muted); font-size: 0.95rem; }
.gm-distance .gm-distance-note { font-size: 0.85rem; color: var(--gm-muted); border-top: 1px solid var(--gm-border); padding-top: 0.85rem; margin-top: auto; }

/* =========================================================================
   TESTIMONIALS
   ========================================================================= */
.gm-testimonials { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr); }
.gm-quote { display: flex; flex-direction: column; gap: 1.25rem; }
.gm-quote .gm-quote-mark { font-family: Georgia, serif; font-size: 3rem; line-height: 0.5; color: var(--gm-gold); opacity: 0.5; }
.gm-quote blockquote { margin: 0; font-size: 1.0625rem; color: rgba(249, 250, 251, 0.9); font-style: italic; }
.gm-quote .gm-quote-author { display: flex; align-items: center; gap: 0.9rem; margin-top: auto; }
.gm-avatar {
	width: 2.75rem; height: 2.75rem; border-radius: 999px;
	background: var(--gm-blue); color: #fff;
	display: grid; place-items: center;
	font-family: var(--gm-heading); font-weight: 700; font-size: 0.85rem;
}
.gm-quote-author cite { font-style: normal; font-weight: 600; }
.gm-quote-author small { display: block; color: var(--gm-muted); font-size: 0.8rem; }

/* =========================================================================
   COURSE / PARCOURS CARDS (alternating photo + glass card)
   ========================================================================= */
.gm-courses { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.gm-course { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(1rem, -1rem + 6vw, 3rem); }
.gm-course:nth-child(even) .gm-course-media { order: 2; }
.gm-course-media { border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--gm-shadow); }
.gm-course-media img { width: 100%; height: 100%; object-fit: cover; }
.gm-course-body .gm-distance-tag { color: var(--gm-red); }
.gm-course-body h3 { font-size: clamp(2rem, 1rem + 3vw, 3.25rem); margin: 0.5rem 0 1rem; }
.gm-course-body p { color: var(--gm-muted); }

/* =========================================================================
   CORE VALUES GRID
   ========================================================================= */
.gm-values { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); }
.gm-value .gm-value-num { font-family: var(--gm-display); font-size: 2.5rem; color: rgba(240, 192, 0, 0.5); line-height: 1; }
.gm-value h3 { font-size: 1.5rem; margin: 0.5rem 0 0.6rem; }
.gm-value p { color: var(--gm-muted); font-size: 0.95rem; }

/* =========================================================================
   FAQ ACCORDION BLOCK (native <details> — works with JS off)
   ========================================================================= */
.gm-faq { display: grid; gap: 0.75rem; max-width: 820px; }
.gm-faq details {
	background: rgba(17, 24, 39, 0.45);
	border: 1px solid var(--gm-border);
	border-radius: 14px;
	overflow: hidden;
}
.gm-faq summary {
	cursor: pointer;
	list-style: none;
	padding: 1.1rem 1.35rem;
	font-family: var(--gm-heading);
	font-weight: 600;
	font-size: 1.05rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}
.gm-faq summary::-webkit-details-marker { display: none; }
.gm-faq summary::after {
	content: "+";
	font-family: var(--gm-display);
	font-size: 1.6rem;
	color: var(--gm-gold);
	transition: transform 0.2s ease;
	line-height: 1;
}
.gm-faq details[open] summary::after { transform: rotate(45deg); }
.gm-faq .gm-faq-body { padding: 0 1.35rem 1.25rem; color: var(--gm-muted); }
.gm-faq details[open] summary { color: var(--gm-gold); }

/* =========================================================================
   REGISTRATION COUNTER BLOCK
   ========================================================================= */
.gm-regcount { display: grid; gap: 1.5rem; }
.gm-regcount .gm-regcount-big {
	font-family: var(--gm-display);
	font-size: clamp(4rem, 2rem + 8vw, 8rem);
	line-height: 0.85;
	color: var(--gm-contrast);
}
.gm-regcount .gm-regcount-big small { font-size: 0.35em; color: var(--gm-muted); }
.gm-progress { height: 12px; border-radius: 999px; background: rgba(249, 250, 251, 0.08); overflow: hidden; }
.gm-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gm-red), var(--gm-gold)); border-radius: 999px; width: 0; transition: width 1.2s ease; }
.gm-regcount-legend { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--gm-muted); }
.gm-regcount-split { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
.gm-regcount-split .gm-split-item { text-align: center; }
.gm-regcount-split .gm-split-num { font-family: var(--gm-display); font-size: 1.75rem; color: var(--gm-gold); }
.gm-regcount-split .gm-split-label { font-family: var(--gm-heading); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gm-muted); }
.gm-regcount-note { font-size: 0.8rem; color: var(--gm-muted); }

/* =========================================================================
   GALLERY BLOCK (CSS :target lightbox — degrades to plain links)
   ========================================================================= */
.gm-gallery { display: grid; gap: 0.85rem; grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; }
.gm-gallery a { display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 1; position: relative; }
.gm-gallery a.is-wide { grid-column: span 2; aspect-ratio: 2 / 1; }
.gm-gallery a.is-tall { grid-row: span 2; aspect-ratio: 1 / 2; }
.gm-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gm-gallery a:hover img { transform: scale(1.06); }
.gm-lightbox {
	position: fixed; inset: 0; z-index: 100;
	background: rgba(5, 8, 16, 0.92);
	display: none; place-items: center;
	padding: 2rem;
}
.gm-lightbox:target { display: grid; }
.gm-lightbox img { max-width: min(1100px, 92vw); max-height: 88vh; border-radius: 12px; }
.gm-lightbox .gm-lightbox-close { position: absolute; top: 1.5rem; right: 1.5rem; color: #fff; font-size: 2rem; text-decoration: none; }

/* =========================================================================
   COURSE MAP BLOCK (Leaflet, with static fallback when JS is off)
   ========================================================================= */
.gm-map { border-radius: 20px; overflow: hidden; border: 1px solid var(--gm-border); position: relative; min-height: 380px; background: var(--gm-surface); }
.gm-map .gm-map-canvas { position: absolute; inset: 0; }
.gm-map .gm-map-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 2rem; gap: 1rem; }
.gm-map.is-live .gm-map-fallback { display: none; }

/* =========================================================================
   CTA BANNER (huge display headline over photo)
   ========================================================================= */
.gm-cta {
	position: relative;
	border-radius: 24px;
	overflow: hidden;
	padding: clamp(3rem, 6vw, 6rem);
	isolation: isolate;
}
.gm-cta .gm-cta-media { position: absolute; inset: 0; z-index: -1; }
.gm-cta .gm-cta-media img { width: 100%; height: 100%; object-fit: cover; }
.gm-cta .gm-cta-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(10, 14, 26, 0.9), rgba(10, 14, 26, 0.55)); }
.gm-cta h2 { font-size: clamp(2.5rem, 1rem + 7vw, 6rem); margin: 0.5rem 0 1rem; }
.gm-cta p { max-width: 38rem; color: rgba(249, 250, 251, 0.85); }

/* =========================================================================
   RACE-INFO: distance stat row
   ========================================================================= */
.gm-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gm-stat { text-align: center; }
.gm-stat .gm-stat-label { font-family: var(--gm-heading); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gm-muted); }
.gm-stat .gm-stat-num { font-family: var(--gm-display); font-size: clamp(2rem, 1rem + 3vw, 3rem); color: var(--gm-contrast); }
.gm-stat .gm-stat-sub { font-size: 0.8rem; color: var(--gm-gold); }

/* =========================================================================
   FORMS (aanmelden / vrijwilliger)
   ========================================================================= */
.gm-form { display: grid; gap: 2rem; max-width: 820px; }
.gm-form fieldset { border: 1px solid var(--gm-border); border-radius: 18px; padding: 1.75rem; background: rgba(17, 24, 39, 0.35); }
.gm-form legend { font-family: var(--gm-heading); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; color: var(--gm-gold); padding: 0 0.5rem; }
.gm-field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.gm-field { display: grid; gap: 0.4rem; }
.gm-field.is-full { grid-column: 1 / -1; }
.gm-field label { font-size: 0.8rem; font-weight: 600; color: var(--gm-contrast); }
.gm-field label .req { color: var(--gm-red); }
.gm-form input, .gm-form select, .gm-form textarea {
	width: 100%;
	background: rgba(10, 14, 26, 0.6);
	border: 1px solid var(--gm-border);
	border-radius: 10px;
	padding: 0.75rem 0.9rem;
	color: var(--gm-contrast);
	font-family: var(--gm-body);
	font-size: 0.95rem;
}
.gm-form input:focus, .gm-form select:focus, .gm-form textarea:focus { outline: 2px solid var(--gm-blue); border-color: transparent; }
.gm-form input::placeholder, .gm-form textarea::placeholder { color: var(--gm-muted); }
.gm-radio-cards { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
.gm-radio-card { border: 1px solid var(--gm-border); border-radius: 16px; padding: 1.25rem; cursor: pointer; display: grid; gap: 0.5rem; }
.gm-radio-card:has(input:checked) { border-color: var(--gm-gold); background: rgba(240, 192, 0, 0.06); }
.gm-radio-card .gm-radio-price { font-family: var(--gm-display); font-size: 1.75rem; color: var(--gm-gold); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.gm-footer { border-top: 1px solid var(--gm-border); background: rgba(7, 10, 18, 0.7); padding-block: clamp(3rem, 5vw, 4.5rem); }
.gm-footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2.5rem; max-width: 1200px; margin-inline: auto; padding-inline: max(1rem, 4vw); }
.gm-footer h4 { font-family: var(--gm-heading); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gm-muted); margin: 0 0 1rem; }
.gm-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.gm-footer a { color: rgba(249, 250, 251, 0.78); text-decoration: none; font-size: 0.95rem; }
.gm-footer a:hover { color: var(--gm-gold); }
.gm-footer .gm-footer-brand { font-family: var(--gm-display); font-size: 2rem; }
.gm-footer-bottom { border-top: 1px solid var(--gm-border); margin-top: 2.5rem; padding-top: 1.5rem; text-align: center; color: var(--gm-muted); font-size: 0.85rem; }
.gm-socials { display: flex; gap: 0.75rem; margin-top: 1rem; }
.gm-socials a { width: 2.5rem; height: 2.5rem; border-radius: 999px; border: 1px solid var(--gm-border); display: grid; place-items: center; }
.gm-socials a:hover { border-color: var(--gm-gold); }

/* =========================================================================
   SCROLL REVEAL (opt-in; default visible for no-JS)
   ========================================================================= */
/* Eligible blocks start hidden only while `has-reveal` is on <html> (added by
   the head bootstrap — never when JS is off / reduced motion / toggle off).
   They fade up when `.is-revealed` is added, or all at once if the `.reveal-all`
   failsafe fires. Keep this selector list in sync with ui.js.

   Speed is chosen in admin (Settings → Gelreman) and applied as a class on
   <html>; each sets the duration + travel distance via custom properties. */
.has-reveal { --gm-reveal-dur: 0.7s; --gm-reveal-dist: 44px; }
.has-reveal.reveal-fast { --gm-reveal-dur: 0.45s; --gm-reveal-dist: 36px; }
.has-reveal.reveal-middle { --gm-reveal-dur: 0.75s; --gm-reveal-dist: 48px; }
.has-reveal.reveal-slow { --gm-reveal-dur: 1.15s; --gm-reveal-dist: 64px; }

.has-reveal :is(
	.gm-section-head, .gm-distances > *, .gm-values > *, .gm-stat-row > *,
	.gm-testimonials > *, .gm-courses > *, .wp-block-column,
	.gm-cta, .gm-regcount, .gm-map, .gm-faq details
) {
	opacity: 0;
	transform: translateY(var(--gm-reveal-dist));
	transition: opacity var(--gm-reveal-dur) cubic-bezier(0.16, 1, 0.3, 1), transform var(--gm-reveal-dur) cubic-bezier(0.16, 1, 0.3, 1);
	will-change: opacity, transform;
}
.has-reveal :is(
	.gm-section-head, .gm-distances > *, .gm-values > *, .gm-stat-row > *,
	.gm-testimonials > *, .gm-courses > *, .wp-block-column,
	.gm-cta, .gm-regcount, .gm-map, .gm-faq details
).is-revealed,
.has-reveal.reveal-all :is(
	.gm-section-head, .gm-distances > *, .gm-values > *, .gm-stat-row > *,
	.gm-testimonials > *, .gm-courses > *, .wp-block-column,
	.gm-cta, .gm-regcount, .gm-map, .gm-faq details
) {
	opacity: 1;
	transform: none;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 980px) {
	.gm-distances, .gm-values, .gm-regcount-split, .gm-stat-row, .gm-radio-cards { grid-template-columns: 1fr 1fr; }
	.gm-testimonials { grid-template-columns: 1fr; }
	.gm-gallery { grid-template-columns: repeat(3, 1fr); }
	.gm-footer-grid { grid-template-columns: 1fr 1fr; }
	.gm-course { grid-template-columns: 1fr; }
	.gm-course:nth-child(even) .gm-course-media { order: 0; }
}
@media (max-width: 640px) {
	.gm-nav-toggle {
		display: inline-flex; background: none; border: 0; color: var(--gm-contrast);
		font-size: 1.5rem; cursor: pointer; padding: 0.25rem;
	}
	.gm-primary-nav {
		position: absolute; top: 100%; left: 0; right: 0;
		background: rgba(10, 14, 26, 0.97); backdrop-filter: blur(14px);
		border-bottom: 1px solid var(--gm-border);
		display: none; padding: 1rem max(1rem, 4vw) 1.5rem;
	}
	.gm-primary-nav.is-open { display: block; }
	.gm-primary-nav ul { flex-direction: column; align-items: flex-start; gap: 1rem; }
	.gm-distances, .gm-values, .gm-regcount-split, .gm-stat-row, .gm-field-grid, .gm-radio-cards, .gm-footer-grid, .gm-gallery { grid-template-columns: 1fr; }
}

/* =========================================================================
   CORE BLOCK INTEGRATION
   Styles the core Navigation / Social Links / Gallery blocks to match.
   ========================================================================= */

/* Site title as brand */
.gm-header .wp-block-site-title { margin: 0; }
.gm-header .wp-block-site-title a {
	font-family: var(--gm-display);
	font-size: 1.7rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--gm-contrast);
	text-decoration: none;
}
.gm-header .wp-block-site-title a:hover { color: var(--gm-gold); }

/* Core navigation inside our header */
.gm-header .wp-block-navigation {
	font-family: var(--gm-heading);
	font-weight: 500;
	font-size: 0.95rem;
	--wp--style--block-gap: 1.75rem;
}
.gm-header .wp-block-navigation a,
.gm-header .wp-block-navigation .wp-block-navigation-item__content { color: var(--gm-contrast); text-decoration: none; }
.gm-header .wp-block-navigation a:hover,
.gm-header .wp-block-navigation .wp-block-navigation-item:hover a { color: var(--gm-gold); }
.gm-header .wp-block-navigation .wp-block-navigation__submenu-container {
	background: rgba(10, 14, 26, 0.97);
	border: 1px solid var(--gm-border);
	border-radius: 12px;
	backdrop-filter: blur(14px);
	padding: 0.5rem;
	min-width: 200px;
}
.gm-header .wp-block-navigation .wp-block-navigation__submenu-container a { padding: 0.55rem 0.75rem; border-radius: 8px; }
.gm-header .wp-block-navigation .wp-block-navigation__submenu-container a:hover { background: rgba(249,250,251,0.06); }

/* Header CTA button — slightly tighter than body buttons */
.gm-header-cta .wp-block-button__link { padding: 0.7rem 1.25rem; font-size: 0.75rem; }

/* Mobile nav overlay background */
.gm-header .wp-block-navigation__responsive-container.is-menu-open {
	background: rgba(10, 14, 26, 0.98);
	padding-top: 4rem;
}

/* Social links */
.gm-socials.wp-block-social-links { gap: 0.6rem; }
.gm-socials .wp-social-link {
	background: rgba(249, 250, 251, 0.04);
	border: 1px solid var(--gm-border);
	color: var(--gm-contrast);
	transition: border-color 0.2s ease, transform 0.2s ease;
}
.gm-socials .wp-social-link:hover { border-color: var(--gm-gold); transform: translateY(-2px); }

/* Footer link lists rendered by core/list */
.gm-footer .gm-footer-links a { color: rgba(249, 250, 251, 0.78); }
.gm-footer .gm-footer-links a:hover { color: var(--gm-gold); }

/* Core gallery on the gallery page */
.gm-gallery-block { gap: 0.85rem !important; }
.gm-gallery-block .wp-block-image,
.gm-gallery-block figure { border-radius: 14px; overflow: hidden; }
.gm-gallery-block img { transition: transform 0.4s ease; }
.gm-gallery-block .wp-block-image:hover img { transform: scale(1.05); }

/* Standalone core/details (when used outside .gm-faq) */
.wp-block-details {
	background: rgba(17, 24, 39, 0.45);
	border: 1px solid var(--gm-border);
	border-radius: 14px;
	padding: 1.1rem 1.35rem;
}
.wp-block-details summary { font-family: var(--gm-heading); font-weight: 600; cursor: pointer; }

/* post-content within constrained pages keeps comfortable measure */
.gm-section .wp-block-post-content { color: var(--gm-contrast); }

/* Ensure constrained content inside full-bleed sections is padded on mobile */
@media (max-width: 640px) {
	.gm-section { padding-inline: 1rem; }
}

/* =========================================================================
   VIDEO BACKGROUND BLOCK (gelreman/youtube-bg)
   Full-bleed YouTube (or self-hosted) background that covers its container.
   The iframe autoplays muted+looped from its own URL params, so it works
   even with site JavaScript disabled. Used as the hero background.
   ========================================================================= */
.gm-video-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
	background: var(--gm-base);
}
.gm-video-bg iframe,
.gm-video-bg video {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border: 0;
	/* 16:9 cover: whichever of these wins, the frame always fills the box */
	width: max(100%, 177.78vh);
	height: max(100%, 56.25vw);
	min-width: 100%;
	min-height: 100%;
	object-fit: cover;
	pointer-events: none;
}
.gm-video-bg__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10, 14, 26, 0.40) 0%, rgba(10, 14, 26, 0.55) 42%, rgba(10, 14, 26, 0.92) 100%);
}
/* Editor: keep the background block from collapsing / autoplaying awkwardly. */
.editor-styles-wrapper .gm-video-bg { position: relative; min-height: 220px; }

/* Regular (in-flow) video player — same in the editor and on the front end,
   and it honours block alignment (wide / full). */
.gm-video-regular {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 20px;
	overflow: hidden;
	background: var(--gm-surface);
	border: 1px solid var(--gm-border);
	box-shadow: var(--gm-shadow);
}
.gm-video-regular iframe,
.gm-video-regular video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: cover;
}

/* Hero using the video-bg block as its background */
.gm-hero .gm-hero-inner { position: relative; z-index: 1; }
/* Optional: hide the moving background on small screens (overlay stays). */
@media (max-width: 781px) {
	.gm-video-bg.hide-on-mobile iframe,
	.gm-video-bg.hide-on-mobile video { display: none; }
}

/* =========================================================================
   BLOCK STYLES (selectable in the editor Styles panel)
   ========================================================================= */
/* core/group → "Glaskaart" */
.wp-block-group.is-style-glass {
	background: var(--gm-card);
	border: 1px solid var(--gm-border);
	border-radius: 20px;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	backdrop-filter: blur(14px);
	box-shadow: var(--gm-shadow);
}
/* core/group → "Gelreman sectie" */
.wp-block-group.is-style-gm-section {
	padding-block: clamp(4rem, 3rem + 6vw, 8rem);
}

/* Responsive column utilities for ready-made rows (override the default grid
   column count via a class, not inline styles, so mobile still collapses). */
.gm-cols-4 { grid-template-columns: repeat(4, 1fr); }
.gm-cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) {
	.gm-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.gm-cols-4, .gm-cols-2 { grid-template-columns: 1fr; }
}

/* Bulleted list inside a glass card (intro element) */
.gm-card .gm-card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.gm-card .gm-card-list li { position: relative; padding-left: 1.4rem; color: var(--gm-muted); }
.gm-card .gm-card-list li::before { content: "›"; position: absolute; left: 0; color: var(--gm-gold); font-weight: 700; }
