/* ===================================================
   SIMPLE STICKY HEADER - CLEAN VERSION
   =================================================== */

/* MAIN HEADER - ALWAYS STICKY */
.main-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 999 !important;
    width: 100% !important;
    background: white !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.3s ease-in-out !important;
    transform: translateY(0) !important;
}

/* State: Hidden when scrolling down fast */
.main-header.hidden {
    transform: translateY(-100%) !important;
}

/* State: Visible (default and when scrolling up) */
.main-header.visible {
    transform: translateY(0) !important;
}

/* State: Enhanced shadow when scrolled */
.main-header.scrolled {
    box-shadow: 0 4px 20px rgba(87, 95, 245, 0.15) !important;
}

/* Header content spacing */
.main-header .header-upper {
    padding: 15px 0 !important;
    transition: padding 0.3s ease-in-out !important;
}

.main-header.scrolled .header-upper {
    padding: 12px 0 !important;
}

/* Body spacing to prevent content jump */
.page-wrapper {
    padding-top: 80px !important;
}

/* Mobile adjustments */
@media (max-width: 991px) {
    .main-header .header-upper {
        padding: 12px 0 !important;
    }
    
    .main-header.scrolled .header-upper {
        padding: 10px 0 !important;
    }
    
    .page-wrapper {
        padding-top: 70px !important;
    }
}

@media (max-width: 767px) {
    .page-wrapper {
        padding-top: 60px !important;
    }
}

/* Disable legacy animations */
.main-header.fixed-header,
.main-header.fixed-header .header-upper {
    animation: none !important;
    -webkit-animation: none !important;
}

/* Performance optimizations and additional properties */
.main-header {
    will-change: transform !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

/* Auto-show animation when scroll stops */
.main-header.auto-shown {
    animation: headerAutoShow 0.6s ease-out;
    box-shadow: 0 4px 25px rgba(87, 95, 245, 0.25) !important;
}

@keyframes headerAutoShow {
    0% {
        transform: translateY(-100%);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Ensure dropdown menus work with fixed positioning */
.main-menu .navigation li ul {
    position: absolute !important;
    top: 100% !important;
    z-index: 1000 !important;
}
