/**
 * Hero Video Background Styles
 *
 * Provides styling for video background in hero sections.
 * The video plays behind content with a gradient overlay for text readability.
 */

.hero-video-section {
    position: relative !important;
    overflow: hidden;
    min-height: 500px;
    /* Fallback background in case video doesn't load */
    background: var(--hero-gradient, linear-gradient(135deg, #4CAF50, #81C784));
}

.hero-video-container {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    object-position: center;
}

/* Gradient overlay for text readability */
.hero-video-overlay {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    /* Dark overlay with theme-aware gradient blend */
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Optional: Theme-colored overlay variant */
.hero-video-overlay--themed {
    background: linear-gradient(
        135deg,
        rgba(76, 175, 80, 0.7) 0%,
        rgba(129, 199, 132, 0.5) 50%,
        rgba(76, 175, 80, 0.7) 100%
    );
}

/* Content container sits above the video and overlay */
.hero-video-content {
    position: relative !important;
    z-index: 2;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero-video {
        display: none;
    }

    .hero-video-section {
        background: var(--hero-gradient, linear-gradient(135deg, #4CAF50, #81C784));
    }

    .hero-video-overlay {
        display: none;
    }
}

/* Fallback for when video fails to load */
.hero-video-section.video-fallback {
    background: var(--hero-gradient, linear-gradient(135deg, #4CAF50, #81C784));
}

.hero-video-section.video-fallback .hero-video-container,
.hero-video-section.video-fallback .hero-video-overlay {
    display: none;
}

/* Mobile optimization - optionally disable video on small screens for performance */
@media (max-width: 768px) {
    .hero-video-section--mobile-static {
        background: var(--hero-gradient, linear-gradient(135deg, #4CAF50, #81C784));
    }

    .hero-video-section--mobile-static .hero-video-container,
    .hero-video-section--mobile-static .hero-video-overlay {
        display: none;
    }
}
