/*
Theme Name: Valenti Child
Theme URI: https://stagezine.com
Description: Child theme for Valenti — PHP 8 compatibility fixes.
Author: StageZine
Template: valenti
Version: 1.0.8
*/

/*
 * Single-post featured images — no Backstretch / imagesLoaded fade-in.
 * Hero areas use object-fit: cover to match Backstretch center-crop behavior.
 */
#cb-standard-featured .cb-mask .cb-fi-standard {
	display: block !important;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	opacity: 1 !important;
}

#cb-full-width-featured,
#cb-full-background-featured {
	overflow: hidden;
}

#cb-full-width-featured .cb-featured-hero,
#cb-full-background-featured .cb-featured-hero {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	overflow: hidden;
}

#cb-full-width-featured .cb-featured-hero-img,
#cb-full-background-featured .cb-featured-hero-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

#cb-full-background-featured .cb-mask {
	position: relative;
	z-index: 2;
}

/*
 * Boxer lightbox — remove float gap beside image; keep Boxer JS dimensions intact.
 */
#boxer .boxer-container {
	overflow: hidden;
	/*max-width: 1260px;*/
}

#boxer .boxer-content {
	overflow: hidden;
	/*max-width: 1260px;*/
}

#boxer .boxer-image {
	float: none !important;
	display: block;
	margin-left: 0 !important;
	margin-top: 0 !important;
}

#boxer .boxer-meta {
	clear: both;
}

#boxer .boxer-meta .boxer-caption:empty,
#boxer .boxer-meta .boxer-caption:hidden {
	display: none !important;
}

#boxer .boxer-meta:has(.boxer-caption:hidden):not(:has(p.caption)) {
	display: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

#boxer .boxer-caption p.caption {
	margin: 0;
	padding: 12px 15px 15px;
	text-align: center;
	line-height: 1.4;
}

/*
 * Mobile / narrow viewports: Boxer sets full viewport height and centers the
 * image with margin-top, which leaves a large white band below the caption.
 */
@media (max-width: 767px) {
	#boxer {
		width: 100% !important;
		height: auto !important;
		max-height: calc(100vh - 2rem);
		overflow-y: auto;
		box-sizing: border-box;
		left: 0 !important;
		position: fixed !important;
	}

	#boxer .boxer-container,
	#boxer .boxer-content {
		width: 100% !important;
		height: auto !important;
	}

	#boxer .boxer-image {
		float: none !important;
		display: block;
		width: 100% !important;
		height: auto !important;
		max-height: calc(100vh - 10rem);
		margin: 0 !important;
	}

	#boxer .boxer-meta {
		width: 100% !important;
	}
}
