/* carrousel*/

.carrousel{
    margin-top: -50px;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.carrousel .list .item{
    position: absolute;
    inset: 0 0 0 0;
}

.carrousel .list .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    pointer-events: none;
    object-position: top;
    transition: filter .2s ease-in-out;
}

.carrousel .list .item:nth-child(1) img,
.thumbnail .item:nth-child(1) img{
    object-position: top;
}

.carrousel .list .item .content{
    position: absolute;
    top: 20%;
    width: 1140px;
    max-width: 80%;
    left: 50%;
    transform: translateX(-50%);
    padding-right: 30%;
    color:var(--neutral2);
    text-shadow: 0 5px 10px #004;

}

.carrousel .list .item .content .author{
    font-weight: bold;
    letter-spacing: 10px;    
}

.carrousel .list .item .content .title,
.carrousel .list .item .content .topic{
    font-weight: bold;
    font-size: 5em;
    line-height: 1.3em;
}

.carrousel .list .item .content .topic{
    color: var(--neutral1);
}

.carrousel .list .item .content .buttons{
    display: grid;
    grid-template-columns: repeat(2,130px);
    grid-template-rows: 40px;
    gap: 5px;
    margin-top: 20px;
}

.carrousel .list .item .content .buttons button{
    border: none;
    background-color: var(--anchor);
    letter-spacing: 3px;
    font-weight: 500;
    transition: background-color .2s ease-in-out;
    border-radius: 6px;
    z-index: 100;
    cursor: pointer;
}

.carrousel .list .item .content .buttons button:nth-child(2) {
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--neutral1);
    border: 1px solid var(--neutral1);
}

.carrousel .list .item .content .buttons button a{
    text-decoration: none;
    color: var(--neutral1);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    transition: background-color .2s ease-in-out, color .2s ease-in-out;
    border-radius: 6px;
    font-weight: 500;
}

.carrousel .list .item .content .buttons button:nth-child(2) a{
    color: var(--netrual1);
}

.carrousel .list .item .content .buttons button:hover a{
    background-color: var(--CTA);
    color: var(--neutral1);
    border: 1px solid var(--neutral1);
}


/* Thumbnail */
.thumbnail{
    position: absolute;
    bottom: 50px;
    left: 50%;
    width: max-content;
    z-index: 100;
    display: flex;
    gap:20px;
}

.thumbnail .item{
    width: 150px;
    height: 220px;
    flex-shrink: 0;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.thumbnail .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    overflow: hidden;
}

.thumbnail .item .content{
    position: absolute;
    bottom:0px;
    left: px;
    right:0px;
    width: 100%;
    background: rgba(250,250,250,0.8);
    color: var(--mainColor);
    padding: 10px;
    text-align: center;
}

.thumbnail .item .content .title{
    font-weight: bold;
}

/* arrow*/
.arrows{
    position: absolute;
    top: 80%;
    right: 52%;
    width: 300px;
    max-width: 30%;
    display: flex;
    gap: 10px;
    cursor: pointer;
    z-index: 100;
}

.arrows button{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--anchor);
    border: none;
    color: var(--neutral1);
    font-weight: bold;
    font-size: large;
    transition: .5s;
    cursor: pointer;
}

.arrows button:hover{
    background-color: var(--CTA);
    color: var(--neutral1);
}

.carrousel .list .item:nth-child(1){
    z-index: 1;
}

.carrousel .list .item:nth-child(1) .author,
.carrousel .list .item:nth-child(1) .title,
.carrousel .list .item:nth-child(1) .topic,
.carrousel .list .item:nth-child(1) .desc,
.carrousel .list .item:nth-child(1) .buttons{
    transform: translateY(50px);
    filter: blur(20px);
    opacity: 0;

    animation: showContent .5s 1s linear forwards;
}

@keyframes showContent {
    to{
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);

    }
    
}

.carrousel .list .item:nth-child(1) .title{
    animation-delay: 1.2s;
}

.carrousel .list .item:nth-child(1) .topic{
    animation-delay: 1.4s;
}

.carrousel .list .item:nth-child(1) .desc{
    animation-delay: 1.6s;
}

.carrousel .list .item:nth-child(1) .buttons{
    animation-delay: 1.8s;
}

/* Effect next click*/
.carrousel.next .list .item:nth-child(1) img{

    width: 150px;
    height: 220px;
    position: absolute;
    left: 50%;
    bottom: 50px;
    border-radius: 20px;
    animation: showImage 0.5s linear 1 forwards;
}

@keyframes showImage {
    to{
        width: 100%;
        height: 100%;
        left: 0;
        bottom: 0;
        border-radius: 0;
    }     
}

.carrousel.next .thumbnail .item:nth-last-child(1){
    width: 0;
    overflow: hidden;
    animation: showThumbnail .5s linear 1 forwards;
}

@keyframes showThumbnail {
    to{
        width:150px;
    }    
}

.carrousel.next .thumbnail{
    transform: translateX(150px);
    animation: transformThumbnail .5s linear 1 forwards;
}

@keyframes transformThumbnail{
    to{
        transform: translateX(0);
    }
}

/* Effect prev click*/

.carrousel.prev .list .item:nth-child(2){
    z-index: 2;
}

.carrousel.prev .list .item:nth-child(2) img{
    position: absolute;
    bottom: 0;
    left: 0;
    animation: outImage 0.5s linear 1 forwards;
}

@keyframes outImage {
    to{
        width: 150px;
        height: 220px;
        border-radius: 20px;
        left: 50%;
        bottom: 50px;
    }    
}

.carrousel.prev .thumbnail .item:nth-child(1){
    width: 0;
    overflow: hidden;
    opacity: 0;
    animation: showThumbnail 0.5s linear 1 forwards;
}


.carrousel .list .item:nth-child(2) .author,
.carrousel .list .item:nth-child(2) .title,
.carrousel .list .item:nth-child(2) .topic,
.carrousel .list .item:nth-child(2) .desc,
.carrousel .list .item:nth-child(2) .buttons{
    animation: contentOut 1.5s linear 1 forwards;
}

@keyframes contentOut {
    to{
        transform: translateY(-150px);
        filter: blur(20px);
        opacity: 0;
    }
}

.carrousel.next .arrows button,
.carrousel.prev .arrows button{
    pointer-events: none;
}

.time{
    width: 0%;
    height: 5px;
    background-color: var(--mainColor);
    position: absolute;
    z-index: 100;
    top:0;
    left: 0;
}

.carrousel.next .time, 
.carrousel.prev .time{
    width: 100%;
    animation: timeRunning 2s linear 1 forwards;
}

@keyframes timeRunning {
    to{
        width: 0;
    }    
}

@media screen and (max-width:678px){

    .carrousel {
        margin-top: 0;
        height: calc(100vh - 80px);
        width: 100%;
    }

    .carrousel .list{
        height: 100%;
        
    }

    .carrousel .list .item .content{
        top: 10%;
    }

    .carrousel .list .item .content{
        padding-right: 0;        
    }

    .carrousel .list .item .content .title{
        font-size: 30px;
    }

    .carrousel .list .item .content .title,
    .carrousel .list .item .content .topic{
    font-size: 3em;
    }

    .thumbnail{
        bottom: 10px;
    }

    @keyframes outImage {
        to{
            width: 150px;
            height: 220px;
            border-radius: 20px;
            left: 50%;
            bottom: 10px;
        }    
    }
}

@media screen and (max-height:619px) {
    .thumbnail{

        display: none;
    }

    .carrousel .list .item .content .title,
    .carrousel .list .item .content .topic{
    font-size: 1em;
    }
    
}





