/* منوی اصلی سایت (هدر دسکتاپ، حالت چسبان، جستجو و منوی کشویی موبایل) */

.nz-header {
    --nz-navy: #0b3d5c;
    --nz-ink: #183247;
    --nz-muted: #5d7184;
    --nz-teal: #1a7a6d;
    --nz-teal-soft: #e6f3f1;
    --nz-line: #e3eaef;
    --nz-surface: #f3f7f9;
    --nz-shadow: 0 12px 32px rgba(8, 44, 67, 0.12), 0 1px 3px rgba(8, 44, 67, 0.06);
    --nz-drop-shadow: 0 24px 48px rgba(8, 44, 67, 0.16), 0 2px 6px rgba(8, 44, 67, 0.06);
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
    padding-top: 22px;
    pointer-events: none;
    font-family: inherit;
}

.nz-header .container {
    position: relative;
}

.nz-header ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nz-header a,
.nz-drawer a {
    text-decoration: none !important;
}

.nz-header button,
.nz-drawer button {
    font-family: inherit;
}

.nz-bar,
.nz-search {
    pointer-events: auto;
}

.nz-bar {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    height: 66px;
    padding: 0 1.1rem 0 0.75rem;
    background: #fff;
    border: 1px solid rgba(11, 61, 92, 0.06);
    border-radius: 18px;
    box-shadow: var(--nz-shadow);
    transition: height 0.25s ease, box-shadow 0.25s ease, border-radius 0.25s ease, background 0.25s ease;
}

.nz-logo {
    display: flex;
    align-items: center;
    flex: none;
    padding-left: 1rem;
    border-left: 1px solid var(--nz-line);
}

.nz-logo img {
    display: block;
    width: auto;
    height: 44px;
}

/* —— منوی دسکتاپ —— */
.nz-nav {
    flex: 1;
    min-width: 0;
}

.nz-menu {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.2rem;
}

.nz-item {
    position: relative;
    flex: none;
}

.nz-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 42px;
    padding: 0 0.9rem;
    border-radius: 12px;
    color: var(--nz-ink) !important;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.nz-link--home {
    width: 42px;
    padding: 0;
    justify-content: center;
    font-size: 1.1rem;
}

.nz-link:hover,
.nz-item:hover > .nz-link,
.nz-item.is-open > .nz-link {
    background: var(--nz-surface);
    color: var(--nz-navy) !important;
}

.nz-item.is-active > .nz-link {
    color: var(--nz-navy) !important;
    font-weight: 700;
}

.nz-item.is-active > .nz-link::after {
    content: "";
    position: absolute;
    right: 50%;
    bottom: 3px;
    width: 18px;
    height: 3px;
    margin-right: -9px;
    border-radius: 3px;
    background: linear-gradient(90deg, #13a49d, var(--nz-navy));
}

.nz-caret {
    font-size: 0.8rem;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.nz-item:hover > .nz-link .nz-caret,
.nz-item.is-open > .nz-link .nz-caret {
    transform: rotate(180deg);
}

.nz-ext {
    font-size: 0.7rem;
    opacity: 0.55;
}

/* زیرمنو */
.nz-drop {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 30;
    padding-top: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}

.nz-item:hover > .nz-drop,
.nz-item:focus-within > .nz-drop,
.nz-item.is-open > .nz-drop {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}

.nz-header .nz-drop-list {
    min-width: 240px;
    max-width: 320px;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid var(--nz-line);
    border-radius: 16px;
    box-shadow: var(--nz-drop-shadow);
}

.nz-drop:not(.nz-drop--side) > .nz-drop-list::before {
    content: "";
    position: absolute;
    top: 6px;
    right: 22px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-top: 1px solid var(--nz-line);
    border-left: 1px solid var(--nz-line);
    transform: rotate(45deg);
}

.nz-header .nz-drop--cols .nz-drop-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(190px, 1fr));
    column-gap: 0.25rem;
    min-width: 440px;
    max-width: none;
}

.nz-drop--side {
    top: -0.5rem;
    right: 100%;
    padding-top: 0;
    padding-right: 8px;
    transform: translateX(-8px);
}

.nz-sub-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    color: var(--nz-ink) !important;
    font-size: 0.88rem;
    line-height: 1.7;
    transition: background 0.15s ease, color 0.15s ease;
}

.nz-sub-link::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c8d5dd;
    transition: background 0.15s ease, transform 0.15s ease;
}

.nz-sub-link > span {
    flex: 1;
}

.nz-sub-link:hover,
.nz-item:hover > .nz-sub-link,
.nz-item.is-open > .nz-sub-link {
    background: var(--nz-surface);
    color: var(--nz-navy) !important;
}

.nz-sub-link:hover::before,
.nz-item:hover > .nz-sub-link::before,
.nz-item.is-active > .nz-sub-link::before {
    background: var(--nz-teal);
    transform: scale(1.25);
}

.nz-item.is-active > .nz-sub-link {
    color: var(--nz-teal) !important;
    font-weight: 700;
}

.nz-sub-link .nz-caret {
    transform: none !important;
}

/* دکمه‌ها */
.nz-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: none;
    margin-right: auto;
}

.nz-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--nz-line);
    border-radius: 12px;
    background: var(--nz-surface);
    color: var(--nz-navy);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nz-icon-btn:hover,
.nz-header.is-search .nz-search-toggle {
    background: var(--nz-navy);
    border-color: var(--nz-navy);
    color: #fff;
}

.nz-burger {
    display: none;
}

/* جستجو */
.nz-search {
    position: absolute;
    top: calc(100% + 10px);
    left: 15px;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: min(560px, calc(100% - 30px));
    padding: 0.45rem 0.9rem 0.45rem 0.45rem;
    background: #fff;
    border: 1px solid var(--nz-line);
    border-radius: 16px;
    box-shadow: var(--nz-drop-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.nz-header.is-search .nz-search {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}

.nz-search-icon {
    color: var(--nz-muted);
}

.nz-header .nz-search-input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--nz-ink);
    font-family: inherit;
    font-size: 0.95rem;
    box-shadow: none;
}

.nz-search-submit {
    height: 40px;
    padding: 0 1.1rem;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(119deg, #13a49d, #065482);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.nz-search-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--nz-muted);
    cursor: pointer;
}

.nz-search-close:hover {
    background: var(--nz-surface);
    color: var(--nz-navy);
}

/* —— حالت چسبان هنگام اسکرول —— */
.nz-header.is-stuck .nz-bar-wrap {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 28px rgba(8, 44, 67, 0.12);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    pointer-events: auto;
    animation: nz-slide-down 0.35s ease;
    transition: transform 0.3s ease;
}

.nz-header.is-stuck .nz-bar {
    height: 60px;
    padding: 0;
    background: transparent;
    border-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

.nz-header.is-stuck .nz-logo img {
    height: 40px;
}

@keyframes nz-slide-down {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: none;
    }
}

/* وقتی آیتم‌های منو در عرض جا نشوند، منو به حالت دکمه‌ای می‌رود */
.nz-header.nz-compact .nz-nav {
    display: none;
}

.nz-header.nz-compact .nz-burger {
    display: inline-grid;
}

/* —— موبایل و تبلت —— */
@media (max-width: 991.98px) {
    .nz-header {
        position: relative;
        height: 64px;
        padding-top: 0;
        pointer-events: auto;
    }

    .nz-bar-wrap {
        background: #fff;
        box-shadow: 0 1px 0 var(--nz-line), 0 6px 18px rgba(8, 44, 67, 0.06);
    }

    .nz-bar,
    .nz-header.is-stuck .nz-bar {
        height: 64px;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .nz-logo {
        padding-left: 0;
        border-left: 0;
    }

    .nz-logo img,
    .nz-header.is-stuck .nz-logo img {
        height: 42px;
    }

    .nz-nav {
        display: none;
    }

    .nz-burger {
        display: inline-grid;
        background: var(--nz-navy);
        border-color: var(--nz-navy);
        color: #fff;
    }

    .nz-header.is-stuck.is-hidden .nz-bar-wrap {
        transform: translateY(-110%);
    }

    .nz-search {
        top: calc(100% + 8px);
        right: 15px;
        left: 15px;
        width: auto;
    }

    .nz-search-submit {
        display: none;
    }
}

/* —— منوی کشویی موبایل —— */
.nz-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(8, 28, 43, 0.45);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.nz-backdrop.is-visible {
    opacity: 1;
}

.nz-drawer {
    --nz-navy: #0b3d5c;
    --nz-ink: #183247;
    --nz-muted: #5d7184;
    --nz-teal: #1a7a6d;
    --nz-teal-soft: #e6f3f1;
    --nz-line: #e3eaef;
    --nz-surface: #f3f7f9;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    width: min(88vw, 360px);
    background: #fff;
    box-shadow: -24px 0 48px rgba(8, 44, 67, 0.2);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.32s;
}

.nz-drawer.is-open {
    transform: none;
    visibility: visible;
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
}

.nz-drawer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nz-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--nz-line);
}

.nz-drawer-logo img {
    display: block;
    width: auto;
    height: 44px;
}

.nz-drawer .nz-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--nz-line);
    border-radius: 12px;
    background: var(--nz-surface);
    color: var(--nz-navy);
    font-size: 1.1rem;
    cursor: pointer;
}

.nz-drawer-search {
    position: relative;
    margin: 0.9rem 1.1rem 0.4rem;
}

.nz-drawer-search input {
    width: 100%;
    height: 46px;
    padding: 0 1rem 0 3rem;
    border: 1px solid var(--nz-line);
    border-radius: 13px;
    outline: 0;
    background: var(--nz-surface);
    color: var(--nz-ink);
    font-family: inherit;
    font-size: 0.92rem;
    box-shadow: none;
}

.nz-drawer-search input:focus {
    border-color: var(--nz-teal);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 122, 109, 0.12);
}

.nz-drawer-search button {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: var(--nz-navy);
    color: #fff;
    cursor: pointer;
}

.nz-drawer-nav {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.4rem 0.75rem 1rem;
}

.nz-m-link,
.nz-acc-toggle--full {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 48px;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    color: var(--nz-ink) !important;
    font-size: 0.97rem;
    font-weight: 500;
    line-height: 1.6;
    text-align: right;
    transition: background 0.15s ease, color 0.15s ease;
}

.nz-m-link:hover,
.nz-acc-toggle--full:hover {
    background: var(--nz-surface);
}

.nz-m-menu > li {
    border-bottom: 1px solid #eef2f5;
}

.nz-m-menu > li:last-child {
    border-bottom: 0;
}

.nz-m-menu li.is-active > .nz-m-link,
.nz-m-menu li.is-active > .nz-acc-row > .nz-m-link,
.nz-m-menu li.is-active > .nz-acc-row > .nz-acc-toggle--full {
    color: var(--nz-teal) !important;
    font-weight: 700;
}

.nz-m-menu > li.is-active:not(.nz-acc) > .nz-m-link {
    background: var(--nz-teal-soft);
}

.nz-acc-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nz-acc-row > .nz-m-link {
    flex: 1;
    width: auto;
}

.nz-acc-toggle {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--nz-muted);
    font-size: 1rem;
    cursor: pointer;
}

.nz-acc-toggle.nz-acc-toggle--full {
    display: flex;
    justify-content: space-between;
    width: 100%;
    height: auto;
    padding: 0.55rem 0.85rem;
    color: var(--nz-ink);
    font-size: 0.97rem;
    font-weight: 500;
    background: transparent;
    border: 0;
}

.nz-acc-toggle i {
    transition: transform 0.25s ease;
}

.nz-acc.is-open > .nz-acc-row .nz-acc-toggle i {
    transform: rotate(180deg);
}

.nz-acc.is-open > .nz-acc-row .nz-acc-toggle:not(.nz-acc-toggle--full) {
    background: var(--nz-surface);
    color: var(--nz-navy);
}

.nz-drawer .nz-acc-panel {
    display: none;
    margin: 0 0.9rem 0.6rem 0;
    padding-right: 0.6rem;
    border-right: 2px solid var(--nz-line);
}

.nz-acc.is-open > .nz-acc-panel {
    display: block;
    animation: nz-fade-in 0.25s ease;
}

.nz-acc-panel .nz-m-link,
.nz-acc-panel .nz-acc-toggle.nz-acc-toggle--full {
    min-height: 42px;
    padding: 0.4rem 0.75rem;
    color: var(--nz-muted) !important;
    font-size: 0.9rem;
}

.nz-acc-panel .nz-acc-toggle {
    width: 40px;
    height: 40px;
}

.nz-acc-panel li.is-active > .nz-m-link {
    background: var(--nz-teal-soft);
}

@keyframes nz-fade-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.nz-drawer-foot {
    padding: 0.9rem 1.1rem 1.1rem;
    border-top: 1px solid var(--nz-line);
    background: var(--nz-surface);
}

.nz-drawer-contact {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0;
    color: var(--nz-ink) !important;
    font-size: 0.88rem;
}

.nz-drawer-contact i {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #fff;
    color: var(--nz-teal);
}

.nz-drawer-contact span {
    direction: ltr;
}

.nz-drawer-social {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.7rem;
}

.nz-drawer-social a {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--nz-line);
    border-radius: 50%;
    background: #fff;
    color: var(--nz-navy) !important;
    font-size: 15px;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease;
}

.nz-drawer-social a:hover {
    background: var(--nz-navy);
    color: #fff !important;
}

.nz-drawer-social span {
    display: inline-flex;
    margin: 0;
    width: auto;
    height: auto;
    color: inherit;
}

html.nz-lock,
html.nz-lock body {
    overflow: hidden;
}

/* دسترس‌پذیری صفحه‌کلید */
.nz-header a:focus-visible,
.nz-header button:focus-visible,
.nz-drawer a:focus-visible,
.nz-drawer button:focus-visible {
    outline: 2px solid var(--nz-teal);
    outline-offset: 2px;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .nz-bar {
        gap: 0.7rem;
    }

    .nz-link {
        padding: 0 0.65rem;
        font-size: 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nz-header *,
    .nz-header.is-stuck .nz-bar-wrap,
    .nz-drawer,
    .nz-backdrop {
        animation: none !important;
        transition: none !important;
    }
}
