.hero-carousel {
    position: relative;
    width: 100%;
    height: 400px; /* Adjust as needed */
    overflow: hidden; /* Ensures only one slide is visible at a time */
}

.carousel-inner {
    display: flex; /* Makes children (carousel-item) lay out in a row */
    /* *** THIS IS THE KEY CHANGE *** */
    width: 300%; /* If you have 3 items, it's 300%. If 4, it's 400%, etc. */
    /* For a truly dynamic number of items, you'd need to set this via JS,
       but for a fixed 3, CSS is simpler and ensures it's applied immediately. */
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    flex: 0 0 33.33%; /* Now, each item takes 1/3rd of the 300% inner width */
    /* This makes sure each item correctly occupies 100% of the visible container's width */
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.carousel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    z-index: 1;
    background-repeat: no-repeat;
}

.carousel-item .carousel-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.carousel-content {
    position: relative;
    z-index: 2;
    color: gold;
    padding: 20px;
    text-align: right;
    max-width: 60%;
    margin-right: 5%;
    box-sizing: border-box;
}

.arabic-verse {
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-size: 2.2em;
    line-height: 1.6;
    direction: rtl;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Horiz, Vert, Blur, Color */
}

/* Carousel Controls */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #000;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 10;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}