/* Critical CSS for Hero Sections - Inline for fastest loading */

/* Hero Base Styles - Critical for immediate rendering */
.video-hero, .hero {
    min-height: 80vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #1a1a2e; /* Fallback color for immediate paint */
}

/* Critical hero content styles */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 90%;
    padding: 2rem;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content .subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* Critical video hero styles */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0; /* Start hidden, fade in when loaded */
    transition: opacity 0.5s ease;
}

.hero-video.loaded {
    opacity: 1;
}

.video-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.7), rgba(102, 126, 234, 0.3));
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading placeholder for hero images */
.hero-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #667eea);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .video-hero, .hero {
        min-height: 60vh;
    }
    
    .hero-content {
        padding: 1rem;
    }
}