.containerr {
    width: 100%;
    aspect-ratio: 16 / 9; /* Default aspect ratio for smaller screens */
    margin: 0px auto;
    margin-top: 37px;
    position: relative;
}

.carousel .containerr .sliderr .slide {
    position: relative;
}

.carousel .containerr .sliderr .slide .slider-text {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 18px;
    font-family: Arial, sans-serif;
    text-align: center;
    max-width: 80%;
    display: block;
}

.carousel .containerr .sliderr .slide img {
    width: 100%;
    height: auto;
    display: block;
}

.carousel .containerr .sliderr .slide:not(.active) .slider-text {
    display: none;
}

.sliderr {
    width: 100%;
    aspect-ratio: 16 / 9; /* Default aspect ratio for smaller screens */
    border-radius: 10px 10px 0 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.sliderr img {
    width: 100%;
    height: 100%; /* Ensure the image fills the container */
    object-fit: contain; /* Ensures the entire image is visible without cropping */
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateX(100%);
    border-radius: 15px;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.sliderr img.active {
    opacity: 1;
    transform: translateX(0);
}

.sliderr img.previous {
    transform: translateX(-100%);
}

.navigation-button {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
}

.line {
    cursor: pointer;
    height: 10px;
    width: 10px;
    margin: 0 5px;
    background-color: #777;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s, transform 0.3s;
}

.line.active {
    background-color: #ffffff;
    transform: scale(1.2);
}

.nav-button {
    position: absolute;
    top: 50%;
    background-color: rgba(134, 129, 129, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    padding: 15px;
    z-index: 10;
    transition: background-color 0.3s, transform 0.3s;
    transform: translateY(-50%);
}

.nav-button:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.prev {
    left: 15px;
}

.next {
    right: 15px;
}
.slide {
    position: relative;
}

.slide img {
    width: 100%;
    height: auto;
    display: block;
}

.slider-text {
    position: absolute;
    bottom: 40px; /* Adjust as needed */ 
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5); 
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    font-size: 20px;
    font-family: 'Open Sans', sans-serif; 
    text-align: center;
    opacity: 0; 
    transform: translateY(20px); 
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out; 
  }
  
  /* This is the key change: Apply the transitions to the active slide */
  .slide.active .slider-text {
    opacity: 1;
    transform: translateY(0);
}
@media (max-width: 890px) {
    .nav-button {
        font-size: 22px;
        padding: 11px;
    }

    .navigation-button {
        bottom: 12px;
    }

    .line {
        height: 9px;
        width: 9px;
    }
}

@media (max-width: 700px) {

    .containerr {
        width: 100%;
    }

    .navigation-button {
        bottom: 10px;
    }

    .line {
        height: 7px;
        width: 7px;
    }

    .nav-button {
        font-size: 14px;
        padding: 7px;
    }

}

/* Adjust for larger screens */
@media (min-width: 1024px) {
    .containerr, .sliderr {
        aspect-ratio: 18 / 9; /* Wider and shorter aspect ratio for desktops */
        max-width: 1300px; /* Reduce the width for large screens */
        margin-left: auto;
        margin-right: auto;
    }
}
