.carousel-container {
    width: calc(80vw + 1.25rem);
    height: calc(52vh + 1.25rem);
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    background: #fff;
    margin: 6.25rem auto;
}

.carousel-container .carousel {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.carousel-container .carousel-item {
    position: absolute;
    height: 86%;
    top: 7%;
    background-size: cover;
    background-position: center;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
    box-shadow: 0 0px 10px rgba(0, 0, 0, 0.5);
}

.carousel-container .carousel-item.active {
    width: 60%;
    height: 100%;
    top: 0;
    left: 20%;
    z-index: 10;
    transform: none;
    box-shadow: 0 0px 10px rgba(0, 0, 0, 0.2);
}

.carousel-container .carousel-item:hover .carousel-image {
    transform: scale(1.05);
}

.carousel-container .carousel-item.prev {
    width: 50%;
    left: 0;
    z-index: 5;
    opacity: 0.85;
    filter: brightness(0.4);
}

.carousel-container .carousel-item.next {
    width: 50%;
    left: 50%;
    z-index: 5;
    opacity: 0.85;
    filter: brightness(0.4);
}

.carousel-container .carousel-item.hidden {
    opacity: 0;
    pointer-events: none;
}

.carousel-container .carousel-image {
    position: absolute;
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-container .carousel-caption {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 18%;
    background: linear-gradient(to top, rgba(160, 0, 0, 0.85), rgba(160, 0, 0, 0.75));
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 0px 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 12;
    overflow: hidden;
}

.carousel-container .carousel-item.active .carousel-caption {
    height: 24%;
}

.carousel-container .carousel-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .375rem;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.carousel-container .carousel-item.active .carousel-title {
    font-size: 20px
}

.carousel-container .carousel-subtitle {
    font-size: 0.8rem;
    opacity: 0.92;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.carousel-container .carousel-item.active  .carousel-subtitle {
    font-size: 1rem;
}

.carousel-container .carousel-item.prev:hover,
.carousel-container .carousel-item.next:hover {
    filter: brightness(0.6);
}

@media (max-width: 768px) {
    .carousel-container {
        width: 88vw !important;
        box-sizing: border-box;
        height: 30vh !important;
        margin: 4.25rem auto !important;
    }

    .carousel-container .carousel-item.active {
        width: 88%;
        left: 6%;
    }

    .carousel-container .carousel-item .carousel-image {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
    }

    .carousel-container .carousel-caption {
        height: 30% !important;
        padding: 0 1rem !important;
    }

    .carousel-container .carousel-item.active .carousel-caption {
        height: 28% !important;
        padding: 0 2rem !important;
    }

    .carousel-container .carousel-title {
        font-size: 0.8rem !important;
    }

    .carousel-container .carousel-item.active .carousel-title {
        font-size: 1.1rem !important;
    }

    .carousel-container .carousel-subtitle {
        font-size: 0.5rem !important;
    }

    .carousel-container .carousel-item.active  .carousel-subtitle {
        font-size: 0.9rem !important;
    }
}