.slider {
    display: block;
    top:100px;
    width: 100%;
    max-width: 100%;
    height: 100%;
    overflow: hidden;
    position: absolute;
}

.slider>* {
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    animation: slide 32s infinite;
}
.slider>* p {
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    opacity:0;
    animation: slide2 32s infinite;
}

.slide p {
    position:relative;
    font-family: 'myfont';
    font-size: 120%;
    text-align: justify;
    max-width:50%;
    height:auto;
    opacity:0;
    top: 50%;
    left: 50%;
    margin-right: -50%;
    transform: translate(-50%, calc(-50% - 80px));
    display: inline-block;
    padding:30px;
    color: #fff;
    background-image:linear-gradient(to bottom,rgba(100,100,100,0.3),rgba(100,100,100,0.5));
	-webkit-transition: all 3s ease;
    	-moz-transition: all 3s ease;
    	-o-transition: all 3s ease;
    	-ms-transition: all 3s ease;
	transition: all 3s ease;
}

.slide:nth-child(1) {
    left: 0%;
    animation-delay: -1s;
    background-image: url(./slideshow/img1.jpg);
    background-size: cover 100%;
    background-position: center;
}
.slide:nth-child(1) p {
    opacity:1;
    animation-delay: 0s;

}
.slide:nth-child(2) {
    left: 100%;
    animation-delay: 7s;
    background-image: url(./slideshow/img2.jpg);
    background-size: cover 100%;
    background-position: center;
}

.slide:nth-child(2) p {
    opacity:1;
    animation-delay: 7s;

}
.slide:nth-child(3) {
    left: 100%;
    animation-delay: 15s;
    background-image: url(./slideshow/img3.jpg);
    background-size: cover 100%;
    background-position: center;
}
.slide:nth-child(3) p {
    opacity:1;
    animation-delay: 15s;
}
.slide:nth-child(4) {
    left: 100%;
    animation-delay: 23s;
    background-image: url(./slideshow/img4.jpg);
    background-size: cover;
    background-position: center;
}
.slide:nth-child(4) p {
    opacity:1;
    animation-delay: 23s;
}

.slide{
    max-width:100%;
    width:30%;
    padding:0px;
    margin:0px;
}

@keyframes slide {
    0% {
        left: 100%;
        width: 100%;
     max-width:100%;
       opacity: 1;
    }

    5% {
        left: 0%;
    }

    25% {
        left: 0%;
    }

    30% {
        left: -100%;
        width: 100%;
     max-width:100%;
       opacity: 1;
    }

    30.0001% {
        left: -100%;
        width: 0%;
        opacity: 0;
    }

    100% {
        left: 100%;
        width: 100%;
     max-width:100%;
       opacity: 0;
    }
}
@keyframes slide2 {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    25% {
        opacity: 1;
    }

    30% {
        opacity: 1;
    }

    30.0001% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

@media screen and (max-width: 768px) {

.slide p {
    font-family: 'myfont';
    font-size: 100%;
    text-align: justify;
    max-width:100%;
    width:calc(100% - 60px);
    height:auto;
    top:0;
    left:50%;
    display: inline-block;
    color: #fff;
    background-image:linear-gradient(to bottom,rgba(100,100,100,0.3),rgba(100,100,100,0.5));
    padding:30px;
    transform:translate(-50%, 0%);
}
.slider>* {
    width: 100%;
    max-width: 100%;
    height: 70%;
    max-height: 70%;
    background-size: auto 100%;
}
}