body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #f4f7f6;
    padding-top: 80px; /* Prevents content from hiding behind the fixed navbar */
}

/* Navbar Styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 0 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: calc(100% - 80px);
    z-index: 1000;
    height: 80px;
}

.navbar-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.logo-img {
    height: 40px;
    margin-right: 15px;
}

.navbar-brand h1 {
    font-size: 1.8em;
    margin: 0;
    transition: display 0.3s ease; /* Smooth transition for hiding */
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 1em;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #007bff;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Profile Section & Dropdown */
.profile-section {
    position: relative;
}

.profile-icon {
    cursor: pointer;
}

.profile-icon img {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    border: 2px solid #007bff;
    object-fit: cover;
    transition: width 0.3s ease, height 0.3s ease; /* Smooth transition for resizing */
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 65px;
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 200px;
    overflow: hidden;
    z-index: 1001;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: #f4f4f4;
}

/* Footer Styles */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 20px 40px;
    margin-top: 40px;
}

/* Hamburger menu button (hidden on desktop) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

/* --- RESPONSIVE STYLES START HERE --- */

/* For Tablets */
@media (max-width: 992px) {
    .navbar-brand h1 {
        display: none; /* Hide the title text to save space */
    }
}

/* For Mobile Phones */
@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
        width: calc(100% - 40px);
    }

    /* Transform the nav links into a slide-out menu */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        height: 100vh;
        width: 250px;
        background-color: #ffffff;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 100px;
        gap: 0;
        transition: right 0.3s ease-in-out;
        z-index: 999;
    }
    
    .nav-links.active {
        right: 0; /* Slide the menu into view */
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        padding: 15px 30px;
        display: block;
    }

    /* Show the hamburger menu icon */
    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    /* Make the profile icon smaller */
    .profile-section .profile-icon img {
        height: 40px;
        width: 40px;
    }
}

/* --- AI Assistant Sticky Icon Styles --- */
#ai-assistant-icon-container {
    position: fixed; /* Makes it stick to the viewport */
    bottom: 20px;    /* Distance from the bottom of the screen */
    right: 20px;     /* Distance from the right of the screen */
    z-index: 1000;   /* Ensure it's above other content */
    display: flex;   /* For centering the image if needed, or consistent sizing */
    justify-content: center;
    align-items: center;
    /* Optional: background/padding for a circular shape */
    /* background-color: #007bff; */
    /* border-radius: 50%; */
    /* box-shadow: 0 4px 8px rgba(0,0,0,0.2); */
}

#ai-assistant-link {
    display: block; /* Ensure the link fills the container */
    cursor: pointer;
    line-height: 0; /* Remove extra space below image */
}

#ai-assistant-image {
    width: 80px;  /* Default size for the icon */
    height: auto; /* Maintain aspect ratio */
    border-radius: 50%; /* Make it circular if your image allows */
    transition: transform 0.2s ease-in-out; /* Smooth hover effect */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Add some depth */
}

#ai-assistant-image:hover {
    transform: scale(1.05); /* Slightly enlarge on hover */
}

/* --- Responsiveness for smaller screens --- */
@media (max-width: 768px) {
    #ai-assistant-icon-container {
        bottom: 15px;
        right: 15px;
    }
    #ai-assistant-image {
        width: 60px; /* Smaller on mobile */
    }
}

@media (max-width: 480px) {
    #ai-assistant-icon-container {
        bottom: 10px;
        right: 10px;
    }
    #ai-assistant-image {
        width: 50px; /* Even smaller on very small screens */
    }
}