/* ================================================================
   LIGHTBOX – Wiederverwendbare Galerie-Lightbox
   ================================================================ */

/* Shared gallery section */
.galerie-section {
    padding: 2rem 0 3rem;
}

/* Shared section heading for gallery pages */
.galerie-section-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}
.galerie-section-title i {
    color: var(--highlight-color);
    margin-right: 0.5rem;
}

/* Gallery item base */
.galerie-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
}
.galerie-item__img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.galerie-item__img--placeholder {
    background: #d0d5dd;
}
.galerie-item__title {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}
.galerie-item[data-lightbox] {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.galerie-item[data-lightbox]:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.galerie-item[data-lightbox]::after {
    content: '\f065';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 7 Free';
    font-weight: 900;
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.galerie-item[data-lightbox]:hover::after {
    opacity: 1;
}

/* Lightbox Overlay */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox-overlay--open {
    opacity: 1;
    visibility: visible;
}
.lightbox__img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
}
.lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    z-index: 10;
}
.lightbox__close:hover {
    opacity: 1;
}
.lightbox__prev,
.lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.3rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 10;
}
.lightbox__prev:hover,
.lightbox__next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}
.lightbox__prev {
    left: 16px;
}
.lightbox__next {
    right: 16px;
}
.lightbox__title {
    position: absolute;
    bottom: 20px;
    left: 24px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 600;
    max-width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lightbox__counter {
    position: absolute;
    bottom: 20px;
    right: 24px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 767px) {
    .lightbox__prev,
    .lightbox__next {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    .lightbox__prev {
        left: 8px;
    }
    .lightbox__next {
        right: 8px;
    }
    .lightbox__title {
        left: 16px;
        bottom: 16px;
        font-size: 0.85rem;
        max-width: 55%;
    }
    .lightbox__counter {
        right: 16px;
        bottom: 16px;
        font-size: 0.8rem;
    }
}
