:root {
  --primary: #2d5016;
  --secondary: #7cb342;
  --accent: #f9a825;
  --dark: #1a1a1a;
  --light: #f5f5f5;
  --red: #E53935;
  --lightblue: #29B6F6;
  --orange: #FB8C00;
  --deepblue: #0288D1;
  --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--light);
}

/* Logo-Leiste, wie auf der Hauptseite */
.logo-leiste {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  padding: 20px;
}
.logo-leiste img { width: 120px; height: auto; }
.logo-leiste .titel { text-align: center; }
.logo-leiste h1 { font-size: 2rem; color: var(--primary); }
.logo-leiste .untertitel { color: var(--dark); opacity: 0.8; margin-top: 4px; }

/* Nav, identisch zur Hauptseite */
nav.site-nav {
  background: var(--dark);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}
nav.site-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
nav.site-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}
nav.site-nav a:hover { color: var(--accent); }
nav.site-nav a.aktiv { color: var(--accent); }

main { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem 3rem; }
main > h2 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 30px;
  text-align: center;
}

/* Filterleiste */
.filterleiste {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  background: var(--white);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.filter-gruppe { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.filter-label { font-weight: 600; margin-right: 0.4rem; color: var(--primary); }

.filter-btn {
  border: 1px solid var(--secondary);
  background: var(--white);
  color: var(--primary);
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.filter-btn:hover { background: var(--light); }
.filter-btn.active { background: var(--secondary); color: var(--white); border-color: var(--secondary); }

.filter-reset {
  margin-left: auto;
  border: none;
  background: var(--accent);
  color: var(--dark);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}
.filter-reset:hover { opacity: 0.85; }

.ergebnis-info { color: #555; font-size: 0.9rem; margin: 0.5rem 0 1rem; }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  min-height: 200px;
}

.grid-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  background: #ddd;
}
.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.grid-item:hover img { transform: scale(1.06); }

.grid-leer {
  grid-column: 1 / -1;
  text-align: center;
  color: #777;
  padding: 2rem;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.pagination button {
  border: none;
  background: var(--primary);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
}
.pagination button:disabled { background: #bbb; cursor: default; }
#page-info { font-weight: 600; color: var(--primary); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-caption {
  color: var(--white);
  margin-top: 0.75rem;
  font-size: 0.9rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--white);
  font-size: 2.5rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* Footer, wie auf der Hauptseite */
footer {
  background: var(--dark);
  color: white;
  text-align: center;
  padding: 40px 20px;
}
footer a { color: var(--accent); text-decoration: none; }

@media (max-width: 600px) {
  .filterleiste { flex-direction: column; align-items: stretch; }
  .filter-reset { margin-left: 0; }
  .lightbox-nav { width: 2.2rem; height: 2.2rem; font-size: 1.8rem; }
  .logo-leiste img { width: 90px; }
  .logo-leiste h1 { font-size: 1.5rem; }
}
