/* --- Floating Sticky Header --- */
.site-header {
    position: fixed;
    top: 40px;
    left: 0;
    width: 100%;
    z-index: 9999;
    pointer-events: none;
}

.header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 80px;
    pointer-events: auto;
    display: flex;
    justify-content: flex-start;
}

@media (max-width: 1024px) {
    .header-inner {
        padding: 0 40px;
    }
}

.header-nav-element {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 40px;
    padding: 12px 40px; 
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10000;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.nav-list li a {
    color: var(--black);
    font-size: 16px;
    text-decoration: none;
    font-family: var(--font-main);
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-list li a:hover {
    color: var(--primary-colour); /* Nice neon pink hover state */
}

.desktop-only {
    display: flex;
}

.desktop-nav-content {
    display: flex;
    align-items: center;
    gap: 32px; /* Space between the page links and the social links */
}


/* Vertical divider and styling for the desktop socials */
.desktop-extras {
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    padding-left: 32px;
}

.desktop-extras a {
    color: var(--black);
    font-size: 18px; 
    transition: color 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.desktop-extras a.desktop-email {
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 500;
    margin-left: 8px; /* Extra space before the email text */
}

.desktop-extras a:hover {
    color: var(--primary-colour);
}

/* --- Repositioning for 1024px and below --- */
@media (max-width: 1024px) {
    .site-header {
        top: auto; /* Removes the top positioning */
        bottom: 40px; /* Sits 40px above the cut-off */
    }

    .header-inner {
        padding: 0; /* Remove side padding to allow true centering */
        justify-content: center; /* Forces the pill to the centre */
    }
}

/* --- Mobile Menu Overlay --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--black);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998; 
    pointer-events: auto;
}

.mobile-menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    width: 100%;
    padding: 40px;
    text-align: center;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0 0 60px 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.mobile-nav-list li a {
    color: var(--white);
    font-size: 32px;
    font-family: var(--font-heading);
    letter-spacing: 2px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-nav-list li a:hover {
    color: var(--primary-colour);
}

.mobile-extras {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.mobile-socials {
    display: flex;
    gap: 32px;
}

.mobile-email {
    color: var(--white);
    font-family: var(--font-main);
    font-size: 18px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-email:hover {
    color: var(--primary-colour);
}

/* --- Mobile Burger Toggle --- */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 20px;
    position: relative;
    z-index: 10001; 
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .menu-toggle {
        display: block;
    }

    .hamburger, .hamburger::before, .hamburger::after {
        content: '';
        display: block;
        background: var(--black);
        height: 2px;
        width: 100%;
        border-radius: 2px;
        position: absolute;
        transition: all 0.3s ease;
    }

    .hamburger { top: 50%; transform: translateY(-50%); }
    .hamburger::before { top: -8px; }
    .hamburger::after { bottom: -8px; }
    
    /* State changes when the menu opens */
    .site-header.menu-open .hamburger { background: transparent; }
    .site-header.menu-open .hamburger::before { top: 0; transform: rotate(45deg); background: var(--white); }
    .site-header.menu-open .hamburger::after { bottom: 0; transform: rotate(-45deg); background: var(--white); }
    
    /* Make the pill background transparent so it doesn't clash with the full-screen overlay */
    .site-header.menu-open .header-nav-element {
        background-color: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
    }
}