/* Sticky Menu Styles */
header {
    z-index: 99999;
    position: relative;
    font-family: "-apple-system", "BlinkMacSystemFont", "Roboto", "Helvetica Neue", sans-serif !important;
}

#logo {
    display: block;
    /* Ensure block-level for centering */
    position: fixed;
    top: 30px;
    left: 0;
    right: 0;
    width: 60px;
    /* Reduced from 100px to be less obtrusive */
    height: auto;
    margin: 0 auto;
    opacity: 1;
    transition: .3s all cubic-bezier(0.075, 0.82, 0.165, 1) .6s;
    z-index: 100000;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
    /* Ensure visibility on light backgrounds */
}

header nav {
    display: flex;
    height: 80px;
    /* Adjusted height */
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    left: 0;
    right: 0;
    width: 700px;
    /* Widened to fit real menu items */
    margin: 0 auto;
    top: 100px;
    background-color: rgba(26, 25, 42, 0.85);
    /* Sambucus with opacity */
    /* More transparent backgrouund */
    border-radius: 200px;
    z-index: 9999;
    /* Higher than other elements */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(129, 99, 194, 0.2);
    /* Lavish Spending border hint */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    /* Add shadow for lift */
    transition: 1s all cubic-bezier(0.075, 0.82, 0.165, 1) .2s;
}

header nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    display: block;
    padding: 10px 15px;
    /* Reduced padding to fit more items */
    line-height: 1;
    font-size: 14px;
    /* Adjusted font size */
    letter-spacing: 1px;
    text-transform: uppercase;
    /* Match site style? Or template? Template was lowercase. I'll stick to template logic but uppercase looks better usually. Template: text-transform: lowercase */
    text-transform: lowercase;
    transition: .3s all cubic-bezier(0.075, 0.82, 0.165, 1) .6s;
    white-space: nowrap;
}

header nav a:hover,
header nav a:focus,
header nav a.active {
    color: #8163C2 !important;
    /* Lavish Spending */
    /* Cyan/Blue to match branding 'Didiphama' gradient style or similar */
    opacity: 1;
}

header nav button {
    -webkit-appearance: none;
    appearance: none;
    background: rgba(0, 0, 0, .3);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, .1);
    position: absolute;
    z-index: 99;
    left: 0;
    margin: auto;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    height: 60px;
    border-radius: 100%;
    outline: 0;
    border: 0;
    cursor: pointer;
    transition: .3s all cubic-bezier(0.075, 0.82, 0.165, 1) 0.2s;
    transform: scale(0);
}

header nav button span {
    width: 40%;
    background: #fff;
    height: 2px;
    display: block;
    margin: 5px auto;
    transform: scalex(0);
    transition: .6s transform cubic-bezier(0.075, 0.82, 0.165, 1) 0s, .3s margin ease-in 0s;
}

header nav button:hover {
    border-color: rgba(255, 255, 255, .5);
}

header nav button:hover span {
    margin: 10px auto;
}

/* Sticky State */
header.sticky #logo {
    top: 0;
    transform: scale(.8);
    opacity: 0;
    transition-delay: 0.5s;
    pointer-events: none;
    /* Make sure it doesn't block clicks */
}

header.sticky nav {
    top: 20px;
    padding: 0;
    width: 90px;
    height: 90px;
    transition: all 0.6s cubic-bezier(0.075, 0.82, 0.165, 1);
    background: transparent;
    /* Hide background when collapsed */
    pointer-events: none;
    /* Allow clicks through container */
    transform: translateX(calc(-50vw + 75px));
    /* Slide to the left with 30px spacing from edge */
    left: 50%;
    /* Start from center for transform */
    margin-left: 0;
}

header.sticky nav button {
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.075, 0.82, 0.165, 1) 0.6s;
    pointer-events: auto;
    /* Re-enable pointer events for button */
}

header.sticky nav button span {
    transform: scalex(1);
    transition: .6s transform cubic-bezier(0.075, 0.82, 0.165, 1) .8s, .3s margin ease-in 0s;
}

header.sticky nav a {
    padding: 0;
    opacity: 0;
    letter-spacing: 0px;
    transform: scale(0.3);
    transition-delay: 0.2s;
    pointer-events: none;
}

/* Menu Centered State (when menu is open) */
header.menu-centered #logo {
    top: 30px;
    transform: scale(1);
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
}

header.menu-centered nav {
    top: 100px;
    width: 700px;
    height: 80px;
    padding: 0 20px;
    background-color: rgba(26, 25, 42, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(129, 99, 194, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transform: translateX(0);
    /* Center position */
    transition: all 0.6s cubic-bezier(0.075, 0.82, 0.165, 1);
    pointer-events: auto;
    left: 50%;
    margin-left: -350px;
    /* Half of width to center */
}

header.menu-centered nav button {
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
    pointer-events: none;
}

header.menu-centered nav a {
    padding: 10px 15px;
    opacity: 1;
    letter-spacing: 1px;
    transform: scale(1);
    transition: all 0.3s cubic-bezier(0.075, 0.82, 0.165, 1) 0.6s;
    pointer-events: auto;
}

/* Page effect */
#page {
    position: relative;
    transition: 1s all ease-in-out;
}

#page.menuopen {
    opacity: .6;
    filter: blur(20px);
    transform: scale(1.02);
    /* Slight scale */
}

/* Fixed Link - kept from template if needed, otherwise optional */
#fixedlink {
    position: fixed;
    bottom: 0;
    z-index: 9999;
    right: 0;
    left: 0;
    text-align: center;
    text-decoration: none;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 20px;
}

/* Response */
@media screen and (max-width: 800px) {
    header nav {
        width: 90%;
        flex-wrap: wrap;
        height: auto;
        padding: 10px;
    }

    header.sticky nav {
        width: 70px;
        height: 70px;
    }
}