/* Service pages that exist in two languages, and the page written in Arabic (resources/views/pages/service-details.blade.php:
   $languageLink, $pageLanguage). Loaded only on those pages. On the Arabic page its own parts (the green banner and <main>)
   run right to left in Arabic typefaces; the menu, the footer and the shared English audit form stay as they are. */

/* The link to the same page in the other language, beside the heading's button. */
.v3-langlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  margin-inline-start: 24px;
  color: var(--ink, #10302a);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.v3-langlink svg { flex: none; color: var(--g, #00a759); }
.v3-langlink[lang="ar"] { font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif; font-size: 16px; }
@media (hover: hover) { .v3-langlink:hover { color: var(--g2, #008f4c); } }
@media (max-width: 575px) { .v3-langlink { display: flex; width: max-content; margin: 20px 0 0; } }

/* ---- Arabic ---------------------------------------------------------------------------------------------------- */

html[lang="ar"] .seo-page-banner { direction: rtl; }
html[lang="ar"] .seo-page-banner,
html[lang="ar"] main[dir="rtl"] .v3 {
  --display: "Readex Pro", "IBM Plex Sans Arabic", "Urbanist", system-ui, sans-serif;
  font-family: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif;
}

/* Letter spacing pulls the joined letters of Arabic apart, and Arabic has no italics. */
html[lang="ar"] .seo-page-banner *,
html[lang="ar"] main[dir="rtl"] * { letter-spacing: 0 !important; }
html[lang="ar"] .seo-page-banner em,
html[lang="ar"] main[dir="rtl"] em { font-style: normal; font-family: inherit; }

/* Arabic letters reach higher and lower than Latin ones: the large headings get more room between lines. */
html[lang="ar"] .seo-page-banner__headline,
html[lang="ar"] main[dir="rtl"] .v3-h1,
html[lang="ar"] main[dir="rtl"] .v3-h2,
html[lang="ar"] main[dir="rtl"] .v3-step__title,
html[lang="ar"] main[dir="rtl"] .v3-rows__row h3 { line-height: 1.3; }
html[lang="ar"] main[dir="rtl"] .v3-h1.v3-h1--page { font-size: clamp(36px, 4.4vw, 64px); max-width: 15ch; }
html[lang="ar"] main[dir="rtl"] .v3-cta__title { font-size: clamp(56px, 10vw, 168px); line-height: 1.2; }

/* Arrows point the way the line reads (the individual "scale" adds to the hover movement instead of replacing it). */
html[lang="ar"] .seo-page-banner .v3-ico,
html[lang="ar"] main[dir="rtl"] .v3-ico { scale: -1 1; }

/* The parts that stay in English keep their own order: the shared audit form and the list of the other services. */
html[lang="ar"] main[dir="rtl"] .v3-form,
html[lang="ar"] main[dir="rtl"] .v3-also__list li { direction: ltr; text-align: left; }
html[lang="ar"] main[dir="rtl"] .v3-form .v3-ico,
html[lang="ar"] main[dir="rtl"] .v3-also__list .v3-ico { scale: none; }

/* How it works: the line with the dots runs down the right-hand side. */
html[lang="ar"] main[dir="rtl"] .v3-steps { padding: 0 clamp(40px, 4.4vw, 72px) 0 0; }
html[lang="ar"] main[dir="rtl"] .v3-steps__rail { right: 7px; left: auto; }
html[lang="ar"] main[dir="rtl"] .v3-step__dot { right: calc(-1 * clamp(40px, 4.4vw, 72px)); left: auto; }

/* Questions: the answer keeps clear of the plus sign, which is now on the left. */
html[lang="ar"] main[dir="rtl"] .v3-faq__answer { padding: 0 0 26px 48px; }
@media (max-width: 599px) { html[lang="ar"] main[dir="rtl"] .v3-faq__answer { padding-left: 0; } }

/* The quick form in the banner: the country code sits on the right, the phone icon moves to the left, and phone
   numbers and e-mail addresses are typed left to right. */
html[lang="ar"] .seo-page-banner .seo-phone-code__toggle {
  padding: 0 16px 0 12px;
  border-right: 0;
  border-left: 1px solid rgba(144, 162, 177, 0.44);
  border-radius: 0 100px 100px 0;
}
html[lang="ar"] .seo-page-banner .seo-phone-code__list { right: 0; left: auto; direction: ltr; text-align: left; }
html[lang="ar"] .seo-page-banner .seo-phone-code ~ .seo-contact__icon { right: auto; left: 15px; }
html[lang="ar"] .seo-page-banner .seo-phone-code ~ input { padding: 0 15px 0 52px; }
html[lang="ar"] .seo-page-banner input[type="tel"],
html[lang="ar"] .seo-page-banner input[type="email"] { direction: ltr; text-align: right; }
/* The fields' natural width follows the typeface's letters, which are wider in the Arabic one: on a phone that
   made the form's column wider than the card. The column now takes the card's width and nothing more. */
html[lang="ar"] .seo-banner-form { grid-template-columns: minmax(0, 1fr); }

/* ---- The Arabic page's English parts (v3/service.blade.php, $englishBrief) -------------------------------------- */
/* A short summary under the Arabic lead, and three questions answered in English after the Arabic ones. They read
   left to right in the site's English typefaces, with the "EN" mark of the language they are in. */

.v3-enbrief {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  max-width: 600px;
  margin: 28px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  color: var(--body);
  font-size: 15px;
  line-height: 1.6;
}
.v3-enbrief strong { color: var(--ink); font-weight: 600; }
.v3-enbrief__tag {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--g);
  border-radius: 50%;
  color: var(--g-ink);
  font-family: "Urbanist", "Inter", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.v3-enqa { background: #fff; padding-top: 0; }
.v3-enqa__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 120px); align-items: start; }
.v3-enqa__intro { position: sticky; top: 120px; }
.v3-enqa__intro .v3-link { margin-top: 28px; }
.v3-enqa__kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1; text-transform: uppercase; }
.v3-enqa__list { border-top: 1px solid var(--ink); counter-reset: v3-enqa; }
.v3-enqa__item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  padding: clamp(24px, 2.4vw, 34px) 0;
  border-bottom: 1px solid var(--line);
  counter-increment: v3-enqa;
}
.v3-enqa__item::before {
  content: counter(v3-enqa, decimal-leading-zero);
  grid-row: 1 / span 2;
  padding-top: 7px;
  color: var(--g-ink);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
}
.v3-enqa__item h3 { margin: 0; color: var(--ink); font-family: var(--display); font-size: clamp(21px, 1.9vw, 28px); font-weight: 500; line-height: 1.2; }
.v3-enqa__item p { max-width: 62ch; margin: 12px 0 0; color: var(--body); font-size: 17px; line-height: 1.6; }
@media (max-width: 899px) {
  .v3-enqa__grid { grid-template-columns: minmax(0, 1fr); }
  .v3-enqa__intro { position: static; }
}
@media (max-width: 599px) {
  .v3-enqa__item { grid-template-columns: 36px minmax(0, 1fr); }
  .v3-enqa__item p { font-size: 16px; }
}

/* Inside the right-to-left page: the English typefaces and letter spacing come back, and arrows point right. */
html[lang="ar"] main[dir="rtl"] .v3 :is(.v3-enbrief, .v3-enqa) {
  --display: "Urbanist", "Inter", system-ui, sans-serif;
  font-family: "Inter", "Inter Fallback", system-ui, sans-serif;
}
html[lang="ar"] main[dir="rtl"] .v3-enqa .v3-h2 { line-height: 1.03; letter-spacing: -0.03em !important; }
html[lang="ar"] main[dir="rtl"] .v3-enqa .v3-h2 em {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-style: italic;
  letter-spacing: -0.02em !important;
}
html[lang="ar"] main[dir="rtl"] .v3-enqa__item h3 { letter-spacing: -0.02em !important; }
html[lang="ar"] main[dir="rtl"] .v3-enqa__kicker { letter-spacing: 0.12em !important; }
html[lang="ar"] main[dir="rtl"] .v3-enqa .v3-ico { scale: none; }
