
/* PERSIAN HOMEPAGE ETF - LOCAL RTL LAYOUT FIX */
/* All rules are scoped to #etf-market. */

html[lang="fa-IR"] #etf-market {
    direction: rtl;
    text-align: right;
}

html[lang="fa-IR"] #etf-market .etf-home-head {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

html[lang="fa-IR"] #etf-market .etf-home-head > div {
    flex: 1 1 auto;
    min-width: 0;
}

html[lang="fa-IR"] #etf-market .etf-home-head h2 {
    font-size: clamp(22px, 2.2vw, 30px);
    line-height: 1.45;
    letter-spacing: 0;
    margin: 7px 0 9px;
}

html[lang="fa-IR"] #etf-market .etf-home-head p {
    max-width: 720px;
    font-size: 13px;
    line-height: 1.9;
    margin: 0;
}

html[lang="fa-IR"] #etf-market .etf-view-all {
    flex: 0 0 auto;
    align-self: flex-end;
    white-space: nowrap;
}

html[lang="fa-IR"] #etf-market .etf-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    direction: rtl;
}

html[lang="fa-IR"] #etf-market .etf-home-card {
    min-width: 0;
    padding: 19px;
    text-align: right;
}

html[lang="fa-IR"] #etf-market .etf-home-card-top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

html[lang="fa-IR"] #etf-market .etf-home-card-top strong {
    direction: ltr;
    unicode-bidi: isolate;
    font-size: 19px;
}

html[lang="fa-IR"] #etf-market .etf-home-label {
    font-size: 11px;
    line-height: 1.7;
    margin-top: 16px;
}

html[lang="fa-IR"] #etf-market .etf-home-value {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: right;
    font-size: clamp(20px, 2vw, 25px);
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}

html[lang="fa-IR"] #etf-market .etf-home-card small {
    line-height: 1.8;
    overflow-wrap: anywhere;
}

html[lang="fa-IR"] #etf-market .etf-home-foot {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 16px;
}

html[lang="fa-IR"] #etf-market .etf-home-foot span {
    line-height: 1.85;
}

html[lang="fa-IR"] #etf-market .etf-home-foot a {
    white-space: nowrap;
}

/* Existing local demonstration-data notice */
html[lang="fa-IR"] #etf-market [role="note"] {
    padding: 10px 14px !important;
    margin: 0 0 20px !important;
    background: rgba(202,162,75,.075) !important;
    border: 1px solid rgba(202,162,75,.32) !important;
    border-radius: 9px !important;
    color: #e4c98a !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.8 !important;
    text-align: right;
}

@media (max-width: 800px) {
    html[lang="fa-IR"] #etf-market .etf-home-head {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    html[lang="fa-IR"] #etf-market .etf-view-all {
        align-self: flex-start;
    }

    html[lang="fa-IR"] #etf-market .etf-home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    html[lang="fa-IR"] #etf-market .etf-home-grid {
        grid-template-columns: 1fr;
    }

    html[lang="fa-IR"] #etf-market .etf-home-foot {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    html[lang="fa-IR"] #etf-market .etf-home-head h2 {
        font-size: 22px;
    }
}


/* PERSIAN_ETF_PARITY_1345 */
html[lang="fa-IR"] #etf-market .etf-home-head {
    gap: 30px;
    margin-bottom: 25px;
}

html[lang="fa-IR"] #etf-market .etf-home-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

html[lang="fa-IR"] #etf-market .etf-home-label {
    margin-top: 19px;
}

html[lang="fa-IR"] #etf-market .etf-home-foot {
    gap: 25px;
    margin-top: 14px;
}

@media (max-width: 1000px) {
    html[lang="fa-IR"] #etf-market .etf-home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    html[lang="fa-IR"] #etf-market .etf-home-head {
        display: block;
    }

    html[lang="fa-IR"] #etf-market .etf-home-grid {
        grid-template-columns: 1fr;
    }

    html[lang="fa-IR"] #etf-market .etf-home-foot {
        display: block;
    }
}
