.carousel {
    position: relative;
    max-width: 800px;
    margin: 24px auto;
    overflow: hidden;
    -webkit-border-radius: 5px;
            border-radius: 5px;
    -webkit-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.carousel-inner {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-transition: -webkit-transform 0.5s ease;
    transition: -webkit-transform 0.5s ease;
    -o-transition: transform 0.5s ease;
    transition: transform 0.5s ease;
    transition: transform 0.5s ease, -webkit-transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    display: none; /* Hide all items by default */
    position: relative;
    margin: 0; /* Remove any default margin */
    padding: 0; /* Remove any default padding */
}

.carousel-item.active {
    display: block; /* Show the active item */
}

.carousel-item img {
    width: 100%;
    display: block;
    margin: 0; /* Ensure no margin around the image */
    padding: 0; /* Ensure no padding around the image */
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    text-align: center;
    font-size: 1em;
    opacity: 0;
    -webkit-transition: opacity 0.5s ease;
    -o-transition: opacity 0.5s ease;
    transition: opacity 0.5s ease;
}

.carousel-item:hover .carousel-caption {
    opacity: 1; /* Show caption on hover */
}

.carousel-control {
    position: absolute;
    top: 50%;
    width: auto;
    padding: 10px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    -webkit-transform: translateY(-50%);
        -ms-transform: translateY(-50%);
            transform: translateY(-50%);
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}
