/* Hero Carousel Styles */
.hero-carousel {
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    /* Lighter shadow */
}

/* Responsive height */
.hero-carousel .carousel-item {
    height: 480px;
    /* Reduced from 600px to fix "too broad" look */
    position: relative;
    background-color: #000;
    /* Dark background to prevent white flashes */
}

@media (max-width: 991px) {
    .hero-carousel .carousel-item {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .hero-carousel .carousel-item {
        height: 250px;
        /* Mobile friendly height */
    }
}

.hero-carousel .carousel-img-wrap {
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.hero-carousel img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center;
    will-change: transform;
}

/* Gradient Overlay - Significantly reduced opacity to fix "faded" look */
.hero-carousel .carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Subtle bottom gradient for text readability, clear top/center */
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

/* Caption Styles - Adjusted for better responsiveness */
.hero-carousel .carousel-caption {
    z-index: 2;
    text-align: left;
    left: 8%;
    bottom: 40px;
    /* Moved up slightly */
    top: auto;
    /* Allow it to sit at bottom */
    right: 8%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Align to bottom */
    max-width: 700px;
    padding-bottom: 0;
}

.hero-carousel .display-5 {
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
    opacity: 0;
}

/* Responsive Font Sizes */
@media (max-width: 768px) {
    .hero-carousel .display-5 {
        font-size: 1.8rem;
    }

    .hero-carousel .lead {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .hero-carousel .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

.hero-carousel .lead {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    opacity: 0;
    /* Start hidden for animation */
}

/* Animations */
.hero-carousel .carousel-item.active .display-5 {
    animation: slideUpFade 0.8s cubic-bezier(0.2, 1, 0.3, 1) forwards;
    animation-delay: 0.2s;
}

.hero-carousel .carousel-item.active .lead {
    animation: slideUpFade 0.8s cubic-bezier(0.2, 1, 0.3, 1) forwards;
    animation-delay: 0.4s;
}

.hero-carousel .carousel-item.active .btn-primary {
    animation: slideUpFade 0.8s cubic-bezier(0.2, 1, 0.3, 1) forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Indicators */
.carousel-line-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    gap: 10px;
}

.carousel-line-indicators .line-indicator {
    width: 40px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.carousel-line-indicators .line-indicator.active {
    background-color: #fff;
    width: 60px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Navigation Controls */
.hero-carousel .custom-control {
    width: 5%;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.hero-carousel .custom-control:hover {
    opacity: 0.9;
}

.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    padding: 25px;
    background-size: 50% 50%;
}

/* Progress Bar */
.carousel-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    z-index: 20;
}

.carousel-progress-bar .progress-fill {
    height: 100%;
    background-color: #007bff;
    /* Primary Color */
    width: 0%;
}