/* Navigation Bar Styles */

/* Global font family for navbar */
* {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Main Navigation Bar */
.navbar {
    background: #35408e;
    color: #ffffff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 900;
}

.navbar .left {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease-in-out;
}

.navbar .right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.navbar input[type=text] {
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #333; /* Make sure text is dark and visible */
    font-size: 14px;
    width: 250px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
}

.navbar input[type=text]:focus {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 280px;
    color: #333; /* Ensure text stays visible on focus */
}

.navbar input[type=text]::placeholder {
    color: #666; /* Make placeholder visible but lighter */
    opacity: 1;
    font-weight: 400;
}

/* Ensure search form doesn't have conflicting styles */
.navbar form {
    display: flex;
    align-items: center;
    margin: 0;
}

/* If you have a search container/wrapper */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.navbar a.btn {
    background: #2563eb;
    color: #ffffff;
}

.navbar a.btn:hover {
    background: #1d4ed8;
}

.navbar a:not(.btn):hover {
    background: #f1f5f9;
    color: #2563eb;
}

.navbar a.logout-btn {
    background: #dc2626;
    color: #ffffff;
    border-radius: 6px;
}

.navbar a.logout-btn:hover {
    background: #b91c1c;
}

/* Hamburger Menu */
.hamburger {
    display: inline-block;
    cursor: pointer;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    padding: 8px 12px;
    transition: opacity 0.3s ease-in-out;
    margin-right: 8px;
}

.hamburger.hidden {
    opacity: 0;
    pointer-events: none;
}

.main.shifted .navbar .left {
    transform: none; /* prevent navbar left from shifting when drawer opens */
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-btn {
    background: none;
    border: none;
    color: #ffffff;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-btn:hover {
    background: #f1f5f9;
    color: #2563eb;
}

.profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.profile-pic-default {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    border: 2px solid #e2e8f0;
}

.profile-name {
    font-weight: 500;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 12px;
    color: #94a3b8;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #ffffff;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    z-index: 1000;
    margin-top: 4px;
}

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

.dropdown-content a {
    color: #475569;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.dropdown-content a:hover {
    background-color: #f1f5f9;
    color: #2563eb;
}

.dropdown-content a:first-child {
    border-radius: 6px 6px 0 0;
}

.dropdown-content a:last-child {
    border-radius: 0 0 6px 6px;
}

.dropdown-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 4px 0;
}

/* Logout option specific styling */
.logout-option {
    color: #dc2626 !important;
    border-top: 1px solid #e2e8f0;
}

.logout-option:hover {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
}

/* Login Page Navbar Styles */
body.login-page .navbar {
    background: transparent;
    box-shadow: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

body.login-page .navbar a, 
body.login-page .navbar .profile-btn, 
body.login-page .hamburger {
    color: #ffffff; /* keep navbar controls visible on hero */
}

/* Hide hamburger on login page */
body.login-page .hamburger { 
    display: none; 
}