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

body{
    background: #eaeaea;
    overflow: hidden;
}

.container{
    /* maintain a reasonable aspect ratio so height scales with width */
    height: 60vh;
    max-height: 600px;
    background: #f5f5f5;
    box-shadow: 0 30px 50px #dbdbdb;
    overflow: hidden;
}

.container .slide .item{
    width: 200px;
    height: 300px;
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
    border-radius: 20px;
    box-shadow: 0 30px 50px #505050;
    background-position: 50% 50%;
    background-size: cover;
    display: inline-block;
    transition: 0.5s;
    
}

.slide .item:nth-child(1),
.slide .item:nth-child(2){
    top: 0;
    left: 0;
    transform: translate(0, 0);
    border-radius: 0;
    width: 100%;
    height: 100%;
    
}


.slide .item:nth-child(3){
    left: 80%;
}
.slide .item:nth-child(4){
    /* shift by one item width + small gap (~22%) */
    left: calc(80% + 22%);
}
.slide .item:nth-child(5){
    left: calc(80% + 44%);
}

/* here n = 0, 1, 2, 3,... */
.slide .item:nth-child(n + 6){
    left: calc(80% + 66%);
    opacity: 100%;
    

}



.item .content{
   position: relative;
    top: 50%;
    
    width: 80%;
    padding-top: 100%;
    padding-bottom: 100%;
    padding-left: 10%;
    text-align: left;
    color: #eee;
    transform: translate(0, -50%);
    font-family: system-ui;
    display: none;
    text-shadow: #000 2px 2px 5px;

    
}
.item .content::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, hsl(49deg 100% 5% / 100%), transparent);
    z-index: -1;
    animation: animate 1s ease-in-out 1 forwards;
}


.slide .item:nth-child(2) .content{
    display: block;
}


.content .name{
    font-size: 40px;
    text-transform: uppercase;
    font-weight: bold;
    opacity: 0;
    animation: animate 1s ease-in-out 1 forwards;
    text-shadow: #000 2px 2px 5px;
    
    
}

.content .des{
    margin-top: 10px;
    margin-bottom: 20px;
    opacity: 0;
    animation: animate 1s ease-in-out 0.3s 1 forwards;
}

.content button{
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    opacity: 0;
    animation: animate 1s ease-in-out 0.6s 1 forwards;
}


@keyframes animate {
    from{
        opacity: 0;
        transform: translate(0, 100px);
        filter: blur(33px);
    }

    to{
        opacity: 1;
        transform: translate(0);
        filter: blur(0);
        
    }
}



.button{
    width: 100%;
    text-align: center;
    position: absolute;
    bottom: 20px;
}

/* responsive adjustments */
@media (max-width: 768px) {
    .container {
        height: 60vh;
    }

    .container .slide .item {
        
        
    }

    /* hide extra cards offscreen to avoid clutter */
    .slide .item:nth-child(1),
    .slide .item:nth-child(3),
    .slide .item:nth-child(4),
    .slide .item:nth-child(5),
    .slide .item:nth-child(n + 6) {
        left: 600px;
    }

    .button {
        bottom: 10px;
    }

    .item{
        animation: ease-in-out 0.5s 1 forwards;
    }

    .content {
        width: 100%;
        padding-left: 20px;
        padding-top: 80%;
        padding-bottom: 80%;
    }

    .content .name { font-size: 24px; }
    .content .des { font-size: 14px; }
    .content button { padding: 8px 16px; }
}

.button button{
    width: 40px;
    height: 35px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    margin: 0 5px;
    border: 1px solid #000;
    transition: 0.3s;
}

.button button:hover{
    background: #ababab;
    color: #fff;
}