/* =====================================================
   Sokolowski Contracting - Gallery System
   CLEAN FINAL CSS (GRID + LIGHTBOX SAFE)
===================================================== */


/* =====================================================
   SAFETY RESET (prevents global CSS conflicts)
===================================================== */

#gallery,
#gallery *{
    box-sizing: border-box;
}


/* =====================================================
   GALLERY GRID (MAIN FIX)
===================================================== */

#gallery.photo-grid{
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 16px !important;
    padding: 20px !important;
    max-width: 1200px;
    margin: 0 auto 80px auto;
}


/* =====================================================
   THUMBNAILS
===================================================== */

#gallery.photo-grid img{
    width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
    display: block !important;

    border-radius: 10px;
    cursor: pointer;

    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

#gallery.photo-grid img:hover{
    transform: scale(1.03);
    box-shadow: 0 10px 28px rgba(0,0,0,0.25);
}


/* =====================================================
   LIGHTBOX BACKDROP
===================================================== */

#lightbox{
    display: none;
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.92);

    justify-content: center;
    align-items: center;

    z-index: 9999;
}


/* =====================================================
   LIGHTBOX IMAGE
===================================================== */

#lightboxImage{
    max-width: 90%;
    max-height: 85%;

    border-radius: 10px;

    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}


/* =====================================================
   NAV BUTTONS
===================================================== */

#prevBtn,
#nextBtn{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 55px;
    height: 55px;

    border: none;
    border-radius: 50%;

    font-size: 32px;

    color: #fff;
    background: rgba(255,255,255,0.15);

    cursor: pointer;

    transition: background 0.2s ease;
}

#prevBtn:hover,
#nextBtn:hover{
    background: rgba(255,255,255,0.30);
}

#prevBtn{
    left: 20px;
}

#nextBtn{
    right: 20px;
}


/* =====================================================
   CLOSE BUTTON
===================================================== */

#closeLightbox{
    position: absolute;
    top: 20px;
    right: 25px;

    font-size: 42px;
    color: #fff;

    cursor: pointer;

    transition: opacity 0.2s ease;
}

#closeLightbox:hover{
    opacity: 0.6;
}


/* =====================================================
   IMAGE COUNTER
===================================================== */

#imageCounter{
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);

    color: #fff;
    font-size: 15px;

    background: rgba(0,0,0,0.4);
    padding: 6px 14px;
    border-radius: 20px;
}


/* =====================================================
   RESPONSIVE DESIGN
===================================================== */

@media (max-width: 768px){

#prevBtn,
#nextBtn{
    width: 45px;
    height: 45px;
    font-size: 26px;
}

#gallery.photo-grid img{
    height: 180px !important;
}

}

@media (max-width: 480px){

#gallery.photo-grid img{
    height: 150px !important;
}

}