/* carousel.css */

.displayCarousel {
    position: relative;
    height: 500px; /* Maintain fixed height */
    width: auto; /* Allow width to adjust to content */
    max-width: 100%; /* Ensure it doesn't exceed container width */
    overflow: hidden;
    border: 1px solid #666;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    margin: 0 auto; /* Center the carousel if it's narrower than the container */
    user-select: none;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
    width: 100%; /* Ensure inner container spans full width */
}

.carousel-item {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
}

.carousel-item-image-wrapper {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.carousel-item video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.carousel-item-caption {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,1) 0%,rgba(0,0,0,0.5) 70%, rgba(0,0,0,0) 100%);
    color: #fff;
    padding: 15px 20px;
    box-sizing: border-box;
    z-index: 10;
    max-height: 200px;
    overflow: hidden;
    text-overflow: ellipsis;

    /* text glow */
    text-shadow: 0 0 4px #000;

    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.carousel-item-caption:hover {
    color: transparent;
    /* move the background out of bview */
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 100%);
    text-shadow: none;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.carousel-control {
    background-color: rgba(68, 68, 68, 0.7);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 10px;
    transition: background-color 0.2s ease;
}

.carousel-control:hover {
    background-color: rgba(85, 85, 85, 0.9);
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.carousel-indicator.active {
    background-color: #fff;
}