/*
Theme Name: Leporello
Template: twentytwentyfive
Version: 0.1.0
*/
:root, body {
	--schaduw-len: 15px;
	--schaduw-kleur: #d2d2d2;
	--lep-oranje: #f28c28;
	--lep-donker: #1f1f1f;
}

/* Homepage: vier tegels */
:root {
	--lep-oranje: #f28c28;   /* pas aan naar de oranje van het logo */
	--lep-donker: #1f1f1f;
}

.lep-tegels {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}
.lep-tegels > * { margin-block: 0; }

.lep-tegel {
	position: relative;
	isolation: isolate;
	aspect-ratio: 4 / 5;
	padding: 20px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-sizing: border-box;
}
.lep-tegel > * { margin: 0; }

/* Label onderin, hele tegel klikbaar */
.lep-tegel .lep-tegel-label {
	margin-top: auto;
	font-size: 1.375rem;
	font-weight: 550;
	line-height: 1.2;
}
.lep-tegel-label a { color: inherit; text-decoration: none; }
.lep-tegel-label a::after { content: ""; position: absolute; inset: 0; }
.lep-tegel:hover .lep-tegel-label a { text-decoration: underline; }

/* 1. Foto */
.lep-tegel-foto { color: #fff; }
.lep-tegel-foto .wp-block-image { position: absolute; inset: 0; z-index: -1; }
.lep-tegel-foto .wp-block-image img { width: 100%; height: 100%; object-fit: cover; }
.lep-tegel-foto::after {   /* verloop onderin voor leesbaarheid */
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent 45%);
}

/* 2. Willekeurig boek met lange schaduw */
.lep-tegel-boek { background: #f0f0f0; }

/* Dit blok neemt alle vrije ruimte boven het label in en is de maatstaf (cqw/cqh) voor de cover */
.lep-tegel-boek .wp-block-query {
	flex: 1;
	min-height: 0;
	margin-bottom: 12px;           /* minimale ruimte tot het label */
	display: flex;
	align-items: center;
	justify-content: center;
	container-type: size;
}
.lep-tegel-boek .wp-block-post-template { margin: 0; padding: 0; list-style: none; }
.lep-tegel-boek .wp-block-post-template > li { margin: 0; padding: 0; }

.lep-tegel-boek .wp-block-post-featured-image {
	position: relative;
	width: fit-content;
	margin: 0 var(--schaduw-len) var(--schaduw-len) 0;
	box-shadow: var(--schaduw-len) var(--schaduw-len) 0 var(--schaduw-kleur);
}
.lep-tegel-boek .wp-block-post-featured-image img {
	display: block;
	width: auto;
	height: auto;
	max-width: calc(100cqw - var(--schaduw-len));
	max-height: calc(100cqh - var(--schaduw-len));
}
.lep-tegel-boek .wp-block-post-featured-image::before,
.lep-tegel-boek .wp-block-post-featured-image::after {
	content: "";
	position: absolute;
	width: var(--schaduw-len);
	height: var(--schaduw-len);
	background: var(--schaduw-kleur);
}
.lep-tegel-boek .wp-block-post-featured-image::before { left: 100%; top: 0; clip-path: polygon(0 0, 0 100%, 100% 100%); }
.lep-tegel-boek .wp-block-post-featured-image::after  { left: 0; top: 100%; clip-path: polygon(0 0, 100% 0, 100% 100%); }

/* 3 en 4. Kleurvlak met icoon */
.lep-tegel-nieuws { background: var(--lep-oranje); color: #fff; }
.lep-tegel-bestel { background: var(--lep-donker); color: #fff; }
.lep-tegel-icoon { flex: 1; display: flex; align-items: center; justify-content: center; }

@media (max-width: 900px) { .lep-tegels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 450px) { .lep-tegels { grid-template-columns: 1fr; } }