/* galerie.css */
.page-galerie { /* kleine Anpassungen */ }

/* Gallerie ausklappbar */

.gallery-section-ak h2 {
    cursor: pointer;
    background-color: black;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 10px auto;
    max-width: 1000px;
    transition: background 0.3s ease;
}

    .gallery-section-ak h2:hover {
        background-color: #333;
    }

.gallery-ak {

    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    max-width: 1000px;
    margin: auto;
    transition: max-height 0.5s ease;
}

    .gallery-ak img {
        width: 100%;
        max-width: 1000px;
        border-radius: 6px;
        object-fit: cover;
    }


.image-wrapper-ak {
    position: relative;
    display: inline-block;
    max-width: 600px; /* Bild Gre */
    width: 100%;
}

    .image-wrapper-ak img {

        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 10px;
        max-width: 1000px;
        margin: auto;
        transition: max-height 0.5s ease;
    }

.image-caption-ak {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 10px;
    color: white;
    background: rgba(0, 0, 0, 0.3); /* halbtransparenter Hintergrund */
    text-align: center;
    font-size: 1.5em;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    pointer-events: none;
}

/* Der unsichtbare Link */
.image-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    text-decoration: none;
    color: inherit;
}

/* ===== Galerie: Accordion & Animations ===== */
.gallery-page { max-width: var(--container, 1100px); margin-inline: auto; }

.acc { border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius, 8px); margin-block: 1rem; overflow: hidden; background: #000; }

.acc__trigger {
    -webkit-tap-highlight-color: transparent;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: .75rem;
    padding: 0.9rem 1.1rem;
    background: #111;
    color: white !important;
    border: 0;
    text-align: left;
    cursor: pointer;
    transition: background .25s ease, transform .15s ease, box-shadow .25s ease;
}
.acc__trigger:hover { background: #222; box-shadow: 0 8px 24px rgba(0,0,0,.35); transform: translateY(-1px); }
.acc__trigger:active { transform: translateY(0); }

.acc__title { font-weight: 700; }
.acc__count {
  font-size: .85rem;
  opacity: .85;
  padding: .15rem .55rem;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
}
.acc__chev { width: 22px; height: 22px; justify-self: end; transition: transform .25s ease; fill: none; stroke: currentColor; stroke-width: 2; }
.acc__trigger[aria-expanded="true"] .acc__chev { transform: rotate(180deg); }

.acc__panel {
  overflow: hidden;
  will-change: height;
  transition: height .28s ease;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: transparent;
}

/* Grid + Cards */
.gallery-grid {
  display: grid;
  gap: 1.25rem;
  padding: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1024px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-item { 
  background: #0b0b0b;
  border-radius: var(--radius, 8px);
  box-shadow: 0 6px 16px rgba(0,0,0,.3);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.gallery-item:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.4); }

.gallery-link { display: block; position: relative; overflow: hidden; }
.gallery-link img {
  display: block; width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  transform: scale(1); transition: transform .5s ease, filter .5s ease;
  border-radius: 0;
}
.gallery-item:hover img { transform: scale(1.05); filter: saturate(1.1) contrast(1.05); }

.gallery-item figcaption {
  padding: .75rem 1rem; font-size: .95rem; opacity: .9; text-align: left;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Overlay label */
.gallery-link::after {
  content: "Ansehen";
  position: absolute; inset: auto 10px 10px auto;
  padding: .35rem .6rem; border-radius: 999px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(2px);
  transform: translateY(6px); opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  font-size: .85rem;
}
.gallery-item:hover .gallery-link::after { transform: translateY(0); opacity: 1; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.reveal--in { opacity: 1; transform: translateY(0); }

/* Sub-Accordion */
.acc.acc--sub {
  margin: .75rem 1rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0a0a0a;
  border-radius: var(--radius, 8px);
}
.acc.acc--sub .acc__trigger { background: #121212; padding: 0.7rem 0.9rem; }
.acc.acc--sub .acc__trigger:hover { background: #1a1a1a; }
.acc.acc--sub .acc__panel { border-top: 1px solid rgba(255,255,255,0.06); }

/* Lightbox (image + video + embed) */
#lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .3s ease;
  z-index: 1000;
}
#lightbox.active { opacity: 1; visibility: visible; }
#lightbox .lb-content {
  max-width: 90vw; max-height: 90vh; display: flex; align-items: center; justify-content: center;
}
#lightbox img, #lightbox video, #lightbox iframe {
  max-width: 90vw; max-height: 90vh; border-radius: var(--radius, 8px); box-shadow: 0 10px 24px rgba(0,0,0,.5); display: block;
}
#lightbox .close, #lightbox .fs {
  position: absolute; top: 1rem; background: none; border: 0; color: #fff; line-height: 1; cursor: pointer;
}
#lightbox .close { right: 1rem; font-size: 2rem; }
#lightbox .fs { right: 3.2rem; font-size: 1.4rem; }
#lightbox .close:hover, #lightbox .fs:hover { color: #aaa; }

/* Compatibility */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.section__title { margin: 0 0 1.25rem; }

/* Lightbox swipe nav buttons */
#lightbox .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.35);
  border: 0;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  padding: .3rem .6rem;
  cursor: pointer;
  border-radius: .5rem;
  user-select: none;
}
#lightbox .nav:hover { background: rgba(0,0,0,0.5); }
#lightbox .nav.prev { left: 1rem; }
#lightbox .nav.next { right: 1rem; }

/* Compatibility */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s ease, transform .6s ease;
}

    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }

.section__title {
    margin: 0 0 1.25rem;
}