/* -- SLIDER 3D -- */

.banner{
    width: calc(100% + 80px); /* per compensare padding */
    height: 75vh;
    text-align: center;
    padding-top: 2rem;
    margin: -30px 0 0 -40px; /* per compensare padding */
    position: relative;
    background: url(./slider-background.webp) no-repeat center;
    background-size: cover;
}
.banner .slider{
    position: absolute;
    width: 200px;
    height: 250px;
    top: 10%;
    left: calc(50% - 100px);
    transform-style: preserve-3d;
    transform: perspective(1000px);
    animation: autoRun 20s linear infinite;
    z-index: 2;
}
.banner .slider:hover{
    animation-play-state: paused;
}
@keyframes autoRun{
    from{
        transform: perspective(1000px) rotateX(-19deg) rotateY(360deg);
    }to{
        transform: perspective(1000px) rotateX(-19deg) rotateY(0deg);
    }
}

.banner .slider .item{
    position: absolute;
    inset: 0 0 0 0;
    aspect-ratio: 1/1;
    transition: opacity 0.2s;
    transform: 
        rotateY(calc( (var(--position) - 1) * (360 / var(--quantity)) * 1deg))
        translateZ(400px);
}
.banner .slider:hover .item:not(:hover){
    opacity: 0.5;
}
.banner .slider .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.banner .slider .item p{
    text-transform: uppercase;
    text-align: center;
    background-color: #ffffff00;
    transition: all 0.3s;
    position: absolute;
    inset: 0 0 0 0;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    & span{
        font-size: 1.2rem;
        font-weight: 400;
        color: #fff;
        transition: all 0.3s;
        text-shadow: #000 1px 1px 4px;
    }
    & a {
        position: absolute;
        inset: 0 0 0 0;
        z-index: 3;
    }
}
.banner .slider .item:hover p{
    background-color: #fefbf4;
    & span {
        color: #000;
        text-shadow: #1c687a 1px 1px 4px;
    }
}
.banner .lamp{
    position: absolute;
    width: 300px;
    top: calc(10% + 100px);
    left: calc(50% - 150px);
}
@media screen and (max-width: 1023px) {
    .banner .slider{
        width: 160px;
        height: 200px;
        left: calc(50% - 80px);
    }
    .banner .slider .item{
        transform: 
            rotateY(calc( (var(--position) - 1) * (360 / var(--quantity)) * 1deg))
            translateZ(300px);
    }
}
@media screen and (max-width: 767px) {
    .banner .slider{
        width: 100px;
        height: 150px;
        left: calc(50% - 50px);
    }
    .banner .slider .item{
        transform: 
            rotateY(calc( (var(--position) - 1) * (360 / var(--quantity)) * 1deg))
            translateZ(180px);
    }
}