/*
Theme Name: Drive-In Wijnegem
Theme URI: https://driveinwijnegem.be
Author: Traveeka BV
Author URI: https://www.traveeka.be
Description: Block theme voor Drive-In Wijnegem. De homepage wisselt mee met het seizoen (Terugblik, Stem mee, Tickets, Vanavond), met een lichtkrant en een filmstrook. Alle inhoud zit in Gutenberg-blokken, zodat ze ook via MCP te beheren is.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: drivein-wijnegem
*/

/* ---------- Basis ---------- */
html { scroll-padding-top: 5rem; }
body { -webkit-font-smoothing: antialiased; }
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--amber);
	outline-offset: 3px;
	border-radius: 2px;
}
.screen-reader-text:not(:focus) {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px; width: 1px; overflow: hidden;
}

/* ---------- Header ---------- */
.di-header {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .di-header { top: var(--wp-admin--admin-bar--height, 0); }
.di-logo {
	font-family: var(--wp--preset--font-family--affiche);
	font-weight: 800;
	font-size: 1.6rem;
	line-height: 1;
	letter-spacing: 0.01em;
}
.di-logo a { color: inherit; text-decoration: none; }
.di-logo small {
	display: block;
	font-family: var(--wp--preset--font-family--tekst);
	font-weight: 400;
	font-size: 0.8rem;
	letter-spacing: 0;
	color: var(--wp--preset--color--maanlicht);
	margin-top: 0.15rem;
}

/* ---------- Hero: lichtkrant naast de titel, filmstrook onderaan ---------- */
.di-hero-inhoud { padding-bottom: var(--wp--preset--spacing--50); }
@media (min-width: 900px) {
	.di-hero-inhoud {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
		column-gap: clamp(2rem, 5vw, 4rem);
		align-items: start;
	}
	.di-hero-inhoud > * { grid-column: 1; }
	.di-hero-inhoud > .di-lichtkrant {
		grid-column: 2;
		grid-row: 1 / span 8;
		align-self: center;
		margin-block-start: 0 !important;
	}
}
.di-hero-inhoud > h1 { max-width: 16ch; }
.di-hero-inhoud > p { max-width: 38rem; }

/* Lichtkrant: letterbord met lampjes. */
.di-lichtkrant {
	box-sizing: border-box;
	padding: 1rem;
	border-radius: 10px;
	background-color: var(--wp--preset--color--nacht);
	background-image: radial-gradient(circle, #FFD37A 0, var(--wp--preset--color--amber) 3px, rgba(242, 169, 59, 0) 5px);
	background-size: 18px 18px;
}
.di-lichtkrant__bord {
	background: var(--wp--preset--color--doek);
	color: var(--wp--preset--color--inkt);
	border-radius: 4px;
	padding: 1rem 1.25rem;
	box-shadow: 0 0 0 6px var(--wp--preset--color--nacht);
	text-align: center;
	text-transform: uppercase;
	font-family: var(--wp--preset--font-family--affiche);
	letter-spacing: 0.06em;
}
.di-lichtkrant__bord p { margin: 0; line-height: 1.02; }
.di-lichtkrant__klein { font-weight: 600; font-size: 1.1rem; color: var(--wp--preset--color--grijs); letter-spacing: 0.15em; }
.di-lichtkrant__groot { font-weight: 800; font-size: clamp(2.1rem, 6vw, 3rem); margin-top: 0.25rem !important; }
.di-lichtkrant__rood { font-weight: 800; font-size: clamp(1.4rem, 4vw, 2rem); color: var(--wp--preset--color--achterlicht); margin-top: 0.15rem !important; }

/* Filmstrook: perforatie boven en onder, één beeldje per seizoen. */
.di-filmstrook {
	--perf: rgba(233, 231, 245, 0.5);
	margin-block-start: 0 !important;
	padding: 17px 8px;
	background-color: #0E1022;
	background-image:
		repeating-linear-gradient(90deg, var(--perf) 0 12px, transparent 12px 24px),
		repeating-linear-gradient(90deg, var(--perf) 0 12px, transparent 12px 24px);
	background-size: 100% 7px, 100% 7px;
	background-position: 6px 5px, 6px calc(100% - 5px);
	background-repeat: no-repeat;
}
.di-filmstrook__beelden {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	max-width: 90rem;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
}
.di-beeldje a {
	box-sizing: border-box;
	min-height: 64px;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.5rem 1.25rem;
	border-radius: 3px;
	background: #262A4A;
	color: rgba(233, 231, 245, 0.82);
	text-decoration: none;
	transition: background-color 0.15s ease;
}
.di-beeldje a:hover { background: #31365C; color: var(--wp--preset--color--maanlicht); }
.di-beeldje__naam {
	font-family: var(--wp--preset--font-family--affiche);
	font-weight: 800;
	font-size: 1.75rem;
	line-height: 1;
}
.di-beeldje__periode { font-size: 0.8rem; white-space: nowrap; }
.di-beeldje.is-active a { background: var(--wp--preset--color--amber); color: var(--wp--preset--color--inkt); }
.di-beeldje.is-active .di-beeldje__periode { font-weight: 700; }
@media (max-width: 899px) {
	.di-filmstrook { padding: 14px 6px; background-size: 100% 6px, 100% 6px; background-position: 4px 4px, 4px calc(100% - 4px); }
	.di-filmstrook__beelden { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
	.di-beeldje a { min-height: 52px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.1rem; padding: 0.4rem 0.75rem; }
	.di-beeldje__naam { font-size: 1.4rem; }
	.di-beeldje__periode { font-size: 0.72rem; }
}

/* ---------- Seizoensblokken ---------- */
.di-hero h1 { text-wrap: balance; }
.di-hero .wp-block-columns { max-width: 38rem; }
.di-feiten {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
	gap: 0.25rem 2rem;
	margin: 0;
}
.di-feiten dt {
	font-size: 0.85rem;
	color: var(--wp--preset--color--maanlicht);
	opacity: 0.8;
}
.di-feiten dd {
	margin: 0 0 0.9rem;
	font-family: var(--wp--preset--font-family--affiche);
	font-weight: 600;
	font-size: 1.5rem;
	line-height: 1.15;
}

/* Editor: toon welk seizoensblok je bewerkt */
.editor-styles-wrapper .seizoen { position: relative; outline: 2px dashed rgba(242, 169, 59, 0.6); outline-offset: -2px; }
.editor-styles-wrapper .seizoen::before {
	position: absolute; top: 0.5rem; right: 0.5rem; z-index: 2;
	background: var(--wp--preset--color--amber); color: var(--wp--preset--color--inkt);
	font: 700 12px/1 var(--wp--preset--font-family--tekst);
	padding: 4px 8px; border-radius: 3px;
}
.editor-styles-wrapper .seizoen-terugblik::before { content: "Seizoen: Terugblik"; }
.editor-styles-wrapper .seizoen-stem::before { content: "Seizoen: Stem mee"; }
.editor-styles-wrapper .seizoen-tickets::before { content: "Seizoen: Tickets"; }
.editor-styles-wrapper .seizoen-vanavond::before { content: "Seizoen: Vanavond"; }

/* Notities voor beheerders (alleen zichtbaar voor ingelogde redacteurs) */
.di-notitie {
	border: 2px dashed var(--wp--preset--color--achterlicht);
	background: #fff5f6;
	color: var(--wp--preset--color--inkt);
	padding: 1rem 1.25rem;
	border-radius: 6px;
	font-size: 0.95rem;
}
.di-notitie::before {
	content: "Notitie voor beheerders, niet zichtbaar voor bezoekers";
	display: block;
	font-weight: 700;
	font-size: 0.8rem;
	color: var(--wp--preset--color--achterlicht);
	margin-bottom: 0.35rem;
}

/* ---------- Stappen, FAQ, partners ---------- */
.di-stappen { counter-reset: stap; list-style: none; padding-left: 0; }
.di-stappen > li {
	counter-increment: stap;
	position: relative;
	padding-left: 3rem;
	margin-bottom: 1.1rem;
}
.di-stappen > li::before {
	content: counter(stap);
	position: absolute; left: 0; top: -0.2rem;
	width: 2.1rem; height: 2.1rem;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--schemer);
	color: var(--wp--preset--color--amber);
	font-family: var(--wp--preset--font-family--affiche);
	font-weight: 800;
	font-size: 1.15rem;
}
.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--lijn);
	padding: 0.9rem 0;
}
.wp-block-details summary {
	cursor: pointer;
	font-weight: 700;
	font-size: 1.1rem;
	list-style-position: outside;
}
.wp-block-details[open] summary { margin-bottom: 0.5rem; }

.di-partners { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.di-partners li { font-weight: 700; }
.di-partners--klein li { font-weight: 400; }

/* ---------- Kleine schermen ---------- */
@media (max-width: 600px) {
	.di-logo { font-size: 1.35rem; }
}

/* ---------- Footer ---------- */
.di-lijst-plat { list-style: none; padding-left: 0; line-height: 2; }
.di-scheiding { border: 0; border-top: 1px solid #2E3354; opacity: 1; }
.di-colofon { color: #B9B7CC; }

/* ---------- Feiten in de seizoensblokken ---------- */
.di-hero .wp-block-columns { margin-block: 0.5rem 0.75rem; gap: 0.5rem 2rem; }
.di-feit-label { margin-bottom: 0 !important; opacity: 0.8; }
.di-feit {
	margin-top: 0.1rem !important;
	font-family: var(--wp--preset--font-family--affiche);
	font-weight: 600;
	font-size: 1.6rem;
	line-height: 1.1;
}
.di-hero .wp-block-button.is-style-outline .wp-block-button__link { color: var(--wp--preset--color--maanlicht); }

/* ---------- Ritme in inhoudspagina's ---------- */
.wp-block-post-content > .alignfull { margin-block: 0; }
.wp-block-post-content > h2.wp-block-heading {
	font-size: var(--wp--preset--font-size--x-large);
	margin-block-start: var(--wp--preset--spacing--50);
}
.wp-block-post-content > h2.wp-block-heading + * { margin-block-start: 0.6rem; }


/* ---------- Header op kleine schermen ---------- */
.di-logo p { font-family: var(--wp--preset--font-family--tekst); opacity: 0.8; white-space: nowrap; }
.di-logo .wp-block-site-title { white-space: nowrap; }
.di-seizoensknop .wp-block-button__link { white-space: nowrap; }
@media (max-width: 420px) {
	.di-seizoensknop .wp-block-button__link { padding: 0.7rem 0.9rem; font-size: 0.95rem; }
}

/* ---------- Sponsorlogo's ---------- */
.di-logos.wp-block-gallery { gap: 0.75rem !important; }
.di-logos .wp-block-image {
	background: var(--wp--preset--color--wit);
	border: 1px solid var(--wp--preset--color--lijn);
	border-radius: var(--wp--custom--radius);
	aspect-ratio: 3 / 2;
	display: flex !important;
	align-items: center;
	justify-content: center;
	padding: 0.6rem;
}
.di-logos .wp-block-image img {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain !important;
}
.di-logos--hoofd .wp-block-image { aspect-ratio: 2 / 1; }
@media (max-width: 600px) {
	.di-logos.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
		width: calc(33.333% - 0.5rem) !important;
	}
	.di-logos--hoofd.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) { width: 70% !important; }
}
/* Laatste rij niet uitrekken: elk logo houdt de breedte van één kolom. */
.di-logos.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) { flex-grow: 0 !important; }

/* ---------- Sitelogo ----------
 * Is er een logo ingesteld (Weergave → Editor → Header → blok Site-logo), dan toont de header
 * het logo en verdwijnt de tekstnaam visueel (blijft voor schermlezers). Zonder logo: tekstnaam. */
.di-header .wp-block-site-logo { flex-shrink: 0; line-height: 0; }
.di-header .wp-block-site-logo img { height: auto; max-height: 4.5rem; width: auto; }
.di-header:has(.wp-block-site-logo img) .di-logo {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px; width: 1px; overflow: hidden;
}
@media (max-width: 600px) {
	.di-header .wp-block-site-logo img { max-height: 3.4rem; }
}
