.myImg {
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.myImg:hover {
    opacity: 0.7;
}

.modal {
    display: none;
    position: fixed;
 
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(46 46 46 / 90%);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

.modal-content,
#caption {
    -webkit-animation-name: zoom;
    -webkit-animation-duration: 0.6s;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@-webkit-keyframes zoom {
    from {
        -webkit-transform: scale(0)
    }

    to {
        -webkit-transform: scale(1)
    }
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@media only screen and (max-width: 700px) {
    .modal-content {
        width: 100%;
    }
}
.img__height {
    height: 9rem;
}

.image-container {
    position: relative;
    width: 100%;
    height: 9rem; /* Match the height of the image */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Prevents content overflow */
}

.myImg {
    width: 100%;
    height: 100%;
    transition: opacity 0.5s ease-in-out; /* Smooth fade-out effect */
}

.hover-content {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
    width: 100%;
    height: 9rem;
    opacity: 0; /* Initially hidden */
    transform: translateY(-100%); /* Start above */
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out; /* Smooth transition */
    font-size: 23px;
}

.image-container:hover .myImg {
    opacity: 0; /* Smooth fade-out */
}

.image-container:hover .hover-content {
    opacity: 1; /* Smooth fade-in */
    transform: translateY(0); /* Slide down */
    background-color: rgba(0, 0, 0, 1); /* Full black background on hover */
}
