/* =========================================================
   FARASOD — UNIFIED HEADER UI (Desktop & Mobile)
   ساختار یکپارچه: منوی کشویی در همه دستگاه‌ها
   نسخه ۲ — دکمه‌های دو ستونه + والدین تمام‌عرض
   ========================================================= */

:root {
    --farasod-primary: #4F46E5;
    --farasod-primary-dark: #4338CA;
    --farasod-primary-light: #EEF2FF;

    --farasod-text: #111827;
    --farasod-text-soft: #64748B;
    --farasod-border: #E5E7EB;

    --farasod-white: #FFFFFF;
    --farasod-bg: #F8FAFC;

    --header-height: 76px;
    --header-radius: 18px;

    --header-shadow:
        0 8px 30px rgba(15, 23, 42, 0.055);

    /* رنگ‌های نئومورفیک دکمه‌ها */
    --btn-neo-bg: #e8e8e8;
    --btn-neo-shadow-dark: #c5c5c5;
    --btn-neo-shadow-light: #ffffff;
    --btn-accent: #4F46E5;
}


/* =========================================================
   RESET
   ========================================================= */

.site-header *,
.mobile-nav *,
.mobile-nav-overlay * {
    box-sizing: border-box;
}

.site-header a,
.mobile-nav a {
    text-decoration: none;
}


/* =========================================================
   MAIN HEADER
   ========================================================= */

.site-header {
    position: fixed;
    top: 12px;
    right: 0;
    left: 0;

    width: fit-content;
    max-width: calc(100% - 32px);
    min-width: 300px;

    height: var(--header-height);

    margin: 0 auto;

    z-index: 9999;

    background: rgba(255, 255, 255, 0.90);

    border: 1px solid rgba(226, 232, 240, 0.85);

    border-radius: var(--header-radius);

    box-shadow: var(--header-shadow);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    transition:
        top .3s ease,
        width .3s ease,
        box-shadow .3s ease,
        background .3s ease;
}

@supports not (width: fit-content) {
    .site-header {
        width: auto;
        display: table;
    }
}

.site-header.scrolled {
    top: 8px;

    background: rgba(255, 255, 255, 0.96);

    box-shadow:
        0 14px 40px rgba(15, 23, 42, 0.09);
}


/* =========================================================
   HEADER INNER
   ========================================================= */

.header-inner {
    width: 100%;
    height: 100%;

    padding: 0 16px;

    display: flex;
    align-items: center;

    gap: 10px;

    flex-wrap: nowrap;
    white-space: nowrap;
}


/* =========================================================
   BRAND / LOGO
   ========================================================= */

.site-branding {
    display: flex;
    align-items: center;

    flex-shrink: 0;

    min-width: max-content;

    gap: 10px;

    color: var(--farasod-text);
}

.site-branding img {
    width: 200px;
    height: auto;

    object-fit: contain;

    display: block;

    border-radius: 12px;
}

.brand-icon {
    width: 200px;
    height: auto;

    border-radius: 13px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;

    background:
        linear-gradient(135deg,
            var(--farasod-primary),
            #6366F1);

    font-size: 20px;

    box-shadow:
        0 8px 18px rgba(79, 70, 229, .20);
}

.brand-name {
    display: flex;
    flex-direction: column;

    gap: 2px;

    line-height: 1.2;
}

.brand-name span:first-child {
    font-size: 17px;
    font-weight: 800;

    color: var(--farasod-text);
}

.brand-name span:last-child {
    font-size: 10px;
    font-weight: 500;

    color: var(--farasod-text-soft);

    max-width: 170px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================================================
   PRIMARY NAVIGATION
   ========================================================= */

.primary-nav {
    display: none !important;
}


/* =========================================================
   HEADER ACTIONS
   ========================================================= */

.header-actions {
    display: flex;
    align-items: center;

    gap: 7px;

    flex-shrink: 0;

    margin-right: auto;
}


/* =========================================================
   NOTIFICATION
   ========================================================= */

.header-actions .notification-bell,
.header-actions .notification-btn,
.header-actions>a.notification-bell {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;

    border-radius: 12px;

    color: #475569;

    background: #F8FAFC;

    border: 1px solid #E2E8F0;

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease;
}

.header-actions .notification-bell:hover,
.header-actions .notification-btn:hover,
.header-actions>a.notification-bell:hover {
    color: var(--farasod-primary);

    background: var(--farasod-primary-light);

    transform: translateY(-1px);
}

.notification-bell .badge {
    position: absolute;
    top: -6px;
    left: -6px;

    min-width: 20px;
    height: 20px;

    padding: 0 4px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #EF4444;
    color: #fff;

    border-radius: 50%;

    font-size: 10px;
    font-weight: 700;

    border: 2px solid #fff;
}


/* =========================================================
   RECHARGE BUTTON
   ========================================================= */

.btn-recharge-header {
    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 0 13px;

    border-radius: 12px;

    color: var(--farasod-primary);

    background: var(--farasod-primary-light);

    border: 1px solid #E0E7FF;

    font-size: 12px;
    font-weight: 700;

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease;
}

.btn-recharge-header:hover {
    color: #fff;

    background: var(--farasod-primary);

    transform: translateY(-1px);
}

.btn-recharge-header i {
    font-size: 14px;
}


/* =========================================================
   USER PROFILE
   ========================================================= */

.user-profile-btn {
    height: 44px;

    display: flex;
    align-items: center;

    gap: 8px;

    padding: 3px 5px 3px 12px;

    border-radius: 14px;

    color: var(--farasod-text);

    background: #F8FAFC;

    border: 1px solid #E2E8F0;

    transition:
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}

.user-profile-btn:hover {
    background: #fff;

    border-color: #C7D2FE;

    box-shadow:
        0 5px 18px rgba(79, 70, 229, .08);
}

.user-profile-btn>span {
    max-width: 110px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 12px;
    font-weight: 700;
}

.user-profile-btn .avatar {
    width: 36px;
    height: 36px;

    object-fit: cover;

    border-radius: 11px;

    display: block;

    border: 2px solid #fff;

    box-shadow:
        0 2px 8px rgba(15, 23, 42, .12);
}

.header-actions>.btn-cta:not(.user-profile-btn) {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 0 15px;

    color: #fff;

    background:
        linear-gradient(135deg,
            var(--farasod-primary),
            #6366F1);

    border-radius: 12px;

    font-size: 12px;
    font-weight: 700;

    box-shadow:
        0 7px 18px rgba(79, 70, 229, .18);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.header-actions>.btn-cta:not(.user-profile-btn):hover {
    transform: translateY(-1px);

    box-shadow:
        0 10px 24px rgba(79, 70, 229, .25);
}


/* =========================================================
   HAMBURGER
   ========================================================= */

.hamburger {
    width: 43px;
    height: 43px;

    padding: 0;

    border: 0;

    border-radius: 12px;

    background: #F8FAFC;

    border: 1px solid #E2E8F0;

    display: flex;

    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 5px;

    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease;
}

.hamburger:hover {
    background: #EEF2FF;
    border-color: #C7D2FE;
}

.hamburger span {
    width: 19px;
    height: 2px;

    border-radius: 10px;

    background: #334155;

    transition:
        transform .25s ease,
        opacity .2s ease,
        background .2s ease;
}

.hamburger:hover span {
    background: #4F46E5;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   HEADER SPACER
   ========================================================= */

.header-spacer {
    height: 100px;
}


/* =========================================================
   MOBILE OVERLAY
   ========================================================= */

.mobile-nav-overlay {
    position: fixed;

    inset: 0;

    z-index: 10000;

    background: rgba(15, 23, 42, .42);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .3s ease,
        visibility .3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}


/* =========================================================
   MOBILE NAV (Sliding Panel)
   ========================================================= */

.mobile-nav {
    position: fixed;

    top: 0;
    right: 0;

    width: min(400px, 90vw);
    height: 100dvh;

    z-index: 10001;

    background: #fff;

    box-shadow:
        -15px 0 50px rgba(15, 23, 42, .14);

    transform: translateX(105%);

    transition:
        transform .35s cubic-bezier(.4, 0, .2, 1);

    overflow: hidden;

    display: flex;
    flex-direction: column;
}

.mobile-nav.active {
    transform: translateX(0);
}


/* =========================================================
   MOBILE HEADER
   ========================================================= */

.mobile-nav-header {
    height: 76px;

    flex-shrink: 0;

    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid #F1F5F9;
}

.mobile-nav-logo {
    display: flex;
    align-items: center;

    gap: 10px;

    color: var(--farasod-text);
}

.mobile-nav-logo img {
    width: 43px;
    height: 43px;

    object-fit: contain;

    border-radius: 11px;
}

.mobile-site-name {
    font-size: 16px;
    font-weight: 800;
}

.mobile-close-btn {
    width: 40px;
    height: 40px;

    border: 0;

    border-radius: 11px;

    background: #F8FAFC;

    color: #475569;

    cursor: pointer;

    font-size: 16px;

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease;
}

.mobile-close-btn:hover {
    color: var(--farasod-primary);

    background: var(--farasod-primary-light);

    transform: rotate(90deg);
}


/* =========================================================
   MOBILE CONTENT
   ========================================================= */

.mobile-nav-content {
    flex: 1;

    overflow-y: auto;

    padding: 18px;
}


/* =========================================================
   MOBILE USER
   ========================================================= */

.mobile-user-section {
    margin-bottom: 18px;
}

.mobile-user-info {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 13px;

    background:
        linear-gradient(135deg,
            #EEF2FF,
            #F8FAFC);

    border: 1px solid #E0E7FF;

    border-radius: 16px;
}

.mobile-user-info .avatar {
    width: 48px;
    height: 48px;

    border-radius: 13px;

    object-fit: cover;

    box-shadow:
        0 4px 12px rgba(15, 23, 42, .10);
}

.mobile-user-details {
    display: flex;
    flex-direction: column;

    gap: 3px;
}

.mobile-user-details .user-name {
    font-size: 14px;
    font-weight: 800;

    color: var(--farasod-text);
}

.mobile-user-details .user-role {
    font-size: 11px;

    color: var(--farasod-text-soft);
}

.mobile-user-login {
    padding: 18px;

    text-align: center;

    background: #F8FAFC;

    border: 1px solid #E2E8F0;

    border-radius: 17px;

    color: #64748B;
}

.mobile-user-login>i {
    display: block;

    margin-bottom: 8px;

    font-size: 34px;

    color: #818CF8;
}

.mobile-user-login span {
    display: block;

    margin-bottom: 12px;

    font-size: 13px;
    font-weight: 600;
}

.mobile-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 43px;

    border-radius: 11px;

    color: #fff !important;

    background: var(--farasod-primary);

    font-size: 12px;
    font-weight: 700;

    transition:
        background .2s ease,
        transform .2s ease;
}

.mobile-login-btn:hover {
    background: var(--farasod-primary-dark);
    transform: translateY(-1px);
}


/* =========================================================
   ⭐ MOBILE MAIN MENU — گرید دو ستونه
   ========================================================= */

.mobile-main-menu {
    list-style: none;
    margin: 0;
    padding: 0;

    /* ⭐ گرید دو ستونه */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* آیتم‌های لیست منو */
.mobile-main-menu>li {
    margin: 0;
    padding: 0;
    border: 0;
    position: relative;
    min-width: 0;
}

/* ⭐ والدین (دارای زیرمنو) → تمام‌عرض، یک ردیف */
.mobile-main-menu>li.menu-item-has-children {
    grid-column: 1 / -1;
    width: 100%;
}

/* حذف خط زیر قبلی */
.mobile-main-menu>li::after {
    display: none;
}


/* =========================================================
   MENU ROW
   ========================================================= */

.mobile-menu-item-row {
    width: 100%;

    min-height: 50px;

    display: flex;
    align-items: center;

    border-radius: 13px;

    transition: background .2s ease;
}

/* ردیف والدین → تمام‌عرض */
.mobile-main-menu>li.menu-item-has-children>.mobile-menu-item-row {
    display: flex;
    width: 100%;
}


/* =========================================================
   LINK — استایل BUTTON2
   ========================================================= */

.mobile-menu-link {
    flex: 1;

    min-height: 50px;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 0 14px;

    color: #090909;

    font-size: 13px;
    font-weight: 700;

    border-radius: 13px;

    /* ⭐ استایل button2 */
    position: relative;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;

    background: var(--btn-neo-bg);
    border: 1px solid var(--btn-neo-bg);

    box-shadow:
        6px 6px 12px var(--btn-neo-shadow-dark),
        -6px -6px 12px var(--btn-neo-shadow-light);

    transition: all 0.2s ease-in;
}

/* موج پایین */
.mobile-menu-link::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 140%;
    height: 180%;
    transform: translateX(-50%) scaleY(1) scaleX(1.25);
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    display: block;
    transition: all 0.5s 0.1s cubic-bezier(0.55, 0, 0.1, 1);
    z-index: -1;
}

/* موج بالا — رنگ بنفش سایت */
.mobile-menu-link::after {
    content: "";
    position: absolute;
    left: 55%;
    top: 180%;
    width: 160%;
    height: 190%;
    transform: translateX(-50%) scaleY(1) scaleX(1.45);
    background-color: var(--btn-accent);
    border-radius: 50%;
    display: block;
    transition: all 0.5s 0.1s cubic-bezier(0.55, 0, 0.1, 1);
    z-index: -1;
}

/* Hover */
.mobile-menu-link:hover {
    color: #ffffff;
    border: 1px solid var(--btn-accent);
}

.mobile-menu-link:hover::before {
    top: -35%;
    background-color: var(--btn-accent);
    transform: translateX(-50%) scaleY(1.3) scaleX(0.8);
}

.mobile-menu-link:hover::after {
    top: -45%;
    background-color: var(--btn-accent);
    transform: translateX(-50%) scaleY(1.3) scaleX(0.8);
}

/* Active (کلیک) */
.mobile-menu-link:active {
    color: #666;
    box-shadow:
        inset 4px 4px 12px var(--btn-neo-shadow-dark),
        inset -4px -4px 12px var(--btn-neo-shadow-light);
}


/* آیکون */
.mobile-menu-icon {
    width: 20px;

    flex-shrink: 0;

    text-align: center;

    color: #64748B;

    font-size: 14px;

    transition: color .2s ease;
}

.mobile-menu-link:hover .mobile-menu-icon {
    color: #ffffff;
}

/* عنوان */
.mobile-menu-title {
    flex: 1;
}


/* =========================================================
   ACTIVE ITEM
   ========================================================= */

.mobile-main-menu li.current-menu-item>.mobile-menu-link,
.mobile-main-menu li.current-menu-ancestor>.mobile-menu-item-row>.mobile-menu-link {
    color: #fff;
    background: var(--btn-accent);
    border-color: var(--btn-accent);
    font-weight: 800;
}

.mobile-main-menu li.current-menu-item>.mobile-menu-link .mobile-menu-icon,
.mobile-main-menu li.current-menu-ancestor>.mobile-menu-item-row>.mobile-menu-link .mobile-menu-icon {
    color: #fff;
}


/* =========================================================
   SUBMENU BUTTON — استایل BUTTON2
   ========================================================= */

.mobile-sub-toggle {
    width: 44px;
    height: 44px;

    flex-shrink: 0;

    margin-right: 8px;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--btn-neo-bg);
    outline: none;

    border-radius: 11px;

    color: #090909;

    cursor: pointer;

    -webkit-tap-highlight-color: transparent;

    /* ⭐ استایل button2 */
    position: relative;
    overflow: hidden;
    z-index: 1;

    background: var(--btn-neo-bg);

    box-shadow:
        4px 4px 8px var(--btn-neo-shadow-dark),
        -4px -4px 8px var(--btn-neo-shadow-light);

    transition: all 0.2s ease-in;
}

.mobile-sub-toggle::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 140%;
    height: 180%;
    transform: translateX(-50%) scaleY(1) scaleX(1.25);
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    transition: all 0.5s 0.1s cubic-bezier(0.55, 0, 0.1, 1);
    z-index: -1;
}

.mobile-sub-toggle::after {
    content: "";
    position: absolute;
    left: 55%;
    top: 180%;
    width: 160%;
    height: 190%;
    transform: translateX(-50%) scaleY(1) scaleX(1.45);
    background-color: var(--btn-accent);
    border-radius: 50%;
    transition: all 0.5s 0.1s cubic-bezier(0.55, 0, 0.1, 1);
    z-index: -1;
}

.mobile-sub-toggle:hover {
    color: #ffffff;
    border-color: var(--btn-accent);
}

.mobile-sub-toggle:hover::before {
    top: -35%;
    background-color: var(--btn-accent);
    transform: translateX(-50%) scaleY(1.3) scaleX(0.8);
}

.mobile-sub-toggle:hover::after {
    top: -45%;
    background-color: var(--btn-accent);
    transform: translateX(-50%) scaleY(1.3) scaleX(0.8);
}

.mobile-sub-toggle:active {
    box-shadow:
        inset 3px 3px 8px var(--btn-neo-shadow-dark),
        inset -3px -3px 8px var(--btn-neo-shadow-light);
}

.mobile-sub-toggle:hover .mobile-arrow {
    color: #fff;
}


/* =========================================================
   ARROW
   ========================================================= */

.mobile-sub-toggle .mobile-arrow {
    font-size: 10px;

    transition:
        transform .3s ease,
        color .2s ease;
}

.mobile-sub-toggle.open {
    color: #fff;
    background: var(--btn-accent);
    border-color: var(--btn-accent);
}

.mobile-sub-toggle.open .mobile-arrow {
    transform: rotate(180deg);
    color: #fff;
}


/* =========================================================
   SUB MENU
   ========================================================= */

.mobile-sub-menu {
    list-style: none;

    margin: 0;
    padding: 0 10px 0 0;

    max-height: 0;

    overflow: hidden;

    opacity: 0;

    visibility: hidden;

    transition:
        max-height .3s ease,
        opacity .2s ease,
        padding .3s ease;
}

.mobile-sub-menu.open {
    opacity: 1;

    visibility: visible;

    padding-top: 5px;
    padding-bottom: 5px;
}


/* =========================================================
   SUB MENU ITEMS
   ========================================================= */

.mobile-sub-menu>li {
    margin: 6px 0;
}


/* =========================================================
   SUBMENU LINK — استایل BUTTON2
   ========================================================= */

.mobile-sub-menu .mobile-menu-link {
    min-height: 44px;

    padding: 0 14px;

    border-radius: 10px;

    color: #090909;

    font-size: 12px;

    font-weight: 600;

    /* استایل button2 با سایه کوچک‌تر */
    background: var(--btn-neo-bg);
    border: 1px solid var(--btn-neo-bg);

    box-shadow:
        4px 4px 8px var(--btn-neo-shadow-dark),
        -4px -4px 8px var(--btn-neo-shadow-light);
}

/* حذف نقطه قبلی */
.mobile-sub-menu .mobile-menu-link::before,
.mobile-sub-menu .mobile-menu-link::after {
    /* استایل button2 جایگزین نقطه می‌شود */
    content: "";
}

.mobile-sub-menu .mobile-menu-link:hover {
    color: #fff;
    padding-right: 14px;
}

.mobile-sub-menu .mobile-menu-link:active {
    box-shadow:
        inset 3px 3px 8px var(--btn-neo-shadow-dark),
        inset -3px -3px 8px var(--btn-neo-shadow-light);
}


/* =========================================================
   SUBMENU دارای CHILD
   ========================================================= */

.mobile-sub-menu li.menu-item-has-children>.mobile-menu-item-row {
    margin-top: 2px;
}


/* =========================================================
   NESTED SUBMENU
   ========================================================= */

.mobile-sub-menu .mobile-sub-menu {
    padding-right: 14px;
}


/* =========================================================
   MOBILE TOUCH
   ========================================================= */

.mobile-sub-toggle,
.mobile-menu-link {
    touch-action: manipulation;
}


/* =========================================================
   MOBILE ACTIONS — استایل BUTTON2
   ========================================================= */

.mobile-actions {
    display: flex;
    flex-direction: column;

    gap: 12px;

    margin-top: 22px;

    padding-top: 18px;

    border-top: 1px solid #F1F5F9;
}

.mobile-action-btn {
    min-height: 52px;

    padding: 0 14px;

    display: flex;
    align-items: center;

    gap: 11px;

    border-radius: 13px;

    font-size: 12px;
    font-weight: 700;

    /* ⭐ استایل button2 */
    position: relative;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;

    color: #090909;
    background: var(--btn-neo-bg);
    border: 1px solid var(--btn-neo-bg);

    box-shadow:
        6px 6px 12px var(--btn-neo-shadow-dark),
        -6px -6px 12px var(--btn-neo-shadow-light);

    transition: all 0.2s ease-in;
}

.mobile-action-btn::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 140%;
    height: 180%;
    transform: translateX(-50%) scaleY(1) scaleX(1.25);
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    transition: all 0.5s 0.1s cubic-bezier(0.55, 0, 0.1, 1);
    z-index: -1;
}

.mobile-action-btn::after {
    content: "";
    position: absolute;
    left: 55%;
    top: 180%;
    width: 160%;
    height: 190%;
    transform: translateX(-50%) scaleY(1) scaleX(1.45);
    background-color: var(--btn-accent);
    border-radius: 50%;
    transition: all 0.5s 0.1s cubic-bezier(0.55, 0, 0.1, 1);
    z-index: -1;
}

.mobile-action-btn:hover {
    color: #fff;
    border-color: var(--btn-accent);
    transform: translateY(-1px);
}

.mobile-action-btn:hover::before {
    top: -35%;
    background-color: var(--btn-accent);
    transform: translateX(-50%) scaleY(1.3) scaleX(0.8);
}

.mobile-action-btn:hover::after {
    top: -45%;
    background-color: var(--btn-accent);
    transform: translateX(-50%) scaleY(1.3) scaleX(0.8);
}

.mobile-action-btn:active {
    color: #666;
    box-shadow:
        inset 4px 4px 12px var(--btn-neo-shadow-dark),
        inset -4px -4px 12px var(--btn-neo-shadow-light);
}

.mobile-action-btn>i:last-child {
    margin-right: auto;
}

/* رنگ آیکون‌ها هنگام هاور */
.mobile-action-btn:hover>i {
    color: #fff;
}


/* =========================================================
   MOBILE FOOTER
   ========================================================= */

.mobile-nav-footer {
    margin-top: 25px;
    padding-top: 18px;

    border-top: 1px solid #F1F5F9;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-text {
    color: #94A3B8;

    font-size: 10px;
}

.footer-social {
    display: flex;
    gap: 5px;
}

.footer-social a {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    color: #64748B;

    background: #F8FAFC;

    font-size: 12px;

    transition:
        background .2s ease,
        color .2s ease;
}

.footer-social a:hover {
    background: var(--farasod-primary);
    color: #fff;
}


/* =========================================================
   MOBILE LOGIN BTN — استایل BUTTON2
   ========================================================= */

.mobile-login-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;

    color: #090909 !important;

    background: var(--btn-neo-bg);
    border: 1px solid var(--btn-neo-bg);

    box-shadow:
        6px 6px 12px var(--btn-neo-shadow-dark),
        -6px -6px 12px var(--btn-neo-shadow-light);

    transition: all 0.2s ease-in;
}

.mobile-login-btn::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 140%;
    height: 180%;
    transform: translateX(-50%) scaleY(1) scaleX(1.25);
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    transition: all 0.5s 0.1s cubic-bezier(0.55, 0, 0.1, 1);
    z-index: -1;
}

.mobile-login-btn::after {
    content: "";
    position: absolute;
    left: 55%;
    top: 180%;
    width: 160%;
    height: 190%;
    transform: translateX(-50%) scaleY(1) scaleX(1.45);
    background-color: var(--btn-accent);
    border-radius: 50%;
    transition: all 0.5s 0.1s cubic-bezier(0.55, 0, 0.1, 1);
    z-index: -1;
}

.mobile-login-btn:hover {
    color: #fff !important;
    background: var(--btn-neo-bg);
    border-color: var(--btn-accent);
}

.mobile-login-btn:hover::before {
    top: -35%;
    background-color: var(--btn-accent);
    transform: translateX(-50%) scaleY(1.3) scaleX(0.8);
}

.mobile-login-btn:hover::after {
    top: -45%;
    background-color: var(--btn-accent);
    transform: translateX(-50%) scaleY(1.3) scaleX(0.8);
}


/* =========================================================
   BODY LOCK WHEN MENU OPEN
   ========================================================= */

body.mobile-menu-open {
    overflow: hidden;
}


/* =========================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================= */

@media (max-width: 1100px) {

    .site-header {
        width: calc(100% - 24px);
    }

    .header-inner {
        gap: 12px;
    }

    .brand-name span:last-child {
        display: none;
    }

    .user-profile-btn>span {
        max-width: 75px;
    }

}


@media (max-width: 820px) {

    .site-header {
        top: 0;
        right: 0;
        left: 0;

        width: 100%;
        max-width: 100%;

        height: 68px;

        border-radius: 0;

        border-left: none;
        border-right: none;
        border-top: none;

        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
    }

    .site-header.scrolled {
        top: 0;
        box-shadow: 0 4px 20px rgba(15, 23, 42, 0.12);
    }

    .header-inner {
        padding: 0 12px;
        gap: 8px;
    }

    .header-actions {
        margin-right: auto;
        gap: 4px;
    }

    .header-actions .notification-bell,
    .header-actions .notification-btn,
    .header-actions>a.notification-bell {
        width: 40px;
        height: 40px;
    }

    .btn-recharge-header {
        width: 40px;
        height: 40px;
        padding: 0;
    }

    .btn-recharge-header .recharge-label {
        display: none;
    }

    .user-profile-btn {
        width: 40px;
        height: 40px;
        padding: 2px;
        justify-content: center;
        border-radius: 11px;
    }

    .user-profile-btn>span {
        display: none;
    }

    .user-profile-btn .avatar {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

    .header-actions>.btn-cta:not(.user-profile-btn) {
        width: 40px;
        height: 40px;
        padding: 0;
        font-size: 0;
        border-radius: 11px;
    }

    .header-actions>.btn-cta:not(.user-profile-btn) i {
        font-size: 15px;
    }

    .site-branding img,
    .brand-icon {
        width: 120px;
        height: auto;
    }

    .brand-name span:first-child {
        font-size: 15px;
    }

    .header-spacer {
        height: 68px;
    }

    .mobile-nav {
        width: min(360px, 90vw);
    }

}


@media (max-width: 480px) {

    .site-header {
        top: 0;
        right: 0;
        left: 0;

        width: 100%;
        max-width: 100%;

        height: 62px;

        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
    }

    .header-inner {
        gap: 5px;
        padding: 0 10px;
    }

    .header-actions {
        gap: 3px;
    }

    .brand-name span:first-child {
        font-size: 14px;
    }

    .site-branding {
        gap: 7px;
    }

    .site-branding img,
    .brand-icon {
        width: 90px;
        height: auto;
    }

    .header-actions .notification-bell,
    .header-actions .notification-btn,
    .header-actions>a.notification-bell,
    .btn-recharge-header,

    .header-actions>.btn-cta:not(.user-profile-btn),
    .hamburger {
        width: 46px;
        height: 46px;
    }

    .user-profile-btn .avatar {
        width: 28px;
        height: 28px;
    }

    .header-spacer {
        height: 62px;
    }

    .mobile-nav {
        width: 100vw;
        height: 100dvh;
    }

    .user-profile-btn {
        display: none !important;
    }

    .btn-cta {
        display: none !important;
    }

    /* ⭐ در موبایل کوچک، دکمه‌ها کمی کوچک‌تر */
    .mobile-main-menu {
        gap: 8px;
    }

    .mobile-menu-link {
        min-height: 46px;
        padding: 0 10px;
        font-size: 12px;
        box-shadow:
            4px 4px 8px var(--btn-neo-shadow-dark),
            -4px -4px 8px var(--btn-neo-shadow-light);
    }

    .mobile-menu-icon {
        width: auto;
        font-size: 18px;
    }

}


/* =========================================================
   GRID LAYOUT — چیدمان دو ستونه منوی موبایل
   ========================================================= */

/* گرید اصلی */
.mobile-main-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;

    list-style: none;
    margin: 0;
    padding: 0;
}

/* ⭐ والد (دارای فرزند) → تمام‌عرض */
.mobile-main-menu>li.mobile-menu-item-parent {
    grid-column: 1 / -1;
    width: 100%;
}

/* ⭐ بدون فرزند → دو ستونه */
.mobile-main-menu>li.mobile-menu-item-single {
    grid-column: span 1;
    width: 100%;
    min-width: 0;
}


/* =========================================================
   لینک‌های والد و بدون فرزند — هماهنگ با button2
   ========================================================= */

/* والد: تمام‌عرض با padding بیشتر */
.mobile-menu-link-parent {
    padding: 0 16px !important;
    justify-content: flex-start;
}

/* بدون فرزند: وسط‌چین برای ظاهر بهتر در دو ستون */
.mobile-menu-link-single {
    padding: 0 12px !important;
    justify-content: flex-start;
}

/* در موبایل کوچک، فونت کوچک‌تر */
@media (max-width: 480px) {
    .mobile-menu-link-single {
        padding: 0 8px !important;
        font-size: 11.5px;
    }

    .mobile-menu-link-single .mobile-menu-icon {
        width: 16px;
        font-size: 12px;
    }
}


/* =========================================================
   SUBMENU — یک‌ستونه
   ========================================================= */

.mobile-sub-menu {
    display: block !important;
    list-style: none;
    margin: 0;
    padding: 0 10px 0 0;
}

.mobile-sub-menu>li {
    grid-column: auto !important;
    width: 100%;
}


/* =========================================================
   CENTER ALIGN — وسط‌چین کردن متن دکمه‌های منو
   ========================================================= */

/* لینک‌های منو — وسط‌چین */
.mobile-main-menu>li>.mobile-menu-link,
.mobile-main-menu>li>.mobile-menu-item-row>.mobile-menu-link,
.mobile-sub-menu .mobile-menu-link {
    justify-content: center !important;
    text-align: center;
    gap: 8px;
}

/* عنوان — حذف flex: 1 تا وسط‌چین شود */
.mobile-main-menu .mobile-menu-title,
.mobile-sub-menu .mobile-menu-title {
    flex: 0 1 auto !important;
    text-align: center;
}

/* آیکون — بدون عرض ثابت */
.mobile-main-menu .mobile-menu-icon,
.mobile-sub-menu .mobile-menu-icon {
    width: auto !important;
    flex-shrink: 0;
    text-align: center;
}

/* ⭐ استثنا: والدین (دارای زیرمنو) — چپ‌چین بمانند
   چون دکمه فلش در کنارشان است */
.mobile-main-menu>li.mobile-menu-item-parent>.mobile-menu-item-row>.mobile-menu-link {
    justify-content: flex-start !important;
    text-align: right;
}

.mobile-main-menu>li.mobile-menu-item-parent>.mobile-menu-item-row>.mobile-menu-link .mobile-menu-title {
    flex: 1 !important;
    text-align: right;
}

/* ─── رفع تداخل Admin Bar ─────────────────── */
body.admin-bar .site-header {
    top: 32px;
}

body.admin-bar .mobile-nav-overlay {
    top: 32px;
}

body.admin-bar .mobile-nav {
    top: 32px;
    height: calc(100dvh - 32px);
}

body.admin-bar .header-spacer {
    height: 112px;
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }

    body.admin-bar .mobile-nav-overlay {
        top: 46px;
    }

    body.admin-bar .mobile-nav {
        top: 46px;
        height: calc(100dvh - 46px);
    }

    body.admin-bar .header-spacer {
        height: 126px;
    }
}

/* دکنه خروج */
.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.mobile-user-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* چک‌باکس مخفی — فقط منطق را کنترل می‌کند */
.logout-toggle-input {
    display: none;
}

.logout-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* دکمهٔ خط‌چین کوچک، کم‌رنگ و سخت‌پیدا */
.logout-toggle-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px dashed #cfcfcf;
    border-radius: 50%;
    color: #bfbfbf;
    opacity: .55;
    /* خیلی کم‌رنگ */
    cursor: pointer;
    transition: opacity .2s, border-color .2s, color .2s;
    user-select: none;
}

.logout-toggle-btn:hover {
    opacity: 1;
    border-color: #8a8a8a;
    color: #666;
}

/* وقتی تیک خورد، حالت فعال */
.logout-toggle-input:checked+.logout-toggle-btn {
    opacity: 1;
    border-style: solid;
    border-color: #8a8a8a;
    color: #555;
    background: #f3f3f3;
}

/* دکمهٔ خروج — پیش‌فرض پنهان */
.mobile-logout-btn {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    background: #fdecea;
    color: #c0392b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    z-index: 20;
    transition: background .2s, color .2s;
}

.mobile-logout-btn:hover {
    background: #c0392b;
    color: #fff;
}

/* نمایش دکمهٔ خروج وقتی چک‌باکس تیک خورد */
.logout-toggle-input:checked~.mobile-logout-btn {
    display: inline-flex;
}

/* ============================================================
        مودال تأیید خروج
        ============================================================ */
.logout-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    opacity: 0;
    transition: opacity .2s;
    backdrop-filter: blur(2px);
}

.logout-confirm-overlay.is-active {
    display: flex;
    opacity: 1;
}

.logout-confirm-box {
    background: #fff;
    border-radius: 16px;
    padding: 24px 20px 20px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    transform: translateY(10px) scale(.97);
    transition: transform .25s ease;
}

.logout-confirm-overlay.is-active .logout-confirm-box {
    transform: translateY(0) scale(1);
}

.logout-confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fdecea;
    color: #c0392b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.logout-confirm-box h3 {
    margin: 0 0 6px;
    font-size: 17px;
    color: #222;
}

.logout-confirm-box p {
    margin: 0 0 18px;
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

.logout-confirm-actions {
    display: flex;
    gap: 10px;
}

.logout-confirm-actions button,
.logout-confirm-actions a {
    flex: 1;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    border: none;
    transition: background .2s, transform .1s;
}

.logout-confirm-actions button:active,
.logout-confirm-actions a:active {
    transform: scale(.97);
}

.logout-cancel-btn {
    background: #f3f4f6;
    color: #444;
}

.logout-cancel-btn:hover {
    background: #e5e7eb;
}

.logout-confirm-yes {
    background: #c0392b;
    color: #fff;
}

.logout-confirm-yes:hover {
    background: #a93226;
}