/*
Theme Name: Working Equitation Belgium 2027
Theme URI: https://www.workingequitation.be/
Author: Working Equitation Belgium
Description: Blokthema voor Working Equitation Belgium. Donkergroen, beige en goud, gebouwd met native WordPress-blokken. Wedstrijden, uitslagen, documenten en clubs komen uit de plugin "WEB Core".
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.0
Version: 0.4.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: web2027
Domain Path: /languages
Tags: block-patterns, full-site-editing, translation-ready, accessibility-ready, wide-blocks
*/

/* ==========================================================================
   Alleen wat theme.json niet kan. Houd dit bestand klein.
   ========================================================================== */

/* Toegankelijkheid: skip-link en focus ---------------------------------- */
.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--beige);
	color: var(--wp--preset--color--groen);
	font-weight: 600;
	padding: 0.75rem 1.25rem;
	z-index: 100000;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--goud);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Header -------------------------------------------------------------------- */
/* De template part (<header>) zelf is sticky, zodat het menu bij scrollen zichtbaar blijft */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; } }
.web-header { border-bottom: 1px solid rgba(24, 63, 50, 0.1); }

.web-header .wp-block-navigation-item__content {
	padding-block: 0.35rem;
	background-image: linear-gradient(var(--wp--preset--color--goud), var(--wp--preset--color--goud));
	background-size: 0 2px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size var(--wp--custom--transition);
}
.web-header .wp-block-navigation-item__content:hover,
.web-header .current-menu-item > .wp-block-navigation-item__content,
.web-header [aria-current="page"] {
	background-size: 100% 2px;
}

/* Hamburgermenu ook op tablet (core schakelt pas om onder 600px) */
@media (min-width: 600px) and (max-width: 1099px) {
	.web-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.web-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 3rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-family: var(--wp--preset--font-family--serif); font-size: var(--wp--preset--font-size--x-large); }
@media (max-width: 599px) {
	.web-header .wp-block-site-title { font-size: 1.1rem; }
}

/* Taalkeuze */
.web-taalkeuze { display: flex; gap: 0.35rem; list-style: none; margin: 0; padding: 0; font-size: var(--wp--preset--font-size--x-small); font-weight: 700; letter-spacing: 0.08em; }
.web-taalkeuze li + li::before { content: "|"; margin-right: 0.35rem; color: var(--wp--preset--color--goud); }
.web-taalkeuze a { text-decoration: none; color: var(--wp--preset--color--grijs); }
.web-taalkeuze .is-actief a, .web-taalkeuze a:hover { color: var(--wp--preset--color--groen); }

/* Gouden accentlijn boven een kop: blokstijl "Met goudlijn" ------------------- */
.is-style-goudlijn::before {
	content: "";
	display: block;
	width: 3.5rem;
	height: 2px;
	margin-bottom: 1rem;
	background: var(--wp--preset--color--goud);
}
.has-text-align-center.is-style-goudlijn::before { margin-inline: auto; }

/* Bovenschrift (eyebrow): blokstijl voor paragraaf --------------------------- */
.is-style-bovenschrift {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--goud-donker);
}
.has-groen-background-color .is-style-bovenschrift,
.has-groen-donker-background-color .is-style-bovenschrift,
.wp-block-cover .is-style-bovenschrift { color: var(--wp--preset--color--goud-licht); }

/* Knop-variant "omlijnd" ---------------------------------------------------- */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	border-color: currentColor;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--wit);
	color: var(--wp--preset--color--groen);
	border-color: var(--wp--preset--color--wit);
}
.has-wit-color .wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-cover .wp-block-button.is-style-outline > .wp-block-button__link { color: var(--wp--preset--color--wit); }

/* Knop-variant "goud" ------------------------------------------------------- */
.wp-block-button.is-style-goud > .wp-block-button__link {
	background: var(--wp--preset--color--goud);
	border-color: var(--wp--preset--color--goud);
	color: var(--wp--preset--color--groen-donker);
}
.wp-block-button.is-style-goud > .wp-block-button__link:hover {
	background: var(--wp--preset--color--beige);
	border-color: var(--wp--preset--color--beige);
}

/* Pijl-link ("Alle wedstrijden →") ----------------------------------------- */
.is-style-pijl a {
	font-weight: 700;
	text-decoration: none;
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.04em;
}
.is-style-pijl a::after { content: " →"; display: inline-block; transition: transform var(--wp--custom--transition); }
.is-style-pijl a:hover::after { transform: translateX(4px); }

/* Donkere secties: koppen en links volgen de tekstkleur ------------------- */
:is(.has-groen-background-color, .has-groen-donker-background-color, .wp-block-cover) :is(h1, h2, h3, h4, h5, h6):not([class*="-color"]) { color: inherit; }
:is(.has-groen-background-color, .has-groen-donker-background-color) a:not(.wp-block-button__link) { color: inherit; }
:is(.has-groen-background-color, .has-groen-donker-background-color) a:not(.wp-block-button__link):hover { color: var(--wp--preset--color--goud-licht); }

/* Kaarten ------------------------------------------------------------------- */
.is-style-kaart {
	background: var(--wp--preset--color--wit);
	border-radius: var(--wp--custom--radius--middel);
	box-shadow: var(--wp--preset--shadow--zacht);
	overflow: hidden;
	height: 100%;
	color: var(--wp--preset--color--inkt);
	transition: transform var(--wp--custom--transition), box-shadow var(--wp--custom--transition);
}
.is-style-kaart:hover { transform: translateY(-3px); box-shadow: var(--wp--preset--shadow--diep); }
.wp-block-post-template.is-layout-grid > li { display: flex; }
.wp-block-post-template.is-layout-grid > li > .is-style-kaart { flex: 1; }

/* Hele kaart klikbaar maken via de titel-link (blijft één link voor schermlezers) */
.is-style-kaart { position: relative; }
.is-style-kaart :is(h2, h3, h4):not([class*="-color"]) { color: var(--wp--preset--color--groen); }
.is-style-kaart a:not(.wp-block-button__link) { color: var(--wp--preset--color--groen); }
.is-style-kaart .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.is-style-kaart .wp-block-post-title a:focus-visible { outline: none; }
.is-style-kaart:focus-within { outline: 2px solid var(--wp--preset--color--goud); outline-offset: 3px; }

/* Wedstrijdkaart: datumblok */
.web-datumblok {
	min-width: 4.5rem;
	text-align: center;
	line-height: 1;
}
.web-datumblok .web-dag { font-family: var(--wp--preset--font-family--serif); font-size: 2.5rem; font-weight: 600; }
.web-datumblok .web-maand { font-size: var(--wp--preset--font-size--x-small); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wp--preset--color--goud-licht); }

/* Inschrijvingsstatus-label */
.web-status { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: var(--wp--preset--font-size--x-small); font-weight: 700; letter-spacing: 0.04em; background: var(--wp--preset--color--beige); color: var(--wp--preset--color--groen); }
.web-status:empty { display: none; }

/* Nieuwskaart: vaste beeldverhouding */
.is-style-kaart .wp-block-post-featured-image { margin: 0; }
.is-style-kaart .wp-block-post-featured-image img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; border-radius: 0; }

/* Sponsors ------------------------------------------------------------------- */
.web-sponsors .wp-block-image img {
	max-height: 64px;
	width: auto;
	filter: grayscale(1);
	opacity: 0.7;
	transition: filter var(--wp--custom--transition), opacity var(--wp--custom--transition);
}
.web-sponsors .wp-block-image a:hover img,
.web-sponsors .wp-block-image a:focus-visible img { filter: none; opacity: 1; }

/* Footer --------------------------------------------------------------------- */
.web-footer a { color: inherit; text-decoration-color: rgba(184, 149, 74, 0.6); text-underline-offset: 3px; }
.web-footer a:hover { color: var(--wp--preset--color--goud-licht); }
.web-footer .wp-block-navigation .wp-block-navigation-item__content { padding-block: 0.2rem; }

/* Documentenlijst ------------------------------------------------------------ */
.web-documentrij { border-bottom: 1px solid var(--wp--preset--color--beige-donker); }

/* Hero: inhoud onderaan, leesbaar op elke foto ------------------------------ */
.web-hero.wp-block-cover.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container { width: 100%; }
.web-hero.wp-block-cover { min-height: min(88vh, 820px); }
.web-hero h1 { text-wrap: balance; }
@media (max-width: 781px) {
	.web-hero.wp-block-cover { min-height: 78vh; }
}

/* Geen witruimte tussen header, inhoud en footer; secties sluiten op elkaar aan */
.wp-site-blocks > * + *,
main.wp-block-group > * + * { margin-block-start: 0; }

/* Cijfers op gelijke hoogte (Cormorant gebruikt standaard mediaevalcijfers) */
body, h1, h2, h3, h4, .web-dag { font-variant-numeric: lining-nums; }
.wp-block-post-content > .alignfull + .alignfull,
.wp-block-post-content > .alignfull:first-child { margin-block-start: 0; }
.wp-block-post-content > .alignfull:last-child { margin-block-end: 0; }

/* Footer altijd onderaan, ook bij korte pagina's */
.wp-site-blocks { min-height: 100vh; display: flex; flex-direction: column; }
.wp-site-blocks > main { flex: 1 0 auto; }

/* Categorieënlijst (documenten, regio's) als filterknoppen */
.wp-block-categories-list:where(.wp-block-categories) { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.wp-block-categories-list li a { display: inline-block; padding: 0.35rem 0.9rem; border: 1px solid var(--wp--preset--color--groen); border-radius: 999px; text-decoration: none; font-weight: 600; }
.wp-block-categories-list li a:hover, .wp-block-categories-list li.current-cat a { background: var(--wp--preset--color--groen); color: var(--wp--preset--color--wit); }

/* ==========================================================================
   Tijdlijn (Historiek)
   Zonder JS: verticale lijst met jaartallen. Met JS: jaarnavigatie,
   voortgangslijn, actief jaar en rustige verschijning.
   ========================================================================== */
.web-tijdlijn {
	--web-voortgang: 0%;
	position: relative;
	padding-block: var(--wp--preset--spacing--40);
}
/* De lijn */
.web-tijdlijn::before,
.web-tijdlijn.is-interactief::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0.6rem;
	width: 2px;
	background: var(--wp--preset--color--beige-donker);
}
.web-tijdlijn.is-interactief::after {
	background: var(--wp--preset--color--goud);
	bottom: auto;
	height: var(--web-voortgang);
	transition: height 400ms ease;
}

.web-tijdlijn-stap {
	position: relative;
	padding: 0 0 var(--wp--preset--spacing--60) 2.75rem;
}
.web-tijdlijn-stap:last-child { padding-bottom: 0; }
.web-tijdlijn-stap > * { margin-block: 0; }
.web-tijdlijn-stap > * + * { margin-block-start: 0.5rem; }

/* Het bolletje */
.web-tijdlijn-stap::before {
	content: "";
	position: absolute;
	left: 0.6rem;
	top: 0.55em;
	width: 1.1rem;
	height: 1.1rem;
	transform: translateX(-50%);
	border-radius: 50%;
	background: var(--wp--preset--color--wit);
	border: 2px solid var(--wp--preset--color--goud);
	z-index: 1;
	transition: background-color 250ms ease, transform 250ms ease;
}
.web-tijdlijn-stap.is-actief::before,
.web-tijdlijn-stap.is-voorbij::before { background: var(--wp--preset--color--goud); }
.web-tijdlijn-stap.is-actief::before { transform: translateX(-50%) scale(1.25); }

.web-tijdlijn .web-tijdlijn-jaar {
	font-size: var(--wp--preset--font-size--x-large);
	color: var(--wp--preset--color--goud-donker);
	scroll-margin-top: 8rem;
}
.web-tijdlijn-stap p { font-size: var(--wp--preset--font-size--large); max-width: 36rem; }
.web-tijdlijn-stap.is-actief .web-tijdlijn-jaar { color: var(--wp--preset--color--groen); }

/* Rustig verschijnen (alleen als JS actief is) */
.web-tijdlijn.is-interactief .web-tijdlijn-stap {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 500ms ease, transform 500ms ease;
}
.web-tijdlijn.is-interactief .web-tijdlijn-stap.is-zichtbaar { opacity: 1; transform: none; }

/* Desktop: lijn in het midden, stappen afwisselend links en rechts */
@media (min-width: 900px) {
	.web-tijdlijn::before,
	.web-tijdlijn.is-interactief::after { left: 50%; transform: translateX(-50%); }
	.web-tijdlijn-stap { width: 50%; padding-left: 0; padding-right: 3rem; text-align: right; }
	.web-tijdlijn-stap p { margin-left: auto; }
	.web-tijdlijn-stap::before { left: 100%; }
	.web-tijdlijn-stap:nth-child(even) { margin-left: 50%; padding-right: 0; padding-left: 3rem; text-align: left; }
	.web-tijdlijn-stap:nth-child(even) p { margin-left: 0; }
	.web-tijdlijn-stap:nth-child(even)::before { left: 0; }
	.web-tijdlijn-stap { margin-top: -2.5rem; }
	.web-tijdlijn-stap:first-child { margin-top: 0; }
}

/* Jaarnavigatie */
.web-tijdlijn-nav {
	position: sticky;
	top: 4.5rem;
	z-index: 5;
	margin-block: var(--wp--preset--spacing--50) 0;
	background: var(--wp--preset--color--wit);
	border-block: 1px solid var(--wp--preset--color--beige-donker);
}
.admin-bar .web-tijdlijn-nav { top: calc(4.5rem + var(--wp-admin--admin-bar--height, 32px)); }
.web-tijdlijn-nav ol {
	display: flex;
	gap: 0.25rem;
	margin: 0;
	padding: 0.6rem 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: thin;
}
.web-tijdlijn-nav a {
	display: block;
	white-space: nowrap;
	padding: 0.35rem 0.8rem;
	border-radius: 999px;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	text-decoration: none;
	color: var(--wp--preset--color--groen);
	transition: background-color var(--wp--custom--transition), color var(--wp--custom--transition);
}
.web-tijdlijn-nav a:hover { background: var(--wp--preset--color--beige); }
.web-tijdlijn-nav a[aria-current] { background: var(--wp--preset--color--groen); color: var(--wp--preset--color--wit); }
@media (max-width: 600px) {
	.web-tijdlijn-nav { top: 3.9rem; }
	.admin-bar .web-tijdlijn-nav { top: 3.9rem; }
}

/* Lidgeld-tabellen en voetnoten (pagina Lid worden) */
.web-tarieven table { border-collapse: collapse; width: 100%; table-layout: auto; }
.web-tarieven td { border: 0; border-bottom: 1px solid var(--wp--preset--color--beige-donker); padding: 0.55rem 0; vertical-align: top; }
.web-tarieven td + td { padding-left: 1rem; white-space: nowrap; font-variant-numeric: lining-nums; color: var(--wp--preset--color--groen); }
.web-tarieven { margin: 0; }
.web-voetnoten { padding-left: 1.2rem; color: var(--wp--preset--color--grijs); }
.web-voetnoten li + li { margin-top: 0.3rem; }
