/* ===================================
   Hero Section Viewport Fix
   =================================== */

/* Remove any top margin/padding from page */
html, body {
    margin: 0 !important;
    padding: 0 !important;
}

/* Fix page top margin */
body.body5.homepage {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Fix hero section positioning to be visible in viewport */
.hero5 {
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Ensure the container has proper height and positioning */
.hero5 .container {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}

/* Fix the row to center content vertically */
.hero5 .container .row {
    height: 100% !important;
    min-height: 70vh !important;
    align-items: center !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Ensure main heading has proper positioning */
.hero5 .main-heading {
    position: relative !important;
    z-index: 10 !important;
    padding: 60px 0 !important;
}

/* Fix any negative margins that might push content down */
.hero5 * {
    margin-top: 0 !important;
}

.hero5 .main-heading * {
    margin-top: initial !important;
}

/* Ensure text and buttons are visible */
.hero5 .main-heading h1,
.hero5 .main-heading p,
.hero5 .main-heading .buttons {
    position: relative !important;
    z-index: 15 !important;
}

/* Fix for mobile devices */
@media (max-width: 768px) {
    .hero5 {
        min-height: 100vh !important;
        padding: 20px 0 !important;
        align-items: flex-start !important;
        padding-top: 60px !important;
    }
    
    .hero5 .container {
        padding: 0 15px !important;
    }
    
    .hero5 .main-heading {
        padding: 20px 0 !important;
        text-align: center !important;
    }
    
    .hero5 .main-heading h1 {
        font-size: 28px !important;
        line-height: 34px !important;
        margin-bottom: 16px !important;
    }
    
    .hero5 .main-heading p {
        font-size: 16px !important;
        line-height: 24px !important;
        margin-bottom: 24px !important;
    }
    
    .hero5 .buttons {
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
    }
    
    .hero5 .buttons a {
        width: 100% !important;
        max-width: 280px !important;
        text-align: center !important;
        justify-content: center !important;
    }
}

/* Fix for very small mobile devices */
@media (max-width: 480px) {
    .hero5 {
        padding-top: 40px !important;
    }
    
    .hero5 .main-heading h1 {
        font-size: 24px !important;
        line-height: 30px !important;
    }
    
    .hero5 .main-heading p {
        font-size: 14px !important;
        line-height: 22px !important;
    }
}

/* Ensure proper stacking context */
.hero5 .hero3-images {
    position: relative !important;
    z-index: 5 !important;
}

/* Override any conflicting styles */
.body5 .hero5 {
    margin-top: 0 !important;
    top: 0 !important;
}

/* Fix the duplicate/oversized offcanvas header that creates white space */
.vl-offcanvas.vl-header-area5 {
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    visibility: hidden !important;
    overflow: hidden !important;
}

/* Fix header z-index and positioning - Using proper stacking context */
.homepage .vl-header-area5 {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030 !important; /* Reasonable z-index below modals */
}

/* Ensure dropdown menus appear above hero section */
.homepage .vl-main-menu {
    z-index: inherit !important;
    position: relative !important;
}

.homepage .vl-main-menu .sub-menu,
.homepage .dropdown-menu {
    z-index: 1050 !important; /* Above header but below modals */
    position: absolute !important;
}

.homepage .vl-main-menu ul li .sub-menu {
    z-index: 1050 !important;
    position: absolute !important;
}

/* Force submenu to appear above everything */
.homepage .vl-main-menu .has-dropdown:hover .sub-menu,
.homepage .vl-main-menu .dropdown:hover .sub-menu {
    z-index: 1050 !important;
    position: absolute !important;
}

/* Ensure no elements push the hero content down */
.homepage .vl-header-area5 + main .hero5 {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure main content starts immediately after header */
main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Fix any container margins that might cause top spacing */
.container-fluid, .container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove top spacing from page elements */
.paginacontainer {
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
}

/* Ensure header starts at top */
header {
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: relative !important;
    top: 0 !important;
}

/* ===================================
   Mobile/Tablet Header Fixes
   =================================== */

/* Fix hamburger menu positioning on mobile/tablet */
@media (max-width: 991px) {
    .homepage .vl-header-area5 .row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }
    
    /* Logo container - left side */
    .homepage .vl-header-area5 .col-lg-2 {
        flex: 0 0 auto !important;
        width: auto !important;
        order: 1 !important;
    }
    
    /* Menu and social container - right side */
    .homepage .vl-header-area5 .col-lg-10 {
        flex: 0 0 auto !important;
        width: auto !important;
        order: 2 !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
    }
    
    /* Header action items container */
    .homepage .vl-header-action {
        display: flex !important;
        align-items: center !important;
        gap: 15px !important;
    }
    
    /* Mobile menu button */
    .homepage .vl-header-action-item {
        display: inline-flex !important;
        align-items: center !important;
    }
    
    /* Ensure hamburger menu is not stacked under logo */
    .homepage .mobile-menu-btn,
    .homepage .vl-header-action-item button {
        margin-left: 15px !important;
        position: relative !important;
        z-index: 1050 !important;
    }
    
    /* Logo adjustments for mobile */
    .homepage .vl-logo {
        padding: 5px 15px !important;
        min-height: 60px !important;
    }
    
    .homepage .vl-logo .had-logo {
        height: 50px !important;
    }
}

/* ===================================
   Menu Contrast and Visibility Fixes
   =================================== */

/* Clean navy blue menu items - no background boxes */
.homepage .vl-main-menu ul li a {
    color: #1e3a8a !important; /* Navy blue from logo */
    font-weight: 700 !important;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8) !important; /* White text shadow for contrast */
    background: transparent !important;
    padding: 8px 16px !important;
    border-radius: 0 !important;
    margin: 0 2px !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.homepage .vl-main-menu ul li a:hover {
    color: #1e40af !important; /* Slightly lighter navy on hover */
    background: transparent !important;
    transform: none !important;
    text-decoration: underline !important;
}

/* Dropdown menu styling with better contrast */
.homepage .vl-main-menu .sub-menu {
    background: rgba(255,255,255,0.98) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2) !important;
    border-radius: 8px !important;
    padding: 10px 0 !important;
    margin-top: 5px !important;
}

.homepage .vl-main-menu .sub-menu li a {
    color: #333333 !important;
    text-shadow: none !important;
    background: transparent !important;
    padding: 12px 20px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    font-weight: 500 !important;
}

.homepage .vl-main-menu .sub-menu li a:hover {
    color: #000000 !important;
    background: rgba(0,0,0,0.05) !important;
    transform: none !important;
}

/* Clean navy blue social media and search buttons - no background boxes */
.homepage .header5-social-wedget a,
.homepage .search-open-btn {
    color: #1e3a8a !important; /* Navy blue from logo */
    font-weight: 700 !important;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8) !important; /* White text shadow for contrast */
    background: transparent !important;
    padding: 8px !important;
    border-radius: 0 !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.homepage .header5-social-wedget a:hover,
.homepage .search-open-btn:hover {
    color: #1e40af !important; /* Slightly lighter navy on hover */
    background: transparent !important;
    transform: none !important;
}

/* Clean navy blue mobile menu button - no background box */
.homepage .vl-header-action-item button {
    color: #1e3a8a !important; /* Navy blue from logo */
    font-weight: 700 !important;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8) !important; /* White text shadow for contrast */
    background: transparent !important;
    padding: 10px !important;
    border-radius: 0 !important;
    border: none !important;
    font-size: 18px !important;
}

.homepage .vl-header-action-item button:hover {
    color: #1e40af !important; /* Slightly lighter navy on hover */
    background: transparent !important;
    border: none !important;
}