/*
Theme Name: AMBC Staphorst
Theme URI: https://www.ambc-staphorst.nl
Author: It's Possible
Author URI: https://www.itspossible.nl
Description: Onderhoudsarm block-thema voor de Auto, Motor en Bromfiets Club Staphorst. Gebouwd op de WordPress Site Editor (geen page builder, geen externe afhankelijkheden), met WooCommerce-ondersteuning voor kaartverkoop en inschrijvingen.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.1
Version: 1.2.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ambc
Tags: block-patterns, full-site-editing, one-column, custom-logo, editor-style, e-commerce
*/

/* ------------------------------------------------------------------
   Alles wat hieronder staat is bewust klein gehouden. Kleuren, fonts
   en afstanden komen uit theme.json; hier staan alleen details die
   theme.json (nog) niet kan.
   ------------------------------------------------------------------ */

/* ------------------------------------------------------------------
   Koptekst: rij 1 = logo + knoppen, rij 2 = hoofdmenu.
   Dunne merkstreep (groen -> blauw) onder de balk.
   ------------------------------------------------------------------ */
/* Geen witte ruimte tussen koptekst, inhoud en voettekst */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}
.ambc-header {
	position: relative;
	z-index: 50;
	margin-bottom: 4px; /* ruimte voor de merkstreep */
}
.ambc-header::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -4px;
	height: 4px;
	background: linear-gradient(90deg, var(--wp--preset--color--green) 0 60%, var(--wp--preset--color--blue) 60% 100%);
}
.ambc-header .wp-block-site-logo,
.ambc-header .wp-block-site-logo + .wp-block-group,
.ambc-header .wp-block-site-logo img {
	flex-shrink: 0;
}
.ambc-header .wp-block-site-logo img {
	height: 64px;
	width: auto;
	max-width: none;
}
.ambc-header .wp-block-site-title a {
	text-decoration: none;
}
.ambc-header .wp-block-site-tagline {
	opacity: .75;
}
@media (max-width: 599px) {
	.ambc-header .wp-block-site-tagline {
		display: none;
	}
}
.ambc-header__actions .wp-block-button__link {
	padding: .55rem 1.1rem;
}

/* Status crossbaan: stoplicht (inc/baanstatus.php) */
.ambc-baanstatus {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	padding: .35rem .9rem .35rem .45rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, .22);
	background: rgba(255, 255, 255, .06);
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .15s ease, border-color .15s ease;
}
a.ambc-baanstatus:hover,
a.ambc-baanstatus:focus-visible {
	background: rgba(255, 255, 255, .12);
	border-color: rgba(255, 255, 255, .4);
	color: var(--wp--preset--color--base);
}
.ambc-baanstatus__licht {
	display: inline-flex;
	flex-direction: column;
	gap: 3px;
	padding: 4px;
	border-radius: 6px;
	background: #000;
	flex-shrink: 0;
}
.ambc-baanstatus__licht i {
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	opacity: .22;
}
.ambc-baanstatus__licht .is-rood { background: #ef4444; }
.ambc-baanstatus__licht .is-oranje { background: #f59e0b; }
.ambc-baanstatus__licht .is-groen { background: #22c55e; }
.ambc-baanstatus.is-rood .ambc-baanstatus__licht .is-rood,
.ambc-baanstatus.is-oranje .ambc-baanstatus__licht .is-oranje,
.ambc-baanstatus.is-groen .ambc-baanstatus__licht .is-groen {
	opacity: 1;
	box-shadow: 0 0 6px currentColor;
}
.ambc-baanstatus.is-rood .ambc-baanstatus__licht .is-rood { color: #ef4444; }
.ambc-baanstatus.is-oranje .ambc-baanstatus__licht .is-oranje { color: #f59e0b; }
.ambc-baanstatus.is-groen .ambc-baanstatus__licht .is-groen { color: #22c55e; }
.ambc-baanstatus__label {
	display: block;
	font-size: .72rem;
	opacity: .7;
}
.ambc-baanstatus__tekst {
	font-weight: 500;
}
.ambc-header__right > .wp-block-shortcode,
.ambc-header__right > p {
	margin: 0;
}

/* Rij 2: menu */
.ambc-header__nav {
	border-top: 1px solid rgba(255, 255, 255, .1);
}
.ambc-header__nav .wp-block-navigation {
	font-size: 1rem;
}
.ambc-header__nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content,
.ambc-header__nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-submenu__toggle {
	display: inline-flex;
	align-items: center;
	padding: .85rem .8rem;
	white-space: nowrap;
	border-bottom: 3px solid transparent;
	text-decoration: none;
	transition: border-color .15s ease, color .15s ease;
}
.ambc-header__nav .wp-block-navigation__container > .wp-block-navigation-item:first-child > .wp-block-navigation-item__content {
	padding-left: 0;
}
.ambc-header__nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
.ambc-header__nav .wp-block-navigation__container > .current-menu-item > .wp-block-navigation-item__content,
.ambc-header__nav .wp-block-navigation__container > .current-menu-ancestor > .wp-block-navigation-item__content {
	border-bottom-color: var(--wp--preset--color--green);
	color: var(--wp--preset--color--base);
}
.ambc-header__nav .wp-block-navigation__container > .has-child > .wp-block-navigation-item__content {
	padding-right: .2rem;
}
.ambc-header__nav .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-icon {
	margin-left: 0;
	margin-right: .55rem;
	padding: 0;
}
.ambc-header__nav .wp-block-navigation__submenu-container {
	border-radius: 0 0 8px 8px;
	padding: .35rem 0;
	min-width: 220px;
}
.ambc-header__nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: .6rem 1rem;
	font-size: 1rem;
}
.ambc-header__nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: rgba(255,255,255,.08);
}
.ambc-header__nav .wp-block-navigation__responsive-container-open {
	padding: .8rem 0;
}
.ambc-header__nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 2rem var(--wp--preset--spacing--40);
}
.ambc-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	padding: .5rem 0;
	font-size: 1.25rem;
}
/* Uitklapmenu (hamburger): submenu's dicht, openen met het pijltje */
.ambc-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: stretch;
	width: 100%;
}
.ambc-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .has-child {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	width: 100%;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.ambc-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .has-child > .wp-block-navigation-submenu__toggle {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}
.ambc-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	transform: none;
	transition: transform .2s ease;
}
.ambc-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu__toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}
.ambc-header__nav .wp-block-navigation__responsive-container.is-menu-open .has-child > .wp-block-navigation__submenu-container {
	grid-column: 1 / -1;
	display: none !important;
	padding: 0 0 .6rem 1rem !important;
	gap: 0 !important;
}
.ambc-header__nav .wp-block-navigation__responsive-container.is-menu-open .has-child > .wp-block-navigation-submenu__toggle[aria-expanded="true"] + .wp-block-navigation__submenu-container {
	display: flex !important;
	flex-direction: column;
}
.ambc-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 1.05rem;
	padding: .4rem 0;
	opacity: .85;
}

/* WooCommerce-winkelwagentje dat naast het menu wordt geplaatst */
.ambc-header .wc-block-mini-cart__button {
	color: inherit;
}

/* Tussen 600 en 1199 px: hamburgermenu in plaats van een menu dat niet past */
@media (min-width: 600px) and (max-width: 1199px) {
	.ambc-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
	.ambc-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/* Foto bovenaan een kaart (disciplines op de startpagina): rand tot rand */
.is-style-ambc-card > .ambc-card__img {
	align-self: stretch;
	width: auto;
	max-width: none;
	margin: -1.6rem -1.6rem .5rem !important;
	overflow: hidden;
}
.is-style-ambc-card > .ambc-card__img img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: transform .4s ease;
}
.is-style-ambc-card:hover > .ambc-card__img img {
	transform: scale(1.04);
}

/* Kaart-stijl (blokstijl "Kaart" op een Groep) */
.is-style-ambc-card {
	background: var(--wp--preset--color--base);
	border: 1px solid rgba(18, 23, 21, .08);
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(18, 23, 21, .04);
	transition: transform .18s ease, box-shadow .18s ease;
	overflow: hidden;
}
.is-style-ambc-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(18, 23, 21, .10);
}
.is-style-ambc-card h3 a {
	text-decoration: none;
}
.is-style-ambc-card h3 a:hover {
	color: var(--wp--preset--color--green);
}

/* Nieuwsraster (query loop) */
.ambc-news .wp-block-post {
	display: flex;
	flex-direction: column;
}
.ambc-news .wp-block-post-featured-image img {
	border-radius: 10px;
	width: 100%;
}
.ambc-news .wp-block-post-title a {
	text-decoration: none;
}
.ambc-news .wp-block-post-title a:hover {
	color: var(--wp--preset--color--green);
}
.ambc-news .wp-block-post-date {
	text-transform: uppercase;
	letter-spacing: .06em;
	font-weight: 500;
}

/* Datumbadge bij evenementen */
.ambc-date-badge {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-width: 4.25rem;
	padding: .55rem .6rem;
	border-radius: 10px;
	background: var(--wp--preset--color--green);
	color: #fff;
	font-family: var(--wp--preset--font-family--heading);
	line-height: 1;
}
.ambc-date-badge p {
	margin: 0;
	color: #fff;
}
.ambc-date-badge .dag {
	font-size: 1.75rem;
}
.ambc-date-badge .maand {
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	margin-top: .25rem;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 500;
}

/* Finishvlag-scheidingslijn (blokstijl op Scheidingslijn) */
.wp-block-separator.is-style-ambc-checker {
	border: 0;
	height: 14px;
	width: 100%;
	max-width: none;
	opacity: 1;
	background-color: transparent;
	background-image: repeating-conic-gradient(var(--wp--preset--color--contrast) 0 25%, #fff 0 50%);
	background-size: 14px 14px;
}

/* Afbeelding bovenaan een nieuwsbericht */
.ambc-single .wp-block-post-featured-image img {
	border-radius: 14px;
}
.ambc-single .wp-block-post-content > * + * {
	margin-top: 1.25rem;
}

/* Sponsorlogo's: grijs, kleur bij hover */
.ambc-sponsors img {
	filter: grayscale(1);
	opacity: .8;
	transition: filter .2s ease, opacity .2s ease;
}
.ambc-sponsors img:hover {
	filter: none;
	opacity: 1;
}

/* Koppen met smalle groene accentlijn (blokstijl "Met accentlijn") */
.is-style-ambc-accent {
	position: relative;
	padding-bottom: .65rem;
}
.is-style-ambc-accent::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 3rem;
	height: 4px;
	border-radius: 2px;
	background: var(--wp--preset--color--green);
}
.has-text-align-center.is-style-ambc-accent::after {
	left: 50%;
	transform: translateX(-50%);
}

/* Links in de voettekst */
.ambc-footer a {
	color: inherit;
	text-decoration: none;
}
.ambc-footer a:hover {
	color: var(--wp--preset--color--green);
}
.ambc-footer ul {
	list-style: none;
	padding-left: 0;
}
.ambc-footer li + li {
	margin-top: .4rem;
}

/* WooCommerce: knoppen en meldingen in clubkleuren */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce a.button.alt, .woocommerce button.button.alt,
.wc-block-components-button, .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button {
	background-color: var(--wp--preset--color--green) !important;
	color: #fff !important;
	border-radius: 6px !important;
	font-weight: 500;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .wc-block-components-button:hover {
	background-color: var(--wp--preset--color--green-dark) !important;
}
.woocommerce span.onsale {
	background-color: var(--wp--preset--color--blue);
}
.woocommerce-message, .woocommerce-info {
	border-top-color: var(--wp--preset--color--green);
}
.woocommerce-message::before, .woocommerce-info::before {
	color: var(--wp--preset--color--green);
}

/* Formulieren */
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="number"], input[type="url"], textarea, select {
	border: 1px solid rgba(18, 23, 21, .2);
	border-radius: 6px;
	padding: .6rem .8rem;
	font: inherit;
}
input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible, button:focus-visible {
	outline: 2px solid var(--wp--preset--color--blue);
	outline-offset: 2px;
}

/* Kampioenen-spotlight in de hero: goud omrand vierkant dat wisselt */
.ambc-spotlight {
	display: flex;
	flex-direction: column;
	align-items: center;
}
.ambc-spotlight:not(:has(.wp-block-post)) {
	display: none;
}
.ambc-spotlight__label {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.35rem;
	color: #f3d36b;
	text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
	margin: 0 0 .75rem;
}
.ambc-spotlight__label::before {
	content: "";
	display: inline-block;
	width: 1.2em;
	height: 1.2em;
	margin-right: .4em;
	vertical-align: -0.2em;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f3d36b'%3E%3Cpath d='M3 8l4.5 4L12 5l4.5 7L21 8l-2 11H5L3 8zm2 13h14v2H5v-2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ambc-spotlight .wp-block-query {
	width: min(320px, 100%);
}
.ambc-spotlight .wp-block-post-template {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0;
	padding: 6px;
	border-radius: 20px;
	background: linear-gradient(135deg, #fff3b0 0%, #d4a017 28%, #fff0a3 50%, #b8860b 74%, #f5d76e 100%);
	box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.ambc-spotlight .wp-block-post-template::before {
	content: "";
	position: absolute;
	inset: 6px;
	border-radius: 15px;
	background: var(--wp--preset--color--dark);
}
.ambc-spotlight .wp-block-post {
	position: absolute;
	inset: 6px;
	border-radius: 15px;
	overflow: hidden;
	opacity: 0;
	transition: opacity .6s ease;
}
.ambc-spotlight .wp-block-post.is-active,
html:not(.ambc-js) .ambc-spotlight .wp-block-post:first-child {
	opacity: 1;
}
.ambc-spotlight .wp-block-cover {
	position: absolute;
	inset: 0;
	min-height: 0;
	height: 100%;
}
.ambc-spotlight .wp-block-post-title a {
	color: #fff;
	text-decoration: none;
	text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
.ambc-spotlight .wp-block-post-excerpt.ambc-spotlight__sub,
.ambc-spotlight .ambc-spotlight__sub .wp-block-post-excerpt__excerpt {
	color: #f3d36b;
	font-size: .72rem;
	font-weight: 500;
	letter-spacing: .08em;
	text-transform: uppercase;
	margin: 0;
}
@media (prefers-reduced-motion: reduce) {
	.ambc-spotlight .wp-block-post {
		transition: none;
	}
}
/* Hero op mobiel: compacter, spotlight als liggende kaart over de volle breedte */
@media (max-width: 781px) {
	.ambc-hero.wp-block-cover {
		min-height: 0 !important;
		padding-top: 1.75rem !important;
		padding-bottom: 1.75rem !important;
	}
	.ambc-hero .wp-block-columns {
		gap: 1.5rem;
	}
	.ambc-hero h1 {
		font-size: 1.75rem !important;
		line-height: 1.15;
	}
	.ambc-hero p.has-small-font-size {
		font-size: .75rem !important;
		letter-spacing: .12em !important;
	}
	.ambc-hero p.has-medium-font-size {
		font-size: .98rem !important;
		line-height: 1.5;
	}
	.ambc-hero .wp-block-buttons {
		margin-top: 1rem !important;
	}
	.ambc-hero .wp-block-button__link {
		padding: .6rem 1.1rem;
		font-size: .95rem;
	}
	.ambc-spotlight {
		align-items: stretch;
	}
	.ambc-spotlight__label {
		text-align: left !important;
		font-size: 1.1rem;
		margin-bottom: .5rem;
	}
	.ambc-spotlight .wp-block-query {
		width: 100%;
	}
	.ambc-spotlight .wp-block-post-template {
		aspect-ratio: 16 / 9;
		padding: 4px;
		border-radius: 14px;
	}
	.ambc-spotlight .wp-block-post-template::before,
	.ambc-spotlight .wp-block-post {
		inset: 4px;
		border-radius: 11px;
	}
	.ambc-spotlight .wp-block-post-title {
		font-size: 1.2rem !important;
	}
	.ambc-spotlight .wp-block-post-excerpt.ambc-spotlight__sub,
	.ambc-spotlight .ambc-spotlight__sub .wp-block-post-excerpt__excerpt {
		font-size: .66rem;
	}
}

/* Kampioenen: fotokaarten met naam en titel */
.ambc-champions .wp-block-cover {
	border-radius: 14px;
	overflow: hidden;
}
.ambc-champions .wp-block-cover img {
	transition: transform .4s ease;
}
.ambc-champions .wp-block-post:hover .wp-block-cover img {
	transform: scale(1.04);
}
.ambc-champions .wp-block-post-title {
	text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.ambc-champions .wp-block-post-excerpt__excerpt {
	margin: 0;
}

/* Kleine schermen */
@media (max-width: 781px) {
	/* Koptekst op één rij: logo + naam links, status crossbaan rechts. "Word lid" staat in de hero en in het menu. */
	.ambc-header .wp-block-site-logo img {
		height: 40px;
	}
	.ambc-header .wp-block-site-title {
		font-size: 1.1rem !important;
		line-height: 1.15;
	}
	.ambc-header__brand .wp-block-group.alignwide {
		flex-wrap: nowrap !important;
		gap: .75rem;
	}
	.ambc-header__brand .wp-block-group.alignwide > .wp-block-group:first-child {
		min-width: 0;
		gap: .6rem;
	}
	.ambc-header__actions {
		display: none !important;
	}
	.ambc-header__right {
		flex-wrap: nowrap !important;
		flex-shrink: 0;
	}
	.ambc-baanstatus {
		gap: .45rem;
		padding: .3rem .65rem .3rem .35rem;
		font-size: .74rem;
		max-width: 165px;
	}
	.ambc-baanstatus__label {
		font-size: .64rem;
	}
	.ambc-hide-mobile {
		display: none !important;
	}
}
