:root {
    --dark-bg: #1A1A2E;
    --card-bg: #272740;
    --panel-bg: #222238;
    --text-light: #E0E0E0;
    --text-muted: #B0B0C4;
    --accent-blue: #4CAF50; /* A vibrant green for positive actions/badges */
    --accent-purple: #6200EE; /* Used for secondary accents and gradients */
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-light: rgba(0, 0, 0, 0.2);
    --shadow-strong: rgba(0, 0, 0, 0.4);
    --cta-bg: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    --cta-hover-bg: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
}



/* Header Specific Styles */
header#header {
    position: fixed !important;
     width: 100% !important;
    z-index: 1000;
      transition: var(--transition);
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-strong); /* Using shadow-strong for header */
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

#header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Needed for absolute positioning of nav-links */
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-light); /* Use text-light for logo */
    text-decoration: none;
    transition: color 0.3s ease;
    z-index: 1002; /* Ensure logo is above mobile menu */
}

.logo:hover {
    color: var(--accent-blue); /* Use accent-blue for hover */
}

.logo-icon {
    background: var(--cta-bg); /* Use CTA gradient for icon */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.2em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
    /* Desktop styles - will be overridden by media query for mobile */
}

.main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.main-menu li a,
.menu-link {
    color: var(--text-muted); /* Use text-muted for menu links */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s ease;
    position: relative;
    padding: 5px 0;
}

.main-menu li a:hover,
.menu-link:hover {
    color: var(--accent-blue); /* Use accent-blue for hover */
    transform: translateY(-2px);
}

.main-menu li a::after,
.menu-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue); /* Use accent-blue for underline */
    transition: width 0.3s ease;
}

.main-menu li a:hover::after,
.menu-link:hover::after {
    width: 100%;
}



.main-menu li,
    .menu-link,
    a.cta-button{
       
        text-align: left;
        padding: 10px 20px; /* Adjust padding for full-width links */
        box-sizing: border-box;
    }

  
    



.cta-button {
        justify-content: center; /* Center content in CTA button */
    }

.cta-button {
    background: linear-gradient(90deg, var(--accent-blue), #2E7D32);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

.cta-button:hover {
   transform: translateY(-5px);
   box-shadow: 0 10px 25px rgba(46, 125, 50, 0.6);
}


 





/* User Dropdown Styles */
.user-dropdown {
    position: relative;
    cursor: pointer;
    padding: 5px 0;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light); /* Use text-light for user dropdown toggle */
    font-weight: 600;
    transition: color 0.3s ease;
}

.user-dropdown-toggle:hover {
    color: var(--accent-blue); /* Use accent-blue for hover */
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--accent-purple); /* Use accent-purple for avatar background */
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 0.9em;
    font-weight: 700;
}

.user-dropdown-toggle .fa-chevron-down {
    transition: transform 0.3s ease;
}

.user-dropdown.active .user-dropdown-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px); /* Position below toggle */
    right: 0;
    background-color: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: var(--shadow-strong); /* Using shadow-strong for dropdown menu */
    min-width: 180px;
    padding: 10px 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
}

.user-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: var(--text-light); /* Use text-light for dropdown menu items */
    text-decoration: none;
    font-weight: 400;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.user-dropdown-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--accent-blue); /* Use accent-blue for hover */
}

.user-dropdown-menu li:last-child a {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 5px;
    padding-top: 15px;
    color: var(--text-muted); /* Use text-muted for logout link */
}

.user-dropdown-menu li:last-child a:hover {
    color: #ef4444; /* Red for logout */
}

/* Hamburger Menu for Mobile */
.hamburger {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1002; /* Ensure it's above other elements */
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-light); /* Use text-light for hamburger lines */
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-links {
        display: flex; /* Always flex on mobile, visibility controlled by max-height */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Position below header */
        left: 0;
        width: 100%;
        background-color: var(--glass-bg);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-top: 1px solid var(--glass-border);
        box-shadow: var(--shadow-strong);
        padding: 0; /* Initial padding 0, will expand */
        max-height: 0; /* Initially hidden */
        overflow: hidden; /* Hide overflowing content */
        gap: 0; /* No gap when collapsed */
        align-items: flex-start;
        transition: max-height 0.4s ease-out, padding 0.4s ease-out, gap 0.4s ease-out; /* Smooth transitions */
        pointer-events: none; /* Disable interaction when hidden */
    }

    .nav-links.active {
        max-height: 500px; /* Sufficient height to show all content */
        padding: 20px 0; /* Expand padding when active */
        gap: 15px; /* Apply gap when active */
        pointer-events: auto; /* Enable interaction when active */
    }

    .main-menu {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        padding: 0 20px;
    }

    




    .hamburger {
        display: flex; /* Show hamburger on mobile */
    }

    .user-dropdown {
        width: 100%; /* Full width for dropdown on mobile */
        padding: 0 20px; /* Match padding of other menu items */
        box-sizing: border-box;
    }

    .user-dropdown-menu {
        position: static; /* Position statically within the mobile menu */
        width: 100%; /* Take full width of parent */
        min-width: auto;
        border: none; /* Remove border as it's part of main menu now */
        box-shadow: none; /* Remove shadow */
        background-color: transparent; /* Transparent background */
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 0; /* Remove padding */
        margin-top: 10px; /* Add some space below toggle */
        opacity: 1; /* Always visible if parent is active */
        visibility: visible; /* Always visible if parent is active */
        transform: none; /* Remove transform */
    }

    .user-dropdown-menu li a {
        padding: 8px 15px; /* Adjust padding for dropdown items in mobile menu */
        background-color: rgba(255, 255, 255, 0.05); /* Slight background for items */
        border-radius: 4px;
        margin-bottom: 5px;
    }

    .user-dropdown-menu li:last-child a {
        border-top: none; /* Remove top border */
        margin-top: 0;
        padding-top: 8px; /* Consistent padding */
    }
}
