/* ============================================
   HERO BACKGROUND SLIDER
   Auto-sliding crossfade effect for hero images
   ============================================ */

.hero-bg-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    animation: heroSlide 18s infinite;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide:nth-child(1) {
    animation-delay: 0s;
}

.hero-slide:nth-child(2) {
    animation-delay: 6s;
}

.hero-slide:nth-child(3) {
    animation-delay: 12s;
}

@keyframes heroSlide {
    0% {
        opacity: 0;
        z-index: 0;
    }

    5.5% {
        /* Fade in start (1s/18s) */
        opacity: 1;
        z-index: 1;
    }

    33.33% {
        /* Stay visible until next slide starts */
        opacity: 1;
        z-index: 1;
    }

    38.88% {
        /* Fade out (1s overlap) */
        opacity: 0;
        z-index: 0;
    }

    100% {
        opacity: 0;
        z-index: 0;
    }
}

/* Ensure overlay stays on top of slider */
.hero-compact-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.75) 40%, rgba(15, 23, 42, 0.3) 70%, rgba(15, 23, 42, 0.1) 100%);
    z-index: 2;
}

/* Ensure hero content stays above everything */
.hero-compact-content {
    position: relative;
    z-index: 10;
}