﻿/* ================== Top Bar ================== */
body {
    direction: rtl;
}
a {
    text-decoration: none;
}

.MenuBar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #fff;
    border-bottom: 1px solid rgba(15,23,42,.06);
    box-shadow: 0 6px 26px rgba(2,6,23,.06);
}

.MenuBar-inner {
    max-width: 1260px;
    margin: auto;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
}

/* ================== Brand ================== */
.MenuBrand {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap
}

.MenuBrand-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg,#0ea5e9,#1e3a8a);
    box-shadow: 0 6px 16px rgba(14,165,233,.35);
}

.MenuBrand b {
    color: #0b3aa9
}

/* ================== Main Links (with fancy hover) ================== */
.MenuLinks {
    display: flex;
    align-items: center;
    gap: 28px;
    position: relative;
    padding: 6px 8px;
    border-radius: 12px;
    list-style: none;
}

.MenuHover {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(.98);
    height: 36px;
    left: 0;
    width: 0;
    opacity: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(96,165,250,.18), rgba(14,165,233,.15));
    border: 1px solid rgba(59,130,246,.35);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(59,130,246,.18);
    transition: left .24s cubic-bezier(.2,.7,.2,1), width .24s cubic-bezier(.2,.7,.2,1), opacity .2s ease, transform .24s ease;
    z-index: 0;
}

.MenuLinks:hover .MenuHover {
    opacity: 1
}

.MenuLink {
    position: relative;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 800;
    letter-spacing: .2px;
    color: #1f2b3a;
    z-index: 1;
    transform: translateY(0);
    transition: color .15s ease, transform .15s ease;
    font-family: 'peyda';
}

    .MenuLink:hover {
        color: #0b3aa9;
        transform: translateY(-1px)
    }

    .MenuLink:focus-visible {
        outline: 3px solid rgba(59,130,246,.35);
        outline-offset: 3px;
        border-radius: 10px
    }

    .MenuLink::after {
        content: "";
        position: absolute;
        inset-inline: 12px;
        bottom: 4px;
        height: 2px;
        border-radius: 2px;
        background: linear-gradient(90deg,#60a5fa,#1e3a8a);
        transform: scaleX(0);
        transform-origin: center;
        transition: transform .25s ease;
    }

    .MenuLink:hover::after, .MenuLink:focus-visible::after {
        transform: scaleX(1)
    }

    .MenuLink[data-active="true"] {
        color: #0b3aa9
    }

.MenuCare {
    width: 14px;
    height: 14px;
    margin: 0 4px;
    transform: rotate(180deg)
}
/* RTL */

/* ================== Left Actions ================== */
.MenuActions {
    display: flex;
    align-items: center;
    gap: 10px
}

.MenuCTA {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 0;
    cursor: pointer;
    background: #e0a100;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(224,161,0,.35);
    font-family: peyda;
}

.MenuIconBtn, .MenuHamburger {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #cbd5e1;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.MenuHamburger {
    display: none
}

/* ================== Mega Menu (full-width holder) ================== */
.MenuMega {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    pointer-events: none; /* فقط پنل قابل کلیک است */
}

    .MenuMega.is-open {
        pointer-events: auto
    }

/* ---- Panel that always covers its content ---- */
.MenuMega-panel {
    width: min(1260px, calc(100vw - 24px));
    margin: 10px auto 0; /* فاصله بصری اما همچنان داخل کانتینر */
    background: #fff;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 28px 90px rgba(2,6,23,.18);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease;
    position: relative;
    z-index: 1;
}

.MenuMega.is-open .MenuMega-panel {
    opacity: 1;
    transform: translateY(0)
}

/* ---- Decorative top line ---- */
.MenuMega-topline {
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg,#60a5fa,#06b6d4,#1e3a8a);
}

/* ---- Inner grid ---- */
.MenuMega-inner {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    background: radial-gradient(600px 120px at 20% -40%, rgba(59,130,246,.06), transparent 60%), radial-gradient(600px 120px at 80% -40%, rgba(14,165,233,.06), transparent 60%);
    font-family: 'peyda', Tahoma, Arial, sans-serif;
}

/* ================== Tabs (right in RTL) ================== */
.MenuMega-aside {
    background: linear-gradient(180deg,#f2f8ff,#f9fbff);
    border-inline-start: 1px solid #e6eefb;
    padding: 14px;
}

.MenuTabs {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.MenuTab {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: #fff;
    border: 1px solid #dbeafe;
    color: #0b3aa9;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease;
    font-family: peyda;
    box-shadow: 0 2px 0 rgba(2,6,23,.04);
}

    .MenuTab:hover {
        background: #f1f7ff;
        transform: translateY(-1px)
    }

    .MenuTab.is-active {
        background: linear-gradient(135deg,#e0f2fe,#dbeafe);
        border-color: #93c5fd;
        box-shadow: inset 0 0 0 1px #93c5fd, 0 10px 24px rgba(59,130,246,.18);
    }

    .MenuTab svg {
        width: 18px;
        height: 18px
    }

/* ================== Mega Body ================== */
.MenuMega-body {
    padding: 22px 24px;
    position: relative
}

.MenuMega-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px
}

.MenuMega-title {
    margin: 0;
    font-size: 18px;
    color: #0b3aa9;
    font-weight: 800
}

.MenuMega-desc {
    margin: 0;
    color: #475569;
    font-size: 13px
}

/* Columns */
.MenuCols {
    display: grid;
    grid-template-columns: repeat(4, minmax(210px,1fr));
    gap: 18px;
    padding: 10px 0 18px;
}

.MenuCol h4 {
    margin: 0 0 8px;
    font-size: 15px;
    color: #0f172a;
    border-right: 3px solid #3b82f6;
    padding-right: 8px;
}

.MenuCol ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px
}

.MenuCol a {
    color: #334155;
    position: relative
}

    .MenuCol a:hover {
        color: #0b3aa9
    }

    .MenuCol a::after {
        content: "";
        position: absolute;
        inset-inline-end: 0;
        bottom: -2px;
        height: 2px;
        width: 0;
        background: linear-gradient(90deg,#60a5fa,#1e3a8a);
        transition: width .18s ease;
    }

    .MenuCol a:hover::after {
        width: 100%
    }

/* ================== Responsive ================== */
@media (max-width:1100px) {
    .MenuLinks {
        display: none
    }

    .MenuHamburger {
        display: grid;
        place-items: center
    }

    .MenuMega-inner {
        grid-template-columns: 1fr
    }

    .MenuMega-aside {
        border: 0;
        background: #fff;
        padding: 10px 10px 0
    }

    .MenuTabs {
        flex-direction: row;
        overflow: auto;
        padding-bottom: 10px
    }

    .MenuTab {
        white-space: nowrap;
        border-radius: 999px
    }

    .MenuCols {
        grid-template-columns: repeat(2, minmax(160px,1fr))
    }
}

@media (max-width:680px) {
    .MenuActions .MenuCTA {
        display: none
    }

    .MenuCols {
        grid-template-columns: 1fr
    }
}

/* ================== Reduced Motion ================== */
@media (prefers-reduced-motion: reduce) {
    .MenuHover, .MenuLink::after, .MenuMega-panel, .MenuTab {
        transition: none !important
    }
}
