/* Hero Carousel Styles */
.before-after {
    position: relative;
    padding: 0;
    height: 65vh; /* Hauteur réduite */
    overflow: hidden;
}

.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    /* Use will-change to hint the browser to optimize this element */
    will-change: opacity;
    /* Use a more performant transition property */
    transition: opacity 0.8s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Improve paint performance */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.hero-slide.active {
    opacity: 1;
    /* Ensure this element is rendered with high priority */
    content-visibility: auto;
    contain-intrinsic-size: 100%;
}

.hero-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    color: #fff;
}



.hero-content h2:after {
    background-color: #fff;
}

/* Suppression des contrôles de navigation */

@media (max-width: 768px) {
    .before-after {
        height: 55vh; /* Hauteur réduite pour mobile */
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
}
