/* Homepage Scrolling Fix - Phase 1 Implementation - CRITICAL FIX v3 */

/* Force scrolling to work on all elements */
*, *::before, *::after {
    max-height: none !important;
}

/* Reset html and body completely */
html {
    overflow: visible !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    max-height: none !important;
    position: static !important;
    min-height: 100% !important;
}

body {
    overflow: visible !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
    height: auto !important;
    max-height: none !important;
    min-height: 100vh !important;
    position: relative !important;
}

/* Ensure all containers can grow */
.container, 
.container-fluid,
.row,
[class*="col-"],
main,
section,
article,
div {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
}

/* Fix hero section specifically */
.hero-section {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

.bg-gradient-sunset {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

/* Fix any Bootstrap utility classes that might interfere */
.min-vh-75 {
    min-height: 75vh !important;
    height: auto !important;
    max-height: none !important;
}

/* Ensure CTA section is visible */
.bg-light {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

/* Remove any viewport height restrictions */
[class*="vh-"],
[class*="min-vh-"],
[class*="max-vh-"] {
    max-height: none !important;
    overflow: visible !important;
}

/* Ensure main containers allow scrolling */
.main-container,
.container,
.container-fluid {
    height: auto !important;
    min-height: auto;
    overflow: visible !important;
    position: relative;
}

/* Fix hero section to not block scrolling */
.hero-section {
    position: relative !important;
    height: auto !important;
    min-height: auto;
    overflow: visible !important;
}

/* Ensure min-vh-75 doesn't break scrolling */
.min-vh-75 {
    min-height: 75vh;
    height: auto !important;
}

/* Fix any sections that might have fixed positioning */
.navbar,
.hero-section,
.features-section,
section {
    position: relative !important;
    z-index: auto;
}

/* Ensure all content sections are accessible */
.py-5,
.bg-light,
.container {
    position: relative;
    z-index: 1;
}

/* Remove any transform or will-change that might affect scrolling */
* {
    transform: none !important;
    will-change: auto !important;
}

/* Allow transforms only on hover for specific elements */
.card:hover,
.btn:hover,
.feature-card:hover {
    transform: translateY(-2px) !important;
}

/* Ensure footer is accessible */
footer {
    position: relative;
    margin-top: auto;
}

/* Mobile-specific fixes */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .min-vh-75 {
        min-height: auto;
        height: auto !important;
    }
}

/* Debug: Add visible borders to identify problematic sections */
/* Uncomment for debugging 
.hero-section,
.container,
section {
    border: 2px solid red !important;
}
*/