/*
Theme Name: RHC Bouwsteen
Theme URI: https://redhorsecompany.nl
Author: Stichting Red Horse Company
Description: Licht blokthema voor Stichting Red Horse Company. Geen slider, geen zijbalk, alles aanpasbaar via Weergave > Editor.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rhc-bouwsteen
*/

/* ---------- Basis ---------- */

h1, h2, h3, h4,
.wp-block-site-title,
.wp-block-post-title,
.wp-block-query-title {
	font-stretch: 82%;
	text-wrap: balance;
}

p { text-wrap: pretty; }

:where(.wp-site-blocks) :focus-visible {
	outline: 3px solid var(--wp--preset--color--timber);
	outline-offset: 3px;
}

.wp-element-button,
.wp-block-button__link {
	font-stretch: 92%;
}

/* Secundaire knop: omlijnd */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	border: 2px solid currentColor;
	padding: calc(0.8rem - 2px) calc(1.4rem - 2px);
}
/* !important nodig: een tekstkleur uit de editor (has-…-color) wint anders */
.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus {
	background-color: var(--wp--preset--color--paper) !important;
	color: var(--wp--preset--color--ink) !important;
	border-color: var(--wp--preset--color--paper) !important;
}

/* ---------- Kop ---------- */

.rhc-header {
	border-top: 6px solid var(--wp--preset--color--red);
}

.rhc-header .wp-block-site-logo img {
	max-height: 64px;
	width: auto;
}

.rhc-header .wp-block-navigation .wp-block-navigation-item__content {
	padding-block: 0.35rem;
	text-decoration: none;
}
.rhc-header .wp-block-navigation .wp-block-navigation-item__content[aria-current="page"],
.rhc-header .wp-block-navigation .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--red-dark);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.35em;
}
.rhc-header .wp-block-navigation__submenu-container {
	border: 0 !important;
	box-shadow: 0 8px 24px rgba(29, 34, 40, 0.14);
	padding: 0.5rem 0;
	min-width: 15rem !important;
}
.rhc-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.45rem 1rem;
	font-weight: 500;
}

/* ---------- Bakstenen muur (blokstijl voor Groep) ---------- */
/* Rij 1: één steen van 93px; rij 2: halfsteens verband. Voegen 3px. */

.is-style-brick-wall {
	background-color: #861420;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='64'%3E%3Crect width='96' height='64' fill='%23861420'/%3E%3Crect x='3' y='3' width='93' height='29' fill='%23B21F2C'/%3E%3Crect x='0' y='35' width='48' height='29' fill='%23A81C28'/%3E%3Crect x='51' y='35' width='45' height='29' fill='%23B82431'/%3E%3C/svg%3E");
	background-size: 96px 64px;
	background-position: 0 0;
}

/* Het ontbrekende steentje: het witte vlak in de muur */
.rhc-gap {
	background: var(--wp--preset--color--paper);
	box-shadow: inset 0 4px 0 rgba(0, 0, 0, 0.18), 0 0 0 3px #861420;
}

.rhc-iban {
	font-family: var(--wp--preset--font-family--archivo);
	font-weight: 700;
	font-stretch: 90%;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.04em;
	font-size: clamp(1.25rem, 2.6vw, 1.625rem);
	line-height: 1.2;
	user-select: all;
}

/* ---------- Voorpagina: laatste nieuws ---------- */

.rhc-feature {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	align-items: center;
}
@media (min-width: 782px) {
	.rhc-feature:has(.wp-block-post-featured-image) {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: var(--wp--preset--spacing--50);
	}
}
.rhc-feature > * { margin-block: 0 !important; }
.rhc-feature .wp-block-post-featured-image img {
	aspect-ratio: 3 / 2;
	object-fit: cover;
	width: 100%;
}
.rhc-feature-text > * + * { margin-block-start: 0.75rem; }

/* Lijst met eerder nieuws: één regel per bericht */
.rhc-news-list .wp-block-post {
	border-top: 2px solid var(--wp--preset--color--ink);
	padding-top: 0.85rem;
}
.rhc-news-list .wp-block-post-title {
	font-stretch: 88%;
}

/* ---------- Feitenlijst ---------- */

.rhc-facts {
	list-style: none;
	padding-left: 0;
	margin: 0;
	font-family: var(--wp--preset--font-family--archivo);
}
.rhc-facts li {
	border-left: 4px solid var(--wp--preset--color--timber);
	padding: 0.15rem 0 0.15rem 1rem;
	margin-bottom: 1.1rem;
	line-height: 1.35;
}
.rhc-facts strong {
	display: block;
	font-weight: 800;
	font-stretch: 85%;
	font-size: 1.25rem;
}

/* ---------- Voet ---------- */

.rhc-footer a {
	color: inherit;
	text-underline-offset: 0.2em;
}
.rhc-footer a:hover {
	color: var(--wp--preset--color--paper);
}

/* ---------- Kleine schermen ---------- */

@media (max-width: 600px) {
	.rhc-header .wp-block-site-logo img { max-height: 48px; }
	.rhc-gap { box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.18); }
}

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; }
}

/* Kop, inhoud en voet sluiten naadloos op elkaar aan */
.wp-site-blocks > main,
.wp-site-blocks > footer,
.wp-site-blocks > .wp-block-template-part {
	margin-block-start: 0;
}
