.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1500px; /* Maximum width to keep it reasonable */
    margin: auto; /* Center align */
    overflow: hidden;
}

.carousel {
    display: flex;
    transition: transform 0.5s ease-in-out; /* Adjusted for smoother transition */
}

.carousel-inner {
    display: flex;
    width: 100%;
}

.carousel-item {
    flex: 0 0 33.33%; /* Each item should take up exactly one-third of the container width */
    padding: 0 7.5px; /* Add padding for spacing between items */
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-color: black;
    border-style: solid;
    border-width: 3px;
    border-radius: 15px; /* Rounded corners */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for hover effects */
}

.carousel-item:hover img {
    transform: scale(1.05); /* Scale up on hover */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); /* Add shadow effect */
}

.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    color: #fff; /* White color */
    border: none; /* No border */
    padding: 10px; /* Padding for better appearance */
    cursor: pointer; /* Change cursor to pointer */
    z-index: 1; /* Ensure they are above images */
}

.carousel-control-prev {
    left: 10px;
}

.carousel-control-next {
    right: 10px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.3); /* Lighter background on hover */
    transform: scale(1.1); /* Scale up slightly */
    transition: transform 0.3s ease, background 0.3s ease; /* Smooth transition */
}

.controls {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.controls button {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .carousel-container {
        width: 100% !important;
        max-width: none;
        margin: 0 auto;
        overflow: hidden;
    }

    .carousel {
        display: flex;
        transition: transform 0.5s ease-in-out;
        width: 100%;
    }

    .carousel-inner {
        display: flex;
        transition: transform 0.5s ease-in-out;
        gap: 10px; /* Adjusted spacing between items */
        width: 100%;
    }

    .carousel-item {
        flex: 0 0 calc(100% - 10px); /* Each item takes up full width of the container */
        padding-bottom: 56.25%; /* Aspect ratio for images (16:9) */
        position: relative;
    }

    .carousel-item img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover; /* Ensures images cover the container without distortion */
        border-color: black;
        border-style: solid;
        border-width: 3px;
        border-radius: 15px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0, 0, 0, 0.5);
        color: #fff;
        border: none;
        padding: 10px;
        cursor: pointer;
        z-index: 1;
    }

    .carousel-control-prev {
        left: 10px;
    }

    .carousel-control-next {
        right: 10px;
    }

    .carousel-control-prev:hover,
    .carousel-control-next:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(1.1);
        transition: transform 0.3s ease, background 0.3s ease;
    }
}
