/**
 * Gallery CSS (refresh)
 * Zachte, ronde card-stijl + lichtbox met overlay
 */

:root {
	--gallery-radius: 22px;
	--gallery-radius-lg: 28px;
	--gallery-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
	--gallery-soft-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
	--gallery-accent: var(--bs-primary, #0d6efd);
	--gallery-ink: var(--bs-body-color, #212529);
	--gallery-muted: var(--bs-secondary-color, #6c757d);
	--gallery-surface: var(--bs-body-bg, #ffffff);
}

/* Gallery Header */
.gallery-header {
	background: transparent;
	color: var(--gallery-ink);
	padding: 60px 0 30px;
	margin-bottom: 20px;
}

.gallery-header h1 {
	font-size: clamp(2.1rem, 3vw, 2.9rem);
	letter-spacing: -0.02em;
}

.gallery-header p {
	color: var(--gallery-muted);
}

/* Gallery Container */
.gallery-container {
	padding-bottom: 80px;
}

.gallery-category-image--placeholder {
	width: 100%;
	height: 100%;
	background: var(--bs-secondary-bg, #e9ecef);
}

/* Gallery Back Link */
.gallery-back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--gallery-muted);
	text-decoration: none;
	font-weight: 500;
	margin-bottom: 10px;
}

.gallery-back-link:hover {
	color: var(--gallery-ink);
}

/* Gallery Category Cards (Index) */
.gallery-category-card {
	display: grid;
	grid-template-rows: 1fr auto;
	position: relative;
	border-radius: var(--gallery-radius-lg);
	overflow: hidden;
	box-shadow: var(--gallery-shadow);
	transition: transform 0.35s ease, box-shadow 0.35s ease;
	text-decoration: none;
	background: var(--gallery-surface);
	min-height: 300px;
}

.gallery-category-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 24px 50px rgba(35, 30, 25, 0.18);
}

.gallery-category-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #e6e0da;
}

.gallery-category-overlay {
	padding: 18px 20px 20px;
	background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.92) 35%, rgba(255,255,255,1));
	color: var(--gallery-ink);
}

.gallery-category-title {
	font-size: 1.3rem;
	margin: 0 0 8px;
}

.gallery-category-description {
	font-size: 0.92rem;
	margin: 0 0 10px;
	color: var(--gallery-muted);
}

.gallery-category-count {
	display: inline-block;
	background: #f0ebe6;
	color: var(--gallery-ink);
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 0.78rem;
	letter-spacing: 0.02em;
}

/* Gallery Sidebar */
.gallery-sidebar {
	background: var(--gallery-surface);
	border-radius: var(--gallery-radius);
	padding: 22px;
	box-shadow: var(--gallery-soft-shadow);
	margin-bottom: 30px;
}

.gallery-sidebar h4 {
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 15px;
	color: var(--gallery-ink);
}

.gallery-sidebar ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.gallery-sidebar ul li {
	margin-bottom: 6px;
}

.gallery-sidebar ul li a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: var(--gallery-muted);
	text-decoration: none;
	padding: 8px 12px;
	border-radius: 10px;
	transition: all 0.2s;
}

.gallery-sidebar ul li a:hover,
.gallery-sidebar ul li.active a {
	background: #f4eeea;
	color: var(--gallery-ink);
}

.gallery-sidebar .badge {
	background: #e9dfd6;
	color: var(--gallery-ink);
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 0.72rem;
}

/* Gallery Grid */
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 18px;
}

/* List view */
.gallery-grid.is-list {
	grid-template-columns: 1fr;
	gap: 14px;
}

.gallery-grid.is-list .gallery-item {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 12px;
	align-items: center;
	padding: 12px;
}

@media (min-width: 768px) {
	.gallery-grid.is-list .gallery-item {
		grid-template-columns: 180px 1fr;
	}
}

.gallery-grid.is-list .gallery-item-title-top {
	grid-column: 2;
	margin: 0;
}

.gallery-grid.is-list .gallery-lightbox-trigger {
	grid-row: 1 / span 2;
}

.gallery-grid.is-list .gallery-thumb {
	height: 110px;
}

@media (max-width: 575.98px) {
	.gallery-grid {
		grid-template-columns: 1fr;
	}
}

.gallery-item {
	position: relative;
	border-radius: var(--gallery-radius);
	background: var(--gallery-surface);
	box-shadow: var(--gallery-soft-shadow);
	padding: 12px 12px 14px;
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gallery-item:hover {
	transform: translateY(-4px);
	box-shadow: var(--gallery-shadow);
	z-index: 1;
}

.gallery-item-title-top {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--gallery-ink);
	margin: 4px 2px 10px;
}

.gallery-lightbox-trigger {
	display: block;
	border-radius: calc(var(--gallery-radius) - 6px);
	overflow: hidden;
	background: var(--bs-secondary-bg, #e9ecef);
}

.gallery-thumb {
	width: 100%;
	height: 220px;
	object-fit: cover;
	display: block;
}

/* Lightbox */
.gallery-lightbox {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(18, 16, 14, 0.92);
	z-index: 9999;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(4px);
}

.gallery-lightbox.active {
	display: flex;
}

.lightbox-content {
	max-width: 92%;
	max-height: 85%;
	position: relative;
	text-align: center;
}

.lightbox-content img {
	max-width: 100%;
	max-height: 76vh;
	display: block;
	border-radius: 16px;
	box-shadow: 0 22px 50px rgba(0,0,0,0.35);
}

.lightbox-caption {
	color: #f5f1ec;
	text-align: center;
	padding: 15px 0 0;
}

.lightbox-caption h4 {
	margin: 0 0 5px;
	font-size: 1.2rem;
}

.lightbox-caption p {
	margin: 0;
	font-size: 0.95rem;
	opacity: 0.8;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
	position: absolute;
	border: none;
	cursor: pointer;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.lightbox-close {
	top: 20px;
	right: 30px;
	font-size: 40px;
	color: #f7f2ed;
	background: none;
	line-height: 1;
	opacity: 0.8;
}

.lightbox-close:hover {
	opacity: 1;
	transform: scale(1.05);
}

.lightbox-prev,
.lightbox-next {
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255,255,255,0.14);
	color: #f7f2ed;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	font-size: 24px;
}

.lightbox-prev {
	left: 24px;
}

.lightbox-next {
	right: 24px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
	transform: translateY(-50%) scale(1.08);
	background: rgba(255,255,255,0.22);
}


@media (max-width: 768px) {
	.gallery-thumb {
		height: 170px;
	}
}
