.portfolio {
    padding: 20px;
    position: relative;
    /* Make sure it's above others */
    background-color: #131313;
    overflow: visible;
}

.carousel-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(19, 19, 19, 1) 0%, rgba(19, 19, 19, 0.75) 19%, rgba(19, 19, 19, 0.51) 30%, rgba(19, 19, 19, 0.28) 46%, rgba(19, 19, 19, 0) 68%);
    pointer-events: none;
    z-index: 2;
    /* Ensure it's on top of internal content */
}

.carousel-container {
    position: relative;
    margin: 100px auto 0px auto;
    overflow: visible;
    z-index: 1;
}


.carousel {

    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel-slide {
    display: flex;
    margin-right: 20px;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 100px;
    flex: 0 0 60%;

    scroll-snap-align: center;
    border-radius: 30px;
    text-align: center;
    height: 450px;
    max-width: 850px;
    position: relative;
    z-index: 1;
}

 .color-slide{
    height: 350px !important;
 }

.carousel-slide::before {
    border-radius: 30px;
    flex: 0 0 20%;
    height: 250px;
    max-width: 900px;
    content: "";
    position: absolute;
    z-index: -1;
    top: 70px;
    bottom: -20px;
    left: 0px;
    right: 0px;
    background-color: var(--bg-color, #eee);
    transform: rotate(var(--rotate-angle, 0deg));
    transition: transform 0.3s ease;
    transform-origin: center center;
    background-image: var(--bg-image), none;
    background-size: cover;
    background-position: center;

}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: -50px;
    width: 100%;
}

.nav-buttons button {
    padding: 10px;
    cursor: pointer;
}

.indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    position: static;
}

.indicator {
    width: 10px;
    height: 10px;
    background: gray;
    border-radius: 50%;
    cursor: pointer;
}

.indicator.active {
    background: var(--orange-01);
}

.carousel-slide .slide-text {
    top: 50%;
    position: relative;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: left;
    padding-left: 25px;
    color: white;
    z-index: 99;
}

.testimonials-carousel .carousel-slide p {
    margin: 10px 20px;
    transform: rotate(var(--rotate-angle, 0deg));
    transition: transform 0.3s ease;
}

.slide-text::before {
    content: "";
    background: linear-gradient(0deg, rgba(19, 19, 19, 1) 0%, rgba(19, 19, 19, 1) 35%, rgba(19, 19, 19, 0.85) 65%, rgba(19, 19, 19, 0.4) 90%, rgba(19, 19, 19, 0) 99%);
    position: absolute;
    top: 5px;
    left: -10px;
    right: -10px;
    width: 100vw !important;
    height: 150%;
    z-index: -1;
}



@media (max-width: 768px) {
    .carousel-slide {
        height: 550px !important;
        padding-left: 20px;
        padding-right: 20px;
        min-width: 300px;
    }

    .carousel-slide::before {
        height: 450px;
        min-width: 300px;
    }

    .slide-text::before {
        content: "";
        background: linear-gradient(0deg, rgba(19, 19, 19, 1) 0%, rgba(19, 19, 19, 1) 40%, rgba(19, 19, 19, 0.85) 70%, rgba(19, 19, 19, 0.7) 90%, rgba(19, 19, 19, 0) 99%);
        left: -30px;
        top: -10px;
        width: 120vw !important;
        backdrop-filter: blur(1px);

    }
}