/* Apartment photo mosaic (scripts/design/d13-apartment-gallery.php). Spec: docs/design/phase4-gallery.md */

.coast-gallery {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: 200px 200px;
	gap: 8px;
	margin: 10px 0 26px;
	border-radius: 4px;
	overflow: hidden;
}

.coast-gallery__item {
	position: relative;
	display: block;
	overflow: hidden;
	background: var(--coast-foam, #eef5f6);
	border-radius: 2px;
}

.coast-gallery__item.is-lead {
	grid-column: 1 / span 2;
	grid-row: 1 / span 2;
}

.coast-gallery__item.is-more {
	display: none; /* photos 6+ stay in the DOM for the lightbox slideshow */
}

.coast-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.coast-gallery__item:hover img,
.coast-gallery__item:focus-visible img {
	transform: scale(1.04);
}

.coast-gallery__item:focus-visible {
	outline: 3px solid var(--apt, #e3a12f);
	outline-offset: -3px;
}

.coast-gallery__more {
	position: absolute;
	right: 10px;
	bottom: 10px;
	padding: 8px 12px;
	background: var(--coast-navy, #333b48);
	color: #fff;
	font-family: var(--coast-label, "Barlow Condensed", "Arial Narrow", sans-serif);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: 2px;
	pointer-events: none;
}

.coast-gallery__item:hover .coast-gallery__more {
	background: var(--apt, #e3a12f);
	color: var(--coast-navy, #333b48);
}

/* the "Sun Information" list column no longer holds the carousel: give the list some air */
.coast-apt .elementor-widget-icon-list .elementor-icon-list-item {
	padding-top: 8px;
	padding-bottom: 8px;
}

@media (max-width: 991px) {
	.coast-gallery {
		grid-template-rows: 170px 170px;
	}
}

@media (max-width: 767px) {
	.coast-gallery {
		grid-template-columns: repeat(2, 1fr);
		grid-template-rows: 220px 110px 110px;
		gap: 6px;
		margin: 0 0 18px;
	}
	.coast-gallery__item.is-lead {
		grid-column: 1 / span 2;
		grid-row: 1;
	}
	.coast-gallery__more {
		font-size: 13px;
		padding: 6px 9px;
		right: 6px;
		bottom: 6px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.coast-gallery__item img {
		transition: none;
	}
}
