/* ==========================================================================
   BLOCK: BILDER GALERIE
   ========================================================================== */

/* Haupt-Wrapper & Container */
.flow-bilder-galerie-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}


/* Bilder-Grid (3 Spalten auf Desktop) */
.fahrwerksservice-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    width: 100%;
}

/* Einzelne Bilder-Boxen (Link-Wrapper) */
.fahrwerksservice-img-wrapper {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    cursor: pointer;
}

.fahrwerksservice-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

/* Zoom-Effekt beim Hovern */
.fahrwerksservice-img-wrapper:hover img {
    transform: scale(1.04);
}


/* ==========================================================================
   NATIVE LIGHTBOX STYLES
   ========================================================================== */

.custom-lightbox {
    display: flex;
    position: fixed;
    z-index: 99999; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.custom-lightbox.is-active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.custom-lightbox.is-active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #ffffff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    user-select: none;
    line-height: 1;
}

.lightbox-close:hover {
    color: #66C5EE;
    transform: scale(1.1);
}


/* ==========================================================================
   RESPONSIVE OVERRIDES (TABLET & MOBILE)
   ========================================================================== */

@media (max-width: 992px) {
    /* .bilder-galerie-container {
        width: 90vw; 
    } */

    /* Wechsel auf 1 Spalte für die Bilder */
    .fahrwerksservice-gallery-grid {
        grid-template-columns: repeat(2,1fr);
        /* gap: 15px; */
    }

    .lightbox-close {
        top: 20px;
        right: 25px;
        font-size: 40px;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 75vh;
    }
}

/* Add smooth mobile column layout */
@media (max-width: 576px) {
    .fahrwerksservice-gallery-grid {
        grid-template-columns: 1fr; /* Switch to 1 column on smaller mobile screens */
        /* gap: 12px; */
    }

    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 36px;
        padding: 10px; /* Expands touch target area on mobile */
    }
}

/* Prevent image dragging while interacting with lightbox */
.lightbox-content {
    user-select: none;
    -webkit-user-drag: none;
}