
/* Smart Mohajer Mega Menu for Zephyr */
#smhmm-shell,
#smhmm-shell * {
    box-sizing: border-box;
}

#smhmm-shell {
    direction: rtl;
    position: fixed;
    z-index: 999999;
    width: min(1240px, calc(100vw - 36px));
    height: 500px;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 285px;
    background: linear-gradient(135deg, #fff 0%, #fbfdff 62%, #f2f7ff 100%);
    border: 1px solid #dfe8f4;
    border-radius: 20px;
    box-shadow: 0 28px 70px rgba(16, 38, 75, .20);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    font-family: inherit;
}

#smhmm-shell.smhmm-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.smhmm-tabs {
    padding: 18px 13px;
    background: linear-gradient(180deg, #102b55, #0d2140);
    border-left: 1px solid rgba(255,255,255,.08);
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.24) transparent;
}

.smhmm-tabs::before {
    content: "خدمات مهاجرتی";
    display: block;
    padding: 2px 12px 12px;
    color: #8fb5e7;
    font-size: 12px;
    font-weight: 800;
}

.smhmm-tab {
    appearance: none;
    width: 100%;
    border: 0;
    background: transparent;
    color: #d7e3f2;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: right;
    padding: 12px 13px;
    margin: 2px 0;
    border-radius: 11px;
    cursor: pointer;
    transition: .16s ease;
}

.smhmm-tab::after {
    content: "‹";
    font-size: 20px;
    line-height: 1;
    opacity: .42;
}

.smhmm-tab:hover,
.smhmm-tab.is-active {
    background: linear-gradient(90deg, rgba(47,125,246,.30), rgba(20,184,166,.12));
    color: #fff;
    box-shadow: inset -3px 0 0 #d6a341;
}

.smhmm-tab.is-active::after {
    opacity: 1;
    color: #e2b653;
}

.smhmm-content {
    position: relative;
    padding: 26px 28px;
    overflow: hidden;
    background:
      radial-gradient(circle at 25% 5%, rgba(47,125,246,.045), transparent 25%),
      #fff;
}

.smhmm-pane {
    display: none;
    height: 100%;
}

.smhmm-pane.is-active {
    display: flex;
    flex-direction: column;
    animation: smhmmFade .16s ease;
}

@keyframes smhmmFade {
    from { opacity: .35; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

.smhmm-pane-head {
    padding-bottom: 13px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e8eef6;
}

.smhmm-pane-head h3 {
    margin: 0 !important;
    font-size: 19px !important;
    line-height: 1.6 !important;
    color: #142743 !important;
    font-weight: 800 !important;
}

.smhmm-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px 20px;
    align-content: start;
    overflow: auto;
    padding-left: 4px;
    scrollbar-width: thin;
    scrollbar-color: #ccd9ea transparent;
}

.smhmm-link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 37px;
    padding: 7px 9px;
    border-radius: 9px;
    color: #526177 !important;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.55;
    text-decoration: none !important;
    transition: .15s ease;
}

.smhmm-link::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c7d5e6;
    flex: 0 0 5px;
}

.smhmm-link:hover {
    background: #eef5ff;
    color: #145fc9 !important;
    transform: translateX(-2px);
}

.smhmm-link:hover::before {
    background: #2f7df6;
    box-shadow: 0 0 0 4px #e5efff;
}

.smhmm-group {
    border-right: 2px solid #edf2f8;
    padding-right: 11px;
    margin: 4px 0 10px;
    min-width: 0;
}

.smhmm-group-title {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #17335b !important;
    font-size: 14px;
    font-weight: 900;
    padding: 5px 6px 8px;
    text-decoration: none !important;
}

.smhmm-group-title::before {
    content: "";
    width: 4px;
    height: 15px;
    border-radius: 99px;
    background: linear-gradient(180deg, #2f7df6, #16b9a8);
    flex: 0 0 4px;
}

.smhmm-group .smhmm-link {
    min-height: 31px;
    font-size: 12.8px;
    padding-block: 5px;
}

.smhmm-visual {
    position: relative;
    margin: 18px 10px 18px 18px;
    border-radius: 17px;
    overflow: hidden;
    background: #0d2d59;
    box-shadow: 0 18px 36px rgba(10,37,74,.17);
}

.smhmm-visual-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.025);
    transition: opacity .22s ease, transform .34s ease;
}

.smhmm-visual-item.is-active {
    opacity: 1;
    transform: scale(1);
}

.smhmm-visual-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5,23,48,.02) 30%, rgba(5,23,48,.92) 100%);
}

.smhmm-visual-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.smhmm-visual-copy {
    position: absolute;
    z-index: 2;
    right: 18px;
    left: 18px;
    bottom: 17px;
    color: #fff;
}

.smhmm-visual-copy strong {
    display: block;
    font-size: 18px;
    line-height: 1.55;
    margin-bottom: 5px;
}

.smhmm-visual-copy small {
    display: block;
    color: #c9d8eb;
    font-size: 11.5px;
    line-height: 1.85;
}

/* Keep Zephyr's original child list for SEO/HTML, but hide only on desktop when JS mega menu is active. */
@media (min-width: 901px) {
    .smhmm-root > .w-nav-list.level_2 {
        display: none !important;
    }
}

@media (min-width: 901px) and (max-width: 1180px) {
    #smhmm-shell {
        grid-template-columns: 195px minmax(0,1fr) 245px;
        height: 480px;
    }
    .smhmm-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .smhmm-content {
        padding-inline: 21px;
    }
}

@media (max-width: 900px) {
    #smhmm-shell {
        display: none !important;
    }
}
