/* SHADA-MOBILE-HEADER-R18 START */

/*
 * Correct the Farsi mobile logo composition only.
 * Desktop begins at 992px and is not affected.
 */
@media (max-width: 991.98px) {

    html[lang^="fa"] body
    .container-header
    .shada-header-logo--fa {
        box-sizing: border-box !important;

        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;

        gap: clamp(14px, 4vw, 28px) !important;

        width: calc(100vw - 48px) !important;
        min-width: 0 !important;
        max-width: 860px !important;

        direction: ltr !important;
        overflow: visible !important;
    }

    /*
     * Older header CSS positioned one or both children outside
     * normal flex flow. Reset those coordinates so flex order is
     * actually visible: text first, S second (physical right).
     */
    html[lang^="fa"] body
    .container-header
    .shada-header-logo--fa
    .shada-header-logo-fa__text {
        position: static !important;
        inset: auto !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;

        order: 1 !important;
        flex: 0 1 auto !important;
        min-width: 0 !important;

        float: none !important;
        translate: none !important;
        transform: none !important;

        margin: 0 !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    html[lang^="fa"] body
    .container-header
    .shada-header-logo--fa
    .shada-header-logo-fa__icon {
        position: static !important;
        inset: auto !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;

        order: 2 !important;
        flex:
            0 0
            clamp(72px, 13vw, 126px) !important;

        float: none !important;
        translate: none !important;
        transform: none !important;

        margin: 0 !important;
        object-fit: contain !important;
    }
}

/* SHADA-MOBILE-HEADER-R18 END */
