/* =========================================
   فایل CSS مدرن برای هدر - دشت پروانه
   طراحی ساده، زیبا و ریسپانسیو
   ========================================= */

/* --- تنظیمات پایه --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
}

/* --- هدر اصلی --- */
.sticky-header {
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* --- کانتینر محتوا --- */
.sticky-header .header-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    gap: 20px;
}

/* --- لوگو --- */
.sticky-header .logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    transition: transform 0.3s ease;
}

.sticky-header .logo h1:hover {
    transform: scale(1.02);
}

/* --- منوی اصلی دسکتاپ --- */
.sticky-header .main-nav {
    display: flex;
    gap: 12px;
    margin: 0 auto;
}

.sticky-header .nav-link {
    color: #4a5568;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sticky-header .nav-link:hover {
    background-color: #f7fafc;
    color: #2d3748;
    transform: translateY(-1px);
}

/* دکمه آپلود متمایز */
.sticky-header .upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 10px 20px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.sticky-header .upload-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* --- پنل کاربری --- */
.sticky-header .user-panel {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* اطلاعات کاربر */
.sticky-header .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: #f8fafc;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.sticky-header .welcome-text {
    color: #718096;
    font-size: 0.9rem;
}

.sticky-header .username-badge {
    color: #4a5568;
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- دکمه‌های احراز هویت --- */
.sticky-header .auth-buttons {
    display: flex;
    gap: 8px;
}

/* استایل پایه دکمه‌ها */
.sticky-header .auth-buttons .btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

/* دکمه ورود */
.sticky-header .auth-buttons .btn-login {
    background-color: transparent;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.sticky-header .auth-buttons .btn-login:hover {
    background-color: #f8fafc;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

/* دکمه ثبت نام */
.sticky-header .auth-buttons .btn-register {
    background: linear-gradient(135deg, #4fd1c5 0%, #38b2ac 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(79, 209, 197, 0.3);
}

.sticky-header .auth-buttons .btn-register:hover {
    background: linear-gradient(135deg, #38b2ac 0%, #319795 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 209, 197, 0.4);
}

/* دکمه پروفایل */
.sticky-header .auth-buttons .btn-profile {
    background-color: #edf2f7;
    color: #4a5568;
}

.sticky-header .auth-buttons .btn-profile:hover {
    background-color: #e2e8f0;
    transform: translateY(-1px);
}

/* دکمه خروج */
.sticky-header .auth-buttons .btn-logout {
    background-color: #fed7d7;
    color: #c53030;
}

.sticky-header .auth-buttons .btn-logout:hover {
    background-color: #fc8181;
    color: white;
    transform: translateY(-1px);
}

/* --- دکمه همبرگری --- */
.sticky-header .hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 8px;
    border-radius: 8px;
    background-color: transparent;
    transition: background-color 0.2s;
}

.sticky-header .hamburger:hover {
    background-color: #f7fafc;
}

.sticky-header .hamburger span {
    width: 24px;
    height: 2px;
    background-color: #4a5568;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* --- منوی موبایل --- */
.sticky-header .mobile-menu {
    display: none;
    flex-direction: column;
    padding: 20px;
    background-color: white;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sticky-header .mobile-links,
.sticky-header .mobile-auth {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.sticky-header .mobile-links a,
.sticky-header .mobile-auth a {
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sticky-header .mobile-links a:hover,
.sticky-header .mobile-auth a:hover {
    background-color: #f7fafc;
    color: #2d3748;
}

.sticky-header .mobile-user-info {
    padding: 12px 16px;
    background-color: #f8fafc;
    border-radius: 8px;
    margin-bottom: 15px;
    color: #4a5568;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

/* =========================================
   استایل‌های ریسپانسیو
   ========================================= */

@media (max-width: 768px) {
    .sticky-header {
        padding: 0 16px;
    }
    
    .sticky-header .header-content {
        height: 60px;
        gap: 10px;
    }
    
    .sticky-header .logo h1 {
        font-size: 1.5rem;
    }
    
    /* نمایش همبرگر و مخفی کردن منوی دسکتاپ */
    .sticky-header .hamburger {
        display: flex;
    }
    
    .sticky-header .desktop-nav,
    .sticky-header .desktop-user {
        display: none !important;
    }
    
    /* منوی موبایل وقتی باز می‌شود */
    .sticky-header .mobile-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 999;
    }
    
    /* دکمه‌ها در موبایل */
    .sticky-header .mobile-auth .btn {
        width: 100%;
        text-align: center;
    }
    
    .sticky-header .mobile-links a.upload-btn {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white !important;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .sticky-header .logo h1 {
        font-size: 1.3rem;
    }
    
    .sticky-header .header-content {
        height: 56px;
    }
}

/* حالت‌های تعاملی */
.sticky-header .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.sticky-header .hamburger.active span:nth-child(2) {
    opacity: 0;
}

.sticky-header .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* تایپوگرافی فارسی */
@font-face {
    font-family: 'Vazir';
    src: url('/fonts/Vazir.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'Vazir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* بهبود برای نمایش بهتر در مرورگرهای مختلف */
.sticky-header {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* انیمیشن‌های ظریف */
.sticky-header .nav-link,
.sticky-header .auth-buttons .btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* شناور شدن ظریف */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.sticky-header .logo:hover h1 {
    animation: float 2s ease-in-out infinite;
}