/* =========================================
   1. ظاهر کلی هدر و نوار گرادیان
   ========================================= */
.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 85px;
    background: #fff;
    /* گرد کردن گوشه پایین مثل طرح اولت */
    border-radius: 0 0 25px 25px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); /* سایه نرم‌تر */
    z-index: 1000;
    padding: 0 20px;
    box-sizing: border-box;
}

/* آن خط رنگی معروف پایین هدر */
.site-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 20px; /* کمی فاصله از چپ و راست */
    right: 20px;
    height: 4px; /* ضخامت خط */
    background: linear-gradient(90deg, #00b3ff, #b026ff, #ff4fd8);
    border-radius: 10px 10px 25px 25px;
    z-index: 1001;
    /* افکت درخشش نئونی */
    box-shadow: 0 2px 10px rgba(176, 38, 255, 0.4); 
}

/* اصلاح نوار مشکی وردپرس */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

.header-inner {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* لوگو */
.header-logo img {
    height: 50px;
    width: auto;
    display: block;
    transition: transform 0.3s;
}
.header-logo img:hover {
    transform: scale(1.05); /* کمی زوم هنگام هاور */
}

/* =========================================
   2. استایل منو و هاور (بخش مهم)
   ========================================= */
.header-nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-list > li {
    position: relative;
    padding: 25px 0;
}

.nav-list > li > a {
    text-decoration: none;
    color: #444;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
}

/* ✨ افکت هاور: خط متحرک زیر منو */
.nav-list > li > a::before {
    content: "";
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #b026ff, #ff4fd8);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-list > li:hover > a {
    color: #b026ff;
}

.nav-list > li:hover > a::before {
    width: 100%;
    right: auto;
    left: 0;
}

/* =========================================
   3. زیر منو (Dropdown) - استایل نرم و شیشه‌ای
   ========================================= */
.nav-list li ul.sub-menu {
    position: absolute;
    top: 100%; /* دقیقا زیر هدر */
    right: 0;
    width: 220px;
    background: #fff;
    border-radius: 15px; /* گردی بیشتر */
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(176, 38, 255, 0.1); /* حاشیه کمرنگ بنفش */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* انیمیشن فنری */
    z-index: 999;
    padding: 10px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-list li:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-list li ul.sub-menu li a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* ✨ هاور آیتم‌های زیرمنو (گرادیان ملایم) */
.nav-list li ul.sub-menu li a:hover {
    background: linear-gradient(90deg, #f3e6ff, #e6fbff);
    color: #8a00e6;
    transform: translateX(-5px); /* حرکت ریز به سمت چپ */
}

/* =========================================
   4. دکمه‌ها و موبایل
   ========================================= */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.login-btn {
    background: linear-gradient(90deg, #00b3ff, #b026ff);
    color: #fff !important;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 179, 255, 0.3);
    transition: all 0.3s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(176, 38, 255, 0.5);
}

.hidden-toggle, .hamburger-icon, .close-menu-icon { display: none; }

/* موبایل */
@media (max-width: 900px) {
    .hamburger-icon { display: flex; flex-direction: column; gap: 5px; width: 28px; cursor: pointer; }
    .hamburger-icon span { display: block; width: 100%; height: 3px; background: #333; border-radius: 3px; }
    
    .header-nav {
        position: fixed;
        top: 0; right: -100%; width: 280px; height: 100vh;
        background: #fff; flex-direction: column; padding: 60px 20px;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1); transition: 0.3s; z-index: 1002;
    }
    
    #mobile-menu-toggle:checked ~ .header-nav { right: 0; }
    .nav-list { flex-direction: column; width: 100%; gap: 0; }
    .nav-list > li { width: 100%; padding: 0; border-bottom: 1px solid #f0f0f0; }
    .nav-list > li > a { display: block; padding: 15px 5px; }
    
    /* زیرمنو موبایل */
    .nav-list li ul.sub-menu {
        position: static; width: 100%; box-shadow: none; border: none;
        opacity: 1; visibility: visible; transform: none; display: none;
        background: #fafafa; padding: 5px 15px;
    }
    .nav-list li:hover > ul.sub-menu { display: flex; }
    
    .close-menu-icon { display: block; position: absolute; top: 20px; left: 20px; font-size: 24px; cursor: pointer; }
}
img.menu-image {
    margin-left: 12px !important; /* فاصله از متن */
    margin-right: 0 !important;   /* فاصله اضافی سمت راست حذف شود */
    vertical-align: middle !important; /* تراز عمودی با متن */
    
    /* اگر آیکون‌ها خیلی بزرگ هستند، سایزشان را اینجا کنترل کن */
    width: 40px !important; 
    height: 40px !important;
    object-fit: contain;
}

/* برای اطمینان بیشتر، آیتم لینک را هم مرتب می‌کنیم */
.sub-menu li a {
    display: flex !important;
    align-items: center !important;
    gap: 10px; /* این دستور هم فاصله می‌اندازد */
}

/* اگر افزونه عنوان را داخل span گذاشته باشد */
.sub-menu li a span.menu-image-title {
    padding-right: 0 !important; /* حذف پدینگ‌های اضافی */
}