/* ==================================================
   KIAPIC THEME - HEADER
   Desktop: 1200px
   Mobile: Responsive
   Font: Vazirmatn
================================================== */


/* =====================================
   1. HEADER
===================================== */

.site-header {
    width: 1200px;
    max-width: 100%;
    height: 75px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    isolation: isolate;
    z-index: 1000;
    overflow: visible;
}

/* پس زمینه تمام عرض هدر */
.site-header::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);

    background-color: #00008B;

    z-index: -1;
    pointer-events: none;
}

/* =====================================
   2. HEADER TOP
===================================== */

.header-top {
    width: 100%;
    height: 67px;
    display: flex;
    flex-direction: row;
    direction: rtl;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* =====================================
   3. LOGO
===================================== */

.header-logo {
    width: 450px;
    height: 67px;
    flex: 0 0 450px;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    direction: rtl;
    margin: 0;
    padding: 0 20px 0 0;
    box-sizing: border-box;
    overflow: hidden;
}

.header-logo a {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.header-logo img {
    display: block;
    width: 125px;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: right top;
}

.header-logo .site-title {
    color: #ffffff;
    font-family: 'BNazanin', Tahoma, sans-serif;
    font-size: 24px;
    text-decoration: none;
}

.header-logo .site-description {
    color: #ffffff;
    font-family: 'BNazanin', Tahoma, sans-serif;
    margin: 5px 0 0;
}

/* =====================================
   4. HEADER LEFT
===================================== */

.header-left {
    width: 750px;
    height: 67px;
    flex: 0 0 750px;
    position: relative;
    direction: ltr;
    box-sizing: border-box;
}

/* مجموعه ساعت و جستجو */

.header-logo-bars {
    position: absolute;
    left: 0;
    right: auto;
    bottom: 2px;

    width: 190px;
    height: 56px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 5px;

    direction: ltr;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =====================================
   5. DATE AND TIME
===================================== */

#datetime {
    width: 190px;
    height: 22px;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;

    direction: rtl;
    gap: 4px;

    font-family: 'BNazanin', Tahoma, sans-serif;
    font-size: 13px;
    white-space: nowrap;

    margin: 0;
    padding: 0;
}

#datetime #date {

    color: #ffffff;
    padding: 4px 6px;
    border-radius: 3px;
    white-space: nowrap;
}

#datetime #time {

    color: #ffffff;
    padding: 4px 6px;
    border-radius: 3px;
    white-space: nowrap;
}

/* =====================================
   6. SEARCH BOX
===================================== */

.header-search {
    width: 170px;
    height: 22px;

    display: flex;
    flex-direction: row;

    margin: 0;
    padding: 0;

    background: #ffffff;
    border: 1px solid #000000;

    box-sizing: border-box;
    overflow: hidden;
}

.header-search input[type="search"] {
    flex: 1;
    width: 0;
    height: 20px;

    border: none;
    outline: none;

    padding: 0 5px;

    font-family: 'BNazanin', Tahoma, sans-serif;
    font-size: 11px;

    box-sizing: border-box;
}

.header-search button {
    width: 24px;
    height: 20px;
    flex: 0 0 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: none;

    background: #6b1200;
    color: #ffffff;
    cursor: pointer;
}

.header-search button:hover {
    background: #8b1a08;
}

.header-search button svg {
    display: block;
    width: 16px;
    height: 16px;
}

/* =====================================
   7. DESKTOP MENU
===================================== */

.header-menu {
    width: 100%;
    max-width: 100%;
    height: 28px;



    margin: 0;
    padding: 0;

    box-sizing: border-box;
    overflow: visible;

    position: relative;
    z-index: 1001;
}

.kiapic-mobile-menu-toggle {
    display: none;
}

.main-navigation {
    width: 100%;
    height: 28px;

    display: flex;
    align-items: center;

    direction: rtl;
    position: relative;
    z-index: 1002;

    margin: 0;
    box-sizing: border-box;
}

.kiapic-menu {
    width: 100%;
    height: 28px;

    display: flex;
    flex-direction: row;
    align-items: center;

    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
}

.kiapic-menu>li {
    height: 28px;

    display: flex;
    align-items: center;

    position: relative;
    margin: 0;
    padding: 0;
}

.kiapic-menu>li>a {
    height: 28px;

    display: flex;
    align-items: center;

    padding: 0 12px;

    color: #ffffff;
    font-family: 'BNazanin', Tahoma, sans-serif;
    font-size: 18px;
    text-decoration: none;

    box-sizing: border-box;
}

.kiapic-menu>li>a:hover {
    background: #333333;
    color: #ffffff;
}

/* =====================================
   8. DESKTOP SUBMENUS
===================================== */

/* این قوانین فقط برای دسکتاپ هستند */

@media screen and (min-width: 768px) {

    .kiapic-menu .sub-menu {
        display: none;

        position: absolute;
        top: 28px;
        right: 0;

        min-width: 160px;

        padding: 0;
        margin: 0;

        list-style: none;

        background: #ffffff;
        border: 1px solid #cccccc;

        z-index: 9999;
    }

    /* سطح دوم */

    .kiapic-menu>li:hover>.sub-menu {
        display: block;
    }

    /* سطح سوم */

    .kiapic-menu .sub-menu li {
        position: relative;
    }

    .kiapic-menu .sub-menu .sub-menu {
        top: 0;
        right: 100%;
        left: auto;
        min-width: 160px;
        z-index: 10000;
    }

    .kiapic-menu .sub-menu li:hover>.sub-menu {
        display: block;
    }

    .kiapic-menu .sub-menu li a {
        display: block;
        padding: 10px;

        color: #222222;
        font-family: 'BNazanin', Tahoma, sans-serif;
        font-size: 12px;
        text-decoration: none;
    }

    .kiapic-menu .sub-menu li a:hover {
        background: #eeeeee;
        color: #000000;
    }

    /* فلش‌های موبایل در دسکتاپ مخفی */

    .kiapic-submenu-toggle {
        display: none !important;
    }
}

/* =====================================
   9. MOBILE HEADER
===================================== */

@media screen and (max-width: 767px) {

    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .site-header {
        width: 100%;
        max-width: 100%;
        height: auto;
        overflow: visible;
    }

    /* ردیف لوگو و جستجو */

    .header-top {
        width: 100%;
        height: auto;
        min-height: 90px;

        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;

        padding: 10px;
        box-sizing: border-box;
    }

    .header-logo {
        width: 40%;
        max-width: 140px;
        height: auto;
        flex: 0 1 40%;
        padding: 0;
    }

    .header-logo a {
        height: auto;
    }

    .header-logo img {
        width: 100%;
        height: auto;
    }

    .header-left {
        width: 60%;
        height: auto;
        flex: 1 1 60%;
        min-width: 0;
        position: static;
    }

    /* مخفی کردن ساعت و تاریخ */

    #datetime {
        display: none !important;
    }

    /* جستجو */

    .header-logo-bars {
        width: 100%;
        height: auto;
        position: static;

        display: flex;
        align-items: center;
        justify-content: flex-end;

        margin: 0;
    }

    .header-search {
        width: 100%;
        max-width: 220px;
        height: 32px;
    }

    .header-search input[type="search"] {
        height: 30px;
        font-size: 12px;
    }

    .header-search button {
        height: 30px;
    }

    /* =================================
       MOBILE MENU BAR
    ================================= */

    .header-menu {
        width: 100%;
        height: auto;
        position: relative;
        direction: rtl;
    }

    /* دکمه همبرگری */

    .kiapic-mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;

        width: 100%;
        min-height: 45px;

        padding: 10px 15px;

        background: #0025ad  !important;
        color: #ffffff !important;

        border: none;
        border-radius: 0;

        font-family: 'BNazanin', Tahoma, sans-serif;
        font-size: 14px;
        text-align: right;

        cursor: pointer;
    }

    .hamburger-icon {
        font-size: 22px;
        line-height: 1;
    }

    /* منوی اصلی در حالت بسته */

    .main-navigation {
        display: none !important;

        width: 100%;
        height: auto;

        position: relative;
        z-index: 99999;

        background: #ffffff !important;
        opacity: 1;
    }

    /* منوی اصلی در حالت باز */

    .main-navigation.mobile-menu-open {
        display: block !important;
        background: #ffffff !important;
    }

    /* لیست منو و زیرمنوها */

    .kiapic-menu,
    .kiapic-menu .sub-menu {
        display: block;
        width: 100%;
        height: auto;

        margin: 0;
        padding: 0;

        list-style: none;
        box-sizing: border-box;
    }

    .kiapic-menu>li,
    .kiapic-menu .sub-menu li {
        display: block;
        width: 100%;
        height: auto;

        position: relative;
        box-sizing: border-box;

        background: #ffffff;
        border-bottom: 1px solid #eeeeee;
    }

    /* لینک‌ها */

    .kiapic-menu li a {
        display: block;

        width: 100%;
        padding: 10px 15px 10px 48px;

        color: #333333;
        font-family: 'BNazanin', Tahoma, sans-serif;
        text-align: right;
        text-decoration: none;

        box-sizing: border-box;
    }

    .kiapic-menu>li>a {
        font-size: 13px;
    }

    /* زیرمنوهای بسته */

    .kiapic-menu .sub-menu {
        display: none !important;

        position: static !important;
        top: auto;
        right: auto;
        left: auto;

        min-width: 0 !important;
        width: 100% !important;

        padding: 0 15px 0 0 !important;
        margin: 0 !important;

        background: #f2f2f2 !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* فقط با کلاس submenu-open باز شوند */

    .kiapic-menu li.submenu-open>.sub-menu {
        display: block !important;
    }

    /* سطح دوم */

    .kiapic-menu>li>.sub-menu>li>a {
        font-size: 12px !important;
        padding: 9px 15px 9px 48px !important;
    }

    /* سطح سوم */

    .kiapic-menu .sub-menu .sub-menu>li>a {
        font-size: 11px !important;
        padding: 8px 15px 8px 48px !important;
    }

    .kiapic-menu .sub-menu li {
        background: #f2f2f2 !important;
    }

    .kiapic-menu .sub-menu .sub-menu li {
        background: #e9e9e9 !important;
    }

    /* دکمه فلش زیرمنو */

    .kiapic-submenu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;

        position: absolute;
        top: 2px;
        left: 5px;

        width: 38px;
        height: 38px;

        padding: 0;

        background: transparent !important;
        border: none !important;

        color: #6b1200 !important;
        font-size: 20px;
        line-height: 1;

        cursor: pointer;
        z-index: 5;

        transform: rotate(0deg);
        transition: transform 0.2s ease;
    }

    /* چرخش فلش هنگام باز بودن زیرمنو */

    .kiapic-menu li.submenu-open>.kiapic-submenu-toggle {
        transform: rotate(180deg);
    }

}

.datetime-separator {
    display: inline-block;
    width: 1px;
    height: 15px;
    background-color: rgba(255, 255, 255, 0.7);
    margin: 0 1px;
    vertical-align: middle;
}

@media screen and (min-width: 768px) {

    .header-top {
        width: 1200px;
        max-width: 100%;
        height: 67px;
        display: flex;
        flex-direction: row;
        direction: rtl;
        align-items: stretch;
    }

    /* ستون اول: لوگو - 200 پیکسل */
    .header-logo-column {
        width: 200px;
        flex: 0 0 200px;
        height: 67px;
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        overflow: hidden;
    }

    .header-logo {
        width: 100%;
        height: 67px;
        flex: 1 1 auto;
    }

    .header-logo img {
        width: 125px;
    }

    /* ستون دوم: منو - 800 پیکسل */
    .header-menu-column {
        width: 800px;
        flex: 0 0 800px;
        height: 67px;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: stretch;
    }

    .header-menu-column .header-menu {
        width: 100%;
        height: 28px;
        flex: 0 0 28px;
        margin: 0;
    }

    .header-menu-column .main-navigation,
    .header-menu-column .kiapic-menu {
        height: 28px;
    }

    /* ستون سوم: ساعت، تاریخ و جستجو - 200 پیکسل */
    .header-left {
        width: 200px;
        flex: 0 0 200px;
        height: 67px;
        position: relative;
        direction: ltr;
    }

    .header-logo-bars {
        width: 190px;
        height: 56px;
        position: absolute;
        left: 0;
        right: auto;
        bottom: 2px;
    }

}

/* =====================================
   KIAPIC - Active Menu Underline
===================================== */

/* منوی صفحه فعال */
.kiapic-menu>li.current-menu-item>a,
.kiapic-menu>li.current_page_item>a,
.kiapic-menu>li.current-menu-ancestor>a,
.kiapic-menu>li.current_page_ancestor>a {
    position: relative;
}

/* خط زیر منوی فعال */
.kiapic-menu>li.current-menu-item>a::after,
.kiapic-menu>li.current_page_item>a::after,
.kiapic-menu>li.current-menu-ancestor>a::after,
.kiapic-menu>li.current_page_ancestor>a::after {
    content: "";
    position: absolute;
    right: 12px;
    left: 12px;
    bottom: 3px;
    height: 2px;
    background-color: #ffffff;
}

/* =====================================
   FIX: TGJU HORIZONTAL OVERFLOW
===================================== */

.kiapic-tgju-ticker {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.kiapic-tgju-ticker tgju {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}