/* Header */
header {
    background: linear-gradient(145deg, #000, #16222a);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.4s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px); /* Adds a glass effect */
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0; /* Slight padding for better spacing */
}

/* Hover Effects */
header:hover {
    background-color: #131a21; /* Subtle darkening effect on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Enhanced shadow on hover */
}

/* Navigation Styling */
header nav {
    position: sticky;
    top: 0;
    background-color: #000; /* Dark background for better contrast */
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

/* Navigation Links */
header nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 18px 0;
    gap: 30px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
}

/* Navigation Link Styling */
header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    padding: 12px 25px;
    border-radius: 30px; /* Rounded edges for a modern look */
    position: relative;
    transition: all 0.3s ease, transform 0.3s ease;
    display: inline-block;
    text-transform: uppercase; /* Added to make text more prominent */
}

/* Hover Effects & Active Link */
header nav ul li a:hover,
header nav ul li a.active {
    background: linear-gradient(90deg, #000, #000, #000);
    color: #00ffcc;
    transform: translateY(-5px) scale(1.05); /* Smooth hover movement with slight scale */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Add subtle shadow on hover */
    transition: transform 0.3s ease, background-color 0.3s ease;
}

header nav ul li a::before {
    content: "";
    position: absolute;
    width: 0;
    height: 3px;
    background-color: #00ffcc;
    left: 50%;
    color: #000;
    bottom: -4px;
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 5px;
}

header nav ul li a:hover::before,
header nav ul li a.active::before {
    width: 100%;
    left: 0;
}

/* Mobile Menu (Hamburger) Icon */
header .hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 35px;
    margin-left: 5vh;
    height: 25px;
    transition: all 0.3s ease; /* Smooth transition for changes */
}

header .hamburger div {
    background-color: #fff;
    height: 4px;
    width: 100%;
    border-radius: 5px;
    transition: all 0.3s ease; /* Smooth transition for the individual bars */
}

/* Hamburger Animation when clicked (Cross effect) */
header .hamburger.active div:nth-child(1) {
    transform: translateY(9px) rotate(45deg); /* Top bar transforms */
}

header .hamburger.active div:nth-child(2) {
    opacity: 0; /* Middle bar disappears */
}

header .hamburger.active div:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg); /* Bottom bar transforms */
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    header nav ul {
        display: none; /* Hide the menu by default on mobile */
        flex-direction: column;
        gap: 15px;
        width: 100%;
        align-items: center;
        background-color: #000;
        position: absolute;
        top: 70px;
        left: 0;
        padding: 20px 0;
        transition: all 0.3s ease; /* Smooth transition for opening/closing the menu */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow effect */
    }

    header nav ul li a {
        font-size: 20px;
        padding: 12px 20px;
        color: #fff;
        text-transform: uppercase; /* More prominent text style */
        font-weight: 600;
        transition: all 0.3s ease; /* Smooth hover transition */
    }

    header nav ul li a:hover {
        background-color: #00ffcc;
        color: #00ffcc;
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Adding shadow on hover */
    }

    header .hamburger {
        display: flex; /* Show hamburger icon on mobile */
    }

    header nav.active ul {
        display: flex; /* Display the menu when hamburger is clicked */
    }

    /* Background Overlay */
    header nav.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 1.6); /* Darker overlay for more contrast */
        z-index: -1;
        transition: background-color 0.3s ease;
    }
}

/* Smooth Transition Effects */
header nav ul li a, header nav ul li a:hover, header nav ul li a.active {
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Accessibility and Focus States */
header nav ul li a:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.5); /* Outline on focus for accessibility */
}

header .hamburger:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.5); /* Outline on focus for hamburger */
}