/* Defining Global CSS Variables */
:root {
    --primary-color: #6B73FF;
    --hover-color: rgba(255, 255, 255, 0.1);
    --transition-speed: 0.3s;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Base and Header Styling */
body, h1, h2, h3, h4, h5, h6, p, ul, li, a {
    margin: 0;
    padding: 0; /* Zero out padding for consistency */
    text-decoration: none;
    list-style: none;
    color: inherit;
    font-family: 'Poppins', sans-serif;
}

/* Header Section */
.header-section {
    background: linear-gradient(135deg, #6B73FF 10%, #000DFF 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
 

}
/* Adjust margin between logo and title text */
.header-section .logo {
    margin-right: 20px; /* Adjust the value as needed */
}

.header-section .department-text {
    font-size: 18px; /* Adjust size as necessary */
    font-weight: bold; /* Makes the text thicker */
    color: #ffffff; /* Ensures high contrast; adjust if needed */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Adds depth */
    margin-right: auto;
    transition: color var(--transition-speed) ease; /* Smooth transition for color change */
}

/* Ensure flex layout for header content */
.header-section .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Adjust department text */
.header-section .department-text {
    flex-grow: 1;
    margin-right: auto; /* Pushes the text to the left */
}

/* Main Navigation Styling */
.header-section nav ul, nav ul {
    display: flex;
    margin: 0;
    padding: 0;
    gap: 20px;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: white;
    padding: 10px 15px;
    display: block;
    position: relative; /* Important for positioning the pseudo-element */
    transition: color var(--transition-speed) ease, background-color var(--transition-speed) ease; /* Transition for color and background-color */
    border-radius: 10px; /* Rounds the corners of the link's background */
}

/* Styling for the animated underline */
nav ul li a::before {
    content: '';
    position: absolute;
    bottom: -5px; /* Position it just below the link */
    left: 0;
    right: 0;
    width: 100%;
    height: 2px;
    background-color: #6B73FF;
    transform: scaleX(0);
    transition: transform var(--transition-speed) ease-out;
    border-radius: 1px; /* Optional: Rounds the corners of the underline */
}
/* Hover and focus states */
nav ul li a:hover::before, nav ul li a:focus::before {
    transform: scaleX(1); /* Extend the underline across the full width */
}


nav ul li a:focus, nav ul li a:hover {
    outline: none;
    background-color: var(--hover-color); /* Apply the hover background color */
}


/* Mobile Menu Styling */
#customHamburgerIcon {
    display: none; /* Initially hidden, shown in mobile view */
    position: fixed;
    top: 9px;
    right: 20px;
    cursor: pointer;
    font-size: 20px;
    background: linear-gradient(135deg, #6B73FF 10%, #000DFF 100%);
    color: white;
    padding: 5px;
    border-radius: 3px;
    z-index: 10001;    
    opacity: 0.75; /* Adjust opacity as needed */

}

#customMobileMenu {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    padding-top: 20px;
    background: linear-gradient(135deg, #6B73FF 10%, #000DFF 100%);
    color: white;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: left 0.5s ease;
    z-index: 9999;
    opacity: 0.85; /* Adjust opacity as needed */

}

#customMobileMenu.open {
    left: 0;
}

#customMobileMenu a, #customMobileMenu .dropdown-content a {
    text-align: center;
    display: block;
    width: 100%;
    padding: 10px 0;
    transition: background-color 0.75s ease;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: linear-gradient(135deg, #6B73FF 10%, #000DFF 100%);
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.76);
    border-radius: 20px;
    z-index: 1002;
    opacity: 0.85; /* Adjust opacity as needed */

}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
    .header-section nav ul, nav ul {
        display: none; /* Ensure this is applied to both header-section nav ul and nav ul */
    }

    #customHamburgerIcon {
        display: block;
    }

    #customMobileMenu {
        display: flex;
    }
}

@media (min-width: 769px) {
    #customMobileMenu, #customHamburgerIcon {
        display: none; /* Hide both mobile menu and hamburger icon on larger screens */
    }

    .header-section nav ul, nav ul {
        display: flex; /* Ensure normal navigation is visible */
    }
}
