/* Enhanced Header Styles */
:root {
    --header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --header-height: 70px;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: #f8f9fa;
    padding-top: var(--header-height);
}

/* Main Header */
.main-header {
    background: var(--header-bg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    transition: all var(--transition-speed) ease;
}

.main-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Logo */
.navbar-brand {
    color: #fff !important;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform var(--transition-speed) ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.brand-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Navigation Links */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all var(--transition-speed) ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: #fff;
    border-radius: 2px 2px 0 0;
}

/* Auth Buttons (Logged Out View) */
.btn-login, .btn-register {
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    border: 2px solid #fff;
}

.btn-login {
    background: transparent;
    color: #fff;
}

.btn-login:hover {
    background: #fff;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.btn-register {
    background: #fff;
    color: #667eea;
}

.btn-register:hover {
    background: transparent;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* User Menu (Logged In View) */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Notifications */
.notification-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.notification-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    border: 2px solid #667eea;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* User Dropdown Trigger */
.user-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.6rem 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.user-trigger:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.user-name {
    color: #fff;
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    color: #fff;
    font-size: 0.8rem;
    transition: transform var(--transition-speed) ease;
}

.show .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menus */
.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    min-width: 260px;
    margin-top: 0.5rem !important;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    color: #374151;
    font-weight: 500;
}

.dropdown-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    color: #6b7280;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: #667eea;
    transform: translateX(-3px);
}

.dropdown-item:hover i {
    color: #667eea;
}

.dropdown-item.logout-btn {
    color: #ef4444;
}

.dropdown-item.logout-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

.dropdown-item.logout-btn i {
    color: #ef4444;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: #e5e7eb;
}

/* Notification Dropdown Specific */
.notification-dropdown {
    min-width: 340px;
    max-width: 400px;
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-body {
    max-height: 360px;
    overflow-y: auto;
    padding: 0.5rem;
}

.notification-item {
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.notification-item.unread {
    background: #eff6ff;
    border-left-color: #667eea;
}

.notification-item:hover {
    background: #f3f4f6;
}

.notification-footer {
    padding: 0.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    body {
        padding-top: 60px;
    }

    .navbar-collapse {
        background: rgba(102, 126, 234, 0.98);
        padding: 1rem;
        border-radius: 12px;
        margin-top: 1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .user-menu {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.5rem;
    }

    .notification-btn,
    .user-trigger {
        width: 100%;
        border-radius: 8px;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
    }

    .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        background: rgba(255, 255, 255, 0.1);
        margin-top: 0.5rem !important;
    }

    .dropdown-item {
        color: #fff;
    }

    .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.2);
    }
}

/* Flash Messages */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
