.aoi-lang-li{list-style:none;display:flex;align-items:center;}
.aoi-lang{display:inline-flex;align-items:center;gap:3px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.18);border-radius:999px;padding:3px;}
.aoi-lang-btn{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;font-family:'DM Sans',sans-serif;font-weight:600;font-size:12px;letter-spacing:.04em;color:#fff;opacity:.55;text-decoration:none;transition:opacity .2s,background .2s;}
.aoi-lang-btn:hover{opacity:1;}
.aoi-lang-btn.active{opacity:1;background:rgba(255,255,255,.16);}
.aoi-lang-btn svg{width:22px;height:15px;border-radius:2px;display:block;box-shadow:0 0 0 1px rgba(0,0,0,.18);}
#aoi-nav > .nav-links{margin-inline-start:auto;}
#aoi-nav > .aoi-lang-li{margin-inline-start:2rem;}
/* ===== AOI RTL MAJOR FIX PASS ===== */
/* Pin logo LEFT, menu+switcher flow RIGHT, on ALL Arabic nav variants */
body.aoi-rtl #aoi-nav{flex-direction:row-reverse !important;}
body.aoi-rtl #aoi-nav > .nav-logo,body.aoi-rtl #aoi-nav > .nl{margin-inline-start:0 !important;margin-inline-end:2rem !important;}
body.aoi-rtl #aoi-nav > .nav-links,body.aoi-rtl #aoi-nav > .nm{margin-inline-start:0 !important;direction:rtl;}
body.aoi-rtl #aoi-nav > .aoi-lang-li{margin-inline-start:0 !important;margin-inline-end:auto !important;}
/* Cards: force RTL text alignment + reading order across all card/grid systems */
body.aoi-rtl .aoi-ar .vc,body.aoi-rtl .aoi-ar .tsc,body.aoi-rtl .aoi-ar .prog-card,body.aoi-rtl .aoi-ar .why-card{text-align:right !important;direction:rtl !important;}
body.aoi-rtl .aoi-ar .vc *,body.aoi-rtl .aoi-ar .tsc *{text-align:right !important;}
body.aoi-rtl .aoi-ar .vg,body.aoi-rtl .aoi-ar .tsg,body.aoi-rtl .aoi-ar .eg{direction:rtl;}
body.aoi-rtl .aoi-ar .vn{text-align:right !important;}
/* stars + cite in testimonial cards stay visually left-to-right internally but block is RTL */
body.aoi-rtl .aoi-ar .tsc .stars{direction:ltr;text-align:right !important;}
/* Hero + heading font-size rebalance: shrink oversized headings, grow undersized lead paragraphs */
body.aoi-rtl .aoi-ar .pg-hero h1,body.aoi-rtl .aoi-ar #aoi-hero h1{font-size:clamp(2.2rem,4.4vw,3.6rem) !important;line-height:1.35 !important;}
body.aoi-rtl .aoi-ar .pg-hero .sub{font-size:1.15rem !important;line-height:1.9 !important;}
body.aoi-rtl .aoi-ar h2{font-size:clamp(1.7rem,3vw,2.4rem) !important;line-height:1.4 !important;}
body.aoi-rtl .aoi-ar .sec .sub,body.aoi-rtl .aoi-ar .cta-sec .sub{font-size:1.05rem !important;line-height:1.85 !important;}
body.aoi-rtl .aoi-ar .vc h3,body.aoi-rtl .aoi-ar .vc>h3{font-size:1.25rem !important;}
body.aoi-rtl .aoi-ar .vc p{font-size:1rem !important;line-height:1.85 !important;}
body.aoi-rtl .aoi-ar .tsc blockquote{font-size:1.08rem !important;line-height:1.85 !important;}
/* Nav: cluster menu+wa+switcher together at RIGHT, logo stays pinned LEFT */
body.aoi-rtl #aoi-nav{justify-content:flex-end !important;gap:2rem;}
/* Arabic POSTS: .aoi-ar-post was never covered by the .aoi-ar font rules */
body.aoi-rtl .aoi-ar-post,body.aoi-rtl .aoi-ar-post p,body.aoi-rtl .aoi-ar-post li,body.aoi-rtl .aoi-ar-post .sub{font-family:Tajawal,sans-serif !important;}
body.aoi-rtl .aoi-ar-post h1,body.aoi-rtl .aoi-ar-post h2,body.aoi-rtl .aoi-ar-post h3,body.aoi-rtl .aoi-ar-post .faq-q{font-family:Amiri,serif !important;font-style:normal !important;}
body.aoi-rtl .aoi-ar-post .lbl,body.aoi-rtl .aoi-ar-post .post-meta,body.aoi-rtl .aoi-ar-post .post-date,body.aoi-rtl .aoi-ar-post .post-read,body.aoi-rtl .aoi-ar-post .post-author{font-family:Tajawal,sans-serif !important;}
/* AOI-RTL-ALIGN-FIXES v2 (footer is now the canonical #aoi-footer) */
/* 1. FAQ questions: style.css forces text-align:left; Arabic must read right. */
body.aoi-rtl .faq-q,body.aoi-rtl .faq-a{text-align:right !important;}
/* 2. Brand logo stays LTR even inside RTL pages. */
body.aoi-rtl #aoi-nav .nav-logo,body.aoi-rtl #aoi-footer .nav-logo{direction:ltr !important;unicode-bidi:isolate;}
/* 3. Desktop: centre the tagline/phones/socials under the footer logo. */
#aoi-footer .footer-grid > div:first-child{text-align:center;}
#aoi-footer .footer-grid > div:first-child .nav-logo{display:inline-block;}
/* AOI-FOOTER-TYPO-FIX */
/* The tagline is a max-width:240px block with zero margins, so in an RTL column
   it hugged the edge and sat ~60px off-centre from the logo. text-align only
   centres text INSIDE the box; the box itself needs auto margins. */
#aoi-footer .footer-tagline{margin-left:auto !important;margin-right:auto !important;}
/* The footer is injected at wp_footer, OUTSIDE the .aoi-ar wrapper, so the Arabic
   font rules never reached it — Arabic was rendering in DM Sans (a Latin face). */
body.aoi-rtl #aoi-footer,body.aoi-rtl #aoi-footer p,body.aoi-rtl #aoi-footer a,body.aoi-rtl #aoi-footer div,body.aoi-rtl #aoi-footer span{font-family:Tajawal,sans-serif;}
body.aoi-rtl #aoi-footer .nav-logo,body.aoi-rtl #aoi-footer .nav-logo span{font-family:'Cormorant Garamond',serif;}
body.aoi-rtl #aoi-footer .footer-tagline{font-size:.95rem;line-height:2.05;}
body.aoi-rtl #aoi-footer a{font-size:.95rem;}

/* 4. Enroll form: centre the submit button and the note beneath it. */
.ef .ef-submit{display:block;margin-left:auto !important;margin-right:auto !important;}
.ef .ef-note{text-align:center !important;}
/* 5. Mobile: centre the whole footer, both languages. */
@media(max-width:860px){
#aoi-footer,#aoi-footer *{text-align:center !important;}
#aoi-footer .footer-grid{justify-items:center !important;}
#aoi-footer .footer-grid > div{width:100% !important;}
}


body.aoi-rtl #aoi-nav > .nav-logo,body.aoi-rtl #aoi-nav > .nl{position:absolute !important;left:96px !important;top:50% !important;transform:translateY(-50%) !important;margin:0 !important;}
body.aoi-rtl #aoi-nav > .aoi-lang-li{margin-inline-start:0 !important;margin-inline-end:0 !important;margin-left:0 !important;margin-right:0 !important;}
body.aoi-rtl #aoi-nav > .nav-links,body.aoi-rtl #aoi-nav > .nm{margin-inline-end:0 !important;margin-inline-start:0 !important;}
/* Phone numbers: force LTR digit rendering everywhere (footer, anywhere else) */
body.aoi-rtl .aoi-ar .fph a,body.aoi-rtl .aoi-ar [class*=phone] a,body.aoi-rtl .aoi-ar a.aoi-phone-fixed{direction:ltr !important;unicode-bidi:isolate !important;display:inline-block;}
/* Footer brand block: anchor everything flush-right within its own column, clear visual separation from Programs column */
body.aoi-rtl .aoi-ar .fb{text-align:right !important;padding-inline-end:1.5rem;border-inline-start:1px solid rgba(255,255,255,.08);}
body.aoi-rtl .aoi-ar .fb .flo,body.aoi-rtl .aoi-ar .fb>p{text-align:center !important;}
body.aoi-rtl .aoi-ar .fb{text-align:center !important;}
body.aoi-rtl .aoi-ar .fph{text-align:center !important;margin-top:.4rem;align-items:center !important;}
body.aoi-rtl .aoi-ar .fph a{direction:ltr !important;unicode-bidi:isolate !important;display:block !important;text-align:center !important;}
body.aoi-rtl .aoi-ar .fso{justify-content:center !important;}
body.aoi-rtl .aoi-ar .fso{width:100% !important;}
.footer-socials{justify-content:center !important;}
/* Align homepage brand-column social icons under the phone numbers, matching logo/tagline/phone alignment */
.footer-grid .footer-socials{justify-content:flex-end !important;margin-top:.6rem;}
/* Enroll page call-box: stack phone/email links vertically, bold the intro line for readability */
body.aoi-rtl .aoi-ar .esb-gold p{font-weight:600 !important;}
body.aoi-rtl .aoi-ar .esb-gold{display:flex;flex-direction:column;}
body.aoi-rtl .aoi-ar .esb-gold a{display:block !important;margin:.3rem 0;text-align:right !important;}
body.aoi-rtl .aoi-ar .esb-gold a bdi, body.aoi-rtl .aoi-ar .esb-gold a{unicode-bidi:plaintext;}
body.aoi-rtl .footer-grid>:first-child{text-align:center !important;}
body.aoi-rtl .footer-grid>:first-child .footer-phones{text-align:center !important;}
body.aoi-rtl .footer-grid .footer-socials{justify-content:center !important;}
/* Flip footer column order: brand block to the LEFT, Get in Touch column to the RIGHT, for natural RTL flow */
body.aoi-rtl .aoi-ar .fg{direction:ltr !important;}
body.aoi-rtl .aoi-ar .fg>*{direction:rtl;}
body.aoi-rtl .aoi-ar .footer-grid{direction:ltr !important;}
body.aoi-rtl .aoi-ar .footer-grid>*{direction:rtl;}
/* ===== END AOI RTL MAJOR FIX PASS ===== */
body.aoi-rtl .aoi-ar .aoi-mtrack{direction:ltr;}
body.aoi-rtl .aoi-ar .aoi-mi{font-size:.95rem !important;font-weight:700 !important;}
body.aoi-rtl .aoi-ar .aoi-mtrack{animation-duration:90s !important;}
body.aoi-rtl .aoi-ar .why-accent{right:auto !important;left:-1.75rem !important;}
body.aoi-rtl .aoi-ar .why-accent-n,body.aoi-rtl .aoi-ar .why-accent-l{font-weight:800 !important;color:var(--forest) !important;}
body.aoi-rtl .aoi-ar .why-accent-l{font-size:.72rem !important;}
body.aoi-rtl .aoi-ar .prog-card{cursor:pointer;}
body.aoi-rtl .aoi-ar #aoi-nav .nl{margin-inline-end:2rem !important;}
body.aoi-rtl .aoi-ar #aoi-nav .nm{gap:1.6rem !important;}
body.aoi-rtl .aoi-ar, body.aoi-rtl .aoi-ar *{font-family:'Tajawal',sans-serif !important;}
body.aoi-rtl .aoi-ar h1,body.aoi-rtl .aoi-ar h2,body.aoi-rtl .aoi-ar h3,body.aoi-rtl .aoi-ar h4,body.aoi-rtl .aoi-ar h5,body.aoi-rtl .aoi-ar h6{font-family:'Amiri',serif !important;line-height:1.45 !important;}
body.aoi-rtl .aoi-ar .nav-logo,body.aoi-rtl .aoi-ar .nav-logo span,body.aoi-rtl .aoi-ar .nl,body.aoi-rtl .aoi-ar .nl span,body.aoi-rtl .aoi-ar .flo,body.aoi-rtl .aoi-ar .flo span{font-family:'Cormorant Garamond',serif !important;}
body.aoi-rtl .aoi-lang-btn{font-family:'Tajawal',sans-serif;}
body.aoi-rtl .aoi-ar em,body.aoi-rtl .aoi-ar i{font-style:normal !important;}
body.aoi-rtl .aoi-ar p,body.aoi-rtl .aoi-ar li{line-height:1.95;}
body.aoi-rtl .aoi-ar .h-imgslot{right:auto !important;left:0 !important;}
body.aoi-rtl .aoi-ar .h-imgslot::before{background:linear-gradient(to left,var(--forest) 0%,transparent 18%) !important;}
body.aoi-rtl .aoi-ar #aoi-hero h1{font-size:clamp(2.4rem,5.4vw,4.8rem) !important;line-height:1.25 !important;}
body.aoi-rtl .aoi-ar .btn-gold svg,body.aoi-rtl .aoi-ar .prog-link svg{transform:scaleX(-1);}
@media(max-width:860px){
  #aoi-nav > .aoi-lang-li{margin-inline-start:auto;}
  .aoi-lang-btn{padding:5px 7px;}
  .aoi-lang-btn span{display:none;}
  body.aoi-rtl .aoi-ar #aoi-hero h1{font-size:2.3rem !important;}
  body.aoi-rtl .aoi-ar h2{font-size:1.7rem !important;}
  body.aoi-rtl .aoi-ar h3{font-size:1.3rem !important;}

  /* Mobile fix: logo + language switcher were overlapping on narrow RTL screens.
     Copy the English mobile layout exactly: logo stays in normal flow (no
     fixed-pixel absolute positioning), justify-content:space-between pushes it
     to one end, and the existing auto margin on .aoi-lang-li (below) pushes the
     switcher+toggle group to the other end — same mechanism as English, just
     mirrored by the page's existing RTL row-reverse. */
  body.aoi-rtl #aoi-nav{
    justify-content:space-between !important;
    gap:0 !important;
  }
  body.aoi-rtl #aoi-nav > .nav-logo,
  body.aoi-rtl #aoi-nav > .nl{
    position:static !important;
    transform:none !important;
    margin:0 !important;
  }
  body.aoi-rtl #aoi-nav > .aoi-lang-li{
    margin-inline-start:auto !important;
    margin-inline-end:0 !important;
  }
}
