/* RTL Support for Persian Language */

/* Beautiful Persian Fonts */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&family=Noto+Sans+Arabic:wght@100;200;300;400;500;600;700;800;900&family=Amiri:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* RTL Body (robust: works with html[dir="rtl"] and html.rtl) */
html[dir="rtl"] body,
html.rtl body,
body.rtl {
    direction: rtl !important;
    text-align: right !important;
    font-family: 'Vazirmatn', 'Noto Sans Arabic', 'Amiri', 'Tahoma', 'Arial', sans-serif !important;
}

/* Persian Typography */
html[dir="rtl"] body h1, html[dir="rtl"] body h2, html[dir="rtl"] body h3, html[dir="rtl"] body h4, html[dir="rtl"] body h5, html[dir="rtl"] body h6,
html.rtl body h1, html.rtl body h2, html.rtl body h3, html.rtl body h4, html.rtl body h5, html.rtl body h6,
body.rtl h1, body.rtl h2, body.rtl h3, body.rtl h4, body.rtl h5, body.rtl h6 {
    font-family: 'Vazirmatn', 'Noto Sans Arabic', 'Amiri', sans-serif;
    font-weight: 600;
    line-height: 1.4;
}

html[dir="rtl"] body p, html[dir="rtl"] body span, html[dir="rtl"] body div,
html.rtl body p, html.rtl body span, html.rtl body div,
body.rtl p, body.rtl span, body.rtl div {
    font-family: 'Vazirmatn', 'Noto Sans Arabic', 'Amiri', sans-serif;
    line-height: 1.6;
}

/* Navigation (RTL friendly) - Override with consistent sizing */
body.rtl .main-menu ul,
body.rtl #navigation {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0px !important;
}
body.rtl .main-menu ul li,
body.rtl #navigation li {
    display: inline-block !important;
    position: relative !important;
    margin: 0 3px !important;
    vertical-align: middle !important;
}
body.rtl .main-menu ul li a,
body.rtl #navigation li a {
    display: inline-block !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    min-height: 32px !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    text-align: center !important;
    font-family: 'Vazirmatn', 'Noto Sans Arabic', 'Arial', sans-serif !important;
    letter-spacing: 0 !important;
}
body.rtl .main-menu ul li .submenu { right: 0; left: auto; text-align: right; }

/* Alternating layout helpers used on home */
body.rtl .about_info.pl-68 { padding-left: 0; padding-right: 68px; }
@media (max-width: 768px) { body.rtl .about_info.pl-68 { padding-right: 0; } }

/* Program details alternating timeline */
body.rtl .single_propram:nth-child(odd) .inner_wrap { text-align: right; padding-right: 20px; }
body.rtl .single_propram:nth-child(even) .inner_wrap { text-align: left; padding-left: 20px; }

/* Footer tweaks */
.footer_content { padding: 60px 0 40px; background: #1a1a1a; }
.footer_bottom { background: #000; padding: 25px 0; border-top: 1px solid #333; }

/* Ensure phones in footer render LTR properly */
.kh-contact a[href^="tel:"] { direction: ltr; text-align: left; unicode-bidi: bidi-override; }


