/*
 * Dunzy homepage Taxonomy Gallery visual normalization.
 * Scope: Elementor homepage widget b5880f4 only.
 *
 * Listeo's stock gallery puts backdrop-filter: blur(10px) on the <h3> overlay.
 * On the two-column mobile layout that overlay can cover most of a card, making
 * otherwise sharp province photos appear blurred and producing inconsistent
 * title offsets. This keeps the existing widget/data/links and normalizes only
 * its image and overlay presentation.
 */
body.home .elementor-element-b5880f4 .gallery-wrap .item {
	isolation: isolate;
	background: #d9dde1;
}

body.home .elementor-element-b5880f4 .gallery-wrap .item > .dunzy-taxonomy-gallery__image,
body.home .elementor-element-b5880f4 .gallery-wrap .item > img {
	position: absolute !important;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	object-fit: cover !important;
	object-position: 50% 50% !important;
	filter: none !important;
	transform: none;
	z-index: 0;
}

body.home .elementor-element-b5880f4 .gallery-wrap .item > .dunzy-taxonomy-gallery__image-fallback {
	position: absolute;
	inset: 0;
	display: block;
	background: linear-gradient(145deg, #d7dde2 0%, #aeb9c2 100%);
	z-index: 0;
}

body.home .elementor-element-b5880f4 .gallery-wrap .item::before {
	z-index: 1;
	pointer-events: none;
}

body.home .elementor-element-b5880f4 .gallery-wrap .item h3 {
	z-index: 2;
}

@media (max-width: 992px) {
	body.home .elementor-element-b5880f4 .gallery-wrap .item {
		position: relative;
		height: 250px;
	}

	/*
	 * One predictable text box for every province card. The title is always at
	 * the same top-left coordinate and the count at the same bottom-left
	 * coordinate, regardless of source-image dimensions or province name.
	 */
	body.home .elementor-element-b5880f4 .gallery-wrap .item h3 {
		position: absolute !important;
		inset: 0 !important;
		display: flex !important;
		flex-direction: column;
		align-items: flex-start;
		justify-content: space-between;
		box-sizing: border-box;
		width: 100% !important;
		height: 100% !important;
		min-height: 0 !important;
		margin: 0 !important;
		padding: 16px 20px 22px !important;
		border-radius: 0 !important;
		background: transparent !important;
		-webkit-backdrop-filter: none !important;
		backdrop-filter: none !important;
		transform: none !important;
		opacity: 1 !important;
		font-size: 20px !important;
		line-height: 1.2 !important;
		white-space: normal !important;
	}

	body.home .elementor-element-b5880f4 .gallery-wrap .item h3 span {
		display: block !important;
		margin: auto 0 0 !important;
		padding: 0 !important;
		font-size: 16px !important;
		font-weight: 500;
		line-height: 1.35 !important;
		opacity: .82;
	}

	/* Keep text legible without blurring the photo. */
	body.home .elementor-element-b5880f4 .gallery-wrap .item::before,
	body.home .elementor-element-b5880f4 .gallery-wrap .item:hover::before {
		opacity: 1 !important;
		background: linear-gradient(
			to bottom,
			rgba(0, 0, 0, .32) 0%,
			rgba(0, 0, 0, .04) 42%,
			rgba(0, 0, 0, .34) 100%
		) !important;
	}
}

@media (max-width: 480px) {
	body.home .elementor-element-b5880f4 .gallery-wrap .item {
		height: 200px;
	}

	body.home .elementor-element-b5880f4 .gallery-wrap .item h3 {
		padding: 14px 18px 18px !important;
		font-size: 18px !important;
	}

	body.home .elementor-element-b5880f4 .gallery-wrap .item h3 span {
		font-size: 15px !important;
	}
}
