.img-gallery {
    position: relative;
    display: inline-block;
    height: 100%; 
    overflow: hidden;
}

.img-gallery .image-container {
    position: relative;
    display: inline-block;
    overflow: hidden; 
}

.img-gallery .main-image {
    display: block; 
    transition: transform 0.3s linear;
    width: 100%;
    height: 533px; 
}
@media screen and (max-width:1199px){
    .img-gallery .main-image {
        height: 347px; 
    }   
}
@media screen and (max-width:450px){
    .img-gallery .main-image {
        height: 300px; 
    }   
}
/* Add the blue overlay on hover */
.img-gallery .image-container:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(167, 203, 244, 0.8); 
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s linear; 
    z-index: 1; 
    transform: scale(1); 
}

.img-gallery:hover .image-container:before {
    opacity: 1; 
    transform: scale(0.95); 
}

.img-gallery:hover .main-image {
    transform: scale(0.95); 
}

/* Cross lines effect */
.img-gallery:hover .cross-horizontal {
    width: 40%;
}

.img-gallery:hover .cross-vertical {
    height: 40%;
}

.cross {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    background-color: #fff;
}

.cross-horizontal {
    width: 18px;
    height: 1px;
    transition: width 0.4s ease-in-out;
}

.cross-vertical {
    height: 18px;
    width: 1px;
    transition: height 0.4s ease-in-out;
}