/* Consolidated Navbar Styles */

/* Add blur effect for main content when mobile menu is open */
.main, .main-content {
    transition: filter 0.3s ease;
}

/* Desktop Navigation */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    margin-left: 10px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 2px;
}

.nav-link:hover {
    background: #8e44ad;
    color: white;
    transform: translateY(-2px);
}

.nav-link.active {
    background-color: #6c3483;
    color: white;
}

.nav-link svg {
    margin-left: 8px;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 2px;
}

.dropdown-toggle:hover {
    background: #8d44ada6;
    color: white;
}

.dropdown-toggle svg:last-child {
    margin-right: 5px;
    transition: transform 0.3s ease;
}

.dropdown-toggle.active svg:last-child {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s ease;
}

.dropdown-link:hover {
    background: #8d44ad88;
    color: white;
}

.dropdown-link svg {
    margin-left: 10px;
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-btn {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.action-btn:hover {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.notification-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    min-width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

/* Notifications Dropdown */
.notifications-dropdown {
    position: relative;
}

.notifications-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 350px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.notifications-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.notifications-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.mark-all-read {
    background: none;
    border: none;
    color: #3498db;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s ease;
}

.mark-all-read:hover {
    color: #2980b9;
    text-decoration: underline;
}

.notifications-list {
    max-height: 300px;
    overflow-y: auto;
}

.loading-notifications {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    color: #666;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(52, 152, 219, 0.2);
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.notifications-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.view-all-notifications {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.view-all-notifications:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Settings Dropdown */
.settings-dropdown {
    position: relative;
}

.settings-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 300px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.settings-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.settings-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.settings-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.user-info {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.user-avatar {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.user-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 15px;
}

.user-details {
    flex: 1;
}

.user-name {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.user-email {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
}

.user-role, .user-join-date {
    margin: 0;
    font-size: 13px;
    color: #999;
}

.guest-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.settings-actions {
    padding: 10px 0;
}

.settings-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s ease;
}

.settings-link:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.settings-link svg {
    margin-left: 10px;
}

/* Login Button */
.login-btn {
    background: linear-gradient(135deg, #6c3483, #8e44ad);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
  
}

.login-btn:hover {
    background: linear-gradient(135deg,  #8e44ad,#6c3483,);
    border-color: #ffffff;
    transform: translateY(-2px);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(52, 152, 219, 0.1);
}

.mobile-menu-btn span {
    width: 22px;
    height: 2px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Scroll Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background: #2980b9;
    transform: translateY(-3px);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear 0.3s, opacity 0.3s ease;
}

.mobile-nav.active {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s linear 0s, opacity 0.3s ease;
}

.mobile-nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.mobile-nav-content {
    position: relative;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    animation: slideOutRight 0.3s ease forwards;
    overflow-y: auto;
    margin-left: auto;
}

.mobile-nav.active .mobile-nav-content {
    animation: slideInRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.mobile-nav-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list li {
    border-bottom: 1px solid #eee;
}

.mobile-nav-list li:last-child {
    border-bottom: none;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: background-color 0.2s;
}

.mobile-nav-link:hover {
    background-color: #f5f5f5;
}

.mobile-nav-link.active {
    background-color: #e9f7fe;
    color: #3498db;
    font-weight: 500;
}

.mobile-nav-link svg {
    margin-left: 10px;
}

/* Mobile Dropdown */
.mobile-dropdown {
    position: relative;
}

.mobile-dropdown > .mobile-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-dropdown > .mobile-nav-link::after {
    content: "▼";
    font-size: 12px;
    transition: transform 0.3s ease;
}

.mobile-dropdown.active > .mobile-nav-link::after {
    transform: rotate(180deg);
}

.mobile-dropdown-content {
    display: none;
    background-color: #f8f9fa;
    padding-right: 20px;
    border-right: 3px solid #3498db;
}

.mobile-dropdown.active .mobile-dropdown-content {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-dropdown-content a {
    color: #333;
    padding: 12px 16px 12px 0;
    text-decoration: none;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    transition: all 0.2s ease;
}

.mobile-dropdown-content a:last-child {
    border-bottom: none;
}

.mobile-dropdown-content a:hover {
    background-color: #e9f7fe;
    padding-right: 20px;
    color: #3498db;
}

.mobile-dropdown-content svg {
    margin-left: 10px;
    min-width: 16px;
}

/* Mobile Auth Section */
.mobile-nav-auth {
    padding: 20px;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

.mobile-auth-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-auth-btn.primary {
    background: #3498db;
    color: white;
    border: 1px solid #3498db;
}

.mobile-auth-btn.primary:hover {
    background: #2980b9;
    border-color: #2980b9;
}

.mobile-auth-btn.secondary {
    background: transparent;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.mobile-auth-btn.secondary:hover {
    background: #e74c3c;
    color: white;
}

/* Notification Badge for Mobile */
.mobile-notification-badge {
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    position: absolute;
    top: 5px;
    right: 5px;
    min-width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav {
        display: none;
    }
    
    .user-actions {
        display: none;
    }
    
    .header-content {
        padding: 0 15px;
    }
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 10px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .mobile-nav-content {
        width: 90%;
    }
}