/* ================================================================
   WORDPRESS GALERIE – Karussell
   ================================================================ */
.gallery {
    position: relative;
    overflow: hidden;
    margin: 24px 0;
}

.gallery-carousel {
    display: flex;
    transition: transform 0.4s ease;
    will-change: transform;
}

.gallery .gallery-item {
    flex: 0 0 33.333%;
    padding: 4px;
    box-sizing: border-box;
}

@media (max-width: 860px) {
    .gallery .gallery-item {
        flex: 0 0 100%;
    }
}

.gallery .gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 4px;
    cursor: zoom-in;
    transition: opacity 0.2s;
    display: block;
}

.gallery .gallery-item img:hover {
    opacity: 0.85;
}

/* Pfeile */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.gallery-nav-btn:hover   { background: rgba(204,26,26,0.85); }
.gallery-nav-btn.prev    { left: 8px; }
.gallery-nav-btn.next    { right: 8px; }

/* Dots */
.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.gallery-dots .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #c8c0b0;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0;
}

.gallery-dots .dot.active { background: #cc1a1a; }

/* ================================================================
   LIGHTBOX
   ================================================================ */
.aikido-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.aikido-lightbox.is-open {
    display: flex;
}

.lightbox__img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.lightbox__close {
    position: fixed;
    top: 18px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox__close:hover { opacity: 1; color: #cc1a1a; }

.lightbox__prev,
.lightbox__next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 32px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox__prev:hover,
.lightbox__next:hover { background: rgba(204,26,26,0.7); }

.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }

.lightbox__counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.55);
    font-size: 13px;
    font-family: 'Open Sans', sans-serif;
}

/* Gutenberg Block-Galerie überschreiben */
.wp-block-gallery {
    position: relative;
    overflow: hidden;
    display: block !important;
    gap: 0 !important;
    flex-wrap: nowrap !important;
}

.wp-block-gallery > figure.wp-block-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 4px;
    cursor: zoom-in;
    transition: opacity 0.2s;
    display: block;
}

.wp-block-gallery > figure.wp-block-image img:hover {
    opacity: 0.85;
}