/* TSD Gallery grid */
.tsd-gallery {
	display: grid;
	gap: 12px;
	margin: 0 0 1.5em;
}
.tsd-gallery-cols-1 { grid-template-columns: 1fr; }
.tsd-gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
.tsd-gallery-cols-3 { grid-template-columns: repeat(3, 1fr); }
.tsd-gallery-cols-4 { grid-template-columns: repeat(4, 1fr); }
.tsd-gallery-cols-5 { grid-template-columns: repeat(5, 1fr); }
.tsd-gallery-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 980px) {
	.tsd-gallery-cols-4,
	.tsd-gallery-cols-5,
	.tsd-gallery-cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
	.tsd-gallery-cols-3,
	.tsd-gallery-cols-4,
	.tsd-gallery-cols-5,
	.tsd-gallery-cols-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
	.tsd-gallery { grid-template-columns: 1fr !important; }
}

.tsd-gallery-item {
	position: relative;
	display: block;
	margin: 0;
	overflow: hidden;
	border-radius: 6px;
	aspect-ratio: 1 / 1;
	text-decoration: none;
}
.tsd-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}
.tsd-gallery-item:hover img {
	transform: scale(1.04);
}
.tsd-gallery-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 20px 10px 8px;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
	color: #fff;
	font-size: 0.85em;
	line-height: 1.3;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}
.tsd-gallery-item:hover .tsd-gallery-caption {
	opacity: 1;
}

/* "Show all" button */
.tsd-gallery-more {
	text-align: center;
	margin: 4px 0 1.5em;
}
.tsd-gallery-button {
	display: inline-block;
	padding: 12px 28px;
	background: #222;
	color: #fff;
	border-radius: 4px;
	text-decoration: none;
	font-size: 0.95em;
	letter-spacing: 0.02em;
	transition: opacity 0.2s ease;
}
.tsd-gallery-button:hover,
.tsd-gallery-button:focus {
	opacity: 0.85;
	color: #fff;
}

/* Lightbox */
.tsd-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.92);
}
.tsd-lightbox img {
	max-width: 92vw;
	max-height: 86vh;
	object-fit: contain;
	border-radius: 4px;
}
.tsd-lightbox-caption {
	position: absolute;
	bottom: 18px;
	left: 0;
	right: 0;
	text-align: center;
	color: #fff;
	font-size: 15px;
	padding: 0 60px;
}
.tsd-lightbox button {
	position: absolute;
	background: none;
	border: none;
	color: #fff;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	padding: 14px;
	opacity: 0.75;
}
.tsd-lightbox button:hover { opacity: 1; }
.tsd-lightbox-close { top: 10px; right: 14px; }
.tsd-lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.tsd-lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); }
