/* --- Hero Video Background --- */
.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    /* Behind content */
}

.hero-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* Darker opacity for better text contrast */
    z-index: 1;
    /* On top of video */
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.hero-slide.active .hero-content h1 {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-slide.active .hero-content p {
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.hero-slide.active .hero-content .hero-buttons {
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

/* Ensure page header content is above the video */
.page-header .container {
    position: relative;
    z-index: 2;
}

/* Specific fix for slider-placeholder.jpg background if we are replacing it */
.page-header {
    position: relative;
    /* We will remove the static background image via inline style injection or class override */
    background: none !important;
}

/* --- Subpage Hero Section (Non-homepage pages) --- */
.page-hero {
    position: relative;
    overflow: hidden;
    height: 350px;
    max-height: 350px;
    min-height: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.page-hero .hero-content {
    position: relative;
    z-index: 3;
    padding: 60px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.page-hero h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.page-hero .hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

@media (max-width: 768px) {
    .page-hero {
        height: 280px;
        max-height: 280px;
        min-height: unset;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .page-hero .hero-subtitle {
        font-size: 1rem;
    }
}