/* Sticky Header Styles */
header.compact-header {
    transition: all 0.3s ease;
    width: 100%;
    z-index: 1000;
    position: relative;
}

header.compact-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-in-out;
    background-color: #fff;
}

header.compact-header.sticky .bg_topbar {
    background-color: rgba(0, 51, 102, 0.95);
}

header.compact-header.sticky .logo-container {
    padding: 5px 0;
}

header.compact-header.sticky .main-nav {
    background-color: rgba(0, 51, 102, 0.95);
}

/* Animation for sticky header */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Add padding to body to prevent content jump when header becomes sticky */
body.has-sticky-header {
    padding-top: 0; /* Initially no padding */
}

/* Only add padding when header becomes sticky */
body.has-sticky-header.scrolled {
    padding-top: 160px; /* Adjust based on your header height */
}

/* Make sure mobile menu stays above everything else */
.mobile-nav {
    z-index: 1001; /* Higher than the sticky header */
}

/* Responsive adjustments */
@media (max-width: 991px) {
    body.has-sticky-header.scrolled {
        padding-top: 120px; /* Smaller padding for mobile */
    }
    
    header.compact-header.sticky .mobile-menu-toggle {
        position: relative;
        z-index: 1002; /* Make sure it's above the mobile nav */
    }
}

@media (max-width: 767px) {
    body.has-sticky-header.scrolled {
        padding-top: 100px; /* Even smaller padding for very small screens */
    }
}
