/*
Theme Name: Buurthuis de Kolk
Theme URI: https://buurthuisdekolk.nl
Author: Buurthuis de Kolk
Description: Eigen blokthema voor Buurthuis de Kolk. Werkt samen met de plug-in "Buurthuis de Kolk – Activiteiten".
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: buurthuis-de-kolk
*/

/* ==========================================================================
   Huisstijl: pas hier de basis aan. Kleuren staan ook in theme.json.
   ========================================================================== */
:root {
	--r: 18px;                 /* ronding van de rechterbovenhoek */
	--oranje: #ED7B1E;
	--turq: #73C6CD;
	--diep: #1D5963;
	--inkt: #12313A;
	--bg: #EEF8F9;
	--lijn: #C4E1E4;
	--zacht: #DCEDEF;
	--mute: #4A6A72;
	--kop-font: Montserrat, Verdana, sans-serif;
}

html { overflow-y: scroll; scrollbar-gutter: stable; }
body { margin: 0; }
.wp-site-blocks { min-height: 100vh; display: flex; flex-direction: column; }
.wp-site-blocks > main { flex: 1; width: 100%; }
:focus-visible { outline: 3px solid var(--oranje); outline-offset: 2px; }
a { text-underline-offset: 3px; }

/* ==========================================================================
   Kop en menu
   ========================================================================== */
.bdk-kop { background: var(--oranje); color: #fff; border-bottom: 6px solid var(--turq); }
.bdk-kop :focus-visible { outline-color: #fff; }
.bdk-kop__in {
	max-width: 1040px; margin: 0 auto; padding: 14px 20px;
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.bdk-logo { margin: 0; line-height: 0; font-size: 0; }
.bdk-logo a {
	display: block; width: 272px; height: 80px;
	background: url(assets/logo-oranje.png) no-repeat left center / contain;
	text-indent: -9999px; overflow: hidden; white-space: nowrap;
	-webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.bdk-menu .wp-block-navigation-item__content,
.bdk-menu .wp-block-pages-list__item__link {
	font-family: var(--kop-font); font-weight: 700; font-size: .95rem; letter-spacing: .03em;
	text-transform: uppercase; text-decoration: none; color: #fff; padding: 10px 16px;
	border-radius: 0 var(--r) 0 0;
}
.bdk-menu .wp-block-navigation-item__content:hover { background: rgba(255, 255, 255, .25); }
.bdk-menu [aria-current="page"],
.bdk-menu .current-menu-item > a {
	background: rgba(255, 255, 255, .22); box-shadow: inset 0 -4px 0 #fff;
}
.wp-block-navigation__responsive-container.is-menu-open { background: var(--oranje); color: #fff; }

/* ==========================================================================
   Pagina’s
   ========================================================================== */
.bdk-main { max-width: 1040px; margin: 0 auto; padding: 28px 20px 48px; box-sizing: border-box; }
.bdk-main > .wp-block-post-title:first-child,
.bdk-main > h1:first-child { margin-top: 32px; margin-bottom: .5em; }
.bdk-main h2 { margin: 1.4em 0 .6em; }
.bdk-main p { margin: 0 0 1em; }

/* De blauwe banner sluit direct aan op de oranje kop (geen ruimte ertussen). */
.bdk-main > .bdk-hero:first-child { margin-top: -28px; }

.bdk-hero {
	background: var(--diep); color: #fff; padding: 32px; position: relative; overflow: hidden; margin-bottom: 8px;
}
.bdk-hero > * { position: relative; z-index: 1; }
.bdk-hero h1 { color: #fff; margin: 0 0 .4em; }
.bdk-hero p { max-width: 60ch; }
.bdk-hero::after {
	content: ""; position: absolute; right: -20px; bottom: -24px; width: 230px; height: 230px;
	background: var(--turq); opacity: .45;
	-webkit-mask: url(assets/kringeltje.png) center / contain no-repeat;
	mask: url(assets/kringeltje.png) center / contain no-repeat;
}

/* Titel met kringeltje, in een andere kleur per pagina (body-klasse bdk-c0 t/m bdk-c5) */
body[class*="bdk-c"] .wp-block-post-title::before {
	content: ""; display: inline-block; width: .9em; height: .9em; margin-right: .35em; vertical-align: -.05em;
	background: currentColor; transform: rotate(180deg);
	-webkit-mask: url(assets/kringeltje.png) center / contain no-repeat;
	mask: url(assets/kringeltje.png) center / contain no-repeat;
}
body.bdk-c0 .wp-block-post-title::before { color: #00AEEF; }
body.bdk-c1 .wp-block-post-title::before { color: #ED7B1E; }
body.bdk-c2 .wp-block-post-title::before { color: #73C6CD; }
body.bdk-c3 .wp-block-post-title::before { color: #F26191; }
body.bdk-c4 .wp-block-post-title::before { color: #ED7B1E; }
body.bdk-c5 .wp-block-post-title::before { color: #00AEEF; }

/* Terug-link en pijlen */
.bdk-top2 { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.bdk-terug { display: inline-block; }
.bdk-pijlen { display: flex; gap: 8px; }
.bdk-pijl { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; font-size: 1.4rem; line-height: 1; }
.bdk-pijl--uit { background: var(--zacht); color: var(--mute); cursor: default; }

/* Knoppen */
.bdk-btn {
	display: inline-block; background: var(--oranje); color: var(--inkt); font: inherit; font-weight: 700;
	padding: 12px 20px; border: 0; border-radius: 0; text-decoration: none; cursor: pointer;
}
.bdk-btn:hover { filter: brightness(1.05); }

/* Balk boven een lijst */
.bdk-balk { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 14px 0 20px; }

/* Kaarten met oranje balk */
.bdk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.bdk-kaart {
	display: block; background: #fff; border: 1px solid var(--lijn); border-radius: 0 var(--r) 0 0;
	overflow: hidden; text-decoration: none; color: inherit; container-type: inline-size;
}
.bdk-kaart__foto { display: block; aspect-ratio: 16 / 9; background: var(--diep); }
.bdk-kaart__foto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bdk-kaart__balk {
	display: block; background: var(--oranje); color: #fff; font-family: var(--kop-font); font-weight: 700;
	text-transform: uppercase; text-align: center; padding: 9px 10px 3px; line-height: 1.1;
	font-size: min(2.2rem, calc((100cqw - 20px) / 12.6));
}
.bdk-kaart__tekst { display: block; padding: 14px 16px; }
.bdk-klein { padding: 8px 14px; color: var(--mute); }
.bdk-kaart__intro { display: block; margin-top: 8px; color: var(--mute); }
.bdk-datum { display: inline-block; background: var(--oranje); color: var(--inkt); font-weight: 700; padding: 2px 10px; font-size: .95rem; }

/* Agenda */
.bdk-rij {
	display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: center;
	background: #fff; border: 1px solid var(--lijn); border-radius: 0 var(--r) 0 0;
	padding: 12px 16px; margin-bottom: 10px; text-decoration: none; color: inherit;
}
.bdk-rij__d { text-align: center; font-weight: 700; line-height: 1.1; }
.bdk-rij__d b { display: block; font-size: 2rem; }
.bdk-rij--voorbij { background: var(--zacht); color: var(--mute); }

/* Weekagenda */
.bdk-week { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.bdk-dag { background: #fff; border: 1px solid var(--lijn); border-radius: 0 var(--r) 0 0; padding: 14px; }
.bdk-main .bdk-dag h2 { font-size: 1.2rem; margin: 0 0 .5em; border-bottom: 3px solid var(--oranje); padding-bottom: 6px; }
.bdk-dag a { display: block; margin: 10px 0; text-decoration: none; }
.bdk-dag a b { display: block; color: var(--diep); }
.bdk-dag small { color: var(--mute); font-size: .9rem; }

/* Gegevens-blokken (wanneer, waar, kosten, ...) */
.bdk-feiten {
	background: #fff; border: 1px solid var(--lijn); border-left: 6px solid var(--oranje);
	border-radius: 0 var(--r) 0 0; padding: 16px 20px; margin: 0 0 18px;
	display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-content: start;
}
.bdk-feiten dt { font-weight: 700; }
.bdk-feiten dd { margin: 0; }

/* Eén activiteit: foto links, gegevens rechts op dezelfde hoogte */
.bdk-twee { display: grid; gap: 18px 28px; grid-template-columns: 1fr; }
.bdk-twee__foto img {
	display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-top-right-radius: var(--r);
}
.bdk-twee__feiten { display: flex; }
.bdk-twee__feiten > .wp-block-shortcode { flex: 1; display: flex; }
.bdk-twee__feiten .bdk-feiten { flex: 1; margin: 0; }
@media (min-width: 860px) {
	.bdk-twee { grid-template-columns: 3fr 2fr; grid-template-rows: auto 1fr; }
	.bdk-twee__foto { grid-column: 1; grid-row: 1; align-self: start; }
	.bdk-twee__feiten { grid-column: 2; grid-row: 1; }
	.bdk-twee__tekst { grid-column: 1; grid-row: 2; }
}

/* Over ons */
.bdk-over { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .bdk-over { grid-template-columns: 3fr 2fr; } }

.bdk-galerij { margin-top: 32px; }

/* ==========================================================================
   Onderbalk
   ========================================================================== */
.bdk-voet { background: var(--diep); color: #fff; position: relative; overflow: hidden; }
.bdk-voet::after {
	content: ""; position: absolute; right: -20px; top: -40px; width: 170px; height: 170px;
	background: var(--oranje); opacity: .9; transform: rotate(-90deg);
	-webkit-mask: url(assets/kringeltje.png) center / contain no-repeat;
	mask: url(assets/kringeltje.png) center / contain no-repeat;
}
.bdk-voet__in { max-width: 1040px; margin: 0 auto; padding: 24px 20px; position: relative; z-index: 1; box-sizing: border-box; }
.bdk-voet__grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.bdk-voet a { color: #fff; }
.bdk-voet p { margin: 0; }
.bdk-print-krul { display: none; }

/* ==========================================================================
   Kleine schermen
   ========================================================================== */
@media (max-width: 560px) {
	.bdk-logo a { width: 190px; height: 56px; }
	.bdk-rij { grid-template-columns: 64px 1fr; }
	.bdk-rij .bdk-btn { display: none; }
	.bdk-hero { padding: 22px; }
}

/* ==========================================================================
   Afdrukken (weekagenda op A4)
   ========================================================================== */
@media print {
	@page { size: A4; margin: 14mm; }
	body { background: #fff !important; color: #000 !important; font-size: 11pt; }
	.wp-site-blocks { display: block; min-height: 0; }
	.bdk-kop { background: none; color: #000; border-bottom: 3px solid var(--oranje); }
	.bdk-kop__in { padding: 0 0 8px; }
	.bdk-logo a { height: 46px; width: 156px; }
	.bdk-menu, .bdk-nodruk, .bdk-balk, .wp-block-navigation { display: none !important; }
	.bdk-main { padding: 0; }
	.bdk-main > .wp-block-post-title:first-child { margin-top: 14px; font-size: 22pt; }
	.bdk-week { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.bdk-dag { break-inside: avoid; border: 1.5px solid #000; background: #fff; border-radius: 0; }
	.bdk-dag a b { color: #000; }
	.bdk-dag small { color: #222; font-size: 10pt; }
	.bdk-voet { background: none; color: #000; border-top: 1px solid #000; margin-top: 14px; overflow: visible; }
	.bdk-voet::after { display: none; }
	.bdk-voet a { color: #000; text-decoration: none; }
	.bdk-voet__in { padding: 10px 0 0; }
	.bdk-voet__grid { grid-template-columns: 1fr 1fr; }
	.bdk-voet__grid > div:nth-child(3) { display: none; }
	.bdk-print-krul { display: block; position: fixed; right: 0; bottom: 0; width: 64px; }
	.bdk-print-krul img { display: block; width: 100%; height: auto; }
}
