@font-face {
font-family: 'iranyekan';
src: url('../fonts/iranyekanr.woff2') format('woff2');
font-weight: normal;
font-style: normal;
font-feature-settings: "ss02";
font-display: swap;

}

@font-face {
font-family: 'iranyekan';
src: url('../fonts/iranyekanb.woff2') format('woff2');
font-weight: bold;
font-style: normal;
font-feature-settings: "ss02";
font-display: swap;

}

/* =========================================
   IMMIGRATION HEADER
========================================= */

.immigration-header,
.immigration-header * {
    box-sizing: border-box;
}

.immigration-header {
    position: relative;
    z-index: 1000;
    width: 100%;
    background: var(--imm-background);
    border-bottom: 1px solid var(--imm-border-light);
    font-family: var(--imm-font);
    direction: rtl;
}

.imm-header-container {
    width: min(
        calc(100% - 48px),
        var(--imm-container-width)
    );

    min-height: var(--imm-header-height);
    margin-inline: auto;

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


/* =========================================
   LOGO — RIGHT
========================================= */

.imm-header-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.imm-header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.imm-logo {
    display: block;
    width: 185px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}



/* =========================================
   IMMIGRATION NAVIGATION
   WordPress menu: category
========================================= */

.imm-navigation {
    flex: 1 1 auto;
    min-width: 0;
    align-self: stretch;

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

    direction: rtl;
    font-family: var(--imm-font);
    position: relative;
    z-index: 1000;
}

.imm-navigation ul,
.imm-navigation li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.imm-navigation .mega-menu-root {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 2vw, 36px);

    width: auto;
    max-width: 100%;
    min-width: 0;

    direction: rtl;
}

/* آیتم‌های منوی اصلی */

.imm-navigation .mega-menu-root > li {
    position: relative;
    flex: 0 0 auto;
}

.imm-navigation .mega-menu-root > li > a {
    min-height: var(--imm-header-height);

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 0 2px;

    color: var(--imm-text);
    font-family: var(--imm-font);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.8;

    text-decoration: none;
    white-space: nowrap;

    transition: color .2s ease;
}

/* رنگ آیتم فعال و هاور */

.imm-navigation .mega-menu-root > li:hover > a,
.imm-navigation .mega-menu-root > li:focus-within > a,
.imm-navigation .mega-menu-root > li.current-menu-item > a,
.imm-navigation .mega-menu-root > li.current-menu-ancestor > a {
    color: var(--imm-primary-hover);
}



/* =========================================
   LEFT ACTIONS
========================================= */

.imm-header-actions {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    gap: 18px;
}


/* ورود و ثبت نام */

.imm-account-button {
    min-height: 72px;
    padding: 0 27px;

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

    border: 3px solid var(--imm-border);
    border-radius: 19px;

    background: var(--imm-surface);
    color: var(--imm-text);

    font-family: var(--imm-font);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;

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

.imm-account-button:hover {
    background: #FFFFFF;
    border-color: var(--imm-text-muted);
    color: var(--imm-text);
}


/* دکمه جستجو */

.imm-search-toggle {
    width: 72px;
    height: 72px;
    padding: 0;

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

    border: 3px solid var(--imm-border);
    border-radius: 19px;

    background: var(--imm-surface);
    color: var(--imm-text);

    cursor: pointer;

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

.imm-search-toggle:hover,
.imm-search-toggle[aria-expanded="true"] {
    background: #FFFFFF;
    border-color: var(--imm-text-muted);
}


/* رزرو مشاوره */

.imm-consultation-button {
    min-width: 332px;
    min-height: 72px;
    padding: 0 25px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    border: 1px solid var(--imm-primary);
    border-radius: 13px;

    background: var(--imm-primary);
    color: #FFFFFF;

    font-family: var(--imm-font);
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;

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

.imm-consultation-button:hover {
    background: var(--imm-primary-hover);
    border-color: var(--imm-primary-hover);
    color: #FFFFFF;
}

.imm-consultation-button svg {
    flex: 0 0 auto;
}


/* =========================================
   SEARCH PANEL
========================================= */

.imm-search-panel {
    position: absolute;
    top: 100%;
    left: 24px;

    width: min(460px, calc(100% - 48px));
    padding: 18px;

    background: var(--imm-background);
    border: 1px solid var(--imm-border-light);
    border-radius: 0 0 12px 12px;

    box-shadow: var(--imm-shadow);
    z-index: 1002;
}

.imm-search-panel[hidden] {
    display: none !important;
}

.imm-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.imm-search-form input {
    flex: 1;
    min-width: 0;
    height: 48px;

    padding: 0 14px;

    border: 1px solid var(--imm-border);
    border-radius: 8px;

    background: #FFFFFF;
    color: var(--imm-text);

    font-family: var(--imm-font);
    font-size: 14px;
}

.imm-search-form input:focus {
    outline: 2px solid var(--imm-primary);
    outline-offset: 1px;
}

.imm-search-form button {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;

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

    border: 0;
    border-radius: 8px;

    background: var(--imm-primary);
    color: #FFFFFF;

    cursor: pointer;
}




/* =========================================
   WORDPRESS RTL MENU
========================================= */

/* جلوگیری از بریده شدن زیرمنو */
.immigration-header,
.imm-header-container,
.imm-navigation {
    overflow: visible !important;
}

.immigration-header {
    position: relative;
    z-index: 9990;
}

.imm-navigation {
    position: relative;
    z-index: 9991;
    align-self: stretch;
    min-width: 0;
}

/* حذف استایل پیش‌فرض */
.imm-navigation ul,
.imm-navigation li {
    list-style: none;
    margin: 0;
    padding: 0;
}


/* =========================================
   MAIN MENU
========================================= */

.imm-navigation .mega-menu-root {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    gap: clamp(12px, 1.6vw, 28px);

    width: auto;
    max-width: 100%;

    direction: rtl;
}

.imm-navigation .mega-menu-root > li {
    position: relative;
    flex: 0 0 auto;
}


/* لینک منوی اصلی */

.imm-navigation .mega-menu-root > li > a {
    display: inline-flex;
    align-items: center;

    min-height: var(--imm-header-height);

    padding: 0 2px;

    color: var(--imm-text);

    font-family: var(--imm-font);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.8;

    text-decoration: none;
    white-space: nowrap;

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


/* =========================================
   ARROW — MAIN MENU
   آیتم‌هایی که زیرمنو دارند
========================================= */

.imm-navigation .mega-menu-root > li.menu-item-has-children > a {
    gap: 9px;
}


/*
   چون منو RTL است،
   فلش با after در سمت چپ متن قرار می‌گیرد.
*/

.imm-navigation .mega-menu-root > li.menu-item-has-children > a::after {
    content: "";

    width: 7px;
    height: 7px;

    flex: 0 0 7px;

    border-left: 1.7px solid currentColor;
    border-bottom: 1.7px solid currentColor;

    transform: rotate(-45deg);

    margin-top: -4px;

    transition: transform .2s ease;
}


/* چرخش فلش هنگام هاور */

.imm-navigation .mega-menu-root > li.menu-item-has-children:hover > a::after,
.imm-navigation .mega-menu-root > li.menu-item-has-children:focus-within > a::after {
    transform: rotate(135deg);
}


/* رنگ هاور */

.imm-navigation .mega-menu-root > li:hover > a,
.imm-navigation .mega-menu-root > li:focus-within > a,
.imm-navigation .mega-menu-root > li.current-menu-item > a,
.imm-navigation .mega-menu-root > li.current-menu-ancestor > a {
    color: var(--imm-primary-hover);
}


/* =========================================
   ALL SUBMENUS
========================================= */

.imm-navigation .mega-menu-root .sub-menu {
    display: block;

    position: absolute;

    margin: 0;
    padding: 8px;

    background: #fff;

    border: 1px solid var(--imm-border-light);
    border-radius: 12px;

    box-shadow:
        0 12px 35px rgba(35, 49, 57, .14);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    z-index: 9999;

    transition:
        opacity .18s ease,
        transform .18s ease,
        visibility .18s ease;
}


/* =========================================
   LEVEL 2
   زیرمنوی اصلی
========================================= */

.imm-navigation .mega-menu-root > li > .sub-menu {

    /*
       به جای top:100%
       کمی به هدر نزدیک‌تر می‌شود.
    */

    top: calc(100% - 8px);

    right: 0;
    left: auto;

    width: 270px;
    min-width: 270px;

    max-width: calc(100vw - 24px);

    border-radius: 0 0 12px 12px;

    transform: translateY(-5px);
}


/* نمایش زیرمنو */

.imm-navigation .mega-menu-root > li:hover > .sub-menu,
.imm-navigation .mega-menu-root > li:focus-within > .sub-menu {

    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0);
}


/* =========================================
   LEVEL 2 ITEMS
========================================= */

.imm-navigation .mega-menu-root > li > .sub-menu > li {
    position: relative;

    display: block;

    width: 100%;
}


/* لینک سطح دوم */

.imm-navigation .mega-menu-root > li > .sub-menu > li > a {

    display: flex;
    align-items: center;

    /*
       متن سمت راست
       فلش سمت چپ
    */

    justify-content: space-between;

    direction: rtl;

    width: 100%;
    min-height: 48px;

    padding: 9px 14px;

    border-radius: 7px;

    color: var(--imm-text);

    font-family: var(--imm-font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;

    text-decoration: none;

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


/* هاور سطح دوم */

.imm-navigation .mega-menu-root > li > .sub-menu > li:hover > a,
.imm-navigation .mega-menu-root > li > .sub-menu > li:focus-within > a {

    background: var(--imm-primary);
    color: #fff;
}


/* =========================================
   ARROW — LEVEL 2
   فلش سمت چپ
========================================= */

.imm-navigation
.mega-menu-root
> li
> .sub-menu
> li.menu-item-has-children
> > a::after {

    content: "";

    width: 7px;
    height: 7px;

    flex: 0 0 7px;

    border-left: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;

    /*
       فلش به سمت چپ
    */
    transform: rotate(45deg);

    transition: transform .18s ease;
}


/* هنگام هاور، فلش به سمت زیرمنو می‌چرخد */

.imm-navigation
.mega-menu-root
> li
> .sub-menu
> li.menu-item-has-children:hover
> > a::after,

.imm-navigation
.mega-menu-root
> li
> .sub-menu
> li.menu-item-has-children:focus-within
> > a::after {

    transform: rotate(225deg);
}


/* =========================================
   LEVEL 3 — SUB MENU
========================================= */

/* آیتم سطح دوم که فرزند دارد */
.imm-navigation
.mega-menu-root
> li
> .sub-menu
> li.menu-item-has-children {
    position: relative;
}


/* خود سطح سوم */
.imm-navigation
.mega-menu-root
> li
> .sub-menu
> li
> .sub-menu {

    position: absolute;

    top: 0;
    right: calc(100% - 1px);
    left: auto;

    width: 270px;
    min-width: 270px;
    max-width: calc(100vw - 24px);

    margin: 0;

    padding: 8px;

    background: #fff;

    border: 1px solid var(--imm-border-light);
    border-radius: 12px;

    box-shadow:
        0 12px 35px rgba(35, 49, 57, .14);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateX(8px);

    z-index: 10000;

    transition:
        opacity .18s ease,
        transform .18s ease,
        visibility .18s ease;
}


/* باز شدن سطح سوم */
.imm-navigation
.mega-menu-root
> li
> .sub-menu
> li.menu-item-has-children:hover
> .sub-menu,

.imm-navigation
.mega-menu-root
> li
> .sub-menu
> li.menu-item-has-children:focus-within
> .sub-menu {

    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateX(0);
}


/* =========================================
   فلش سطح دوم
========================================= */

.imm-navigation
.mega-menu-root
> li
> .sub-menu
> li.menu-item-has-children
> a {

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

    direction: rtl;
}


/* فلش سمت چپ */
.imm-navigation
.mega-menu-root
> li
> .sub-menu
> li.menu-item-has-children
> a::after {

    content: "";

    width: 7px;
    height: 7px;

    flex: 0 0 7px;

    border-left: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;

    transform: rotate(45deg);

    transition: transform .18s ease;
}


/* چرخش فلش هنگام هاور */
.imm-navigation
.mega-menu-root
> li
> .sub-menu
> li.menu-item-has-children:hover
> a::after,

.imm-navigation
.mega-menu-root
> li
> .sub-menu
> li.menu-item-has-children:focus-within
> a::after {

    transform: rotate(225deg);
}


/* =========================================
   HOVER BRIDGE
   فضای نامرئی بین منوی دوم و سوم
========================================= */

.imm-navigation
.mega-menu-root
> li
> .sub-menu
> li.menu-item-has-children
> .sub-menu::before {

    content: "";

    position: absolute;

    top: 0;
    right: -14px;

    width: 14px;
    height: 100%;

    background: transparent;
}


/* =========================================
   LEVEL 3 ITEMS
========================================= */

.imm-navigation
.mega-menu-root
> li
> .sub-menu
> li
> .sub-menu
> li {

    display: block;

    width: 100%;
}


/* لینک‌های سطح سوم */

.imm-navigation
.mega-menu-root
> li
> .sub-menu
> li
> .sub-menu
> li
> a {

    display: flex;
    align-items: center;

    width: 100%;
    min-height: 44px;

    padding: 9px 13px;

    border-radius: 7px;

    color: var(--imm-text);

    font-family: var(--imm-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.8;

    text-decoration: none;

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


/* Hover سطح سوم */

.imm-navigation
.mega-menu-root
> li
> .sub-menu
> li
> .sub-menu
> li
> a:hover,

.imm-navigation
.mega-menu-root
> li
> .sub-menu
> li
> .sub-menu
> li
> a:focus {

    background: var(--imm-surface);

    color: var(--imm-primary-dark);
}


/* اصلاح تداخل نمایش */
@media (min-width: 769px) {
    .mobile-header, .mobile-panel, .mobile-overlay, .top-bar-announcement {
        display: none !important;
    }
}
/* فقط در حالت موبایل نمایش داده شود */
@media (max-width: 768px) {

.immigration-header, .imm-header-container, .imm-navigation {
  display:none !important;
}




    .mobile-header {
        width: 100%;
        height: 70px !important;
        padding: 10px 15px !important;

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

        position: relative;
        background: #fff;
        border-bottom: 1px solid #eee;

        box-sizing: border-box;
        z-index: 1000;
    }

    .mobile-logo {
        position: static !important;
        transform: none !important;

        width: 100%;
        height: 100%;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .mobile-logo a {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
    }

    .mobile-logo img {
        display: block;
        width: 135px !important;
        max-width: 100%;
        max-height: 85px;
        height: auto !important;
        object-fit: contain;
    }



/* overlay */
.mobile-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.4);
  opacity:0;
  visibility:hidden;
  transition:.3s;
  z-index:9998;
}

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

.mobile-panel {
    position: fixed;
    top: 0;
    left: 0; 
    width: 280px;
    max-width: 85%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    transform: translateX(-101%);
    transition: transform .3s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: none; /* وقتی بسته است سایه نداشته باشه */
}

.mobile-panel.active {
    transform: translateX(0);
    box-shadow: 5px 0 15px rgba(0,0,0,0.1); /* فقط وقتی باز شد سایه بدهد */
}

/* top */
.mobile-panel-top{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border-bottom:1px solid #eee;
}


.panel-search{
  flex:1;
}

.panel-search input{
  width:100%;
  padding:10px;
  border:1px solid #ddd;
}

.close-panel{
background:none;
 color:#a87c77;
  border:none;
  font-size:20px;
 
}

/* tabs */
.panel-tabs{
  display:flex;
  border-bottom:1px solid #eee;
}

.panel-tabs button{
  flex:1;
  padding:12px;
  border:none;
  background:#f5f5f5;
  color: #000;
  font-size: 12px;
  font-weight: bold;
}

.panel-tabs button.active{
  background:#fff;
  border-bottom:2px solid #a87c77;
  font-weight:bold;
}

/* content */
.panel-content{
  flex:1;
  overflow-y:auto;
}

.tab-content{
  display:none;
}

.tab-content.active{
  display:block;
}

}

@media (max-width: 768px) {
.mobile-menu, .mobile-cats {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block !important;
}

.mobile-menu li, .mobile-cats li {
    border-bottom: 1px solid #eee;
    width: 100%;
    display: block; 
}

.mobile-menu li a, .mobile-cats li a {
    display: block;
    padding: 15px;
    color: #333 !important;
    text-decoration: none;
    font-size: 14px;
    text-align: right; /* تراز راست برای زبان فارسی */
    transition: 0.3s;
}

/* افکت ساده هنگام لمس یا هاور */
.mobile-menu li a:active, .mobile-cats li a:active {
    background-color: #f9f9f9;
}
.cat-item-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse; /* برای قرار گرفتن فلش در سمت چپ در سایت فارسی */
    border-bottom: 1px solid #eee;
}

.cat-item-wrapper a {
    flex: 1;
    padding: 14px;
    border-bottom: none !important;
}

.toggle-child {
    background: #f1f1f1;
    border: none;
    border-left: 1px solid #eee;
    width: 45px;
    height: 50px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* استایل زیرمنوها */
.sub-cats {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f9f9f9;
}

.sub-cats li a {
    padding: 12px 30px 12px 15px !important; 
    font-size: 13px;
    color: #555;
}


.toggle-child.open {
    transform: rotate(90deg);
    background: var(--accent);
    color: #fff;
}
.sub-cats {
        list-style: none;
        padding: 0;
        margin: 0;
        background: #f9f9f9;
    }

    .sub-cats li a {
        display: block;
        padding: 12px 30px 12px 15px !important;
        font-size: 13px;
        color: #555;
    }

    /* برای سطح سوم کمی تو رفتگی بیشتر */
    .sub-cats .sub-cats li a {
        padding-right: 45px !important;
        background: #fff;
    }}
.uder-header-mobile {
    margin: 20px;
}




