/* Priority Layout Fixes - Override any conflicting styles */

/* Ensure all sections have proper spacing and don't overlap */
section {
    position: relative !important;
    z-index: 1 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Fix any potential container issues */
.container {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
}

/* Ensure hero section doesn't interfere with services */
.hero {
    margin-bottom: 0 !important;
    padding-bottom: 60px !important;
}

/* Services section visibility and positioning */
.services-overview {
    position: relative !important;
    z-index: 2 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    clear: both !important;
    margin-top: 0 !important;
}

.services-overview * {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Grid system fixes */
.services-grid {
    position: relative !important;
    z-index: 3 !important;
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.service-card {
    position: relative !important;
    z-index: 4 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Text visibility fixes */
.service-title,
.service-description,
.service-features,
.service-cta {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

.service-features {
    display: block !important;
}

.service-features li {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure no negative margins or positioning issues */
* {
    max-width: none !important;
}

/* Fix any transform issues that might hide content */
.service-card {
    transform: none !important;
}

.service-card:hover {
    transform: translateY(-8px) !important;
}

/* Debugging - temporary red borders to see layout issues */
/*
.services-overview {
    border: 2px solid red !important;
}

.services-grid {
    border: 2px solid green !important;
}

.service-card {
    border: 2px solid blue !important;
}
*/

/* Mobile responsiveness fixes */
@media (max-width: 768px) {
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    .services-overview {
        padding: 40px 0 !important;
    }
}

/* Ensure proper stacking context */
.hero,
.services-overview,
.solutions,
.about,
.portfolio,
.contact {
    position: relative !important;
    z-index: auto !important;
}

/* Fix any overflow issues */
body {
    overflow-x: hidden !important;
}

.services-overview {
    overflow: visible !important;
}

.container {
    overflow: visible !important;
}