/* پس‌زمینهٔ نیمه‌شفاف هنگام باز بودن منو */
/* به‌صورت پیش‌فرض */
#header {
    position: relative;
    width: 100%;
    transition: background-color 0.3s ease, padding 0.3s ease;
    z-index: 100; /* بالاتر از باقی المان‌ها */
}

    /* لوگوی sticky (مشکی) را مخفی می‌کنیم */
    #header .sticky-logo {
        display: none;
    }

    /* وقتی کلاس header-scrolled ست شد */
    #header.header-scrolled {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        padding: 0; /* دلخواه */
    }

        /* در حالت Scrolled سایت‌لوگو را مخفی و استیکی‌لوگو را نمایش بده */
        #header.header-scrolled .site-logo {
            display: none !important;
        }

        #header.header-scrolled .sticky-logo {
            display: inline-block !important;
        }

        /* رنگ متن لینک‌ها */
        #header.header-scrolled .menu-links a {
            color: #000 ;
        }
        #header.header-scrolled .menu-item1 a {
            color: #000 !important;
        }
        /* اگر المان‌های دیگری مثل آیتم‌های منو یا آی‌کان دارید، رنگ‌شان را هم این‌جا ست کنید */
        #header.header-scrolled .header-inner a {
            color: #000 ;
        }
/* ۱. بازنویسی برای تمام لینک‌های درون زیرمنو (drop-down) */
header.header-scrolled .drop-down-multilevel a {
    color: inherit !important; /* رنگ ارث‌برده از والد (معمولاً سیاه یا سفید بسته به تم) */
}

/* یا ۲. فقط برای لینک‌های درون کانتینر KalaLink */
header.header-scrolled [id^="KalaLink-"] a {
    color: #fff !important; /* یا هر رنگ دلخواهی که می‌خواهید */
}

/* یا ۳. لینک‌ها را بدون !important اما با specificity بالاتر */
header.header-scrolled .header-inner .sub-menu .row a {
    color: #fff !important;
}

/* specificity بالاتر به خاطر تکرار سلکتور */
header.header-above-content-enabled.header-scrolled > .menu > nav.header-navbar-v2 {
    background-color: #fff;
    position: fixed;
    z-index: 999;
}
.mobile-side-menu {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100vh;
    background: #fff;
    transition: left .3s ease;
    z-index: 1000;
    padding-top: 60px;
    overflow-y: auto;
}

    .mobile-side-menu.open {
        left: 0;
    }

.mobile-submenu {
    list-style: none;
    padding-left: 15px;
    margin: 0;
}

    .mobile-submenu .mobile-item a {
        display: block;
        padding: 8px 16px;
        color: #000;
        text-decoration: none;
    }

.no-scroll {
    overflow: hidden;
}

/*.mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease;
    z-index: 900;
  }
  .mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
  }*/
  
  /* پنل منو */
  /*.mobile-side-menu {
    position: fixed;
    top: 0; left: -280px;
    width: 280px;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    transition: left .3s ease;
    z-index: 1000;
    padding-top: 60px;*/ /* قد هدر */
    /*overflow-y: auto;
  }*/
  /* حالت باز */
  /*.mobile-side-menu.open {
    left: 0;
  }*/
  
  /* لیست گروه‌ها */
  /*#mobile-menu-list {
    list-style: none;
    margin: 0; padding: 0;
  }
  #mobile-menu-list .mobile-group {
    border-bottom: 1px solid #eee;
  }
  #mobile-menu-list .mobile-group > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background .2s ease;
  }
  #mobile-menu-list .mobile-group > a:hover {
    background: #f5f5f5;
  }*/
  
  /* آیکون چرخان */
  /*#mobile-menu-list .mobile-group > a .caret {
    transition: transform .3s ease;
    font-size: 12px;
  }
  #mobile-menu-list .mobile-group.open > a .caret {
    transform: rotate(90deg);
  }*/
  
  /* زیرمنو (محصولات) */
  /*.mobile-submenu {
    list-style: none;
    margin: 0; padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
  }
  .mobile-submenu.open {*/
    /* ارتفاع بزرگ‌تر از تعداد آیتم‌ها؛ 500px کافیه */
    /*max-height: 500px;
  }*/
  
  /* آیتم‌های زیرمنو */
  /*.mobile-submenu .mobile-item a {
    display: block;
    padding: 10px 40px;
    text-decoration: none;
    color: #555;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    transition: background .2s ease;
  }
  .mobile-submenu .mobile-item a:hover {
    background: #f9f9f9;
  }*/
  
  /* استایل دکمه همبرگر (بدون تغییر) */
  /*.mobile-menu-toggle {*/ /* ... */ /*}*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Vazir, sans-serif;
    direction: rtl;
}

/* ——— HEADER ——— */
header {
    position: relative;
    width: 100%;
    background: #fff;
    z-index: 100;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* لوگو یا عنوان سایت */
.site-branding {
    font-size: 20px;
    font-weight: bold;
}

/* ——— HAMBURGER TOGGLE ——— */
.mobile-menu-toggle {
    display: none; /* فقط موبایل */
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 32px;
    cursor: pointer;
}

    .mobile-menu-toggle span {
        display: block;
        height: 5px;
        background: #333;
        border-radius: 2px;
        transition: transform .3s ease, opacity .3s ease;
    }

    .mobile-menu-toggle.open span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.open span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

/* ——— MOBILE SIDE PANEL ——— */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease;
    z-index: 190;
}

    .mobile-menu-overlay.open {
        opacity: 1;
        visibility: visible;
    }

.mobile-side-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    transition: left .3s ease;
    z-index: 200;
    padding: 60px 0 20px; /* فاصله از بالای هدر */
    overflow-y: auto;
}

    .mobile-side-menu.open {
        left: 0;
    }

/* منوی داخلی */
#mobile-menu-list {
    list-style: none;
    padding: 0;
}

    #mobile-menu-list > li {
        border-bottom: 1px solid #eee;
    }
    /* لینک‌های ثابت */
    #mobile-menu-list .fixed-link > a {
        display: block;
        padding: 14px 20px;
        color: #333;
        font-weight: 600;
        text-decoration: none;
        transition: background .2s ease;
    }

        #mobile-menu-list .fixed-link > a:hover {
            background: #f5f5f5;
        }

/* گروه‌ها (آکاردئون) */
.mobile-group > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease;
}

    .mobile-group > a:hover {
        background: #f9f9f9;
    }

    .mobile-group > a .caret {
        transition: transform .3s ease;
        font-size: 12px;
    }

.mobile-group.open > a .caret {
    transform: rotate(90deg);
}

/* زیرمنو محصولات */
.mobile-submenu {
    list-style: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
}

    .mobile-submenu.open {
        max-height: 1000px; /* کافی برای باز شدن */
    }

    .mobile-submenu .mobile-item > a {
        display: block;
        padding: 10px 40px;
        font-size: 14px;
        color: #555;
        text-decoration: none;
        transition: background .2s ease;
    }

        .mobile-submenu .mobile-item > a:hover {
            background: #f0f0f0;
        }

/* ——— RESPONSIVE ——— */
@media (max-width: 991px) {
    /* دکمه همبرگر */
    .mobile-menu-toggle {
        display: flex;
    }
    /* منوی دسکتاپ را مخفی کن */
    .header-navbar-v2 {
        display: none;
    }
}




/* ------- BUTTON -------- */
#open-widget-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
    background: #ff9800;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease;
}

    #open-widget-btn:hover {
        transform: scale(1.1);
    }

    #open-widget-btn i {
        font-size: 28px;
        color: #fff;
    }

/* ------- OVERLAY & IFRAME CONTAINER -------- */
#widget-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    visibility: hidden;
    opacity: 0;
    transition: opacity .3s ease, visibility .3s;
    z-index: 9999;
}

    #widget-overlay.open {
        visibility: visible;
        opacity: 1;
    }

#widget-iframe-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 480px;
    height: 90%;
    max-height: 800px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

    #widget-iframe-container header {
        height: 44px;
        background: #f5f5f5;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 0 12px;
        border-bottom: 1px solid #ddd;
    }

        #widget-iframe-container header button {
            background: transparent;
            border: none;
            font-size: 24px;
            line-height: 1;
            cursor: pointer;
        }

#widget-iframe {
    width: 100%;
    height: calc(100% - 44px);
    border: none;
}

.btn-preregister {
    font-family: 'IranSans', sans-serif;
    font-weight: 600;
    font-size: 18px;
    padding: 12px 24px;
    background-color: #FF9800; /* یا #28A745 */
    color: #fff;
    border: none;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: background-color .2s ease, transform .1s ease;
}

    .btn-preregister:hover {
        background-color: #E68900; /* تیره‌تر */
        transform: translateY(-2px);
    }

    .btn-preregister:active {
        background-color: #CC7F00;
        transform: translateY(0);
    }


/* CSS: استایل دکمه چت آنلاین */
#open-chat-btn {
    position: fixed;
    bottom: 20px;
    left: 100px; /* فاصله از دکمه‌ی پیش‌ثبت‌نام */
    width: 56px;
    height: 56px;
    background-color: #007BFF; /* آبی روشن برای چت */
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .2s ease, transform .1s ease;
    z-index: 10000;
}

    #open-chat-btn:hover {
        background-color: #006AE6;
        transform: translateY(-2px);
    }

    #open-chat-btn:active {
        background-color: #005ACD;
        transform: translateY(0);
    }

    #open-chat-btn i {
        color: #fff;
        font-size: 24px;
        line-height: 1;
    }

    /* اگر می‌خواهید در دسکتاپ متن نمایش داده شود */
    #open-chat-btn span {
        display: none;
        font-family: 'Vazir', sans-serif;
        font-weight: 600;
        color: #fff;
        font-size: 14px;
        margin-right: 6px;
    }

@media (min-width: 577px) {
    #open-chat-btn {
        width: auto;
        padding: 0 16px;
        border-radius: 28px;
    }

        

        #open-chat-btn span {
            display: inline;
        }
}
/* استایل مشترک برای هر دو دکمه */
#open-widget-btn,
#open-chat-btn,
#open-request-btn {
    position: fixed;
    left: 20px; /* فاصله از لبه چپ */
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .2s ease, transform .1s ease;
    z-index: 10000;
}

/* دکمه‌ی پیش‌ثبت‌نام در پایین‌تر */
#open-widget-btn {
    bottom: 20px; /* 20px تا لبه پایینی */
    background-color: #FF9800;
}

    #open-widget-btn:hover {
        background-color: #E68900;
        transform: translateY(-2px);
    }

    #open-widget-btn:active {
        background-color: #CC7F00;
    }

/* دکمه‌ی چت آنلاین بالاتر از آن */
#open-chat-btn {
    bottom: 140px; /* 56px ارتفاع + 20px فاصله + 14px اضافی */
    background-color: #007BFF;
}

    #open-chat-btn:hover {
        background-color: #006AE6;
        transform: translateY(-2px);
    }

    #open-chat-btn:active {
        background-color: #005ACD;
    }

    /* آیکون داخل دکمه */
    #open-widget-btn i,
    #open-chat-btn i,
    #open-request-btn i {
        color: #fff;
        font-size: 24px;
    }
#open-request-btn {
    position: fixed;
    bottom: 20px;
    left: 20px; /* فاصله از دکمه‌ی پیش‌ثبت‌نام */
    width: 56px;
    height: 56px;
    background-color: #007BFF; /* آبی روشن برای چت */
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .2s ease, transform .1s ease;
    z-index: 10000;
}

    #open-chat-btn:hover {
        background-color: #006AE6;
        transform: translateY(-2px);
    }

#open-request-btn:active {
    background-color: #005ACD;
    transform: translateY(0);
}

#open-request-btn i {
    color: #fff;
    font-size: 24px;
    line-height: 1;
}

    /* اگر می‌خواهید در دسکتاپ متن نمایش داده شود */
#open-request-btn span {
    display: none;
    font-family: 'Vazir', sans-serif;
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    margin-right: 6px;
}

@media (min-width: 577px) {
    #open-request-btn {
        width: auto;
        padding: 0 18px;
        border-radius: 28px;
    }



        #open-request-btn span {
            display: inline;
        }
}

#open-request-btn {
    bottom: 80px; /* 56px ارتفاع + 20px فاصله + 14px اضافی */
    background-color: #007BFF;
}
    #open-request-btn:hover {
        background-color: #006AE6;
        transform: translateY(-2px);
    }




/* ------- OVERLAY & IFRAME CONTAINER -------- */
#request-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    visibility: hidden;
    opacity: 0;
    transition: opacity .3s ease, visibility .3s;
    z-index: 9999;
}

    #request-overlay.open {
        visibility: visible;
        opacity: 1;
    }

#request-iframe-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 480px;
    height: 90%;
    max-height: 800px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

    #request-iframe-container header {
        height: 44px;
        background: #f5f5f5;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 0 12px;
        border-bottom: 1px solid #ddd;
    }

        #request-iframe-container header button {
            background: transparent;
            border: none;
            font-size: 24px;
            line-height: 1;
            cursor: pointer;
        }

#request-iframe {
    width: 100%;
    height: calc(100% - 44px);
    border: none;
}