/**
 * EMERGENCY CSS FIX - 88I E-E-A-T SEO 2026
 * Critical fixes for common layout issues
 */

/* ===================================
   HOMEPAGE NAVIGATION COLOR FIX - ULTRA PRIORITY
   =================================== */

/* Force navy gradient on homepage navigation */
body.home #wide-nav.header-bottom,
body.home .header-bottom.wide-nav,
body.page-id-1 #wide-nav.header-bottom,
body.page-id-1 .header-bottom.wide-nav {
    background: linear-gradient(135deg, 
        #0F172A 0%, 
        #1E293B 50%, 
        #0F172A 100%) !important;
    background-color: #0F172A !important;
    background-image: linear-gradient(135deg, 
        #0F172A 0%, 
        #1E293B 50%, 
        #0F172A 100%) !important;
    border-top: 2px solid #FFD700 !important;
    border-bottom: 2px solid #FFD700 !important;
    box-shadow: 
        0 4px 20px rgba(15, 23, 42, 0.8),
        inset 0 1px 0 rgba(255, 215, 0, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3) !important;
}

/* Force white text on homepage */
body.home .header-bottom-nav > li > a,
body.page-id-1 .header-bottom-nav > li > a {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    font-weight: 700 !important;
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(255, 255, 255, 0.2) !important;
}

/* ===================================
   CRITICAL LAYOUT FIXES
   =================================== */

/* Ensure main content is visible and not overlapped */
#main {
    position: relative !important;
    z-index: 1 !important;
    padding-top: 0 !important;
    padding-bottom: 60px !important;
}

/* Fix section spacing */
#main .section {
    position: relative !important;
    z-index: 1 !important;
    padding: 40px 0 !important;
}

/* Fix footer overlap */
#footer {
    position: relative !important;
    z-index: 2 !important;
    margin-top: 0 !important;
}

/* Fix header overlap */
#header {
    position: relative !important;
    z-index: 999 !important;
}

/* ===================================
   CONTAINER FIXES
   =================================== */

.home-content {
    position: relative !important;
    z-index: 1 !important;
    min-height: 500px !important;
}

.home-content .col-inner {
    position: relative !important;
    background: #ffffff !important;
    padding: 0 !important;
    overflow: visible !important;
}

/* ===================================
   CONTENT WRAPPER FIXES
   =================================== */

.home-content .col-inner > div {
    position: relative !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px 30px !important;
    background: #fff !important;
}

/* ===================================
   ENSURE VISIBILITY
   =================================== */

.home-content h1,
.home-content h2,
.home-content h3,
.home-content p,
.home-content ul,
.home-content div,
.home-content a {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

.home-content ul li {
    display: list-item !important;
}

.home-content a {
    display: inline !important;
}

.home-content a[style*="display: inline-block"] {
    display: inline-block !important;
}

/* ===================================
   FIX PAGE BLANK TEMPLATE
   =================================== */

.page-template-page-blank #main {
    padding-top: 0 !important;
}

.page-template-page-blank .page-wrapper {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* ===================================
   FIX LOADING SPINNER OVERLAY
   =================================== */

.loading-spin {
    display: none !important;
}

/* ===================================
   MOBILE CRITICAL FIXES
   =================================== */

@media (max-width: 768px) {
    #main {
        padding-bottom: 40px !important;
    }
    
    .home-content .col-inner > div {
        padding: 25px 20px !important;
    }
}

/* ===================================
   FORCE CONTENT DISPLAY
   =================================== */

body.loaded #main,
body #main {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ===================================
   RESET PROBLEMATIC TRANSFORMS
   =================================== */

.home-content,
.home-content * {
    transform: none !important;
}

.home-content a[style*="display: inline-block"]:hover {
    transform: translateY(-3px) scale(1.05) !important;
}

/* ===================================
   FIX FLATSOME THEME CONFLICTS
   =================================== */

.page-wrapper {
    padding-top: 0 !important;
}

.section {
    padding: 40px 0 !important;
}

.section-content {
    padding: 0 !important;
}

/* ===================================
   ENSURE PROPER STACKING ORDER
   =================================== */

.header-wrapper {
    z-index: 1000 !important;
}

.page-wrapper {
    z-index: 1 !important;
}

.footer-wrapper {
    z-index: 2 !important;
}
