/* Camping Gallery — Eindrücke: audio bar, gallery grid, lightbox.
   Colours mirror the theme tokens (forest #2b6c3d, lime #9abe29). */

/* ---------- Background-audio control bar ---------- */
.eg-audio {
	position: sticky;
	/* leave a small gap below the header instead of butting against it */
	top: calc(var(--header-height-scrolled, 60px) + 14px);
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	max-width: 520px;
	margin: 0 auto 2.5rem;
	padding: 0.55rem 1rem;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(43, 108, 61, 0.18);
	border-radius: 999px;
	box-shadow: 0 6px 22px rgba(26, 46, 26, 0.12);
}
.eg-audio-btn {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: var(--color-forest, #2b6c3d);
	color: #fff;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	transition: background 0.2s ease, transform 0.15s ease;
}
.eg-audio-btn:hover { transform: scale(1.06); }
.eg-audio-mute {
	background: transparent;
	color: var(--color-forest, #2b6c3d);
	width: 34px;
	height: 34px;
}
.eg-audio-btn .eg-ico { width: 17px; height: 17px; fill: currentColor; }
.eg-audio-mute .eg-ico { width: 20px; height: 20px; }
.eg-audio-label {
	flex: 1 1 auto;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--color-forest, #2b6c3d);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.eg-audio-volume {
	flex: 0 0 96px;
	width: 96px;
	accent-color: var(--color-lime, #9abe29);
	cursor: pointer;
}
/* Icon visibility toggled by state classes on .eg-audio.
   Every rule is prefixed with .eg-audio so all share specificity (0,2,0)
   and the default-hidden icon can't leak through. */
.eg-audio .eg-ico-play,  .eg-audio .eg-ico-sound { display: block; }
.eg-audio .eg-ico-pause, .eg-audio .eg-ico-muted { display: none; }
.eg-audio.is-playing .eg-ico-play  { display: none; }
.eg-audio.is-playing .eg-ico-pause { display: block; }
.eg-audio.is-muted   .eg-ico-sound { display: none; }
.eg-audio.is-muted   .eg-ico-muted { display: block; }
/* Soft pulse hint until the visitor first interacts */
.eg-audio:not(.is-started) .eg-audio-toggle {
	animation: eg-pulse 2.4s ease-in-out infinite;
}
@keyframes eg-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(154, 190, 41, 0.55); }
	50%      { box-shadow: 0 0 0 8px rgba(154, 190, 41, 0); }
}

/* ---------- Gallery grid ---------- */
.eg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	grid-auto-rows: 200px;
	gap: 14px;
}
.eg-item {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 14px;
	overflow: hidden;
	cursor: pointer;
	background: #eef0ea;
	box-shadow: 0 4px 14px rgba(26, 46, 26, 0.10);
}
.eg-item img,
.eg-item video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s var(--ease-out-expo, ease);
}
.eg-item:hover img,
.eg-item:hover video { transform: scale(1.06); }
.eg-item:focus-visible { outline: 3px solid var(--color-lime, #9abe29); outline-offset: 2px; }
.eg-play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 54px;
	height: 54px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(43, 108, 61, 0.82);
	color: #fff;
	border-radius: 50%;
	font-size: 20px;
	padding-left: 4px;
	pointer-events: none;
}
.eg-cap {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 1.4rem 0.85rem 0.6rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: #fff;
	text-align: left;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
	pointer-events: none;
}

/* ---------- Lightbox ---------- */
.eg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(12, 20, 12, 0.92);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.eg-lightbox.is-open { opacity: 1; }
/* The class selector above would otherwise override the [hidden] UA rule,
   leaving an invisible full-screen overlay that swallows every click. */
.eg-lightbox[hidden] { display: none; }
.eg-lb-stage {
	/* keep clear gutters on both sides so the prev/next buttons never
	   overlap the media */
	max-width: calc(100vw - 160px);
	max-height: 82vh;
	display: flex;
	align-items: center;
	justify-content: center;
}
.eg-lb-stage img,
.eg-lb-stage video {
	max-width: calc(100vw - 160px);
	max-height: 82vh;
	border-radius: 8px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.eg-lb-close, .eg-lb-prev, .eg-lb-next {
	position: absolute;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	border: none;
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}
.eg-lb-close:hover, .eg-lb-prev:hover, .eg-lb-next:hover { background: rgba(255, 255, 255, 0.3); }
.eg-lb-close { top: 18px; right: 18px; width: 46px; height: 46px; }
.eg-lb-prev, .eg-lb-next { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.eg-lb-close svg { width: 20px; height: 20px; display: block; }
.eg-lb-prev svg, .eg-lb-next svg { width: 26px; height: 26px; display: block; }
.eg-lb-prev { left: 18px; }
.eg-lb-next { right: 18px; }
.eg-lb-meta {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 22px;
	text-align: center;
	color: #fff;
	padding: 0 1rem;
	pointer-events: none;
}
.eg-lb-title { display: block; font-weight: 700; font-size: 1.05rem; }
.eg-lb-info  { display: block; font-size: 0.9rem; opacity: 0.85; margin-top: 0.2rem; }

@media (max-width: 640px) {
	.eg-grid { grid-auto-rows: 150px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
	.eg-lb-prev, .eg-lb-next { width: 42px; height: 42px; font-size: 24px; }
	.eg-lb-prev { left: 8px; }
	.eg-lb-next { right: 8px; }
	.eg-lb-stage, .eg-lb-stage img, .eg-lb-stage video { max-width: calc(100vw - 108px); }
	.eg-audio { gap: 0.5rem; padding: 0.45rem 0.7rem; }
	.eg-audio-volume { flex-basis: 70px; width: 70px; }
}
