/* Carousel Styles */
.hero-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 30px;
}

/* Basic carousel structure */
.carousel {
    position: relative;
    width: 100%;
}

.carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-item {
    position: relative;
    height: 500px; /* Adjust height as needed */
    width: 100%;
    float: left;
    margin-right: -100%;
    backface-visibility: hidden;
    transition: transform .6s ease-in-out;
    display: none; /* Hide by default, JS will show active */
}

.carousel-item.active {
    display: block;
}

.carousel-item img {
    width: 100% !important;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    color: white;
    padding: 20px;
    text-align: center;
    width: 100%;
    z-index: 10;
}

.caption-content {
    max-width: 800px;
    margin: 0 auto;
}

.carousel-caption h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.carousel-description {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 15%;
    color: #fff;
    text-align: center;
    opacity: 0.5;
    transition: opacity 0.15s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.carousel-control-prev {
    left: 0;
}

.carousel-control-next {
    right: 0;
}

.carousel-control-prev:hover,
.carousel-control-prev:focus,
.carousel-control-next:hover,
.carousel-control-next:focus {
    color: #fff;
    text-decoration: none;
    outline: 0;
    opacity: 0.9;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: 100% 100%;
}

.carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e");
}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e");
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 15;
    display: flex;
    justify-content: center;
    padding-left: 0;
    margin-right: 15%;
    margin-left: 15%;
    margin-bottom: 1rem;
    list-style: none;
}

.carousel-indicators button {
    box-sizing: content-box;
    flex: 0 1 auto;
    width: 30px;
    height: 3px;
    margin-right: 3px;
    margin-left: 3px;
    text-indent: -999px;
    cursor: pointer;
    background-color: #fff;
    background-clip: padding-box;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    opacity: .5;
    transition: opacity .6s ease;
    border: none;
}

.carousel-indicators button.active {
    opacity: 1;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Full width carousel */
.container-fluid .hero-carousel,
.container-fluid .carousel,
.container-fluid .carousel-inner,
.container-fluid .carousel-item {
    width: 100%;
}

/* Button styling */
.carousel-caption .btn-primary {
    background-color: #1a237e;
    border-color: #1a237e;
    color: white;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.carousel-caption .btn-primary:hover {
    background-color: #0e1358;
    border-color: #0e1358;
}

/* Make sure carousel is responsive */
@media (max-width: 768px) {
    .carousel-item {
        height: 400px;
    }
    
    .carousel-caption h2 {
        font-size: 2rem;
    }
    
    .carousel-description {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .carousel-item {
        height: 300px;
    }
    
    .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    .carousel-description {
        font-size: 0.9rem;
    }
}
