﻿/**
 * Mahartist — هدر چسبان (یکپارچه، بدون تداخل با Riode sticky)
 */

.header.ma-site-header {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: #fff;
    transition: box-shadow 0.25s ease;
}

.header.ma-site-header.ma-site-header--scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* جلوگیری از fixed شدن جداگانهٔ header-bottom توسط main.js */
.header.ma-site-header .header-bottom.fixed,
.header.ma-site-header .sticky-header.fixed {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    animation: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    z-index: auto !important;
}

.header.ma-site-header .sticky-content-wrapper {
    height: auto !important;
    display: block !important;
}

/* ورود / ثبت‌نام / حساب کاربری — متن سفید روی پس‌زمینه برند */
.header.ma-site-header .profileheaderbox {
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.header.ma-site-header .profileheaderbox a,
.header.ma-site-header .profileheaderbox a:hover,
.header.ma-site-header .profileheaderbox a:focus,
.header.ma-site-header .profileheaderbox a:active {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-decoration: none !important;
}

.header.ma-site-header .profileheaderbox span {
    color: rgba(255, 255, 255, 0.85);
}

.header.ma-site-header .profileheaderbox i {
    color: #fff;
}

.header.ma-site-header .profileheaderbox:hover {
    background-color: color-mix(in srgb, var(--brand-primary) 88%, #1a0f08);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--brand-primary) 28%, transparent);
}

/* پیام خوش‌آمد — فارسی: حرکت چپ به راست تا ابتدای جمله اول دیده شود */
@media (max-width: 480px) {
    html[dir="rtl"] .header-top .welcome-msg {
        animation: 6s linear 2s 1 ma_show_msg_first_rtl, 12s linear 8s infinite ma_show_msg_rtl;
    }
}

@keyframes ma_show_msg_first_rtl {
    from { transform: translateX(0%); }
    to { transform: translateX(100%); }
}

@keyframes ma_show_msg_rtl {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}
