/**
 * PS Base — gallery.css
 *
 * Loaded conditionally only on pages that contain a core/gallery block.
 * Includes gallery hover effects and lightbox overlay styles.
 */


/* =============================================================
   GALLERY GRID
   ============================================================= */

/* Clip the zoom animation */
.ps-css .wp-block-gallery .wp-block-image {
	position: relative;
	overflow: hidden;
	cursor: pointer;
}

/* Image base state */
.ps-css .wp-block-gallery .wp-block-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Hover: zoom */
.ps-css .wp-block-gallery .wp-block-image:hover img {
	transform: scale(1.1) translateY(-3%);
}

/* Hover: dark overlay via pseudo-element */
.ps-css .wp-block-gallery .wp-block-image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgb(0 0 0 / 0%);
	transition: background 0.4s ease;
	pointer-events: none;
}

.ps-css .wp-block-gallery .wp-block-image:hover::after {
	background: rgb(0 0 0 / 25%);
}

/* Prevent last image expanding to fill remaining row space */
.ps-css .wp-block-gallery.has-nested-images figure.wp-block-image {
	flex-grow: 0;
}



/* Honour reduced motion */
@media (prefers-reduced-motion: reduce) {
	.ps-css .wp-block-gallery .wp-block-image img,
	.ps-css .wp-block-gallery .wp-block-image::after {
		transition: none;
	}
}