/* Navbar Fixed Positioning (Modern, Smooth, Professional) */
.fixed-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7)); /* Consistent dark gradient */
    padding: 1rem 0;
    color: #fff;
    transition: background 0.4s ease, box-shadow 0.4s ease; /* Smoother transitions */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25); /* Subtle shadow for depth */
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between; /* Ensure logo and navbar are at opposite ends */
    align-items: center;
    padding: 0 1rem;
}

/* Logo Styling */
.logo {
    flex-shrink: 0; /* Prevent logo from shrinking */
}

.logo img {
    height: 48px; /* Adjusted to match home.css */
    width: auto;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out; /* Smooth scaling and fade */
}

.logo a:hover img {
    transform: scale(1.05); /* Subtle scale on hover */
    opacity: 0.9; /* Slight fade for modern effect */
}

/* Hamburger Menu (Modern Design) */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.menu-toggle .menu-bar {
    display: block;
    width: 24px; /* Adjusted to match home.css */
    height: 3px;
    background: #fff;
    margin: 5px 0;
    transition: all 0.3s ease; /* Smoother animations */
    border-radius: 2px; /* Rounded bars for modern appearance */
}

.menu-toggle:hover .menu-bar {
    background: #e50914; /* Ethan’s Logistics red for hover */
}

/* Navigation Bar (Modern and Professional) */
.navbar {
    flex-grow: 0; /* Prevent navbar from taking extra space */
    display: flex;
}

.navbar-nav {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    gap: 15px; /* Modern spacing between nav items */
}

.nav-item {
    margin-left: 1.5rem; /* Adjusted to match home.css */
    position: relative;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem; /* Adjusted to match home.css */
    font-family: 'Roboto', sans-serif;
    padding: 12px 20px; /* Increased padding for modern look */
    transition: color 0.3s ease, transform 0.4s ease, background 0.4s ease; /* Smoother transitions */
    border-radius: 8px; /* Rounded corners for modern design */
}

.nav-link:hover {
    color: #e50914; /* Ethan’s Logistics red for hover */
    transform: translateY(-2px); /* Subtle lift for modern effect */
    background: rgba(255, 255, 255, 0.1); /* Slight white overlay for contrast */
}

/* Dropdown Menu (Modern and Smooth) */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    display: none; /* Hidden by default, controlled by JS */
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px; /* Slightly wider for modern appearance */
    border-radius: 12px; /* Larger radius for modern look */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); /* Enhanced shadow for depth */
    z-index: 1000;
    list-style: none;
    padding: 10px 0;
    animation: fadeInDropdown 0.4s ease-out; /* Smooth fade-in animation */
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-item {
    display: block;
    padding: 12px 20px; /* Increased padding for modern look */
    color: #800080; /* Purple for links, as seen in screenshot */
    text-decoration: none;
    font-size: 0.9rem; /* Adjusted to match home.css */
    font-family: 'Roboto', sans-serif;
    transition: background 0.4s ease, color 0.4s ease, transform 0.4s ease; /* Smoother transitions */
}

.dropdown-item:hover {
    background: #e50914; /* Ethan’s Logistics red for hover */
    color: #fff; /* White text on hover */
    transform: translateX(5px); /* Subtle slide for modern effect */
}

/* Animation for Dropdown */
@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    .navbar {
        display: none; /* Hide by default for mobile */
    }

    .navbar.open {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7)); /* Modern gradient */
        padding: 10px; /* Adjusted to match home.css */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
        transform: translateX(0);
        transition: transform 0.5s ease-out, opacity 0.5s ease-out; /* Smoother transitions */
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 5px; /* Adjusted to match home.css */
    }

    .nav-item {
        width: 100%;
        text-align: center;
        margin-left: 0;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 10px 0; /* Adjusted to match home.css */
        color: #fff;
    }

    .nav-link:hover {
        transform: translateY(-2px) scale(1.05); /* Modern lift and scale */
        background: rgba(255, 255, 255, 0.1); /* Slight white overlay for contrast */
    }

    /* Dropdown in Mobile */
    .dropdown-menu {
        position: static;
        display: none;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7)); /* Modern gradient */
        padding-left: 10px; /* Adjusted to match home.css */
        margin-top: 5px;
        border-radius: 8px; /* Adjusted to match home.css */
        width: 100%;
    }

    .navbar.open .dropdown-menu {
        display: block;
    }

    .dropdown-item {
        padding: 8px 10px; /* Adjusted to match home.css */
        color: #fff; /* White for mobile links */
    }
}

@media (max-width: 768px) {
    .fixed-nav {
        padding: 0.5rem 0; /* Adjusted to match home.css */
    }

    .menu-toggle {
        display: block;
    }

    .navbar {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7));
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .navbar.open {
        display: flex;
        flex-direction: column;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
    }

    .nav-item {
        margin: 0.5rem 0;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: #2c2b2b;
        width: 100%;
        display: none;
    }

    .dropdown.open .dropdown-menu {
        display: block;
    }
}

@media (max-width: 600px) {
    .fixed-nav {
        padding: 0.5rem 0;
    }

    .logo img {
        height: 36px; /* Adjusted to match home.css */
    }

    .nav-link,
    .dropdown-item {
        font-size: 12px; /* Adjusted to match home.css */
    }
}