/* ============================================================
   1. GLOBAL RTL & FONT
   ============================================================ */
html[lang="ar"], body.lang-ar {
    direction: rtl !important;
    text-align: right !important;
    font-family: 'Cairo', sans-serif !important;
}

/* Force standard text to the right, excluding elements with .text-center */
body.lang-ar h1, body.lang-ar h2:not(.text-center), body.lang-ar h3, 
body.lang-ar h4, body.lang-ar p, body.lang-ar .card-body {
    text-align: right !important;
}

/* ============================================================
   2. REQUIREMENT: CENTER MEDIA TITLE (HOME PAGE ONLY)
   ============================================================ */
/* Target the container to flex-center its children */
body.lang-ar .media-center-force-rtl {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}

/* Specific selector to ensure the title ignores the global right-alignment */
body.lang-ar .media-center-force-rtl h2.text-center {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}

/* Force the white line divider to remain centered */
body.lang-ar .media-center-force-rtl .title-line-divider {
    margin: 0 auto !important;
}

/* ============================================================
   3. REQUIREMENT: FOOTER ALIGNMENT
   ============================================================ */
body.lang-ar footer, 
body.lang-ar .footer-area {
    text-align: right !important;
    direction: rtl !important;
}

/* Remove LTR paddings that clump the text in the middle */
body.lang-ar .footer-area ul,
body.lang-ar .footer-item ul {
    padding-right: 0 !important;
    padding-left: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    list-style: none !important;
}

body.lang-ar .footer-area li {
    text-align: right !important;
    display: block !important;
    width: 100% !important;
}

/* Fix spacing for icons (Phone/Email) */
body.lang-ar .footer-area li i {
    margin-left: 10px !important;
    margin-right: 0 !important;
}

/* ============================================================
   4. HEADER & NAV (RTL FLOW)
   ============================================================ */
body.lang-ar .nav-wrapper, 
body.lang-ar .utility-group {
    flex-direction: row !important;
}

body.lang-ar .menumain .nav-link {
    border-left: 1px solid #134386 !important;
    border-right: none !important;
}

/* Mobile Sidebar Fix */
body.lang-ar #gofaSidebar {
    left: auto !important;
    right: -300px;
}
body.lang-ar #gofaSidebar.active {
    right: 0 !important;
}