/* ==========================================================================
   Jusoor Cargo — RTL stylesheet
   --------------------------------------------------------------------------
   Loaded automatically by WordPress (and explicitly by inc/enqueue.php) when
   is_rtl() is true. The layout itself is built on CSS logical properties
   (inset-inline-*, margin-inline-*, padding-inline-*), so it already mirrors
   on its own. This file only corrects the handful of things logical
   properties cannot flip: physical gradients, transform directions,
   off-canvas offsets and Arabic typography details.
   ========================================================================== */

:root {
	--jc-font: var(--jc-font-ar);
	--jc-arrow-shift: -4px;
	--jc-drawer-offset: -105%;
	--jc-origin: right;
}

body {
	direction: rtl;
	text-align: right;
	line-height: 1.9;
}

/* --------------------------------------------------------------------------
   Arabic typography — negative/large tracking hurts Arabic letterforms.
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6,
.jc-hero__title,
.jc-page-hero__title,
.jc-head__title,
.jc-cta__title {
	letter-spacing: normal;
}

.jc-eyebrow,
.jc-hero__eyebrow,
.jc-track-panel__label,
.jc-track-dash__label,
.jc-track-meta__label,
.jc-post-card__meta,
.jc-hero__scroll {
	letter-spacing: 0.02em;
	text-transform: none;
}

/* Latin-only strings keep their spacing and direction. */
.jc-brand__tagline,
.jc-footer__name span,
.jc-track-panel__number,
.jc-track-dash__number,
.jc-service-block__number,
.jc-404__code,
.jc-track-progress__value,
.jc-track-form__hint code {
	direction: ltr;
	unicode-bidi: isolate;
	letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   Physical gradients that need mirroring
   -------------------------------------------------------------------------- */

.jc-hero__scroll-line {
	background: linear-gradient(270deg, var(--jc-yellow-500), transparent);
}

.jc-footer__list a:hover {
	padding-inline-start: 0.3rem;
	padding-inline-end: 0;
}

/* --------------------------------------------------------------------------
   Text alignment helpers
   -------------------------------------------------------------------------- */

.jc-head--start,
.jc-content th,
.jc-content td,
.jc-country-card {
	text-align: right;
}

.jc-head,
.jc-cta__box,
.jc-page-hero,
.jc-track-empty,
.jc-404 {
	text-align: center;
}

input,
textarea,
select {
	text-align: right;
}

.jc-track-form__input {
	text-align: right;
}

/* Tracking numbers stay latin/LTR, but sit at the inline start of the field
   (the right edge in RTL) so they read right next to the search icon. */
.jc-track-form__input[dir="ltr"] {
	direction: ltr;
	text-align: right;
	padding-right: 3.1rem;
	padding-left: 1.1rem;
}

.jc-track-form__input[dir="ltr"]::placeholder {
	direction: rtl;
}

/* --------------------------------------------------------------------------
   Lists
   -------------------------------------------------------------------------- */

ul, ol {
	padding-inline-start: 1.35em;
	padding-inline-end: 0;
}

.jc-content blockquote {
	border-inline-start: 4px solid var(--jc-yellow-500);
	border-inline-end: 0;
}

/* --------------------------------------------------------------------------
   The map is cartography: it must never mirror.
   -------------------------------------------------------------------------- */

.jc-map,
.jc-map-frame,
.jc-hero__truck,
.jc-hero__truck svg {
	direction: ltr;
}

.jc-map__label {
	direction: rtl;
}

/* --------------------------------------------------------------------------
   Scroll-reveal entrances are directional: an element told to arrive from the
   "left" should arrive from the reading-start side, which is the right in RTL.
   -------------------------------------------------------------------------- */

[data-reveal="left"]  { transform: translateX(40px); }
[data-reveal="right"] { transform: translateX(-40px); }

[data-reveal="left"].is-revealed,
[data-reveal="right"].is-revealed { transform: none; }

/* --------------------------------------------------------------------------
   The hero photograph wash follows the copy, which sits on the right in RTL.
   -------------------------------------------------------------------------- */

.jc-hero__photo-scrim { --jc-wash: left; }

/* --------------------------------------------------------------------------
   Language switcher, WhatsApp number and credit: the latin fragments keep
   their own direction inside Arabic copy.
   -------------------------------------------------------------------------- */

.jc-wa__num,
.jc-credit__name {
	direction: ltr;
	unicode-bidi: isolate;
}

.jc-lang__opt[lang="en"] { direction: ltr; unicode-bidi: isolate; }
.jc-wa__label { letter-spacing: .04em; }
