/**
 * Homepage mosaic — match live Premium metro gallery UI (widget 58e6467a).
 * Flush tiles, Raleway/Lato captions, zoom-out hover, full content width.
 */

/* Stretch Elementor wrappers so mosaic matches live Home content width */
body.home .elementor-element-33a2fe4,
body.page-id-2441 .elementor-element-33a2fe4,
body.home .e-con:has(.bsl-home-mosaic),
body.page-id-2441 .e-con:has(.bsl-home-mosaic) {
	padding: 0 !important;
	max-width: 100% !important;
	width: 100% !important;
}

body.home .elementor-element-33a2fe4.e-con.e-flex > .e-con-inner,
body.page-id-2441 .elementor-element-33a2fe4.e-con.e-flex > .e-con-inner,
body.home .e-con.e-flex:has(.bsl-home-mosaic) > .e-con-inner,
body.page-id-2441 .e-con.e-flex:has(.bsl-home-mosaic) > .e-con-inner {
	max-width: 100% !important;
	padding: 0 !important;
	width: 100% !important;
}

body.home .elementor-top-section:has(.bsl-home-mosaic) > .elementor-container,
body.page-id-2441 .elementor-top-section:has(.bsl-home-mosaic) > .elementor-container {
	max-width: 100% !important;
	width: 100% !important;
}

body.home .elementor-element:has(.bsl-home-mosaic) > .elementor-widget-container,
body.page-id-2441 .elementor-element:has(.bsl-home-mosaic) > .elementor-widget-container,
body.home .elementor-widget:has(.bsl-home-mosaic),
body.page-id-2441 .elementor-widget:has(.bsl-home-mosaic) {
	padding: 0 !important;
	margin: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
}

body.home .elementor-column:has(.bsl-home-mosaic) > .elementor-widget-wrap,
body.page-id-2441 .elementor-column:has(.bsl-home-mosaic) > .elementor-widget-wrap,
body.home .elementor-column:has(.bsl-home-mosaic) > .elementor-element-populated,
body.page-id-2441 .elementor-column:has(.bsl-home-mosaic) > .elementor-element-populated {
	padding: 0 !important;
	margin: 0 !important;
}

.bsl-home-mosaic {
	--bsl-mosaic-gap: 0px;
	container-type: inline-size;
	container-name: bsl-mosaic;
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	grid-auto-flow: dense;
	gap: var(--bsl-mosaic-gap);
	/* Row unit = column unit (Premium metro square cells) */
	grid-auto-rows: calc(100cqi / 12);
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	box-sizing: border-box;
}

.bsl-home-mosaic *,
.bsl-home-mosaic *::before,
.bsl-home-mosaic *::after {
	box-sizing: border-box;
}

.bsl-home-mosaic__item {
	position: relative;
	display: block;
	overflow: hidden;
	min-width: 0;
	min-height: 0;
	text-decoration: none;
	color: #fff;
	padding: 0;
	margin: 0;
	border: 0;
	background-color: transparent;
	transition: background-color 0.4s ease;
}

.bsl-home-mosaic__item:focus-visible {
	outline: 2px solid #00b0e0;
	outline-offset: -2px;
	z-index: 3;
}

/* Desktop spans — Premium cell × vcell on 12-col metro */
.bsl-home-mosaic__item--c4-r4 {
	grid-column: span 4;
	grid-row: span 4;
}

.bsl-home-mosaic__item--c4-r2 {
	grid-column: span 4;
	grid-row: span 2;
}

.bsl-home-mosaic__item--c2-r2 {
	grid-column: span 2;
	grid-row: span 2;
}

.bsl-home-mosaic__media {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background-color: transparent;
	transition: background-color 0.4s ease;
}

.bsl-home-mosaic__media picture,
.bsl-home-mosaic__media img {
	width: 100%;
	height: 100%;
	display: block;
}

.bsl-home-mosaic__media img {
	object-fit: fill;
	object-position: center center;
	filter: brightness(87%) contrast(110%) saturate(100%) blur(0px) hue-rotate(0deg);
	-webkit-transform: scale(1.2);
	-ms-transform: scale(1.2);
	transform: scale(1.2);
	-webkit-transition: -webkit-transform 0.6s ease, filter 0.6s ease;
	transition: transform 0.6s ease, filter 0.6s ease;
}

/* Absolute overlay above image (hover only) */
.bsl-home-mosaic__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background-color: #00000080;
	opacity: 0;
	transition: opacity 0.4s ease;
	z-index: 1;
	pointer-events: none;
}

/* Always-on veil — matches Premium .pa-gallery-whole-link tint */
.bsl-home-mosaic__veil {
	position: absolute;
	top: 0;
	inset-inline-start: 0;
	width: 100%;
	height: 100%;
	z-index: 4;
	background-color: rgba(0, 0, 0, 0.1);
	pointer-events: none;
}

/* Caption — Premium style1 slide-up */
.bsl-home-mosaic__caption {
	position: absolute;
	top: auto;
	right: 0;
	bottom: -1px;
	left: 0;
	width: 100%;
	max-width: 100%;
	z-index: 3;
	pointer-events: none;
	color: #fff;
	padding: 20px;
	box-sizing: border-box;
	-webkit-transition: all 0.5s ease 0s;
	transition: all 0.5s ease 0s;
	-webkit-transform: translate3d(0, 100%, 0);
	transform: translate3d(0, 100%, 0);
	overflow: visible;
}

.bsl-home-mosaic__title {
	display: block;
	margin-top: -70px;
	margin-right: 0;
	margin-bottom: 0;
	margin-left: 0;
	padding: 0;
	color: #ffffff;
	font-family: "Raleway", Sans-serif;
	font-size: 36px !important;
	font-weight: 800;
	line-height: 1;
	transform: translateY(0);
	transition: transform 0.4s ease;
}

.bsl-home-mosaic__title strong,
.bsl-home-mosaic__title b {
	font-weight: 800;
}

/* Fallback before JS (twoline tiles) + JS line classes */
.bsl-home-mosaic__item--twoline .bsl-home-mosaic__title,
.bsl-home-mosaic__title--lines-2 {
	margin-top: -104px;
}

.bsl-home-mosaic__title--lines-3 {
	margin-top: -140px;
}

.bsl-home-mosaic__title--lines-4 {
	margin-top: -176px;
}

.bsl-home-mosaic__title--lines-1 {
	margin-top: -70px;
}

.bsl-home-mosaic__desc {
	display: block;
	max-width: 90%;
	margin: 8px 0 0;
	padding: 0;
	color: #ffffff;
	font-family: "Lato", Sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.35;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Hover */
.bsl-home-mosaic__item:hover,
.bsl-home-mosaic__item:focus-visible {
	background-color: rgba(0, 0, 0, 0.1);
}

.bsl-home-mosaic__item:hover .bsl-home-mosaic__media,
.bsl-home-mosaic__item:focus-visible .bsl-home-mosaic__media {
	background-color: rgba(0, 0, 0, 0.1);
}

.bsl-home-mosaic__item:hover .bsl-home-mosaic__media::after,
.bsl-home-mosaic__item:focus-visible .bsl-home-mosaic__media::after {
	opacity: 1;
}

.bsl-home-mosaic__item:hover .bsl-home-mosaic__media img,
.bsl-home-mosaic__item:focus-visible .bsl-home-mosaic__media img {
	-webkit-transform: scale(1);
	-ms-transform: scale(1);
	transform: scale(1);
}

.bsl-home-mosaic__item:hover .bsl-home-mosaic__caption,
.bsl-home-mosaic__item:focus-visible .bsl-home-mosaic__caption {
	-webkit-transform: translate3d(0, 0, 0);
	transform: translate3d(0, 0, 0);
	bottom: -1px !important;
}

.bsl-home-mosaic__item:hover .bsl-home-mosaic__title,
.bsl-home-mosaic__item:focus-visible .bsl-home-mosaic__title {
	transform: translateY(-10px);
}

.bsl-home-mosaic__item:hover .bsl-home-mosaic__desc,
.bsl-home-mosaic__item:focus-visible .bsl-home-mosaic__desc {
	opacity: 1;
	transform: translateY(0);
}

/* Tablet — Premium tablet cell/vcell */
@media (max-width: 1024px) {
	.bsl-home-mosaic__item--c4-r4 {
		grid-column: span 6;
		grid-row: span 6;
	}

	.bsl-home-mosaic__item--c4-r2 {
		grid-column: span 6;
		grid-row: span 3;
	}

	.bsl-home-mosaic__item--c2-r2 {
		grid-column: span 3;
		grid-row: span 3;
	}

	.bsl-home-mosaic__item--epass {
		grid-column: span 6;
		grid-row: span 3;
	}

	.bsl-home-mosaic__caption {
		padding: 16px;
	}
}

/* Mobile — Premium mobile spans, still flush */
@media (max-width: 767px) {
	.bsl-home-mosaic__item--c4-r4,
	.bsl-home-mosaic__item--epass {
		grid-column: span 12;
		grid-row: span 12;
	}

	.bsl-home-mosaic__item--c4-r2 {
		grid-column: span 12;
		grid-row: span 6;
	}

	.bsl-home-mosaic__item--c2-r2 {
		grid-column: span 6;
		grid-row: span 6;
	}

	.bsl-home-mosaic__caption {
		padding: 16px;
	}

	.bsl-home-mosaic__desc {
		font-size: 14px;
		font-weight: 400;
	}
}

/* Fallback without container query units */
@supports not (width: 1cqi) {
	.bsl-home-mosaic {
		grid-auto-rows: minmax(48px, auto);
	}

	.bsl-home-mosaic__item--c2-r2 {
		aspect-ratio: 1 / 1;
		min-height: 0;
	}

	.bsl-home-mosaic__item--c4-r2 {
		aspect-ratio: 2 / 1;
	}

	.bsl-home-mosaic__item--c4-r4 {
		aspect-ratio: 1 / 1;
	}

	.bsl-home-mosaic__media {
		position: absolute;
		inset: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bsl-home-mosaic__media img,
	.bsl-home-mosaic__media::after,
	.bsl-home-mosaic__title,
	.bsl-home-mosaic__desc {
		transition: none;
	}

	.bsl-home-mosaic__item:hover .bsl-home-mosaic__media img,
	.bsl-home-mosaic__item:focus-visible .bsl-home-mosaic__media img {
		-webkit-transform: scale(1.2);
		-ms-transform: scale(1.2);
		transform: scale(1.2);
	}
}
