body {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: cornflowerblue;
}

.slider {
    width: 800px;
    height: 500px;
    border-radius: 10px;
    overflow: hidden;
}

.slides {
    width: 500%;
    height: 500px;
    display: flex;
}

.slides input {
    display: none;
}

.slide {
    width: 20%;
    transition: 2s;
}

.slide img {
    width: 800px;
    height: 500px;
}

/* -- css for manual slide navigation -- */

.navigation-manual {
    position: absolute;
    width: 800px;
    margin-top: -40px;
    display: flex;
    justify-content: center;
}

.manual-btn {
    border: 2px solid cornflowerblue;
    padding: 5px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.5s;
}

.manual-btn:not(:last-child) {
    margin-right: 30px;
}

.manual-btn:hover {
    background: cornflowerblue;
}

#radio1:checked ~ .first {
    margin-left: 0;
}

#radio2:checked ~ .first {
    margin-left: -20%;
}

#radio3:checked ~ .first {
    margin-left: -40%;
}

/* -- css for automatic slider -- */

.navigation-auto {
    position: absolute;
    display: flex;
    width: 800px;
    justify-content: center;
    margin-top: 460px;
}

.navigation-auto div {
    border: 2px solid cornflowerblue;
    padding: 5px;
    border-radius: 10px;
    transition: 0.5s;
}

.navigation-auto div:not(:last-child) {
    margin-right: 30px;
}

#radio1:checked ~ .navigation-auto .auto-btn1 {
    background: cornflowerblue;
    margin-left: 0;
}

#radio2:checked ~ .navigation-auto .auto-btn2 {
    background: cornflowerblue;
    margin-left: 0;
}

#radio3:checked ~ .navigation-auto .auto-btn3 {
    background: cornflowerblue;
    margin-left: 0;
}