/* Medway: right-to-left adjustments for the Arabic version.
   Loaded only on Arabic pages (WordPress sets dir="rtl"). */
:root {
	--f-display: "IBM Plex Sans Arabic", "Archivo", "Segoe UI", Tahoma, Arial, sans-serif;
	--f-body: "IBM Plex Sans Arabic", "Source Sans 3", "Segoe UI", Tahoma, Arial, sans-serif;
}
body { line-height: 1.75; }
h1, h2, h3, h4 { letter-spacing: 0; line-height: 1.35; }

/* Arabic letters must stay joined: no letter-spacing or forced capitals */
.eyebrow, .hero-card-label, .footer-title, .contact-list dt, .accred-table thead th,
.course-facts span, .stat-label, .brand-name, .course-code, .course-pathway, .roster-code,
.hero-pathways li, .aside-title { letter-spacing: 0; text-transform: none; }

/* Keep phone numbers and emails left-to-right */
a[href^="tel:"], a[href^="mailto:"], .stat-num, .accred-numbers li {
	direction: ltr; unicode-bidi: isolate; display: inline-block;
}
.mobile-bar a[href^="tel:"] { direction: rtl; display: inline-flex; }

.skip-link { left: auto; right: -999px; }
.skip-link:focus { right: 8px; left: auto; }

/* Header and menus */
.site-nav .sub-menu { left: auto; right: 0; }
.menu-item-has-children > a::after { margin-left: 0; margin-right: .35em; }
@media (max-width: 1020px) {
	.site-nav .sub-menu { border-left: 0; border-right: 2px solid var(--line); margin-left: 0; margin-right: .75rem; padding: 0 .5rem 0 0; }
}
.lang-switch a { font-family: var(--f-body); font-weight: 700; }

/* Homepage banner: dark side behind the text (right), photo mirrored so the action stays visible */
.hero.has-photo { background: var(--petrol); }
.hero.has-photo::after {
	content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
	background: var(--hero-photo) var(--hero-pos, center) / cover no-repeat;
	transform: scaleX(-1);
}
.hero.has-photo::before {
	z-index: 1; opacity: 1;
	background: linear-gradient(270deg, rgba(24,35,38,.95) 0%, rgba(24,35,38,.88) 35%, rgba(24,35,38,.35) 62%, rgba(24,35,38,.05) 100%);
}
@media (max-width: 860px) {
	.hero.has-photo::before { background: linear-gradient(180deg, rgba(24,35,38,.92) 0%, rgba(24,35,38,.86) 100%); }
}
.hero-inner, .ecg { position: relative; z-index: 2; }
.ecg { position: absolute; }

/* Course page headers */
@media (min-width: 861px) {
	.page-hero.has-photo { background:
		linear-gradient(270deg, rgba(24,35,38,.95) 0%, rgba(24,35,38,.86) 45%, rgba(24,35,38,.35) 75%, rgba(24,35,38,.15) 100%),
		var(--hero-photo) var(--hero-pos, center) / cover no-repeat, var(--petrol); }
}
.page-hero::after { background: linear-gradient(270deg, var(--mint) 0 18%, var(--teal-2) 18% 30%, transparent 30%); }

/* Lines and borders that sit on the "start" side */
.stat { border-left: 0; border-right: 2px solid var(--mint); padding-left: 0; padding-right: .9rem; }
.toc ol { border-left: 0; border-right: 2px solid var(--line); }
.toc a { padding: .3rem .9rem .3rem 0; margin-left: 0; margin-right: -2px; border-left: 0; border-right: 2px solid transparent; }
.toc a:hover, .toc a.is-active { border-right-color: var(--signal); }
.entry ul, .entry ol { padding-left: 0; padding-right: 1.25rem; }
.accred-table th, .accred-table td { text-align: right; }
.sectors li::before { margin-right: 0; margin-left: .45rem; }

/* Arrows point the reading direction */
.course-more span[aria-hidden="true"] { display: inline-block; transform: scaleX(-1); }

/* Floating buttons */
.wa-float { right: auto; left: 18px; }
.lightbox-close { right: auto; left: -14px; }
