.image-layout-custom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.image-layout-custom img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
}

.image-layout-custom:not(.no-lightbox) img:hover {
    transform: scale(1.025);  
    box-shadow: 0px 0px 10px grey;
    cursor:pointer;
}

/* Logos specific styling */
.image-layout-custom.logos {
    align-items: center; /* vertical align inside grid */
}

.image-layout-custom.logos a {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 5px; /* optional, matches other images */
    background: #fff; /* optional, for consistent look */
    padding: 10px; /* optional, some spacing around logos */
}

.image-layout-custom.logos img {
    max-height: 100px;  /* all logos same height */
    width: auto;        /* keep aspect ratio */
    object-fit: contain; /* scale properly without cropping */
    display: block;
    transition: all 0.2s ease-in-out;
}

.image-layout-custom.logos img:hover {
    transform: scale(1.05);
}



/* Large desktop */
@media (min-width: 1400px) {
    .image-layout-custom {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet */
@media (max-width: 991px) {
    .image-layout-custom {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 575px) {
    .image-layout-custom {
        grid-template-columns: 1fr;
    }

    .image-layout-custom.logos {
        grid-template-columns: 1fr; /* one per row */
        align-items: start;          /* align items to top of grid row */
    }

    .image-layout-custom.logos a {
        /* justify-content: flex-start; */
        padding: 5px 0;              /* optional, less padding on mobile */
    }

    .image-layout-custom.logos img {
        max-height: 80px; /* smaller height on mobile */
    }
}


#simple-lightbox {
    display: none; /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;

    justify-content: center;
    align-items: center;
    overflow: auto;
}

#simple-lightbox img.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

#simple-lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    z-index: 10000;
    transition: color 0.2s;
}

#simple-lightbox .close:hover {
    color: #ff0000;
}
