/* Video Hero Section Styles - Each page has its own hero section with video */

.video-hero-section {
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Home page hero - Full viewport height */
.home-page .video-hero-section {
    height: 100vh;
    min-height: 500px;
}

/* Other pages hero - Original height (adjust as needed) */
.insights-page .video-hero-section,
.projects-page .video-hero-section,
.about-page .video-hero-section,
.contact-page .video-hero-section {
    height: 60vh; /* Adjust this value for other pages */
    min-height: 400px;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: white;
    height: 100%;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Account for fixed navbar */
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.2s forwards;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    max-width: 800px;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page content styles */
.page-content {
    position: relative;
    z-index: 2;
    background: white;
    min-height: calc(100vh - 80px);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    margin-top: -20px; /* Overlap with hero section */
}

/* Specific page content adjustments */
.home-seamless-section,
.insights-dashboard,
.projects-list-section,
.about-content-section,
.contact-form-section {
    padding: 3rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    /* Home page hero - Full viewport height on mobile */
    .home-page .video-hero-section {
        height: 100vh;
        min-height: 500px;
    }
    
    /* Other pages hero - Adjusted height on mobile */
    .insights-page .video-hero-section,
    .projects-page .video-hero-section,
    .about-page .video-hero-section,
    .contact-page .video-hero-section {
        height: 50vh;
        min-height: 350px;
    }
    
    .page-content {
        margin-top: -15px;
        border-radius: 15px 15px 0 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Home page hero - Full viewport height on small mobile */
    .home-page .video-hero-section {
        height: 100vh;
        min-height: 500px;
    }
    
    /* Other pages hero - Adjusted height on small mobile */
    .insights-page .video-hero-section,
    .projects-page .video-hero-section,
    .about-page .video-hero-section,
    .contact-page .video-hero-section {
        height: 40vh;
        min-height: 300px;
    }
    
    .page-content {
        margin-top: -10px;
        border-radius: 10px 10px 0 0;
    }
}

/* Video loading state */
.video-container.loading video {
    opacity: 0;
}

.video-container.loaded video {
    opacity: 1;
    transition: opacity 1s ease;
}

/* Video optimization styles */
.video-loading {
    opacity: 0;
    filter: blur(5px);
    transition: opacity 0.5s ease, filter 0.5s ease;
}

.video-loaded {
    opacity: 1;
    filter: blur(0);
}

.video-error {
    display: none;
}

/* Optimized video container */
.video-container.optimized {
    position: relative;
}

.video-container.optimized::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container.optimized.loading::before {
    opacity: 1;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .video-container video {
        display: none;
    }
    
    .video-container::before {
        opacity: 1 !important;
    }
}

/* Low power mode optimizations */
@media (prefers-reduced-data: reduce) {
    .video-container video {
        display: none;
    }
    
    .video-container::before {
        opacity: 1 !important;
    }
    
    .hero-content {
        background: rgba(0, 0, 0, 0.5);
        padding: 2rem;
        border-radius: 10px;
    }
}

/* Video error state */
.video-container.error {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
}

.video-container.error::after {
    content: "Video unavailable - using gradient background";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    opacity: 0.5;
    font-size: 0.8rem;
    z-index: 3;
}

/* Print styles - hide video when printing */
@media print {
    .video-hero-section {
        display: none;
    }
    
    .page-content {
        background: white;
        box-shadow: none;
        border-radius: 0;
        margin-top: 0;
    }
}

/* Animation for sections */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}