/* css/gallery-style.css */

/* Gallery Grid Item Styling - UPDATED FOR THUMBNAIL SIZE */
#image-gallery .gallery-item {
    overflow: hidden;
    border-radius: 0.375rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    cursor: pointer;
    margin-bottom: 15px; /* Consistent bottom margin for items in columns */
    height: 250px;       /* Fixed height for the gallery item container */
    display: block;      /* Or flex if content inside needs more complex alignment */
}

#image-gallery .gallery-item img {
    width: 100%;
    height: 100%;        /* Image fills the .gallery-item's fixed height */
    object-fit: cover;   /* Crops image to fit, maintaining aspect ratio */
    display: block;
}

/* Column padding for horizontal gutters (Bootstrap 4 method) */
#image-gallery > .col-lg-3,
#image-gallery > .col-md-4,
#image-gallery > .col-sm-6 {
    padding-left: 7.5px;  /* Half of desired gutter */
    padding-right: 7.5px; /* Half of desired gutter */
    /* margin-bottom is handled by .gallery-item now if preferred, or add to col-* */
}
/* #image-gallery.row { */ /* This might not be needed if col padding is direct */
    /* margin-left: -7.5px; */
    /* margin-right: -7.5px; */
/* } */


.gallery-item:hover { /* Hover on the .gallery-item container */
    transform: scale(1.03); /* Optional: Scale the whole item */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
/* Optional: if you want ONLY images to zoom slightly on gallery-item hover */
/*
#image-gallery .gallery-item:hover img {
    transform: scale(1.1);
}
*/


/* Filter Buttons Styling */
#filter-buttons .btn {
    margin: 0.25rem;
}

#filter-buttons .btn.active {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}
#filter-buttons .btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}
#filter-buttons .btn-outline-primary:hover {
    background-color: #007bff;
    color: white;
}


/* --- Bootstrap 4 Modal Styling for Lightbox (Fixed Box Viewer) --- */
.modal-backdrop.show {
    opacity: 0.75;
}

#imageLightbox .modal-dialog {
    max-width: 100%;
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#imageLightbox .modal-content.lightbox-viewer-bs4 {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: auto;
    height: auto;
}

.lightbox-image-area-bs4 {
    width: 80vw;
    height: 80vh;
    max-width: 900px; /* Adjust max pixel width if desired */
    max-height: 700px;/* Adjust max pixel height if desired */

    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-radius: 0.25rem;
    
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 10px; /* Padding inside the white box, around the image */
    box-sizing: border-box;
}

#imageLightbox img#lightboxImage {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lightbox-close-btn-fixed-bs4.close {
    position: absolute;
    top: -15px; /* Adjust to be clearly outside the white box */
    right: -15px;/* Adjust to be clearly outside the white box */
    z-index: 1055;
    color: #fff;
    opacity: 0.9;
    text-shadow: 0 1px 0 #000;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1.8rem;
    line-height: 36px;
    text-align: center;
}
.lightbox-close-btn-fixed-bs4.close:hover {
    color: #fff;
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-nav-btn-fixed-bs4 {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1055;
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    border-radius: 5px;
    width: 45px;
    height: 70px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 0;
}
.lightbox-nav-btn-fixed-bs4:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.lightbox-nav-btn-fixed-bs4.prev-btn-fixed-bs4 {
    left: 15px;
}

.lightbox-nav-btn-fixed-bs4.next-btn-fixed-bs4 {
    right: 15px;
}

.lightbox-nav-btn-fixed-bs4:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: rgba(0, 0, 0, 0.2);
}