/* Mentofy Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: var(--z-header, 1000);
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.site-header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 2rem;
    width: 100%;
    margin: 0 auto;
    max-width: 100%;
}

/* Logo Styling */
.site-logo {
    flex-shrink: 0;
    max-height: 45px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 5;
}

.logo-link {
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    cursor: pointer;
}

.logo-image {
    height: 100%;
    max-height: 45px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.site-logo:hover .logo-image {
    transform: scale(1.05);
}

/* Main Navigation */
.site-nav {
    height: 100%;
    margin: 0 auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0 1.2rem;
    color: var(--dark, #1e293b);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--primary, #2161fb);
    transform: translateX(-50%);
    transition: width 0.3s ease;
    border-radius: 3px 3px 0 0;
}

.nav-link:hover {
    color: var(--primary, #2161fb);
}

.nav-link:hover::after,
.nav-item.active .nav-link::after {
    width: 30px;
}

.nav-item.active .nav-link {
    color: var(--primary, #2161fb);
    font-weight: 600;
}

/* Dropdown Menu */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 220px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    list-style: none;
    margin: 0;
    z-index: 1100;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.7rem 1.5rem;
    color: var(--dark, #1e293b);
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    white-space: nowrap;
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: rgba(33, 97, 251, 0.05);
    color: var(--primary, #2161fb);
    transform: translateX(3px);
}

.dropdown-item i {
    margin-right: 0.8rem;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    margin: 0.5rem 0;
    background-color: rgba(0, 0, 0, 0.1);
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-btn,
.register-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.login-btn {
    color: var(--primary, #2161fb);
    border: 1.5px solid var(--primary, #2161fb);
    background-color: transparent;
}

.login-btn:hover {
    background-color: rgba(33, 97, 251, 0.05);
    color: var(--primary-dark, #1a4ad2);
    transform: translateY(-1px);
}

.register-btn {
    background-color: var(--primary, #2161fb);
    color: white;
    border: 1.5px solid var(--primary, #2161fb);
}

.register-btn:hover {
    background-color: var(--primary-dark, #1a4ad2);
    border-color: var(--primary-dark, #1a4ad2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 97, 251, 0.25);
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    border: none;
    background: none;
}

.user-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(33, 97, 251, 0.1);
}

.user-name {
    font-weight: 500;
    color: var(--dark, #1e293b);
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    transform: translateY(10px);
    width: 280px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    list-style: none;
    margin: 0;
    z-index: 1100;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.user-dropdown.show .user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.user-info {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: rgba(33, 97, 251, 0.05);
    border-radius: 12px 12px 0 0;
}

.menu-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(33, 97, 251, 0.1);
    margin-right: 1rem;
}

.user-details {
    overflow: hidden;
}

.user-fullname {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    min-width: 20px;
    margin-left: 0.5rem;
}

.badge-primary {
    background-color: var(--primary, #2161fb);
    color: white;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--dark, #1e293b);
    font-size: 1.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background-color: white;
    z-index: 1101;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(-320px);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-logo {
    height: 36px;
}

.logo-image-mobile {
    height: 100%;
    width: auto;
}

.mobile-menu-close {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--dark, #1e293b);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

/* Mobile Navigation */
.mobile-nav {
    padding: 1rem 0;
}

.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav li {
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-nav li:last-child {
    border-bottom: none;
}

.mobile-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--dark, #1e293b);
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.mobile-nav a:hover {
    color: var(--primary, #2161fb);
    background-color: rgba(33, 97, 251, 0.05);
}

/* Mobile Actions */
.mobile-actions {
    padding: 1rem 1.5rem;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-user-details {
    overflow: hidden;
    margin-left: 1rem;
}

.mobile-user-links {
    display: flex;
    flex-direction: column;
}

.mobile-user-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 0;
    color: var(--dark, #1e293b);
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: color 0.2s ease;
    text-decoration: none;
}

.mobile-user-link:last-child {
    border-bottom: none;
}

.mobile-user-link i {
    width: 24px;
    margin-right: 0.8rem;
    font-size: 1.1rem;
}

.mobile-user-link:hover {
    color: var(--primary, #2161fb);
}

.mobile-user-link.text-danger {
    color: #ef4444;
}

.mobile-user-link.text-danger:hover {
    color: #dc2626;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .header-container {
        padding: 0 1.5rem;
    }
    
    .nav-link {
        padding: 0 1rem;
    }
    
    .user-name {
        max-width: 120px;
    }
}

@media (max-width: 991px) {
    .site-header {
        height: 70px;
    }
    
    .header-container {
        padding: 0 1.2rem;
    }
    
    .site-nav {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .login-btn span,
    .register-btn span {
        display: none;
    }
    
    .login-btn,
    .register-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    
    .user-name {
        display: none;
    }
}

@media (max-width: 767px) {
    .header-container {
        padding: 0 1rem;
    }
    
    .site-logo {
        height: 30px;
        max-height: 30px;
    }
    
    .logo-image {
        max-height: 30px;
    }
}

@media (max-width: 400px) {
    .mobile-menu {
        width: 280px;
        right: -280px;
    }
    
    .mobile-menu.active {
        transform: translateX(-280px);
    }
}

/* Display utilities */
.d-lg-none {
    display: none;
}

@media (max-width: 991px) {
    .d-lg-none {
        display: flex !important;
    }
}