/* Minimal styles for the image gallery — keep consistent with site look */
#filter-controls .filter-btn { transition: all .18s ease; }
#filter-controls .filter-btn.active { background-color: #dc2626; color: #fff; }

/* Grid: uniform rectangular cards with automatic spacing */
#gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 1.5rem;
	width: 100%;
	margin: 0 auto;
}

.portfolio-card {
	position: relative;
	overflow: hidden;
	border-radius: 0.5rem;
	background: #f3f4f6;
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	cursor: pointer;
}

.portfolio-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform .5s ease;
}

.portfolio-card:hover img { transform: scale(1.05); }

.portfolio-meta {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 1rem;
	background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
	color: #fff;
	z-index: 10;
	height: auto !important;
	margin: 0 !important;
	border: none !important;
}

.portfolio-meta div {
	margin: 0 !important;
	padding: 0 !important;
	height: auto !important;
}

/* GLightbox overrides: hide captions and remove white caption background */
.glightbox-container .gdesc,
.glightbox-container .gdesc-inner,
.glightbox-desc,
.gdesc { display: none !important; }

/* Make lightbox background transparent/darker to remove white panels */
.glightbox-container,
.glightbox-overlay,
.glightbox-wrapper,
.gslide {
	background: transparent !important;
}

/* Ensure the overlay mask stays dark for readability */
.glightbox-overlay { background: rgba(0,0,0,0.85) !important; }

/* Back button and detail view header */
#gallery-grid > div:first-child {
	grid-column: 1 / 1;
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #e5e7eb;
}

/* Back button wrapper - positioned above grid */
.back-button-wrapper {
	margin-bottom: 1.5rem;
	padding-bottom: 0;
	border-bottom: none;
}

/* Responsive grid sizing */
@media (min-width: 1024px) {
	#gallery-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 1023px) and (min-width: 768px) {
	#gallery-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}
}

@media (max-width: 767px) {
	#gallery-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
}