/* CSS per il Carosello 3D */
.carousel-container {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 600px; /* Aumentato per un carosello più grande */
    height: 400px; /* Aumentato per un carosello più grande */
   /*  margin: 50px auto; */
}

.carousel {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    transition: transform 0.8s ease-in-out;
}

.carousel-item {
    position: absolute;
    width: 320px; /* Dimensioni dell'immagine centrale */
    height: 320px;
    top: 40px; /* Centra verticalmente */
    left: 140px; /* Centra orizzontalmente */
    overflow: hidden;
    transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    /* box-shadow: 0 10px 20px rgba(0,0,0,0.1); */
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.3);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    font-size: 24px;
    line-height: 1;
    transition: background-color 0.3s ease;
}

.carousel-button:hover {
    background-color: rgba(0,0,0,0.6);
}

.carousel-button.prev {
    left: -20px;
}

.carousel-button.next {
    right: -20px;
}

/* Media Query per la responsività */
@media (max-width: 768px) {
    .carousel-container {
        width: 100%;
        height: 300px;
    }

    .carousel-item {
        width: 200px;
        height: 200px;
        left: calc(50% - 100px);
    }

    .carousel-button {
        display: none; /* Nasconde le frecce su mobile */
    }
}

/* Stili per la hero section per contenere il nuovo layout */
.hero {
    padding: 2rem 1rem;
    text-align: center;
    /* background-color: #f8f8f8; */
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;

}

.hero .hero-text {
    max-width: 100%;
    margin-bottom: 2rem;
}

.hero-sub {
    font-size: 1.1rem;
    color: #666;
    font-size: 1.1rem;
    padding-bottom: 2.5rem;

}

@media (min-width: 992px) {
    .hero-content {

        justify-content: space-between;

    }

    .hero .hero-text {
        flex: 1;
        max-width: 45%;
  
        margin-bottom: 0;
    }

    .carousel-container {
        flex: 1;
        max-width: 55%;
        height: 500px; /* Aumento l'altezza per desktop */
        margin: 2rem auto;
    }

    .carousel-item {
        width: 400px; /* Immagini più grandi per desktop */
        height: 400px;
        top: 50px;
        left: calc(50% - 200px); /* Centratura dinamica */
    }
    
    .carousel-button.prev {
        left: -60px; /* Allargo la posizione delle frecce */
    }

    .carousel-button.next {
        right: -60px; /* Allargo la posizione delle frecce */
    }
}

/* Stili per i puntini di navigazione */
.carousel-dots {
    text-align: center;
    padding: 10px 0;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 5px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: black;
}
