/* Header styling */
header {
    background-color: var(--color-brand-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    border-radius: 2rem 2rem;
    top: 0.5rem;
    z-index: 100;
    max-width: fit-content;
    margin: 0 auto;
    backdrop-filter: blur(10px);
}

/* Main nav container */
header nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.5rem 1.5rem;
    min-width: 65vw;
}

/* Logo link */
.logo a {
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 800;
    background-color: white;
    color: black;
    padding: 0.625rem 1rem;
    border-radius: 2rem;
}

nav a,
nav button {
    color: var(--color-white);
    background: none;
    border: none;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.625rem 1rem;
    border-radius: 2rem;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}

nav a:hover,
nav button:hover {
    background-color: white;
    color: #000000;
}

/* Dropdown container */
.nav-dropdown {
    position: relative;
}

/* Dropdown Menu */
.nav-dropdown .dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    left: 0;
    background-color: var(--color-brand-primary);
    min-width: 200px;
    z-index: 99;
    flex-direction: column; /* Ensure items stack vertically */
    box-shadow: var(--shadow-md);
}
/* .nav-dropdown .dropdown-menu::before {
    content: "";
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
} */

/* Show dropdown menu on hover */
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    display: flex;
}

/* Styling for links/buttons inside dropdown menus */
.dropdown-menu a,
.dropdown-menu button {
    color: var(--color-white);
    background: none;
    border: none;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.625rem 1rem;
    border-radius: 0rem;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
    background-color: white;
    color: #000000;
}

/* Submenu container */
.dropdown-submenu {
    position: relative;
    margin-top: 0.5rem;
}

/* Submenu Content */
.dropdown-submenu > .dropdown-submenu-content {
    display: none; /* Hidden by default */
    position: absolute;
    top: 0;
    left: calc(100%);
    background-color: var(--color-brand-primary);
    min-width: 180px;
    flex-direction: column;
    box-shadow: var(--shadow-md);
}

/* Show submenu content on hover */
.dropdown-submenu:hover > .dropdown-submenu-content,
.dropdown-submenu:focus-within > .dropdown-submenu-content {
    display: flex;
}

/* Ensure submenu links/buttons maintain styling */
.dropdown-submenu-content a,
.dropdown-submenu-content button {
    white-space: nowrap;
}

/* --- Mobile navigation styles --- */

/* Initially hide desktop navigation links and show hamburger on small screens */
.desktop-nav-links {
    display: flex; /* Default for desktop */
    align-items: center;
    gap: 1.5rem;
    flex-grow: 1; /* Allows it to take up available space */
    justify-content: flex-end; /* Pushes items to the right */
}

.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    color: var(--color-white);
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto; /* Pushes the hamburger to the right */
}

.mobile-nav-menu {
    display: none; /* Hidden by default */
    flex-direction: column;
    background-color: var(--color-brand-primary);
    padding: 1rem;
    border-radius: 0 0 2rem 2rem;
    box-shadow: var(--shadow-md);
    position: absolute;
    width: 100%;
    left: 0;
    top: 100%; /* Position below the header */
    z-index: 90;
    box-sizing: border-box; /* Include padding in width */
}

.mobile-nav-menu.active {
    display: flex; /* Show when active */
}

.mobile-nav-menu a,
.mobile-nav-menu button {
    color: var(--color-white);
    background: none;
    border: none;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.8rem 1rem;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 0.5rem; /* Slightly rounded corners for mobile menu items */
}

.mobile-nav-menu a:hover,
.mobile-nav-menu button:hover {
    background-color: white;
    color: #000000;
}

/* Mobile Dropdown styles */
.mobile-nav-dropdown {
    position: relative;
    width: 100%;
}

.mobile-nav-dropdown .mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-nav-dropdown .mobile-dropdown-menu {
    display: none; /* Hidden by default */
    flex-direction: column;
    background-color: rgba(
        255,
        255,
        255,
        0.1
    ); /* Slightly lighter background for submenus */
    padding-left: 1.5rem; /* Indent submenu items */
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.5rem;
    border-radius: 0.5rem;
}

.mobile-nav-dropdown.active .mobile-dropdown-menu {
    display: flex; /* Show when active */
}

.mobile-dropdown-menu a,
.mobile-dropdown-menu button {
    padding: 0.6rem 1rem;
    font-size: 1rem;
}

/* Mobile Submenu styles */
.mobile-dropdown-submenu {
    width: 100%;
}

.mobile-dropdown-submenu > button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-dropdown-submenu-content {
    display: none; /* Hidden by default */
    flex-direction: column;
    background-color: rgba(
        255,
        255,
        255,
        0.05
    ); /* Even lighter background for sub-submenus */
    padding-left: 1.5rem;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.5rem;
    border-radius: 0.5rem;
}

.mobile-dropdown-submenu.active .mobile-dropdown-submenu-content {
    display: flex; /* Show when active */
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    /* Adjust breakpoint as needed */
    header nav {
        justify-content: space-between;
        gap: 0; /* Remove gap for cleaner mobile layout */
    }

    .desktop-nav-links {
        display: none; /* Hide desktop links on mobile */
    }

    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
        padding: 0.5rem 0.8rem;
    }

    header {
        max-width: 100%; /* Allow header to take full width on mobile */
        border-radius: 0; /* Remove border-radius for full width */
        top: 0; /* Align to the top of the screen */
        margin: 0;
    }

    /* Adjust main nav padding to compensate for full width header */
    header nav {
        padding: 0.5rem 1rem;
    }

    .logo a {
        padding: 0.5rem 0.8rem; /* Smaller padding for logo on mobile */
    }

    .mobile-nav-menu {
        position: absolute;
        top: 100%; /* Position directly below the header */
        left: 0;
        width: 100%;
        border-radius: 0;
        max-height: calc(100vh - 60px); /* Adjust based on your header height */
        overflow-y: auto; /* Enable scrolling if menu is long */
        gap: 10px;
        height: 100vh;
    }
    .mobile-nav-menu a,
    .mobile-nav-menu button {
        padding: 0.5rem 0.7rem;
        box-shadow: 0px 0px 2px;
    }
}
.avatar {
    /* Make the image circular */
    border-radius: 9999px; /* Equivalent to rounded-full in Tailwind */
    object-fit: cover; /* Ensures the image covers the area without distortion */
    /* border: 1px solid #000000;  */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06); /* Tailwind shadow-md equivalent */
    width: 2rem; /* Fixed width for the avatar image */
    height: 2rem; /* Fixed height for the avatar image */
    transition: transform 0.3s ease-in-out; /* Smooth transition for hover effect */
    cursor: pointer;
    margin-top: 2px;
}

.avatar:hover {
    transform: scale(1.05); /* Slightly enlarge on hover */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2),
        0 4px 6px -2px rgba(0, 0, 0, 0.1); /* Stronger shadow on hover */
}
