/* =========================================================
 * [foto_collage]
 * Linker slider bepaalt de hoogte; het 2x2 raster rechts
 * rekt exact mee, zodat boven- en onderkant gelijk lopen.
 * ======================================================= */
.imfc-collage {
	--imfc-gap: 24px;
	--imfc-radius: 16px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--imfc-gap);
	align-items: stretch;
	width: 100%;
	margin: 0 0 1.5em;
}

.imfc-collage--single {
	grid-template-columns: 1fr;
}

.imfc-slider {
	position: relative;
	aspect-ratio: 5 / 4;
	border-radius: var(--imfc-radius);
	overflow: hidden;
	background: #e9eef0;
}

.imfc-slides,
.imfc-slide {
	position: absolute;
	inset: 0;
}

.imfc-slide {
	opacity: 0;
	transition: opacity .6s ease;
}

.imfc-slide {
	pointer-events: none;
}

.imfc-slide.is-active {
	opacity: 1;
	pointer-events: auto;
}

/* Klikbare foto's in de collage */
.imfc-collage .imfc-lb-item {
	position: absolute;
	inset: 0;
	display: block;
	cursor: zoom-in;
	overflow: hidden;
}

.imfc-collage .imfc-lb-item img {
	transition: transform .35s ease;
}

.imfc-tile .imfc-lb-item:hover img,
.imfc-collage .imfc-lb-item:focus-visible img {
	transform: scale(1.05);
}

.imfc-collage img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	display: block;
	margin: 0;
	border-radius: 0;
}

.imfc-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 14px;
	display: flex;
	justify-content: center;
	gap: 8px;
	z-index: 2;
}

.imfc-dot {
	width: 14px;
	height: 14px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .55);
	cursor: pointer;
	transition: background .2s, transform .2s;
}

.imfc-dot.is-active {
	background: #fff;
	transform: scale(1.1);
}

.imfc-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: var(--imfc-gap);
	min-height: 0;
}

.imfc-tile {
	position: relative;
	min-height: 0;
	border-radius: var(--imfc-radius);
	overflow: hidden;
	background: #e9eef0;
}

/* Minder dan 4 foto's: raster netjes gevuld houden */
.imfc-grid--1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.imfc-grid--2 { grid-template-columns: 1fr; }
.imfc-grid--3 .imfc-tile:first-child { grid-column: 1 / -1; }

@media (max-width: 782px) {
	.imfc-collage {
		--imfc-gap: 12px;
		--imfc-radius: 12px;
		grid-template-columns: 1fr;
	}

	.imfc-grid {
		aspect-ratio: 5 / 4;
	}
}

/* =========================================================
 * [foto_galerij]
 * ======================================================= */
.imfc-gallery {
	display: grid;
	grid-template-columns: repeat(var(--imfc-cols-r, var(--imfc-cols, 4)), minmax(0, 1fr));
	gap: 16px;
	margin: 0 0 1.5em;
}

.imfc-gallery-item {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	border-radius: 12px;
	overflow: hidden;
	background: #e9eef0;
	cursor: zoom-in;
}

.imfc-gallery-item img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .35s ease;
}

.imfc-gallery-item:hover img,
.imfc-gallery-item:focus-visible img {
	transform: scale(1.05);
}

@media (max-width: 900px) {
	.imfc-gallery { --imfc-cols-r: 3; }
}

@media (max-width: 600px) {
	.imfc-gallery { --imfc-cols-r: 2; gap: 10px; }
}

/* Lightbox */
.imfc-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .9);
}

.imfc-lightbox[hidden] {
	display: none;
}

.imfc-lightbox img {
	max-width: 92vw;
	max-height: 88vh;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}

.imfc-lb-btn {
	position: absolute;
	border: 0;
	background: rgba(255, 255, 255, .15);
	color: #fff;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	font-size: 28px;
	line-height: 48px;
	padding: 0;
	cursor: pointer;
}

.imfc-lb-btn:hover { background: rgba(255, 255, 255, .3); }
.imfc-lb-close { top: 16px; right: 16px; }
.imfc-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.imfc-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
