
/* Home: CTA Chi siamo nascosta, recuperabile rimuovendo questa regola. */
.home .slider-content .bde-button__button {
    display: none;
}
.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    margin: auto;
    padding-top: 6.25rem;
}

.custom-slider {
    display: flex;
    overflow: hidden;
    position: relative;
    height: 30rem; /* Adjusted height for smaller images */
    width: 100%;
}

.slider-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    transition: opacity 0.8s ease-in-out;
    will-change: opacity;
}

.slider-content h2, .slider-content p {
    color: var(--bde-palette-color-1-bda476eb-f904-4b09-ab28-f60f0e200c1c) !important;
}

.slider-content {
    position: absolute;
    left: 0;
    width: 50%; /* Static content occupies 50% of the slider */
    max-width: 50%;
    padding: 20px;
    color: var(--bde-palette-color-1-bda476eb-f904-4b09-ab28-f60f0e200c1c);
    z-index: 10;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center text and button */
    height: 100%; /* Match parent container height */
}

.slider-images {
    position: absolute;
    right: 0;
    width: 45%; /* Images occupy the right half */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
    color: white !important; /* Ensure title is white */
}

.slider-subtitle {
    font-size: 18px;
    margin-bottom: 20px;
    color: white;
}

.slider-button {
    display: inline-block;
    background-color: transparent;
    color: #ff8300; /* Button text color */
    text-decoration: none;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #ff8300; /* Button outline */
    border-radius: 30px; /* Creates a pill-shaped button */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.slider-button:hover {
    background-color: #ff8300;
    color: white; /* Change text color on hover */
}

.slider-image img {
    max-width: 80%; /* Keep images smaller */
    height: auto;
    border-radius: 10px;
}

.slider-image {
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
}

.slider-image.image-three {
    z-index: 4; /* Higher z-index to place it on top of image-one */
    animation: moveImageThree 5s ease-in-out infinite;
}

.slider-image.image-one {
    z-index: 3; /* Lower z-index so image-three appears above */
    animation: moveImageOne 5s ease-in-out infinite;
}

.slider-image.image-two {
    z-index: 2; /* Keep image-two behind the other two */
    animation: moveImageTwo 5s ease-in-out infinite;
}

@keyframes moveImageOne {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5px, -5px); }
}

@keyframes moveImageTwo {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(0, -5px); }
}

@keyframes moveImageThree {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-5px, 5px); }
}

/* Mobile Version */
@media screen and (max-width: 768px) {
    .slider-content {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center;
        padding: 0 20px;
        margin-top: 20px;
        display: flex; 
        flex-direction: column; 
        justify-content: center; 
        align-items: center; 
    }

    .slider-button {
        display: inline-block;
        margin: 10px auto; 
        text-align: center; 
    }

    .slider-wrapper {
        height: 200px !important;
        flex-direction: column; /* Stack elements vertically */
        padding-top: 4rem; /* Adjust padding */
    }

    .custom-slider {
        display: none !important;
    }

    .slider-item {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%; /* Full width on mobile */
        height: auto; /* Adjust height dynamically */
        opacity: 0; /* Hide non-active slides */
        z-index: 0; /* Push non-active slides back */
        transition: opacity 0.5s ease, z-index 0.5s ease;
    }

    .slider-item.active {
        opacity: 1;
        z-index: 1;
    }

    .slider-images {
        position: relative;
        width: 100%; /* Full width on mobile */
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 20px; /* Add spacing */
    }

    .slider-image img {
        max-width: 100%;
        height: auto; /* Keep aspect ratio */
        display: block;
        margin: 0 auto; /* Center the image */
    }

    .slider-title {
        font-size: 45px !important;
        color: white !important;
        margin-bottom: 10px;
    }

    .slider-subtitle {
        font-size: 16px;
        color: white;
        margin-bottom: 20px;
    }

}


/* Pulsante Conosciamoci meglio: spazio verticale stabile, anche nel layout mobile. */
.slider-content .bde-button__button {
    padding: 18px 24px;
    min-height: 56px;
    flex-shrink: 0;
}
