/* Galerie-Übersicht – elegante Overlay-Karten */
.gallery-overview-section {
  padding: 70px 0 90px;
}

.gallery-overview-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.gallery-overview-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #166937;
}

.gallery-overview-title {
  color: #fff;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.gallery-overview-intro {
  margin: 0;
  color: #86939e;
  font-size: 1.05rem;
  line-height: 1.55;
}

.gallery-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.gallery-overview-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: #fff;
  border-radius: 10px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-overview-card:hover,
.gallery-overview-card:focus {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  text-decoration: none;
  color: #fff;
}

.gallery-overview-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #111;
}

.gallery-overview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.gallery-overview-card:hover .gallery-overview-thumb img,
.gallery-overview-card:focus .gallery-overview-thumb img {
  transform: scale(1.08);
}

.gallery-overview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.35rem 1.4rem 1.25rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.45) 42%,
    rgba(0, 0, 0, 0.08) 70%,
    transparent 100%
  );
  transition: background 0.3s ease;
}

.gallery-overview-card:hover .gallery-overview-overlay,
.gallery-overview-card:focus .gallery-overview-overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(22, 105, 55, 0.35) 45%,
    rgba(0, 0, 0, 0.15) 70%,
    transparent 100%
  );
}

.gallery-overview-year {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 0.4rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: #166937;
  border-radius: 3px;
}

.gallery-overview-overlay h3 {
  margin: 0 0 0.35rem;
  padding: 0;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.25;
  color: #fff;
  text-align: left;
}

.gallery-overview-meta {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
}

.gallery-overview-card:hover .gallery-overview-meta,
.gallery-overview-card:focus .gallery-overview-meta {
  color: rgba(255, 255, 255, 0.9);
}

@media (min-width: 992px) {
  .gallery-overview-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.85rem;
  }
}

@media (max-width: 575.98px) {
  .gallery-overview-section {
    padding: 48px 0 64px;
  }

  .gallery-overview-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .gallery-overview-overlay {
    padding: 1.1rem 1.15rem 1rem;
  }

  .gallery-overview-overlay h3 {
    font-size: 1.2rem;
  }
}

/* Einzelgalerie: Thumbnail-Grid */
.gallery-album .sppb-addon-title {
  color: #fff;
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.75rem;
}

.gallery-album .gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0 !important;
  justify-content: stretch !important;
  float: none !important;
}

.gallery-album .gallery-grid li {
  margin: 0 !important;
  padding: 0;
  float: none !important;
  width: auto !important;
}

.gallery-album .gallery-item a {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 1;
  background: #111;
  cursor: zoom-in;
}

.gallery-album .gallery-item a::after {
  content: "\f00e";
  font-family: FontAwesome;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.gallery-album .gallery-item a:hover::after,
.gallery-album .gallery-item a:focus::after {
  opacity: 1;
}

.gallery-album .gallery-grid img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
  border-radius: 0 !important;
}

.gallery-album .gallery-item a:hover img,
.gallery-album .gallery-item a:focus img {
  transform: scale(1.05);
}

.gallery-back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: #86939e;
  text-decoration: none;
  font-size: 0.95rem;
}

.gallery-back-link:hover,
.gallery-back-link:focus {
  color: #166937;
  text-decoration: none;
}

@media (min-width: 768px) {
  .gallery-album .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1200px) {
  .gallery-album .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }
}

/* Magnific Popup Modal */
.mfp-gallery-modal.mfp-bg {
  background: rgba(0, 0, 0, 0.92);
  opacity: 1;
}

.mfp-gallery-modal .mfp-close {
  color: #fff;
  opacity: 0.85;
  font-size: 2.5rem;
  right: 10px;
  top: 10px;
}

.mfp-gallery-modal .mfp-close:hover {
  opacity: 1;
}

.mfp-gallery-modal .mfp-arrow {
  opacity: 0.75;
}

.mfp-gallery-modal .mfp-arrow:hover {
  opacity: 1;
}

.mfp-gallery-modal .mfp-figure::after {
  background: transparent;
  box-shadow: none;
}

.mfp-gallery-modal .mfp-img {
  padding: 40px 0;
  max-height: 88vh !important;
}

.mfp-gallery-modal .mfp-bottom-bar {
  margin-top: -36px;
  background: rgba(0, 0, 0, 0.6);
}

.mfp-gallery-modal .mfp-title {
  color: #ccc;
  text-align: center;
  padding: 8px 12px;
}

.mfp-gallery-modal .mfp-counter {
  color: #aaa;
  font-size: 0.85rem;
}
