/* V5C i18n: language switcher + RTL mirroring for /ar/ and /he/. Loaded on every V5C page. */
/* Switcher hidden unless the head script adds .v5c-lang-on (a public language exists, or ?preview=lang) */
.lang-switcher, .mobile-langs, .landing-lang { display: none; }
.lang-switcher [data-lang], .mobile-langs [data-lang], .landing-lang [data-lang] { display: none; }
html.v5c-pub-en [data-lang="en"], html.v5c-pub-es [data-lang="es"], html.v5c-pub-ar [data-lang="ar"], html.v5c-pub-he [data-lang="he"],
html.v5c-lang-preview [data-lang] { display: revert; }
html.v5c-lang-on .lang-switcher { display: block; position: relative; flex-shrink: 0; }
html.v5c-lang-on .landing-lang { display: block; }

.lang-switcher-btn { background: transparent; border: 0; padding: 0; height: 42px; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: var(--foreground); font-family: inherit; font-size: 13px; font-weight: 300; line-height: 1; }
.lang-switcher-btn:hover, .lang-switcher-btn[aria-expanded="true"] { color: var(--primary); }
.lang-switcher-btn svg { flex-shrink: 0; display: block; }
.lang-switcher-btn .lang-code { font-size: 13px; font-weight: 400; letter-spacing: .04em; }
.lang-switcher-btn[aria-expanded="true"] .lang-chevron { transform: rotate(180deg); }
.lang-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 180px; margin: 0; padding: 8px 0; list-style: none; background: var(--background); border: 1px solid var(--border); box-shadow: var(--header-shadow); z-index: 60; }
.lang-menu li { margin: 0; }
.lang-menu a { display: block; padding: 10px 18px; font-size: 13px; font-weight: 300; color: var(--foreground); line-height: 1.4; white-space: nowrap; text-align: start; }
.lang-menu a:hover { color: var(--primary); background: var(--secondary); }
.lang-menu a[aria-current="true"], .mobile-langs-list a[aria-current="true"] { color: var(--primary); font-weight: 400; }
a[lang="ar"], a[lang="he"] { font-family: "Noto Sans Arabic", "Noto Sans Hebrew", "Heebo", Tahoma, Arial, sans-serif; }
[dir="rtl"] .lang-menu { right: auto; left: 0; }

@media (max-width: 800px) {
  .brand { order: 1; } .header-enquiry { order: 2; } .lang-switcher { order: 3; } .mobile-toggle { order: 4; }
  .lang-switcher-btn { height: 36px; }
  html.v5c-lang-on .mobile-langs { display: block; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--border); }
  .mobile-langs .eyebrow { color: var(--muted-foreground); margin-bottom: 8px; }
  .mobile-langs-list a { display: block; font-size: 16px; font-weight: 300; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--foreground); }
}
@media (max-width: 540px) {
  .lang-switcher-btn .lang-globe { display: none; }
  .lang-switcher-btn { gap: 3px; }
  .lang-switcher-btn .lang-code { font-size: 12px; }
}

/* Landing (no header by design): small switcher top corner */
.landing-lang { position: fixed; top: 18px; right: 22px; z-index: 90; }
[dir="rtl"] .landing-lang { right: auto; left: 22px; }
.landing-lang .lang-switcher-btn { color: #fff; height: 34px; padding: 0 10px; background: rgba(18,20,32,.35); }
.landing-lang .lang-menu { top: calc(100% + 6px); }

/* Fonts for Arabic and Hebrew (Google Fonts, enqueued on those pages only) */
html[lang="ar"] { --font-sans: "Noto Sans Arabic", "Jost", Tahoma, sans-serif; }
html[lang="he"] { --font-sans: "Noto Sans Hebrew", "Jost", Arial, sans-serif; }
html[lang="ar"] .stage, html[lang="he"] .stage { font-family: var(--font-sans); }
html[lang="ar"] .eyebrow, html[lang="he"] .eyebrow { letter-spacing: 0; }

/* RTL mirroring (interior pages). Flex/grid rows mirror automatically from dir=rtl. */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] .brand-line { border-left: 0; padding-left: 0; border-right: 1px solid var(--border); padding-right: 23px; }
[dir="rtl"] .desktop-nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] .header-enquiry { margin-left: 0; margin-right: 16px; }
[dir="rtl"] .page-hero-content { left: 56px; right: max(56px, calc((100% - 1280px)/2)); }
[dir="rtl"] .hero-number { right: auto; left: 56px; }
[dir="rtl"] .image-index { left: auto; right: 16px; }
[dir="rtl"] .image-arrow { right: auto; left: 0; }
[dir="rtl"] .feature-caption { right: auto; left: 40px; }
[dir="rtl"] .quick-enquiry { right: auto; left: 24px; }
[dir="rtl"] .facts-inner > div { border-right: 0; border-left: 1px solid var(--border); padding-left: 0; padding-right: 35px; }
[dir="rtl"] .facts-inner > div:first-child { padding-right: 0; }
[dir="rtl"] .facts-inner > div:last-child { border-left: 0; }
[dir="rtl"] .spec-table th, [dir="rtl"] .spec-table td { text-align: right; padding: 12px 0 12px 16px; }
[dir="rtl"] .brochure-quote { padding-left: 0; border-left: 0; padding-right: 28px; border-right: 2px solid #3B7BC7; }
[dir="rtl"] .feature-row div + div { padding-left: 0; border-left: 0; padding-right: 22px; border-right: 1px solid var(--border); }
[dir="rtl"] .principle-words li + li { border-left: 0; border-right: 1px solid rgba(59,123,199,.55); }
[dir="rtl"] .legal-prose li { padding: 10px 28px 10px 0; }
[dir="rtl"] .legal-prose li::before { left: auto; right: 0; }
[dir="rtl"] .sector-label { direction: rtl; }
/* Directional arrows point the other way in RTL */
[dir="rtl"] .v5c-root svg:has(path[d="M7 17L17 7M8 7h9v9"]),
[dir="rtl"] .v5c-root svg:has(path[d="M5 12h14M13 6l6 6-6 6"]) { transform: scaleX(-1); }
/* Phone numbers / emails / specs stay left-to-right inside RTL text */
[dir="rtl"] a[href^="mailto:"], [dir="rtl"] a[href^="tel:"], [dir="rtl"] input[type="email"], [dir="rtl"] input[type="tel"] { direction: ltr; unicode-bidi: embed; }
@media (max-width:1100px) {
  [dir="rtl"] .header-enquiry { margin-right: 0; }
  [dir="rtl"] .page-hero-content { right: 36px; left: 36px; }
}
@media (max-width:800px) {
  [dir="rtl"] .header-enquiry { margin-right: auto; margin-left: 0; }
  [dir="rtl"] .facts-inner > div { padding-right: 0; border: 0; }
  [dir="rtl"] .feature-row div + div { padding-right: 0; border-right: 0; }
  [dir="rtl"] .principle-words li + li { border-right: 0; }
}
@media (max-width:540px) {
  [dir="rtl"] .page-hero-content { right: 23px; left: 23px; }
  [dir="rtl"] .hero-number { left: 23px; }
  [dir="rtl"] .image-index { right: 10px; }
  [dir="rtl"] .feature-caption { left: 20px; }
  [dir="rtl"] .quick-enquiry { left: 15px; right: auto; }
  [dir="rtl"] .brochure-quote { padding-right: 20px; }
}

/* Landing tiles mirrored for RTL (merged from /workspace/v5c-i18n-full/css/rtl.css, 3 Dec 2026) */
/* ---------- Landing (diagonal tiles): mirror the whole stage, then flip images and copy back so they read normally ---------- */
html[dir="rtl"] .landing-body .stage { transform: scaleX(-1); }
html[dir="rtl"] .landing-body .stage .tile img { transform: scaleX(-1); }
html[dir="rtl"] .landing-body .stage .tile:hover img,
html[dir="rtl"] .landing-body .stage.is-build .tile-build img,
html[dir="rtl"] .landing-body .stage.is-tech .tile-tech img,
html[dir="rtl"] .landing-body .stage.is-invest .tile-invest img,
html[dir="rtl"] .landing-body .stage.is-home .tile-home img { transform: scale(-1.07, 1.07); }
html[dir="rtl"] .landing-body .stage .tile-copy { transform: scaleX(-1); text-align: right; }
html[dir="rtl"] .landing-body .stage .tile-copy .bar { margin-left: auto; margin-right: 0; }
html[dir="rtl"] .landing-body .qe-btn { right: auto; left: 28px; }
/* Tiles whose copy sits near the (mirrored) outer edge: keep the subline inside the visible polygon */
html[dir="rtl"] .landing-body .tile-tech .tile-copy { max-width: calc(24.5vw - 28px); }
@media (max-width: 1024px) and (min-width: 721px) {
  html[dir="rtl"] .landing-body .tile-tech .tile-copy, html[dir="rtl"] .landing-body .tile-home .tile-copy { max-width: calc(46.5vw - 24px); }
}
@media (max-width: 720px) {
  html[dir="rtl"] .landing-body .tile-tech .tile-copy { max-width: none; }
}
/* Landing dropdown: landing.css has no site tokens, so set colours explicitly */
.landing-lang .lang-menu { background: #fff; border-color: #D9DBDE; }
.landing-lang .lang-menu a { color: #181B21; font-family: "Jost", "Futura", sans-serif; }
.landing-lang .lang-menu a[lang="ar"], .landing-lang .lang-menu a[lang="he"] { font-family: "Noto Sans Arabic", "Noto Sans Hebrew", Tahoma, Arial, sans-serif; }
.landing-lang .lang-menu a:hover { background: #F6F7F8; color: #1F244D; }
.landing-lang .lang-menu a[aria-current="true"] { color: #1F244D; font-weight: 400; }
/* Language names align with the page direction, not their own script */
.lang-menu a[dir="rtl"], .mobile-langs-list a[dir="rtl"] { direction: ltr; text-align: left; }
[dir="rtl"] .lang-menu a, [dir="rtl"] .mobile-langs-list a { direction: rtl; text-align: right; }
.landing-lang .lang-menu a { text-decoration: none; font-size: 13px; }

/* ===== Dropdown polish (t298u + t299u, 3 Dec 2026): compact, centred, premium; identical in LTR and RTL ===== */
.lang-switcher .lang-menu, [dir="rtl"] .lang-switcher .lang-menu {
  top: calc(100% + 8px); right: 50%; left: auto; transform: translateX(50%);
}
.lang-menu, [dir="rtl"] .lang-menu {
  min-width: 0; width: 168px; margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid rgba(15, 23, 42, .06); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}
.lang-menu li { margin: 0; padding: 0; text-align: center; }
.lang-menu li + li { margin-top: 2px; }
.lang-menu li > a[href] {
  display: flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px;
  border-radius: 6px; background: transparent; color: #181B21; text-decoration: none; text-align: center;
  font-family: "Jost", "Futura", "Trebuchet MS", sans-serif; font-size: 13px; font-weight: 400; line-height: 1; letter-spacing: .01em;
  white-space: nowrap; transition: background-color .15s, color .15s;
}
.lang-menu li > a[href][lang="ar"] { font-family: "Noto Sans Arabic", Tahoma, sans-serif; font-size: 14px; letter-spacing: 0; }
.lang-menu li > a[href][lang="he"] { font-family: "Noto Sans Hebrew", Arial, sans-serif; font-size: 14px; letter-spacing: 0; }
.lang-menu li > a[href]:hover { background: #F6F7F8; color: #1F244D; }
.lang-menu li > a[href][aria-current="true"] { background: rgba(31, 36, 77, .07); color: #1F244D; font-weight: 500; }
.lang-menu li > a[href]:focus-visible { outline: 2px solid rgba(31, 36, 77, .35); outline-offset: -2px; }
/* Landing control sits in the corner: anchor the panel to its edge instead of centring */
.landing-lang .lang-menu { top: calc(100% + 8px); right: 0; left: auto; transform: none; }
[dir="rtl"] .landing-lang .lang-menu { right: auto; left: 0; transform: none; }
