/*
 * GFH Academy — right-to-left overrides (Arabic, Urdu).
 *
 * Loaded ONLY when gfh_is_rtl() is true, on top of style.css. Nothing here
 * runs for the LTR languages, so the 13 live left-to-right storefronts are
 * untouched by anything in this file.
 *
 * The theme's visual signature is the hard offset "sticker" shadow
 * (box-shadow: 8px 8px 0 var(--leaf)). Mirroring means negating the x offset
 * so the shadow falls to the left of the card, matching the reading direction.
 */

/* ---------- 1. Base ---------- */

body { direction: rtl; text-align: right; }

/* Latin-script islands. Emails, URLs, phone numbers and code keep LTR run
   order inside an RTL paragraph; the bidi algorithm gets the acronyms
   (HACCP, CPD, EHO) right on its own, so they are deliberately not listed. */
a[href^="mailto:"],
a[href^="tel:"],
a[href^="http"]:not([class]),
code, kbd, samp, pre,
.gfh-verify-code,
.gfh-cert-id { direction: ltr; unicode-bidi: embed; }

/* ---------- 2. Sticker shadows ---------- */
.hero-photo { box-shadow: 10px 10px 0 var(--leaf); }
.plaque { box-shadow: -8px 8px 0 var(--leaf); }
.quiz-card { box-shadow: -8px 8px 0 var(--leaf); }
.trust-card { box-shadow: -5px 5px 0 var(--leaf); }
.trust-card:hover { box-shadow: -8px 8px 0 var(--leaf); }
.trio-card:hover { box-shadow: -7px 7px 0 var(--leaf); }
.chooser-box { box-shadow: -8px 8px 0 var(--leaf); }
.chooser-opt:hover { box-shadow: -3px 3px 0 var(--leaf); }
.app-feature:hover { box-shadow: -4px 4px 0 var(--leaf); }
.phone { box-shadow: -14px 14px 0 var(--leaf); }
.app-toast { box-shadow: -4px 4px 0 var(--leaf); }
.guide-cover { box-shadow: -10px 10px 0 var(--leaf); }
.guide-pages { box-shadow: -6px 6px 0 rgba(160,192,80,.5); }
.guide-chips span { box-shadow: -3px 3px 0 var(--leaf); }
.team-card { box-shadow: -9px 9px 0 var(--leaf); }
.cta-panel { box-shadow: -10px 10px 0 var(--leaf); }
.feature-card:hover { box-shadow: -5px 5px 0 var(--leaf); }
.shot:hover { box-shadow: -5px 5px 0 var(--leaf); }
.gfh-auth { box-shadow: -10px 10px 0 var(--leaf); }
.gfh-buy-box { box-shadow: -6px 6px 0 var(--leaf); }
.course-card:hover { box-shadow: -7px 7px 0 var(--leaf); }
.hero-search { box-shadow: -7px 7px 0 var(--leaf); }
.taster-chips span { box-shadow: -3px 3px 0 var(--leaf); }
.contact-form-card { box-shadow: -9px 9px 0 var(--leaf); }
.cf-topic input:checked + span { box-shadow: -3px 3px 0 var(--leaf); }
.contact-card-teams { box-shadow: -5px 5px 0 var(--leaf); }
.about-photo { box-shadow: 10px 10px 0 var(--leaf); }
.value-card:hover { box-shadow: -7px 7px 0 var(--leaf); }
.compare-card { box-shadow: -9px 9px 0 var(--leaf); }
.book-hero-stage .guide-cover { box-shadow: -10px 10px 0 var(--leaf), 0 30px 60px rgba(0,0,0,.4); }
.toc-item:hover { box-shadow: -4px 4px 0 var(--leaf); }
.app-hero .app-toast { box-shadow: -4px 4px 0 rgba(160,192,80,.9), 0 14px 30px rgba(0,0,0,.35); }
.course-hero-stage .plaque { box-shadow: -9px 9px 0 var(--leaf), 0 30px 60px rgba(0,0,0,.4); }
.lesson-fig { box-shadow: -6px 6px 0 var(--leaf); }
.gfh-game { box-shadow: -6px 6px 0 var(--leaf); }
.game-chip:hover { box-shadow: -3px 3px 0 var(--leaf); }
.game-chip-current { box-shadow: -3px 3px 0 var(--leaf); }
.book-cta-panel { box-shadow: -14px 14px 0 var(--leaf); }
.book-cta-stage .guide-cover { box-shadow: -10px 10px 0 var(--leaf-deep), 0 30px 60px rgba(0,0,0,.45); }
.fhrs-card { box-shadow: -10px 10px 0 var(--leaf), 0 26px 60px rgba(0,0,0,.35); }
.gfh-prelaunch { box-shadow: -6px 6px 0 var(--leaf); }
.gfh-prelaunch.is-compact { box-shadow: -4px 4px 0 var(--leaf); }

/* ---------- 3. Decorative tilts ---------- */
/* Mirrored so the collage leans with the reading direction. Symmetric
   transforms (carets, the nav X, chevron 180deg flips) are left alone. */
.hero-photo               { transform: rotate(-2.2deg); }
.plaque                   { transform: rotate(-1.5deg); }
.quiz-card                { transform: rotate(1deg); }
.trio-card:hover .trio-icon { transform: rotate(7deg) scale(1.07); }
.phone                    { transform: rotate(-1.2deg); }
.app-toast-1              { transform: rotate(3deg); }
.app-toast-2              { transform: rotate(-2deg); }
.app-toast-3              { transform: rotate(2deg); }
.guide-cover              { transform: rotate(1.6deg); }
.guide-pages              { transform: rotate(-6deg); }
.guide-badge              { transform: rotate(10deg); }
.team-card                { transform: rotate(1.4deg); }
.demo-phone               { transform: rotate(-1.6deg); }
.taster-stage::before     { transform: translateX(-50%) rotate(2.2deg); }
.taster-badge             { transform: rotate(-8deg); }
.about-photo              { transform: rotate(-1.8deg); }
.about-plaque             { transform: rotate(2.5deg); }
.course-hero-stage .plaque { transform: rotate(2deg); }
.course-hero-price        { transform: rotate(-6deg); }
.lang-phone               { transform: rotate(-1.6deg); }
.rd-chip-logo             { transform: rotate(2.5deg); }
.rd-chip-color            { transform: rotate(-2deg); }
.rd-doc                   { transform: rotate(-1.4deg); }
.book-cta-stage .guide-cover { transform: rotate(-2deg); }
.fhrs-card                { transform: rotate(1.5deg); }

/* Nudge-on-hover micro-interactions travel with the text. */
.trust-card:hover                       { transform: translate(2px, -2px); }
.quiz-opt:hover                         { transform: translateX(-3px); }
.chooser-opt:hover                      { transform: translateX(-4px); }

/* Arrows that live in the MARKUP (&rarr; / literal →), not in CSS content, so
   the glyph itself cannot be swapped from here — mirror them instead. The
   translate composes inside the flipped frame, so +5px reads as leftward. */
.trio-more span,
.course-card-cta span,
.chooser-opt-arrow,
.btn > span[aria-hidden="true"]          { display: inline-block; transform: scaleX(-1); }
.trio-card:hover .trio-more span         { transform: scaleX(-1) translateX(5px); }
.course-card:hover .course-card-cta span { transform: scaleX(-1) translateX(5px); }
.chooser-opt-arrow                       { transform: scaleX(-1) translateX(-5px); }
.chooser-opt:hover .chooser-opt-arrow    { transform: scaleX(-1); }

/* ---------- 4. Arrow glyphs ---------- */
/* "Onward" arrows point left in RTL. */
/* NB: .site-nav a::after exists only inside the 880px drawer breakpoint in
   style.css — declaring `content` here would CREATE the arrow on desktop nav
   items where there is none. It is flipped in the breakpoint block below. */
.footer-col ul a::before       { content: "\2190\00a0"; margin-left: 0; margin-right: -1.1em; }
.trio-card:not(:last-child)::after { content: "\2190"; }

/* ---------- 5. Header, topbar, nav ---------- */
.skip-link                      { left: auto; right: -999px; }
.skip-link:focus                { left: auto; right: 0; }
.topbar-right .topbar-social    { padding-left: 0; padding-right: 16px;
                                  border-left: 0; border-right: 1px solid rgba(255,255,255,.16); }
.gfh-account--bar .acct-signout { padding-left: 0; padding-right: 12px;
                                  border-left: 0; border-right: 1px solid rgba(255,255,255,.2); }
.nav-drawer                     { margin-left: 0; margin-right: auto; }
.nav-toggle                     { margin-left: 0; margin-right: auto; }
.site-nav .menu-item-has-children::after { left: auto; right: 0; }
.site-nav .sub-menu             { left: auto; right: 0; }

/* ---------- 6. Home: stats, trio, hero ---------- */
.hero-photo                                { right: auto; left: -12px; }
.stats .gfh-wrap > div + div::before       { left: auto; right: 0; }
.trio-card::before                         { right: auto; left: 18px; }
.trio-card:not(:last-child)::after         { right: auto; left: -25px; }
.guide-pages                               { right: auto; left: -12%; }
.guide-badge                               { left: auto; right: -14px; }
.guide-list li, .band-points li,
.taster-points li, .gfh-auth-points li,
.rd-points li, .gfh-practice-perks li      { padding-left: 0; padding-right: 30px; }
.gfh-auth-points li                        { padding-right: 26px; }
.gfh-practice-perks li                     { padding-right: 28px; }
.guide-list li::before, .band-points li::before,
.taster-points li::before, .gfh-auth-points li::before,
.rd-points li::before, .gfh-practice-perks li::before { left: auto; right: 0; }
.cta-mark                                  { right: auto; left: -18px; }
.chip-search                               { margin-left: 0; margin-right: auto; }
.app-toast-1                               { left: auto; right: -4%; }
.app-toast-2                               { right: auto; left: -6%; }
.app-toast-3                               { left: auto; right: 0; }

/* ---------- 7. Course cards & badges ---------- */
.course-level      { left: auto; right: 12px; }
.course-soon       { left: auto; right: 12px; }
.course-price      { right: auto; left: 12px; }
.taster-badge      { right: auto; left: max(4%, 8px); }
.course-hero-price { right: auto; left: 6%; }
.about-plaque      { right: auto; left: 4%; }

/* ---------- 8. Learner shell (LMS) ---------- */
.gfh-curriculum-item.gfh-child { padding-left: 0; padding-right: 52px; }
.gfh-item-type                 { margin-left: 0; margin-right: auto; }
.gfh-dock-count                { margin-left: 0; margin-right: auto; }
.gfh-objectives ul,
.page-shell .entry ul,
.page-shell .entry ol          { padding-left: 0; padding-right: 1.3em; }
.gfh-objectives ul             { padding-right: 1.2em; }
.gfh-locked, .gfh-notice,
.about-quote                   { border-left: 0; border-right: 4px solid var(--leaf); }
.gfh-focus-side                { border-right: 0; border-left: 1px solid var(--line); }
.gfh-fnav-item a               { border-left: 0; border-right: 3px solid transparent; }
.gfh-fnav-child a              { padding-left: 0; padding-right: 46px; }
.gfh-curr-head                 { padding-right: 0; padding-left: 16px; }
.stepper-nav .stepper-next,
.stepper-nav .gfh-quiz-submit  { margin-left: 0; margin-right: auto; }

/* ---------- 9. Cart, language switcher, search ---------- */
.gfh-cart-count          { right: auto; left: 1px; }
.gfh-cart-panel          { right: auto; left: 0; }
.gfh-cart-panel::before  { right: auto; left: 15px; }
.gfh-cart-panel a.remove { right: auto; left: 0; }
.gfh-cart-panel:not([hidden]) { transform-origin: top left; }
.gfh-minicart            { margin-left: 0; margin-right: auto; }
.gfh-lang-menu           { right: auto; left: 0; }
.gfh-lang-tick           { margin-left: 0; margin-right: auto; }
.gfh-lang--bar           { padding-right: 0; padding-left: 15px;
                           border-right: 0; border-left: 1px solid rgba(255,255,255,.16); }
.gfh-lang--drawer .gfh-lang-chev { margin-left: 0; margin-right: auto; }
.gfh-lightbox-close      { right: auto; left: 22px; }

/* ---------- 10. App page & Report Designer ---------- */
.demo-phone-btn   { right: auto; left: -6px; }
.demo-phone-btn-2 { left: auto; right: -6px; }
.demo-boot-btn    { padding-left: 0; padding-right: 6px; }
.rd-tpl-thumb--classic i:nth-of-type(1),
.rd-tpl-thumb--classic i:nth-of-type(2) { left: auto; right: 8px; }
.rd-tpl-thumb--classic b                { right: auto; left: 8px; }
.rd-tpl-thumb--minimal b                { left: auto; right: 8px; }
.rd-tpl-thumb--minimal i:nth-of-type(1),
.rd-tpl-thumb--minimal i:nth-of-type(2) { left: auto; right: 21px; }
.rd-chip-logo  { left: auto; right: -10px; }
.rd-chip-color { right: auto; left: -8px; }

/* ---------- 11. Text alignment ---------- */
.quiz-opt, .chooser-opt, .shot, .game-chip, .game-shelf,
.compare-card thead th, .compare-card tbody th,
.gfh-bulk__table th, .score-tg, .hero-panel-badge,
.gfh-practice-upsell { text-align: right; }
.gfh-bulk__table td:last-child { text-align: left; }

/* ---------- 12. Accordions, order summary, split hero ---------- */
.contact-faq summary          { padding-right: 0; padding-left: 26px; }
.contact-faq summary::after   { right: auto; left: 2px; }
.gfh-faq__q::after            { right: auto; left: 20px; }
.wc-block-components-order-summary-item__description { padding-left: 0; padding-right: 14px; }
.hero-split .hero-eyebrow::before { margin-right: 0; margin-left: 10px; }
.hero-panel::before           { right: 20px; left: -16px; }
.hero-panel-badge             { left: auto; right: -18px;
                                border-left: 0; border-right: 4px solid var(--leaf); }

/* ---------- 13. Games ---------- */
.game-order-done li::before { left: auto; right: 12px; }

/* ---------- 14. Breakpoint parity with style.css ---------- */
@media (max-width: 900px) {
	.gfh-focus-side { left: auto; right: 0; transform: translateX(100%);
	                  box-shadow: -6px 0 24px rgba(0,0,0,.14); }
	body.gfh-focus-nav-open .gfh-focus-side { transform: translateX(0); }
}
@media (max-width: 880px) {
	.site-nav a::after { content: "\2190"; }
	.site-nav .menu-item-has-children > a::after { content: "\2190"; transform: translateX(6px); }
	.site-nav .sub-menu { padding: 0 12px 10px 0; }
	/* Stacked trio: the connector rotates 90deg, so it needs the RIGHT-pointing
	   glyph to end up pointing DOWN. */
	.trio-card:not(:last-child)::after { content: "\2192"; right: 50%; left: auto;
	                                     transform: translateX(50%) rotate(90deg); }
	.app-toast-1 { left: auto; right: 0; }
	.app-toast-2 { right: auto; left: 0; }
	.nav-toggle  { margin-right: 0; }
	.gfh-cart-count { right: auto; left: 0; }
	.gfh-cart-panel { right: auto; left: 8px; }
}
@media (max-width: 860px) {
	.hero-panel-badge { left: auto; right: 14px; }
	.rd-chip-logo  { left: auto; right: 2px; }
	.rd-chip-color { right: auto; left: 2px; }
}
@media (max-width: 820px) {
	.gfh-auth { box-shadow: -7px 7px 0 var(--leaf); }
}
@media (max-width: 700px) {
	.gfh-dock-count { margin-right: 0; }
}
@media (max-width: 640px) {
	.chip-search { margin-right: 0; }
}
@media (max-width: 600px) {
	.gfh-curriculum-item.gfh-child { padding-right: 30px; }
	.gfh-curr-head { padding-left: 12px; }
}
