/**
 * Sticky Header Scroll Styles
 * Smooth animations for hiding topbar/header sections and showing only menu
 */

/* Header transitions */
header.header-scrollable {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* All child elements get smooth transitions */
header.header-scrollable > div,
header.header-scrollable > nav {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Minimized state - enhanced shadow */
header.header-minimized {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

/* Minimized navigation - compact */
header.header-minimized nav {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* Expanded state */
header.header-expanded {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Menu items in minimized state */
header.header-minimized nav a,
header.header-minimized nav button {
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    font-size: 0.9rem;
}

/* Ensure sticky positioning */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    will-change: transform;
}

/* Smooth opacity transitions */
header > div {
    will-change: max-height, opacity, padding, margin;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    header.header-minimized nav a,
    header.header-minimized nav button {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Faster transitions on mobile */
    header.header-scrollable,
    header.header-scrollable > div,
    header.header-scrollable > nav {
        transition-duration: 0.3s;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Prevent layout shift during transitions */
header.header-scrollable {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}