/* ===============================================================
   Tile Surrounds — Tile Gallery (page-tile-gallery.php)
   =============================================================== */

/* Masonry on gallery page is identical visual to home masonry; we re-declare
   so gallery.css can be enqueued independently of home.css. */
.gallery-section { padding-top: 56px; padding-bottom: 96px; }

.masonry {
	column-count: 3;
	column-gap: 24px;
}
.masonry-item {
	break-inside: avoid;
	margin-bottom: 24px;
	position: relative;
	overflow: hidden;
	background: var(--bg-warm);
}
.masonry-item img { width: 100%; height: auto; display: block; transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1); }
.masonry-item:hover img { transform: scale(1.04); }
.masonry-item::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.55) 100%);
	opacity: 0; transition: opacity 240ms ease; pointer-events: none;
}
.masonry-item:hover::after { opacity: 1; }
.masonry-caption {
	position: absolute; left: 20px; right: 20px; bottom: 18px;
	color: #FAF7F2;
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	opacity: 0; transform: translateY(8px);
	transition: opacity 240ms ease, transform 240ms ease;
	display: flex; justify-content: space-between; gap: 12px;
	z-index: 2;
}
.masonry-item:hover .masonry-caption { opacity: 1; transform: translateY(0); }
.masonry-caption .loc { font-weight: 500; }
.masonry-caption .yr  { opacity: 0.75; }

.gallery-footer { margin-top: 72px; display: flex; justify-content: center; }

@media (max-width: 820px) {
	.masonry { column-count: 1; column-gap: 0; }
	.masonry-item { margin-bottom: 16px; }
	.masonry-caption { opacity: 1; transform: none; }
	.masonry-item::after { opacity: 0.6; }
}
