/* d:\Freelance\MB CON\MB Website\style.css (Relevant Sections for Header) */
:root {
    font-family: Inter, sans-serif;
    --primary-color: #8BCC00;
    --neutral-color-1: #000000; /* unified to pitch black */
    --neutral-color-2: #1F1F1F;
    --text-color-primary: #EBEBEB;
    --text-color-secondary: #c2c2c2;
    --text-color-tertiary: #999999;
    --line-height: 1.5;
}
body{background-color: var(--neutral-color-1);}

/* Logo Style (used in Header) */
#logo {
    width: 5vw;
    min-width: 64px;
    height: auto;
    flex-shrink: 0;
    fill: var(--text-color-primary);
}

/* Header and Navigation */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 8vh;
    padding: 64px 64px;
    box-sizing: border-box;
    color: var(--text-color-primary);
    filter: drop-shadow(0 1px 6px #00000060);
    z-index: 1000;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease; /* enhanced transitions */
    will-change: background-color, backdrop-filter, padding, transform; /* performance hint */
    transform: translateY(0) scale(1); /* base state for animated transform */
    background-image: linear-gradient(#00000060, #00000000); /* subtle gradient for depth */
}

header.scrolled {
    background-color: #00000050; /* maintain same translucency with pure black */
    backdrop-filter: blur(24px);
    padding: 0 64px;
    box-shadow: 0 4px 24px -4px rgba(0,0,0,0.6); /* subtle elevation */
    transform: translateY(0)  /* subtle shrink when scrolled */
}

nav.navbar {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* If you have a specific .logo class inside nav.navbar for a different size,
   you might have this rule. The #logo ID is more general.
nav.navbar .logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}
*/

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    color: var(--text-color-primary);
    text-decoration: none;
    position: relative;
    /* Apply styles previously on h6 */
    font-size: 1.5rem;
    font-weight: 200;
    letter-spacing: 2px;
    margin: 0; /* Ensures no default browser margins interfere */
}


.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease-in-out;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--text-color-primary);
}

.nav-links a:active {
    color: var(--primary-color);
}

.nav-links a:active::after {
    width: 100%;
}

/* Social Media Icons (in Header) */
.social-media-container {
    display: flex;
    align-items: center;
}

.social-media-icons {
    display: flex;
    gap: 16px;
    align-items: center;
}

.social-media-icons a {
    display: inline-flex;
    text-decoration: none;
}

.social-media-icons svg {
    width: 24px;
    height: 24px;
    display: block;
}

.social-media-icons svg path {
    fill: var(--text-color-primary);
    transition: fill 0.2s ease-in-out;
}

.social-media-icons a:hover svg path,
.social-media-icons a:focus svg path {
    fill: var(--primary-color);
}

/* Hamburger Menu */
.hamburger-menu {
    display: none; /* Hidden on desktop by default */
    width: 30px;  /* Match SVG size or slightly larger for click area */
    height: 30px; /* Match SVG size */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1005;
    position: relative; /* For positioning SVGs inside */
}

/* Styles for the SVG icons within the hamburger button */
.hamburger-menu svg {
    width: 30px; /* Adjust size as needed */
    height: 30px; /* Adjust size as needed */
    stroke: var(--text-color-primary); /* Or your desired color */
    position: absolute; /* Position SVGs on top of each other */
    top: 0;
    left: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out; /* Animation */
}

.hamburger-svg-icon {
    /* Initial state: hamburger icon is visible */
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.close-svg-icon {
    /* Initial state: close icon is hidden and transformed */
    opacity: 0;
    transform: rotate(-45deg) scale(0.7);
    pointer-events: none; /* Not interactive when hidden */
}

/* Remove old span styles as they are no longer used for the icon */
/* .hamburger-menu span { ... } */
/* Media Queries for Header Responsiveness */
@media (max-width: 768px) {
    header {
        padding: 0 24px; /* Mobile padding for header */
    }

    .nav-links {
                display: flex; /* Changed from none to flex for initial layout for transition */
                flex-direction: column;
                position: absolute;
                top: 7vh;
                left: 0;
                width: 100%;
                background-color: var(--neutral-color-2);
                padding: 8px 0;
                box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
                z-index: 999;
                /* background-color: rgba(31, 31, 31, 0); // This is overridden by the active state, can be removed or kept for initial non-active transparent bg */
                opacity: 0;
                max-height: 0;
                overflow: hidden;
                transition: opacity 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out;
            }

    header.mobile-menu-active .nav-links {
        display: flex; /* This is the crucial fix: make it visible */
        background-color: var(--neutral-color-2); /* Visible state for transition */
        opacity: 1;
        max-height: 50vh; /* Or enough to show all links */
    }

    .nav-links a {
        padding: 12px 24px;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        /* Apply mobile font size previously on h6 */
        font-size: 1.15rem;
    }

    .nav-links a::after {
        bottom: 0; /* Adjust underline position for mobile if needed */
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-links a:hover::after {
        width: 50%; /* Or 100% if preferred on mobile */
    }

    header .social-media-container { /* Hides only header social icons on mobile; footer unaffected */
        display: none;
    }

    .hamburger-menu {
        display: block; /* Show hamburger button on mobile. 'flex' would also work. */
    }

    /* Explicit initial state for icons in mobile view (menu closed) */
    /* These ensure the desktop defaults are correctly applied if needed, though the general rules should cover it. */
    .hamburger-menu .hamburger-svg-icon {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
    .hamburger-menu .close-svg-icon {
        opacity: 0;
        transform: rotate(-45deg) scale(0.7);
        pointer-events: none;
    }

    /* When mobile menu is active, show the close icon and hide the hamburger icon */
    header.mobile-menu-active .hamburger-menu .hamburger-svg-icon {
        opacity: 0;
        transform: rotate(45deg) scale(0.7); /* Hamburger rotates out */
        pointer-events: none;
    }
    header.mobile-menu-active .hamburger-menu .close-svg-icon {
        opacity: 1;
        transform: rotate(0deg) scale(1); /* X mark rotates in */
        pointer-events: auto;
    }

    header.mobile-menu-active { /* Ensures header has a background when mobile menu is open */
        background-color: var(--neutral-color-2);
    }

    /* Typography for h6 in nav on mobile - Commented out as nav link styles are now directly on 'a' elements. */
    /* If h6 is used elsewhere and styled by this file, this rule might need to be kept or moved to a global stylesheet. */
    /* h6 { font-size: 1.15rem; } */
}

@media (max-width: 420px) {
    header { padding: 0 16px; }
    .nav-links a { font-size: 1.05rem; }
}
