/* ==================== MODERN NAVIGATION ==================== */

/* هدر مدرن */
.modern-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
}

/* کانتینر هدر */
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 20px;
        height: 70px;
    }
}

/* لوگو */
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* منوی دسکتاپ */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

@media (max-width: 1024px) {
    .desktop-nav {
        display: none;
    }
}

/* لیست منو */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link.active {
    color: #667eea;
    font-weight: 600;
}

/* انیمیشن underline */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* دکمه‌های احراز هویت */
.auth-buttons {
    display: flex;
    gap: 15px;
    margin-right: 20px;
}

.auth-btn {
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-btn {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.login-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.register-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 2px solid transparent;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* منوی موبایل */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: block;
    }
}

.hamburger {
    width: 25px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* منوی کشویی موبایل */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: white;
    z-index: 1000;
    padding: 80px 30px 30px;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
}

.mobile-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-item {
    margin-bottom: 10px;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    font-weight: 500;
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.mobile-menu-link i {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.mobile-auth-buttons {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.mobile-auth-buttons .auth-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
}

/* پروفایل کاربر */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-profile:hover {
    background: rgba(102, 126, 234, 0.2);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.user-role {
    font-size: 12px;
    color: #666;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
}

.user-profile:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.dropdown-item {
    padding: 12px 20px;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
}

.dropdown-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 10px 0;
}

.dropdown-logout {
    color: #ff4757;
}

.dropdown-logout:hover {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.05);
}

/* استایل‌های خاص برای صفحه‌های مختلف */
body.auth-page .modern-header {
    background: transparent;
    box-shadow: none;
}

body.auth-page .header-scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.08);
}

/* انیمیشن‌های اضافی */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-item {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.2s; }
.nav-item:nth-child(3) { animation-delay: 0.3s; }
.nav-item:nth-child(4) { animation-delay: 0.4s; }
.nav-item:nth-child(5) { animation-delay: 0.5s; }
.nav-item:nth-child(6) { animation-delay: 0.6s; }

/* استایل‌های ریسپانسیو */
@media (max-width: 1200px) {
    .desktop-nav {
        gap: 20px;
    }
    
    .nav-menu {
        gap: 15px;
    }
}

@media (max-width: 1024px) {
    .auth-buttons {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 15px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .mobile-nav {
        width: 90%;
        padding: 70px 20px 20px;
    }
}

/* دکمه‌های اسپیشال */
.nav-cta {
    position: relative;
    overflow: hidden;
}

.nav-cta::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.nav-cta:hover::before {
    opacity: 1;
}

/* بج آیکون */
.nav-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: #ff4757;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}