/* Eigen Instagram Feed – sluit aan op het Flatsome grid */

.cif-feed { --cif-radius: 0px; margin-bottom: 1.5em; }

/* Media-tegel */
.cif-feed .cif-link { display: block; color: inherit; }
.cif-feed .cif-media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--cif-radius);
	background: rgba(0, 0, 0, .06);
}
.cif-feed .cif-media img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	transition: transform .6s cubic-bezier(.2, .7, .3, 1);
}
.cif-ratio-square .cif-media { aspect-ratio: 1 / 1; }
.cif-ratio-portrait .cif-media { aspect-ratio: 4 / 5; }
.cif-ratio-landscape .cif-media { aspect-ratio: 16 / 9; }
.cif-feed:not(.cif-ratio-original) .cif-media img {
	position: absolute;
	inset: 0;
	height: 100%;
	object-fit: cover;
}

/* Video/album-icoon */
.cif-type-icon {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	width: 20px;
	height: 20px;
	color: #fff;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .55));
	pointer-events: none;
}
.cif-type-icon svg { display: block; width: 100%; height: 100%; }

/* Hover */
.cif-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.25em;
	color: #fff;
	font-weight: 600;
	background: rgba(0, 0, 0, .42);
	opacity: 0;
	transition: opacity .25s ease;
}
.cif-overlay svg { width: 1.15em; height: 1.15em; }
.cif-overlay-icon svg { width: 30px; height: 30px; }
.cif-count { display: inline-flex; align-items: center; gap: .35em; }

.cif-hover-overlay .cif-link:hover .cif-overlay,
.cif-hover-overlay-zoom .cif-link:hover .cif-overlay,
.cif-feed .cif-link:focus-visible .cif-overlay { opacity: 1; }

.cif-hover-zoom .cif-link:hover img,
.cif-hover-overlay-zoom .cif-link:hover img { transform: scale(1.06); }

.cif-feed .cif-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Bijschrift en datum */
.cif-date { display: block; margin-top: .6em; font-size: .8em; opacity: .6; }
.cif-caption { margin: .4em 0 0; font-size: .875em; line-height: 1.45; }
.cif-date + .cif-caption { margin-top: .15em; }

/* Profielkop */
.cif-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.cif-avatar { display: block; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.cif-header-text { display: flex; flex-direction: column; line-height: 1.3; }
.cif-username { font-weight: 700; font-size: 1.05em; }
.cif-stats { font-size: .85em; opacity: .7; }

/* Volg-knop */
.cif-follow { margin-top: 6px; }
.cif-follow .button, .cif-follow .cif-follow-link { display: inline-flex; align-items: center; gap: .5em; margin-bottom: 0; }
.cif-follow svg { width: 1.1em; height: 1.1em; flex: none; }
.cif-follow-link { font-weight: 600; }

/* Melding voor beheerders */
.cif-admin-notice { padding: 12px 15px; border-left: 4px solid #d63638; background: #fcf0f1; font-size: .9em; }

/* Lightbox */
.cif-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 56px 64px;
	background: rgba(0, 0, 0, .9);
}
.cif-lb.is-open { display: flex; }
.cif-lb-inner {
	display: flex;
	width: 100%;
	max-width: 1100px;
	max-height: 100%;
	background: #fff;
	color: #222;
	border-radius: 6px;
	overflow: hidden;
}
.cif-lb-stage {
	flex: 1 1 62%;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	background: #000;
}
.cif-lb-stage img,
.cif-lb-stage video {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 112px);
	object-fit: contain;
}
.cif-lb-info {
	flex: 0 0 340px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 22px;
	overflow-y: auto;
	max-height: calc(100vh - 112px);
}
.cif-lb-counter { font-size: .8em; opacity: .6; }
.cif-lb-counter:empty { display: none; }
.cif-lb-caption { white-space: pre-line; font-size: .9em; line-height: 1.55; flex: 1; }
.cif-lb-link { font-weight: 600; font-size: .9em; }
.cif-lb button {
	position: absolute;
	margin: 0;
	padding: 0;
	width: 44px;
	height: 44px;
	min-height: 0;
	line-height: 44px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 34px;
	cursor: pointer;
	opacity: .8;
}
.cif-lb button:hover, .cif-lb button:focus-visible { opacity: 1; background: rgba(255, 255, 255, .12); }
.cif-lb-close { top: 8px; right: 8px; }
.cif-lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.cif-lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.cif-lb.is-single .cif-lb-prev, .cif-lb.is-single .cif-lb-next { display: none; }
html.cif-lb-lock { overflow: hidden; }

@media (max-width: 849px) {
	.cif-lb { padding: 56px 0 0; align-items: flex-start; }
	.cif-lb-inner { flex-direction: column; border-radius: 0; height: 100%; }
	.cif-lb-stage { flex: 0 0 auto; }
	.cif-lb-stage img, .cif-lb-stage video { max-height: 60vh; }
	.cif-lb-info { flex: 1 1 auto; max-height: none; }
	.cif-lb-prev, .cif-lb-next { top: 30vh; }
}

@media (prefers-reduced-motion: reduce) {
	.cif-feed .cif-media img, .cif-overlay { transition: none; }
	.cif-hover-zoom .cif-link:hover img,
	.cif-hover-overlay-zoom .cif-link:hover img { transform: none; }
}
