@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Jost';
}

.container{
    position: absolute;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slider{
    position: absolute;
    inset: 56px 200px 80px 80px;
    background-color: #ccc;
    border-radius: 20px;
}
 .slider .slides{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 240px;
    height: 320px;
    background: url(./pura-desa-lan-puseh.jpg);
    background-size: cover;
    background-position: center;
    transition: 0.5s;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;

 }

 .slider .slides:nth-child(1),
 .slider .slides:nth-child(2){
    position: absolute;
    top:  0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateY(0);
    box-shadow: 0 25px 50px rgba(0,0,0,0);
    background-size: cover;
 }

.slider .slides:nth-child(3){
    left: calc(50% + 240px);
    background-size:cover;
}

.slider .slides:nth-child(4){
    left: calc(50% + 500px);
    background-size: cover;
}

.slider .slides:nth-child(5){
    left: calc(50% + 760px);
    background-size: cover;
}

.slider .slides:nth-child(6){
    left: calc(50% + 1020px);
    background-size: cover;
    opacity: 0;
}

.buttons{
    position: absolute;
    bottom: 15px;
    display: flex;
    gap: 20px;
}

.buttons span{
    position: relative;
    width: 50px;
    height: 50px;
    background: #111;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.buttons span::before{
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    border-top: 4px solid #fff;
    border-left: 4px solid #fff;
    transform: rotate(315deg) translate(2px,2px);
}

.buttons span:nth-child(2)::before{
    transform: rotate(135deg) translate(2px,2px); 
}

.buttons span:active{
    opacity: 0.5s;
}

.content{
    position: relative;
    padding: 40px;
    max-width: 600px;
    transition: 0.25s;
    transition-delay: 0s;
    transform: translateY(40px);
    z-index: 10000;
    opacity: 0;
}

.content h1{
    font-size: 4em;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.652);
    animation: animate 1s ease-in-out 1 forwards ;
}

.content p{
    margin-top: 10px;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.652);
    animation: animate 1s ease-in-out 0.6s 1 forwards;
}

 .slider .slides:nth-child(1) .content,
 .slider .slides:nth-child(2) .content{
    opacity: 1;
    transform: rotateY(0px);
    transition-delay: 0.5s;
 }

 .button.back {
    background-color: #002769;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.2s ease;
    bottom: 8px;
    margin-bottom: -150px;

    position: absolute;   
    left: 50%;              
    transform: translateX(-50%);
    width: fit-content;
}

.button.back::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000c4d 0%, #065c84 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.button.back:hover::before {
    opacity: 1;
}

.button.back::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.button.back:focus:not(:active)::after {
    animation: ripple 0.6s ease-out;
}

 @media (max-width: 900px){
    .slider{
        position: absolute;
        inset: 40px 40px 200px 40px;
    }
   
    .slider .slides{
        width: 100px;
        height: 100px;
        top: initial;
        bottom: -170px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.25);
    }

    .slider .slides:nth-child(1),
    .slider .slides:nth-child(2){
        top: initial;
        bottom: 0px;
    }

    .slider .slides:nth-child(3){
        left: 0;
    }

    .slider .slides:nth-child(4){
        left: 120px;
    }

    .slider .slides:nth-child(5){
        left: 240px;
    }

     .slider .slides:nth-child(6){
        left: 360px;
    }
 }