.hero-section {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    min-height: 0;
    overflow: visible;
    display: block;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    z-index: 1;
}

.hero-slides-container {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    z-index: 1;
}

#heroCarousel {
    width: 100% !important;
    height: auto !important;
    display: flex;
    flex-direction: column;
}

#heroCarousel .carousel-inner {
    flex: 0 0 auto;
    height: min(400px, 56vw);
    min-height: 220px;
    min-height: 0;
    overflow: hidden;
    background: #ccc;
}

#heroCarousel .carousel-item {
    height: 100%;
    min-height: 0;
    position: relative;
}

#heroCarousel .carousel-item[style*="height"] {
    height: 100% !important;
}

#heroCarousel .carousel-item img {
    height: 100%;
    object-fit: cover;
}

.hero-slide-title {
    position: absolute;
    bottom: 5%;
    left: 50%;
    z-index: 10;
    color: white;
    font-size: 1.6rem;
    font-weight: 500;
    display: inline-block;
    opacity: 0;
    text-align: center;
    transform: translateX(calc(-50% - 70px));
}

#heroCarousel .carousel-item.active .hero-slide-title {
    animation: heroSlideTitleMotion 5s ease both;
}

@keyframes heroSlideTitleMotion {
    0% {
        opacity: 0;
        transform: translateX(calc(-50% - 70px));
    }
    16% {
        opacity: 1;
        transform: translateX(-50%);
    }
    78% {
        opacity: 1;
        transform: translateX(-50%);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    #heroCarousel .carousel-item.active .hero-slide-title {
        animation: none;
        opacity: 1;
        transform: translateX(-50%);
    }
}

.btn.hero-slide-title {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #333 !important;
    border: 1px solid white !important;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    display: inline-block;
}

.btn.hero-slide-title:hover {
    background: white !important;
    color: #000 !important;
}

.hero-carousel-indicators {
    position: relative;
    padding: 0;
    display: flex !important;
    justify-content: center;
    gap: 8px;
    margin: 22px auto 0;
    list-style: none;
}

.hero-carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(200, 200, 200, 0.8);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s;
}

.hero-carousel-indicators button:hover {
    background-color: rgba(200, 200, 200, 1);
}

.hero-carousel-indicators button.active {
    background-color: var(--vpt-primary);
}


/* Carousel indicators - 8x8px rounded circles - Override Bootstrap */
/* Hero carousel only */
#heroCarousel .carousel-indicators {
    bottom: 0 !important;
}


#heroCarousel .carousel-indicators,
#heroCarousel .hero-carousel-indicators {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    left: auto !important;
    margin: 22px auto 0 !important;
    width: auto !important;
    display: flex !important;
    justify-content: center !important;
    text-align: center !important;
}

.hero-section + section {
    padding-top: 1.5rem !important;
}

@media (max-width: 767.98px) {
    #heroCarousel .carousel-inner {
        height: min(400px, 85vw);
        min-height: 240px;
    }

    #heroCarousel .carousel-indicators,
    #heroCarousel .hero-carousel-indicators {
        margin-top: 20px !important;
    }

    .hero-section {
        margin-bottom: 1.5rem;
    }

    .hero-section + section {
        padding-top: 0.75rem !important;
    }
}


@media (min-width: 992px) {
    #heroCarousel .hero-carousel-control {
        align-items: center !important;
        background: rgba(0, 0, 0, .32);
        border: 0;
        border-radius: 0;
        bottom: auto;
        display: flex !important;
        height: 54px;
        justify-content: center;
        opacity: 0;
        top: 50%;
        transform: translateY(-50%);
        transition: opacity .2s ease, background-color .2s ease;
        width: 42px;
    }

    #heroCarousel .carousel-control-prev.hero-carousel-control {
        border-radius: 0 6px 6px 0;
        left: 0;
        padding-right: 4px;
    }

    #heroCarousel .carousel-control-next.hero-carousel-control {
        border-radius: 6px 0 0 6px;
        padding-left: 4px;
        right: 0;
    }

    #heroCarousel:hover .hero-carousel-control,
    #heroCarousel:focus-within .hero-carousel-control {
        opacity: 1;
    }

    #heroCarousel .hero-carousel-control:hover,
    #heroCarousel .hero-carousel-control:focus {
        background: rgba(0, 0, 0, .52);
    }
}

@media (max-width: 991.98px) {
    #heroCarousel .hero-carousel-control {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .hero-section {
        width: 100vw;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        min-height: 0;
        overflow: visible;
    }

    #heroCarousel .carousel-item {
        height: 100%;
        min-height: 0;
    }

    .hero-slide-title {
        font-size: 1.2rem !important;
        padding: 0 !important;
        left: 5%;
        bottom: 12%;
        text-align: left;
        transform: translateX(-70px);
    }

    #heroCarousel .carousel-item.active .hero-slide-title {
        animation-name: heroSlideTitleMotionMobile;
    }

    @media (prefers-reduced-motion: reduce) {
        #heroCarousel .carousel-item.active .hero-slide-title {
            transform: none;
        }
    }

    @keyframes heroSlideTitleMotionMobile {
        0% {
            opacity: 0;
            transform: translateX(-70px);
        }
        16% {
            opacity: 1;
            transform: translateX(0);
        }
        78% {
            opacity: 1;
            transform: translateX(0);
        }
        100% {
            opacity: 0;
            transform: translateX(0);
        }
    }

    #heroCarousel .carousel-control-prev,
    #heroCarousel .carousel-control-next {
        width: 36px;
        height: 36px;
    }

    .hero-carousel-indicators {
        bottom: auto;
    }
}
