/* =========================================================
   DIECUT MAIN LAYOUT
========================================================= */

:root {
    --primary: #17479e;
    --primary-dark: #0c2c67;

    --white: #ffffff;
    --cyan: #56c5d0;
    --orange: #faa61a;

    --background: #f5f8fc;
}


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html,
body {
    width: 100%;
    min-height: 100%;
}


html {
    scroll-behavior: smooth;
}


body {
    direction: rtl;

    font-family:
        "Vazirmatn",
        Tahoma,
        Arial,
        sans-serif;

    background: var(--background);

    color: var(--primary-dark);

    overflow-x: hidden;
}


button {
    font-family: inherit;
}


img {
    display: block;
    max-width: 100%;
}


/* =========================================================
   SITE WRAPPER
========================================================= */

.site-wrapper {
    width: 100%;
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    overflow-x: hidden;
}


/* =========================================================
   HEADER - DESKTOP
========================================================= */

.main-header {
    position: relative;

    width: 100%;
    height: 125px;

    display: grid;

    /*
       RTL
       راست = لوگو
       وسط = منو
       چپ = نوشته
    */

    grid-template-columns:
        280px
        minmax(0, 1fr)
        280px;

    grid-template-areas:
        "logo menu info";

    align-items: center;

    gap: 20px;

    padding:
        12px
        35px;

    background:
        linear-gradient(
            135deg,
            #0c3275 0%,
            #17479e 55%,
            #0862bd 100%
        );

    border-bottom:
        3px solid var(--orange);

    overflow: hidden;
}


/* خط فیروزه‌ای بالا */

.main-header::before {
    content: "";

    position: absolute;

    top: 0;
    right: 8%;

    width: 150px;
    height: 4px;

    background: var(--cyan);
}


/* =========================================================
   LOGO
========================================================= */

.header-logo {
    grid-area: logo;

    width: 250px;
    height: 90px;

    display: flex;

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

    overflow: visible;
}


.header-logo-image {
    display: block;

    width: 210px;
    height: 82px;

    object-fit: contain;
    object-position: right center;

    transform: scale(2.1);

    transform-origin: right center;
}


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

.main-menu {
    grid-area: menu;

    width: 100%;
    min-width: 0;

    display: flex;

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

    gap: 28px;

    white-space: nowrap;
}


.menu-button {
    position: relative;

    flex: 0 0 auto;

    padding:
        10px
        1px;

    border: 0;

    background: transparent;

    color:
        rgba(255, 255, 255, 0.9);

    font-size: 14px;
    font-weight: 700;

    line-height: 1.4;

    white-space: nowrap;

    cursor: pointer;

    transition:
        color 0.25s ease;
}


.menu-button:hover,
.menu-button.active {
    color: #ffffff;
}


/* خط نارنجی */

.menu-button::after {
    content: "";

    position: absolute;

    right: 50%;
    bottom: 0;

    width: 0;
    height: 3px;

    border-radius: 20px;

    background: var(--orange);

    transform:
        translateX(50%);

    transition:
        width 0.25s ease;
}


.menu-button:hover::after,
.menu-button.active::after {
    width: 100%;
}


/* نقطه فیروزه‌ای */

.menu-button.active::before {
    content: "";

    position: absolute;

    top: 0;
    left: -9px;

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--cyan);
}


/* =========================================================
   HEADER INFO
========================================================= */

.header-info {
    grid-area: info;

    width: 100%;
    min-width: 0;

    display: flex;

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

    overflow: hidden;
}


.header-text {
    width: 245px;
    max-width: 100%;

    display: flex;

    flex-direction: column;

    gap: 5px;

    color:
        rgba(255, 255, 255, 0.9);

    font-size: 12px;
    font-weight: 600;

    line-height: 1.6;

    text-align: center;
}


.header-text span {
    display: block;

    width: 100%;
}


.header-text span:first-child {
    font-size: 11.5px;

    white-space: nowrap;
}


.header-text span:last-child {
    width: 100%;

    padding:
        0
        25px;

    font-size: 11.5px;

    text-align: justify;
    text-align-last: justify;

    white-space: nowrap;
}


/* =========================================================
   PAGE CONTENT
========================================================= */

.page-content {
    width: 100%;

    flex: 1;

    overflow: hidden;

    background: #ffffff;
}


.page-frame {
    display: block;

    width: 100%;

    height:
        calc(100vh - 165px);

    min-height: 580px;

    margin: 0;
    padding: 0;

    border: 0;

    background: #ffffff;
}


/* =========================================================
   FOOTER
========================================================= */

.main-footer {
    width: 100%;
    min-height: 40px;

    display: flex;

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

    padding:
        9px
        15px;

    color: #ffffff;

    background:
        linear-gradient(
            90deg,
            #17479e,
            #0862bd
        );

    border-bottom:
        3px solid var(--orange);
}


.main-footer p {
    font-size: 10px;

    line-height: 1.7;

    text-align: center;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) and (min-width: 769px) {

    .main-header {
        grid-template-columns:
            190px
            minmax(0, 1fr)
            190px;

        gap: 12px;

        padding:
            10px
            20px;
    }


    .header-logo {
        width: 180px;
        height: 82px;
    }


    .header-logo-image {
        width: 160px;
        height: 72px;

        transform:
            scale(1.15);
    }


    .main-menu {
        gap: 18px;
    }


    .menu-button {
        font-size: 11px;
    }


    .header-text {
        width: 170px;

        font-size: 9px;
    }


    .header-text span:first-child,
    .header-text span:last-child {
        font-size: 9px;
    }


    .header-text span:last-child {
        padding:
            0
            12px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    body {
        overflow-x: hidden;
    }


    /* =====================================================
       HEADER MOBILE
    ===================================================== */

    .main-header {
        width: 100%;
        height: 92px;
        min-height: 92px;

        /*
           سه ستون:
           راست لوگو
           وسط منو
           چپ نوشته
        */

        display: grid;

        grid-template-columns:
            86px
            minmax(0, 1fr)
            105px;

        grid-template-areas:
            "logo menu info";

        align-items: center;

        gap: 5px;

        padding:
            6px
            10px;

        overflow: hidden;
    }


    .main-header::before {
        top: 0;

        right: 7%;

        width: 70px;
        height: 3px;
    }


    /* =====================================================
       LOGO MOBILE
    ===================================================== */

    .header-logo {
        grid-area: logo;

        width: 82px;
        height: 68px;

        min-width: 0;

        display: flex;

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

        overflow: hidden;
    }


    .header-logo-image {
        width: 78px;
        height: 64px;

        max-width: 100%;

        object-fit: contain;
        object-position: right center;

        transform: none !important;

        margin: 0;
    }


    /* =====================================================
       MENU MOBILE
    ===================================================== */

    .main-menu {
        grid-area: menu;

        width: 100%;
        min-width: 0;

        display: flex;

        flex-direction: row;
        flex-wrap: nowrap;

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

        gap: 7px;

        padding: 0;
        margin: 0;

        overflow: visible;

        white-space: nowrap;
    }


    .menu-button {
        flex:
            0
            0
            auto;

        padding:
            6px
            0;

        font-size: 7.2px;
        font-weight: 700;

        line-height: 1.2;
    }


    .menu-button::after {
        height: 2px;
    }


    .menu-button.active::before {
        top: 0;
        left: -4px;

        width: 4px;
        height: 4px;
    }


    /* =====================================================
       TEXT LEFT MOBILE
    ===================================================== */

    .header-info {
        grid-area: info;

        width: 100%;
        min-width: 0;
        max-width: 105px;

        height: 70px;

        display: flex;

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

        overflow: hidden;
    }


    .header-text {
        width: 100%;
        max-width: 100%;

        display: flex;

        flex-direction: column;

        align-items: stretch;
        justify-content: center;

        gap: 3px;

        margin: 0;
        padding: 0;

        color:
            rgba(255, 255, 255, 0.92);

        font-size: 7px;
        font-weight: 600;

        line-height: 1.55;

        text-align: center;

        overflow: hidden;
    }


    /*
       مهم:
       nowrap دسکتاپ در موبایل حذف می‌شود
    */

    .header-text span,
    .header-text span:first-child,
    .header-text span:last-child {
        display: block;

        width: 100%;
        max-width: 100%;

        margin: 0;
        padding: 0;

        font-size: 7px;

        line-height: 1.55;

        text-align: center;
        text-align-last: center;

        white-space: normal;

        overflow-wrap: normal;
        word-break: normal;
    }


    /* خط اول */

    .header-text span:first-child {
        font-weight: 600;
    }


    /* خط دوم */

    .header-text span:last-child {
        font-weight: 700;
    }


    /* =====================================================
       CONTENT MOBILE
    ===================================================== */

    .page-content {
        width: 100%;

        flex: 1;

        margin: 0;
        padding: 0;

        overflow: hidden;
    }


    .page-frame {
        display: block;

        width: 100%;

        height:
            calc(100vh - 121px);

        min-height: 500px;

        margin: 0;
        padding: 0;

        border: 0;
    }


    /* =====================================================
       FOOTER MOBILE
    ===================================================== */

    .main-footer {
        width: 100%;

        min-height: 29px;

        padding:
            5px
            8px;
    }


    .main-footer p {
        margin: 0;

        font-size: 6px;

        line-height: 1.5;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 430px) {

    .main-header {
        height: 90px;
        min-height: 90px;

        grid-template-columns:
            78px
            minmax(0, 1fr)
            96px;

        gap: 4px;

        padding:
            5px
            8px;
    }


    /* LOGO */

    .header-logo {
        width: 74px;
        height: 64px;
    }


    .header-logo-image {
        width: 70px;
        height: 60px;
    }


    /* MENU */

    .main-menu {
        gap: 6px;
    }


    .menu-button {
        font-size: 6.7px;

        padding:
            5px
            0;
    }


    /* INFO */

    .header-info {
        max-width: 96px;

        height: 66px;
    }


    .header-text,
    .header-text span,
    .header-text span:first-child,
    .header-text span:last-child {
        font-size: 6.6px;

        line-height: 1.55;
    }


    .page-frame {
        height:
            calc(100vh - 119px);
    }

}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .main-header {
        grid-template-columns:
            70px
            minmax(0, 1fr)
            84px;

        gap: 3px;

        padding:
            5px
            6px;
    }


    .header-logo {
        width: 66px;
    }


    .header-logo-image {
        width: 63px;
    }


    .main-menu {
        gap: 4px;
    }


    .menu-button {
        font-size: 6px;
    }


    .header-info {
        max-width: 84px;
    }


    .header-text,
    .header-text span,
    .header-text span:first-child,
    .header-text span:last-child {
        font-size: 6px;
    }

}