.slider-container {
position: relative;
width: 100%;
height: auto;
overflow: hidden;
}

.slider {
position: absolute;
width: 100%;
height: 100%;
display: flex;
flex-direction: row;
transition: transform 0.5s ease;
}

.slide {
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: auto;
opacity: 0;
transition: opacity 1s, transform 1s;
}  

.slide img {
width: 100%;
height:auto;
object-fit: cover;
}

.slide-caption {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: rgba(0, 0, 0, 0.5);
padding: 20px;
color: #fff;
text-align: center;
opacity: 1;
transition: opacity 0.5s ease;
font-family: inherit;
}

.left {
    left: 20%;
}

.mobile-caption {
    display: none;
}

.slide-caption h2 {
font-size: 2em;
margin-bottom: 10px;
font-family: inherit;
}

.slide-caption p {
font-size: 1.2em;
margin-bottom: 20px;
}

.caption-button {
background-color: black;
border: none;
padding: 10px 20px;
font-size: 1.2em;
cursor: pointer;
margin:auto;
font-family: inherit;
color: white;
}

.caption-button:hover {
    background-color: #303030;
}

.prev, .next {
position: absolute;
top: 50%;
transform: translateY(-50%);
font-size: 2em;
cursor: pointer;
}

.prev {
left: 20px;
}

.next {
right: 20px;
}

@media (max-width: 801px) {
    .slide-caption {
        width: 50vw;
        padding: 20px 0 20px 0;
        left: 50%;
    }
    .slide-caption h2 {
        font-size: 1.2em;
    }
    .slide-caption p {
        font-size: 12px;
    }
    .caption-button {
        font-size: 12px;
    }
}