header { 
    background: #2c3e50; 
    color: white; 
    padding: 1rem; 
    text-align: center; 
}

/* Navigation Container to center the bar */
.navbar-container {
    position: fixed;
    top: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1000;
    background: transparent; /* Makes sure the header doesn't block the view */
}

.glass-nav {
    display: flex;
    align-items: center;
    padding: 10px 30px;
    background: rgba(54, 89, 44, 0.306); 
    border: 1px solid rgba(255, 255, 255, 0.3);/* Subtle light border */
    border-radius: 50px; /* Makes it a pill shape */
    gap: 20px;
    overflow: visible !important;
}
.glass-nav::after{
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    content: '';
    width: 495px;
    height: 68%;
    border-radius: 50px; /* Makes it a pill shape */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
    z-index: -1;
}

.logo {
    height: 35px; /* Adjust based on your logo shape */
    width: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 15px;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 25px;
    transition: 0.3s;
    font-size: 0.9rem;
}

/* The "Active" or hovered link style  */
.nav-links a:hover, .nav-links a.active {
    background: rgba(71, 116, 54, 0.2);
}

/* Navigation Dropdown Container */
.dropdown {
    position: relative;
    display: inline-block;
    overflow: visible;
}

/* Style for the 'More' button itself */
.dropbtn {
    cursor: pointer;
}

.arrow-down {
    font-size: 0.7rem;
    vertical-align: middle;
    margin-left: 2px;
    opacity: 0.7;
}

/* The actual hidden menu */
.dropdown-content {
    display: none;
    position: absolute;
    background: rgba(54, 89, 44, 0.306); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    top: calc(100% + 25px); 
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px;
    border-radius: 18px;
    padding: 12px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    pointer-events: none; /* Prevents accidental clicks when hidden */ 
    isolation: isolate;
}

.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 30px; /* Matches the 25px+ offset to keep the connection */
}

/* Links inside the dropdown */
.dropdown-content a {
    color: white;
    padding: 14px 24px;
    font-weight: 500;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;

    text-align: left;
}

/* Hover effect for items in the list */
.dropdown-content a:hover {
    background: rgba(71, 116, 54, 0.2);
}

/* Show the menu on hover */
.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.3s ease; /* Adds a soft entrance */
    
    pointer-events: auto;
}


/* 1. Hide Hamburger on Desktop */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10002;
}

.mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: #fcf9f2; /* Warm parchment */
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* 2. Mobile Layout (under 768px) */
@media (max-width: 768px) {

    .glass-nav {
        width: 80%; /* Narrower for mobile screens */
        justify-content: space-between;
        margin-right: 8%;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /*  blur ::after needs to match the new mobile width */
    .glass-nav::after {
        width: 84.5%;
        height: 67%;
        left: 46.3%;
    }

    /* Ensure the list doesn't have default bullets or padding */
    ul.nav-links {
        list-style: none;
        padding: 0;
        margin: 0;
        display: none; /* Hidden until .active is added */
        position: absolute;
        top: 70px; /* Sits below the nav bar */
        left: 6%;
        width: 80%;
        background: rgba(27, 48, 34, 0.95); /* Deep Forest Green */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        border-radius: 25px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        gap: 20px;
        text-align: center;
    }

    /* Make sure the list items stack vertically on mobile */
    ul.nav-links li {
        width: 100%;
        padding: 10px 0;
    }
    
    /*Hide more btn on mobile*/
    .dropbtn{
        display: none;
    }

    /* Keep your dropdown visible or adjust it for mobile taps */
    .dropdown-content {
        position: static; /* Let it flow naturally in the mobile list */
        box-shadow: none;
        background: none; /* Deep Forest Green */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: block;
        border: 0px solid rgba(255, 255, 255, 0.2);
        margin-top: -5%;
        transform: translateX(0);
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        pointer-events: all;
    }

    /*keep drop down text in centre*/
    .dropdown-content a{
        text-align: center;
        max-width: fit-content;
    }

    .dropdown:hover .dropdown-content {
        animation: fadeIn 0.3s ease; /* Adds a soft entrance */
        display: flex;
    }

    /* Show the menu when active */
    .nav-links.active {
        display: flex;
        animation: slideIn 0.3s ease forwards;
    }

    /* Animate the Hamburger to an 'X' when open */
    .mobile-menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

