/* Webux Galerie (gallery) - mosaic image grid with category overlay. */
.webux-gallery {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.webux-gallery__head {
	max-width: 46rem;
	margin: 0 auto;
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.webux-gallery__eyebrow {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary, #356b4b);
}

.webux-gallery__title {
	margin: 0;
	font-size: clamp(1.9rem, 3.4vw, 2.75rem);
	line-height: 1.12;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--contrast, #10180f);
}

.webux-gallery__lead {
	margin: 0;
	line-height: 1.65;
	color: var(--wp--preset--color--muted, #5a665c);
}

/* --- grid --- */
.webux-gallery__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-auto-rows: 220px;
	grid-auto-flow: dense;
	gap: 1rem;
}

.webux-gallery__item {
	position: relative;
	display: block;
	border-radius: 14px;
	overflow: hidden;
	background: var(--wp--preset--color--surface, #f1f3ef);
	text-decoration: none;
}

.webux-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.webux-gallery__item--wide {
	grid-column: span 2;
}

.webux-gallery__item--tall {
	grid-row: span 2;
}

.webux-gallery__item--big {
	grid-column: span 2;
	grid-row: span 2;
}

.webux-gallery__label {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 2.5rem 1rem 0.875rem;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.01em;
	background: linear-gradient(to top, rgba(16, 24, 15, 0.72) 0%, rgba(16, 24, 15, 0) 100%);
	pointer-events: none;
}

/* Subtle zoom affordance for linked tiles. */
.webux-gallery__item[href] img {
	transition: transform 0.4s ease;
}

.webux-gallery__item[href]:hover img,
.webux-gallery__item[href]:focus img {
	transform: scale(1.04);
}

.webux-gallery__cta {
	justify-content: center;
	margin-top: 0.5rem;
}

@media (max-width: 900px) {
	.webux-gallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.webux-gallery__item--big,
	.webux-gallery__item--wide {
		grid-column: span 2;
	}
}

@media (max-width: 600px) {
	.webux-gallery__grid {
		grid-template-columns: 1fr;
		grid-auto-rows: 200px;
	}
	.webux-gallery__item--big,
	.webux-gallery__item--wide,
	.webux-gallery__item--tall {
		grid-column: auto;
		grid-row: auto;
	}
}
