@import url('../style.css');

body{
    direction: rtl;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.slider{
   width: 900px;
   margin: 50 auto;
   border-radius: 12px;
   position: relative;
   overflow: hidden;
}

.slider .item{
    width: 100%;
    height: 100%;
    display: none;
}

.slider .item img{
    width: 100%;
    animation: zoom 1s ease;
}

@keyframes zoom{
    0%{
        transform: scale(1.5);
        opacity: 0;
    }
    100%{
        transform: scale(1);
        opacity: 1;
    }
}

.slider .item.active{
     display: block;
}

.slider .item .caption{
    position: absolute;
    background-color: rgba(0, 0, 0, var(--text-color));
    width: 100%;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    height: 60px;
    font-size: 25px;
}

.slider .controler{
    position: absolute;
    top: 50%;
    right: 5%;
    left: 5%;
    width: 90%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.slider .controler .next,
.slider .controler .preveious{
    background-color: var(--primary-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 25px;
    color: var(--background-color);
    font-weight: bold;
    cursor: pointer;
}

@media screen and (max-width:600px) {
    body{
        width: 100%;
    }
    .slider{
        width: 90%;
        border: 10px solid var(--primary-color) ;
        margin: 50 auto;
        position: relative;
        overflow: hidden;
    }
}