/* Carousel Section */
.carousel-section {
    margin: 2rem 0;
}

.carousel-container {
    width: 100%;
    background: #f8f9fa;
    padding: 2rem 0;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
    /* Increased height */
    overflow: hidden;
}

/* Main carousel container */
#mainCarousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: block !important;
    background-color: #f8f9fa;
}

/* Carousel inner */
#mainCarousel .carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Carousel item container */
#mainCarousel .carousel-item {
    position: relative;
    width: 100%;
    height: 100%;
    display: none;
    float: left;
    margin-right: -100%;
    backface-visibility: hidden;
}

#mainCarousel .carousel-item.active {
    display: block;
    z-index: 1;
}

/* Image styling */
#mainCarousel .carousel-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block !important;
}

/* Caption styling */
#mainCarousel .carousel-caption {
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 8px;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 800px;
    z-index: 2;
}

.carousel-caption h5 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-caption p {
    color: #fff;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin-bottom: 0;
}

/* Control buttons */
#mainCarousel .carousel-control-prev,
#mainCarousel .carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    opacity: 0.7;
    transition: all 0.3s ease;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    text-decoration: none;
}

#mainCarousel .carousel-control-prev {
    left: 30px;
}

#mainCarousel .carousel-control-next {
    right: 30px;
}

#mainCarousel .carousel-control-prev:hover,
#mainCarousel .carousel-control-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
}

/* Custom control icons */
#mainCarousel .carousel-control-prev-icon,
#mainCarousel .carousel-control-next-icon {
    display: none;
    /* Hide default icons */
}

#mainCarousel .carousel-control-prev::after {
    content: "<";
    font-size: 24px;
    font-weight: bold;
}

#mainCarousel .carousel-control-next::after {
    content: ">";
    font-size: 24px;
    font-weight: bold;
}

/* Indicators */
#mainCarousel .carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    list-style: none;
}

#mainCarousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

#mainCarousel .carousel-indicators button.active {
    background-color: #fff;
    transform: scale(1.2);
}

/* Event carousel specific styles */
#eventCarousel {
    position: relative;
    width: 100%;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

#eventCarousel .carousel-item {
    text-align: center;
}

#eventCarousel .carousel-item img {
    margin: 0 auto;
    max-width: 100%;
}

#eventCarousel .carousel-text {
    padding: 1rem 0;
}

#eventCarousel .carousel-text h5 {
    color: #333;
    margin-bottom: 0.5rem;
}

#eventCarousel .carousel-text p {
    color: #666;
    font-size: 0.9rem;
}

#eventCarousel .carousel-control-prev,
#eventCarousel .carousel-control-next {
    position: absolute;
    width: 40px;
    height: 40px;
    top: calc(100px);
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    opacity: 0.7;
    transition: all 0.3s ease;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

#eventCarousel .carousel-control-prev:hover,
#eventCarousel .carousel-control-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .carousel-wrapper {
        height: 400px;
        /* Adjusted mobile height */
    }

    #mainCarousel .carousel-caption {
        bottom: 10%;
        padding: 15px;
        width: 90%;
    }

    #mainCarousel .carousel-caption h5 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    #mainCarousel .carousel-caption p {
        font-size: 0.9rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    #mainCarousel .carousel-control-prev,
    #mainCarousel .carousel-control-next {
        width: 40px;
        height: 40px;
    }

    #mainCarousel .carousel-control-prev {
        left: 15px;
    }

    #mainCarousel .carousel-control-next {
        right: 15px;
    }
}