
*{
    padding: 0px;
    margin: 0px;
    box-sizing: border-box;
}

body{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    min-height: 100vh;
    background: #151f28;
}

.box{
    position: relative;
    width: 550px;
    height: 300px;
    margin: 50px;
    cursor: pointer;
}

.box .imgBx {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.box .imgBx img{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;   
}

.box::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: white;
    z-index: 1000;
    transition: 1.5s;
}

.box:hover::before{
    top: calc(100% - 4px);
}

.box .imgBx:nth-child(2){
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: 1.5s;
}

.box:hover .imgBx:nth-child(2){
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transition: 1.5s;
}