/* 1. LAYOUT DER GALERIE (Thumbnails) */

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 20px;
	max-width: 90%;
	margin: 0 auto;
}

.gallery-item {
	background: white;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 4px 8px rgba(0,0,0,0.1);
	cursor: pointer;
	transition: transform 0.2s;
}

.gallery-item:hover { transform: translateY(-5px); }

.thumb {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
}

.thumb-text { padding: 15px; }
.thumb-text h4 { margin: 0 0 5px 0; color: #333; }
.thumb-text p { margin: 0; color: #777; font-size: 0.9rem; }

/* 2. LIGHTBOX (Das Overlay) */
#lightbox {
	display: none; /* Startet versteckt */
	position: fixed;
	top: 0; left: 0;
	width: 100%; height: 100%;
	background: rgba(0, 0, 0, 0.92);
	z-index: 10000;
	align-items: center;
	justify-content: center;
	user-select: none;
}

/* Das Bild im Fokus */
.content-wrapper {
	position: relative;
	max-width: 85%;
	max-height: 80%;
	text-align: center;
	z-index: 10005;
}

#lightbox-img {
	max-width: 100%;
	max-height: 75vh;
	border-radius: 4px;
	box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

#caption {
	color: white;
	margin-top: 15px;
	font-size: 1.2rem;
}

/* 3. NAVIGATION (Die großen Klickzonen) */
.prev, .next {
	position: absolute;
	top: 0;
	height: 100%;
	width: 25%; /* Große Trefferzone */
	display: flex;
	align-items: center;
	cursor: pointer;
	z-index: 10008;
	color: rgba(255, 255, 255, 0.2);
	font-size: 60px;
	transition: all 0.3s;
}

.prev { left: 0; justify-content: flex-start; padding-left: 20px; }
.next { right: 0; justify-content: flex-end; padding-right: 20px; }

.prev:hover, .next:hover {
	color: white;
	background: rgba(255, 255, 255, 0.05);
}

/* Der Close-Button (Auffällig) */
.close {
	position: absolute;
	top: 25px;
	right: 25px;
	width: 50px;
	height: 50px;
	background: rgba(255, 255, 255, 0.15);
	color: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 35px;
	cursor: pointer;
	z-index: 10020;
	transition: 0.3s;
}
.close:hover { background: #e74c3c; transform: rotate(90deg); }
