/* Header Section */
header {
    width: auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: white;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

header .logo img {
    height: 100px;
    width: auto;
}

/* Base styles for the menu */
nav ul.menu {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

nav ul.menu li {
    position: relative;
}

nav ul.menu li a {
    text-decoration: none;
    font-size: 16px;
    color: #333;
    padding: 10px 15px;
    font-weight: 500;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 5px;
}

/* Hover effect on menu items */
nav ul.menu li a:hover {
    color: #00509e;
    background-color: #f9f9f9;
}

/* Submenu styles */
nav ul.submenu {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: white;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    z-index: 999;
    min-width: 200px;
}

nav ul.submenu li {
    margin: 0;
    padding: 0;
}

nav ul.submenu li a {
    font-size: 14px;
    color: #333;
    padding: 8px 15px;
    display: block;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul.submenu li a:hover {
    background: #f0f0f0;
    color: #00509e;
}

/* Show submenu when hovering over the parent item */
nav ul.menu > li:hover > ul.submenu {
    display: block;
}

/* Hide the menu toggle on desktop */
@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }

    /* Reset the mobile menu on desktop */
    nav ul.menu {
        display: flex;
        flex-direction: row;
    }

    /* Fix submenu position on desktop */
    nav ul.submenu {
        position: absolute;
        top: 100%;
    }
}

/* Mobile View Adjustments */
@media (max-width: 768px) {
    .menu-toggle {
        display: block !important;
    }

    .menu-toggle {
        margin-left: auto;
        margin-right: 20px; /* Adjust the right margin */
    }

    /* Hide the menu by default on mobile */
    nav ul.menu {
        display: none;
        flex-direction: column;
        gap: 10px;
        position: absolute;
        top: 60px; /* Add top spacing to avoid overlap with the toggle */
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    /* Show the menu when it's active */
    nav ul.menu.active {
        display: flex;
    }

    /* Mobile menu items */
    nav ul.menu li {
        width: 100%;
    }

    nav ul.menu li a {
        padding: 10px;
        text-align: center;
        width: 100%;
    }

    /* Fix submenu on mobile */
    nav ul.submenu {
        position: static;
        display: none;
    }

    nav ul.menu > li.active > ul.submenu {
        display: block;
    }

    /* Mobile submenu toggle arrow */
    nav ul.menu > li > a::after {
        content: "\f0d7"; /* Down arrow */
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        margin-left: 10px;
        font-size: 12px;
    }

    nav ul.menu > li.active > a::after {
        content: "\f0d8"; /* Up arrow */
    }
}
