/* LingoPerfect Translation: mobile-first, LTR + RTL via logical properties */
@font-face { font-family: "Tagline Sans"; src: url(/assets/fonts/fira-sans-tagline-400.woff2) format("woff2"); font-weight: 400; font-display: swap; } /* Fira Sans subset, stands in for Trebuchet MS */
@font-face { font-family: "Plex Arabic"; src: url(/assets/fonts/plex-arabic-400.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Plex Arabic"; src: url(/assets/fonts/plex-arabic-700.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  --blue: #0b4f9c;
  --blue-dark: #083a73;
  --sky: #1e9bd7;
  --ink: #1b2430;
  --muted: #4a5668;
  --line: #d9e2ec;
  --bg: #ffffff;
  --bg-alt: #f2f6fa;
  --gold: #f5b301;
  --red: #D61F2A;
  --radius: 10px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Plex Arabic", "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
/* Header sizes. Phones: logo row + menu row. Desktop (>=900px): one row. */
:root {
  --row-full: 72px; --row-small: 56px;
  --logo-full: 48px; --logo-small: 36px;
  --nav-row: 44px;
  --hdr-full: calc(var(--row-full) + var(--nav-row));
  --hdr-small: calc(var(--row-small) + var(--nav-row));
  --hdr-ease: 240ms ease;
}
@media (min-width: 900px) {
  :root { --row-full: 96px; --row-small: 64px; --logo-full: 64px; --logo-small: 44px; --nav-row: 0px; }
}
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-small) + 12px); }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--bg); }
[lang="ar"] body, body:lang(ar), [lang="ar"] { font-family: var(--font-ar); }
[lang="en"] { font-family: var(--font); }
html[lang="ar"] body { line-height: 1.8; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); color: var(--blue-dark); }
h3 { font-size: 1.15rem; }
p, ul, ol { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
.small { font-size: .9rem; color: var(--muted); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--blue); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { top: 8px; }

/* TODO markers: deliberately loud so nothing ships unnoticed */
mark.todo { background: #fff3a0; color: #6b4c00; border: 1px dashed #c99a00; padding: 2px 6px; border-radius: 4px; font-family: var(--font); font-size: .9rem; display: inline-block; }
.draft-banner { background: #fff3a0; color: #5a4000; text-align: center; padding: 8px 16px; font-weight: 700; border-bottom: 1px solid #c99a00; }

/* Buttons */
.btn { display: inline-block; background: var(--blue); color: #fff; text-decoration: none; padding: .7em 1.2em; border-radius: 999px; font-weight: 700; border: 2px solid var(--blue); cursor: pointer; font: inherit; font-weight: 700; line-height: 1.2; }
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--blue); }
.btn-ghost:hover { background: var(--blue); color: #fff; }
.btn-ghost-light { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost-light:hover { background: #fff; color: var(--blue-dark); border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Header: fixed at the top; the page always reserves the full (tall) height, so shrinking
   never moves the content. site.js adds .hdr-small to <html> once the page is scrolled. */
body { padding-top: calc(var(--hdr-full) + 1px); } /* +1px for the header's bottom border */
body.page-404 { padding-top: 0; }
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); transition: box-shadow var(--hdr-ease); }
.header-row { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "brand actions" "nav nav"; grid-template-rows: var(--row-full) minmax(var(--nav-row), auto); align-items: center; column-gap: 12px; transition: grid-template-rows var(--hdr-ease); }
.brand-wrap { grid-area: brand; display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand { display: block; line-height: 0; flex: none; }
/* Tagline (brand font is Trebuchet MS) */
.tagline { font-family: "Tagline Sans", "Trebuchet MS", var(--font); margin: 0; }
html[lang="ar"] .tagline { font-family: var(--font-ar); }
.tagline span { display: block; }
.header-tagline { font-size: .8rem; line-height: 1.35; color: var(--muted); padding-inline-start: 14px; border-inline-start: 1px solid var(--line); max-height: 3em; overflow: hidden; transition: opacity var(--hdr-ease), max-height var(--hdr-ease); }
.header-tagline mark.todo { font-size: .7rem; padding: 1px 4px; }
.hdr-small .header-tagline { opacity: 0; max-height: 0; visibility: hidden; }
/* Shown on tablets (menu on its own row) and wide desktops; hidden where it would push the menu onto two lines. */
@media (max-width: 599px), (min-width: 900px) { .header-tagline { display: none; } }
.hero-tagline { color: #fff; font-size: 1.05rem; letter-spacing: .01em; margin-bottom: 14px; opacity: .92; }
.hero-tagline span { display: inline; }
.footer-tagline { color: #d4dce6; font-size: .95rem; margin-bottom: 14px; }
.brand img { width: auto; height: var(--logo-full); transition: height var(--hdr-ease); }
.hdr-small .site-header { box-shadow: 0 4px 18px rgba(10, 30, 60, .14); }
.hdr-small .header-row { grid-template-rows: var(--row-small) minmax(var(--nav-row), auto); }
.hdr-small .brand img { height: var(--logo-small); }
@media (prefers-reduced-motion: reduce) {
  .site-header, .header-row, .brand img, .header-tagline { transition: none; }
}
.header-actions { grid-area: actions; display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.lang-switch { font-weight: 700; text-decoration: none; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; }
.btn-call { padding: .5em .9em; font-size: .95rem; }
.btn-call .call-num { display: none; }
@media (min-width: 480px) { .btn-call .call-num { display: inline; } .btn-call .call-short { display: none; } }

.main-nav { grid-area: nav; }
.main-nav > ul { list-style: none; margin: 0 -6px; padding: 0; display: flex; flex-wrap: wrap; gap: 0; }
@media (min-width: 400px) { .main-nav > ul { gap: 2px 4px; margin: 0; } }
.main-nav a, .main-nav summary { display: block; line-height: 1.5; padding: 8px 7px; text-decoration: none; color: var(--ink); font-weight: 600; border-radius: 6px; cursor: pointer; }
.main-nav a:hover, .main-nav summary:hover { background: var(--bg-alt); color: var(--blue); }
.main-nav a[aria-current="page"], .main-nav summary.active { color: var(--blue); box-shadow: inset 0 -3px 0 var(--sky); }
.main-nav summary { list-style: none; }
.main-nav summary::-webkit-details-marker { display: none; }
.main-nav summary::after { content: ""; display: inline-block; width: .45em; height: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-inline-start: .45em; vertical-align: .2em; }
.has-sub { position: relative; }
.has-sub .sub { list-style: none; margin: 0; padding: 6px; position: absolute; inset-inline-start: 0; top: 100%; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(10, 30, 60, .12); }
.has-sub .sub a { font-weight: 500; }

@media (min-width: 400px) { .main-nav a, .main-nav summary { padding-inline: 10px; } }
@media (min-width: 900px) {
  .header-row { grid-template-columns: auto 1fr auto; grid-template-areas: "brand nav actions"; grid-template-rows: var(--row-full); }
  .hdr-small .header-row { grid-template-rows: var(--row-small); }
  .main-nav > ul { justify-content: center; }
}

/* Hero */
.home-hero { position: relative; color: #fff; background: #10243d; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero-inner { position: relative; padding-block: 56px 48px; max-width: var(--wrap); }
.home-hero h1 { color: #fff; max-width: 20ch; }
.home-hero .lead { font-size: 1.15rem; max-width: 60ch; }
.page-hero { background: linear-gradient(135deg, var(--blue-dark), var(--blue) 60%, var(--sky)); color: #fff; padding-block: 44px 36px; }
.page-hero h1 { color: #fff; max-width: 26ch; }
.page-hero .lead { font-size: 1.1rem; max-width: 65ch; }
.page-hero .btn { background: #fff; color: var(--blue-dark); border-color: #fff; }
.page-hero .btn:hover { background: var(--bg-alt); }
/* Service illustrations: beside the text on wider screens (left in Arabic), hidden on small phones */
.page-hero.has-art .wrap { display: grid; align-items: center; gap: 24px; }
.hero-art { display: none; width: 100%; max-width: 320px; height: auto; justify-self: center; }
@media (min-width: 600px) { .page-hero.has-art .wrap { grid-template-columns: 1fr 220px; } .hero-art { display: block; } }
@media (min-width: 900px) { .page-hero.has-art .wrap { grid-template-columns: 1fr 320px; gap: 48px; } }
/* Light hero with the red logo as an accent (Reviews) */
.page-hero-accent { background: var(--bg-alt); color: var(--ink); border-bottom: 4px solid var(--red); }
.page-hero-accent h1 { color: var(--blue-dark); }
.hero-accent-logo { height: 56px; width: auto; margin-bottom: 18px; }
@media (min-width: 900px) { .hero-inner { padding-block: 96px 80px; } .page-hero { padding-block: 64px 52px; } }

/* Google badge */
.g-badge { display: inline-flex; align-items: center; gap: 10px; background: #fff; color: var(--ink); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 700; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); margin-block: 8px 16px; border: 1px solid var(--line); }
.g-badge:hover { color: var(--blue); }
.stars { color: var(--gold); letter-spacing: 1px; font-size: 1.1rem; }

/* Sections */
.section { padding-block: 44px; }
.section.alt { background: var(--bg-alt); }
@media (min-width: 900px) { .section { padding-block: 64px; } }
.two-col, .contact-grid { display: grid; gap: 32px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; align-items: start; } .contact-grid { grid-template-columns: 3fr 2fr; } }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.rounded { border-radius: var(--radius); }

/* Lists */
.ticks { list-style: none; padding: 0; }
/* Brand-mark bullets: 1em tall, centred on the first line, on the start side (right in Arabic).
   The mark is a logo, so it is never mirrored. */
.ticks li { position: relative; padding-inline-start: 1.65em; margin-bottom: .55em; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; top: .3em; top: calc((1lh - 1em) / 2); width: .84em; height: 1em; background: url(/assets/img/lingoperfect-mark-2023-red.svg) no-repeat center / contain; }
html[lang="ar"] .ticks li::before { top: .4em; top: calc((1lh - 1em) / 2); }

.cards { list-style: none; padding: 0; display: grid; gap: 16px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.cards li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; border-top: 4px solid var(--sky); }
.icon { display: block; width: auto; }
.cards .icon { height: 44px; margin-bottom: 12px; }
.creds .icon { height: 40px; margin-bottom: 4px; align-self: flex-start; }
.cards h3 a { text-decoration: none; }
.cards h3 a:hover { text-decoration: underline; }
.cards p { margin: 0; color: var(--muted); }

.creds { list-style: none; padding: 0; display: grid; gap: 16px; }
@media (min-width: 640px) { .creds { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .creds { grid-template-columns: repeat(4, 1fr); } }
.creds li { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.creds strong { color: var(--blue-dark); font-size: 1.1rem; }
.creds span { font-size: .95rem; color: var(--muted); }
.atio-badge { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.atio-badge { margin-top: auto; padding-top: 12px; }
.atio-logo { display: block; width: 100%; }
.atio-logo img { display: block; width: 100%; max-width: 320px; height: auto; } /* fills the card width; never filtered or recoloured */
.creds .atio-meta { font-size: .9rem; }
.atio-badge mark.todo { font-size: .8rem; }

.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 16px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; background: #fff; border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); }
.steps .step-icon { height: 44px; margin-bottom: 12px; }
.steps h3::before { content: counter(step) ". "; color: var(--red); }
.steps p { margin: 0; color: var(--muted); }

.quotes { list-style: none; padding: 0; display: grid; gap: 16px; }
@media (min-width: 760px) { .quotes { grid-template-columns: repeat(3, 1fr); } }
.quotes li { background: var(--bg-alt); border-radius: var(--radius); padding: 20px; }
.quotes blockquote { margin: 0; }
.quotes .who { font-weight: 700; margin: 0; }
.section.alt .quotes li { background: #fff; }

/* Brand-mark watermark: large, faint, on the end side (left in Arabic), partly cropped,
   behind the content. Used on three sections only. Hidden on small phones. */
.wm { position: relative; isolation: isolate; overflow: hidden; }
.wm::after { content: ""; position: absolute; z-index: -1; top: 50%; inset-inline-end: -5%; height: clamp(320px, 115%, 620px); aspect-ratio: 142 / 170; transform: translateY(-50%); background: no-repeat center / contain; opacity: .06; pointer-events: none; }
.wm-red::after { background-image: url(/assets/img/lingoperfect-mark-2023-red.svg); }
.wm-blue::after { background-image: url(/assets/img/lingoperfect-mark-2023-blue.svg); }
.wm-white::after { background-image: url(/assets/img/lingoperfect-mark-2023-white.svg); opacity: .08; }
.home-hero.wm::after { z-index: 0; } /* above the photo, below the text */
.home-hero .hero-inner { z-index: 1; }
@media (max-width: 599px) { .wm::after { display: none; } }

/* About: logo story teaser */
.story-teaser { display: flex; gap: 24px; align-items: flex-start; }
.mark-accent { flex: none; height: 64px; width: auto; margin-top: 4px; }
.story-teaser > div { max-width: 680px; }
.story-teaser p:last-child { margin-bottom: 0; }

/* Our logo page: one element per section, visual and text side by side (alternating) */
.story-row { display: grid; gap: 24px; align-items: center; }
.story-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.story-visual { height: 180px; width: auto; }
.story-visual-dot { height: auto; width: min(100%, 340px); }
.story-text { max-width: 560px; }
.story-text p:last-child { margin-bottom: 0; }
@media (min-width: 760px) {
  .story-row { grid-template-columns: 1fr 1.4fr; gap: 48px; }
  .story-row-flip .story-fig { order: 2; }
  .story-visual { height: 220px; }
}
.swatch { display: inline-flex; align-items: center; gap: 8px; font: 600 .9rem/1 var(--font); color: var(--muted); }
.swatch-chip { width: 28px; height: 28px; border-radius: 6px; background: #075398; }
.story-end { text-align: center; }
.story-tagline { font-size: clamp(1.3rem, 1rem + 1.4vw, 1.9rem); color: var(--blue-dark); margin-top: 24px; }
.story-tagline span { display: inline; }

/* CTA band */
.cta-band { background: var(--blue-dark); color: #fff; padding-block: 44px; }
.cta-band h2 { color: #fff; }

/* Offices */
.offices { display: grid; gap: 16px; }
@media (min-width: 860px) { .offices { grid-template-columns: 1.2fr 1fr 1fr; } }
.office { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.office-main { border-top: 4px solid var(--blue); }

/* Address */
.nap { font-style: normal; }
.addr { display: inline-block; }

/* Form */
.contact-form .field { margin-bottom: 14px; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.contact-form .opt { font-weight: 400; color: var(--muted); }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #aab7c6; border-radius: 8px; background: #fff; color: var(--ink); }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--blue); outline: 2px solid var(--sky); outline-offset: 0; }
.contact-form [aria-invalid="true"] { border-color: #b3261e; }
.contact-form .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.form-status { margin-top: 14px; padding: 12px 14px; border-radius: 8px; font-weight: 600; }
.form-status.ok { background: #e6f4ea; color: #1e4620; border: 1px solid #9ccc9f; }
.form-status.err { background: #fdecea; color: #7a1c14; border: 1px solid #f1a8a1; }
.form-status.info { background: var(--bg-alt); }
.contact-form button[disabled] { opacity: .6; cursor: progress; }

/* Map */
.map { width: 100%; height: 380px; border: 0; border-radius: var(--radius); }
.map-todo { display: grid; place-items: center; background: #e7edf3; height: 220px; }

/* Footer */
.site-footer { background: #0e1b2c; color: #d4dce6; padding-top: 40px; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-logo { margin: 0 0 12px; line-height: 0; }
.footer-logo img { height: 44px; width: auto; }
.footer-name, .footer-h { color: #fff; font-weight: 700; font-size: 1.05rem; margin-bottom: .5em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35em; }
.copyright { border-top: 1px solid #24364d; margin-top: 24px; padding-block: 16px; font-size: .9rem; }
.copyright p { margin: 0; }

/* 404 */
.notfound { padding-block: 40px; }
.brand-404 { display: inline-block; line-height: 0; }
.brand-404 img { height: 72px; width: auto; }
.notfound section { margin-block: 32px; }
.notfound-ar { font-family: var(--font-ar); }

/* Client logo wall */
.client-logos { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .client-logos { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .client-logos { grid-template-columns: repeat(4, 1fr); } }
.client-logos li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.client-logos a, .client-logos li > span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 100%; padding: 22px 16px 16px; text-decoration: none; color: inherit; }
.client-logos a:hover { box-shadow: 0 4px 16px rgba(10, 37, 64, .08); }
.client-logo { display: flex; align-items: center; justify-content: center; height: 64px; width: 100%; }
.client-logo img[height="60"][width="38"] { max-height: 64px; }
.client-logo img { max-height: 60px; max-width: min(100%, 170px); height: auto; width: auto; object-fit: contain; filter: grayscale(100%); opacity: .8; transition: filter .2s, opacity .2s; }
.client-logos a:hover img, .client-logos a:focus-visible img { filter: none; opacity: 1; }
.client-name { font-weight: 700; color: var(--blue-dark); font-size: 1.05rem; text-align: center; }
.client-meta { font-size: .85rem; color: var(--muted); text-align: center; }
@media (prefers-reduced-motion: reduce) { .client-logo img { transition: none; } }

/* Home services grid: the last card fills its row so the grid has no gap. */
@media (min-width: 640px) { .cards-services li:last-child { grid-column: 1 / -1; } }
/* A single review quoted on a service page */
.quotes.quotes-single { grid-template-columns: 1fr; max-width: 760px; }
/* Short FAQ on service pages */
.faq { max-width: 760px; }
.faq h3 { margin-bottom: .3em; }
.faq p { margin-top: 0; }

/* Founder profile (About page) */
.founder { display: grid; gap: 24px; align-items: start; }
@media (min-width: 760px) { .founder { grid-template-columns: 300px 1fr; gap: 40px; } }
.founder-photo { width: 100%; max-width: 300px; height: auto; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(10, 37, 64, .15); }
.founder-text h3 { margin: 0 0 4px; font-size: 1.5rem; color: var(--blue-dark); }
.founder-role { margin: 0 0 14px; color: var(--red); font-weight: 700; }

/* Hero service points */
.hero-points { list-style: none; padding: 0; margin: 4px 0 6px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 700; color: #fff; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; }

/* Two Canadian locations side by side */
.loc-pair { display: grid; gap: 18px; }
@media (min-width: 640px) { .loc-pair { grid-template-columns: 1fr 1fr; } }
.loc-pair h4 { margin: 0 0 6px; color: var(--blue-dark); }
.offices .office-main { grid-column: 1 / -1; }
.loc-pair .addr { white-space: normal; }

/* Inner-page hero with a photo: brand-blue overlay keeps text readable */
.page-hero.has-photo { background: linear-gradient(90deg, rgba(7, 43, 82, .94) 0%, rgba(7, 83, 152, .82) 50%, rgba(7, 83, 152, .35) 100%), var(--hero-photo) center / cover no-repeat, var(--blue-dark); padding-block: 72px 60px; }
html[dir="rtl"] .page-hero.has-photo { background: linear-gradient(270deg, rgba(7, 43, 82, .94) 0%, rgba(7, 83, 152, .82) 50%, rgba(7, 83, 152, .35) 100%), var(--hero-photo) center / cover no-repeat, var(--blue-dark); }
@media (max-width: 699px) { .page-hero.has-photo, html[dir="rtl"] .page-hero.has-photo { background: linear-gradient(rgba(7, 43, 82, .86), rgba(7, 83, 152, .86)), var(--hero-photo) center / cover no-repeat, var(--blue-dark); padding-block: 48px 40px; } }
.page-hero.has-photo .hero-art { display: none; }
.page-hero.has-photo.has-art .wrap { grid-template-columns: 1fr; }

/* WhatsApp */
.btn-wa { display: inline-flex; align-items: center; gap: 8px; background: #25D366; border-color: #25D366; color: #0b2e1a; }
.btn-wa:hover { background: #1ebe5b; border-color: #1ebe5b; color: #0b2e1a; }
.btn-wa svg { width: 22px; height: 22px; flex: none; }
.page-hero .btn-wa, .home-hero .btn-wa, .cta-band .btn-wa { background: #25D366; border-color: #25D366; color: #0b2e1a; }
.wa-float { position: fixed; z-index: 60; bottom: 18px; inset-inline-end: 18px; display: flex; align-items: center; gap: 8px; background: #25D366; color: #fff; text-decoration: none; font-weight: 700; padding: 12px 16px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.wa-float:hover { background: #1ebe5b; color: #fff; }
.wa-float svg { width: 28px; height: 28px; }
@media (max-width: 599px) { .wa-float { padding: 13px; } .wa-float-text { display: none; } }
@media print { .wa-float { display: none; } }
.wa-contact { margin-bottom: 18px; }

/* Stats counter band */
.stats-band { background: var(--bg-alt); padding-block: 44px; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px 16px; grid-template-columns: repeat(2, 1fr); text-align: center; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.stats svg { width: 56px; height: 56px; fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
.stat-num { margin: 0; font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.1; color: var(--blue-dark); font-variant-numeric: tabular-nums; }
.stat-label { margin: 4px 0 0; color: var(--blue); font-weight: 600; }

/* Home hero video: fades in over the poster image once it plays */
.hero-video { opacity: 0; transition: opacity .8s ease; }
.hero-video.is-playing { opacity: .42; }
/* Calm home hero: still photo, fewer elements, more breathing room */
.home-hero .hero-bg { opacity: .45; }
.home-hero .hero-inner { padding-block: 84px 72px; }
.home-hero .lead { margin-bottom: 26px; }
.video-toggle { position: absolute; z-index: 3; top: 14px; inset-inline-end: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.6); background: rgba(10,37,64,.55); color: #fff; cursor: pointer; display: none; align-items: center; justify-content: center; padding: 0; }
.video-toggle.show { display: flex; }
.video-toggle:hover, .video-toggle:focus-visible { background: rgba(10,37,64,.85); }
.video-toggle svg { width: 16px; height: 16px; fill: currentColor; }


/* Inner-page hero video: plays behind the blue overlay */
.page-hero.has-video { position: relative; overflow: hidden; isolation: isolate; }
.page-hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-hero-video.is-playing { opacity: 1; }
.page-hero.has-video::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7, 43, 82, .92) 0%, rgba(7, 83, 152, .78) 50%, rgba(7, 83, 152, .3) 100%); opacity: 0; transition: opacity .8s ease; }
html[dir="rtl"] .page-hero.has-video::before { background: linear-gradient(270deg, rgba(7, 43, 82, .92) 0%, rgba(7, 83, 152, .78) 50%, rgba(7, 83, 152, .3) 100%); }
.page-hero.has-video:has(.is-playing)::before { opacity: 1; }

/* Home hero: show the video at full clarity; a soft gradient on the text side keeps the words readable */
.home-hero .hero-bg, .home-hero .hero-video.is-playing { opacity: 1; }
/* Wide screens crop this 16:9 frame. Shift it up so the flag stays in view and the pole is cropped. */
@media (min-width: 900px) {
  .home-hero .hero-bg { object-position: center 24%; }
}
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(90deg, rgba(8, 28, 56, .78) 0%, rgba(8, 28, 56, .55) 40%, rgba(8, 28, 56, 0) 62%); }
html[dir="rtl"] .home-hero::before { background: linear-gradient(270deg, rgba(8, 28, 56, .78) 0%, rgba(8, 28, 56, .55) 40%, rgba(8, 28, 56, 0) 62%); }
@media (max-width: 899px) { .home-hero::before, html[dir="rtl"] .home-hero::before { background: rgba(8, 28, 56, .62); } }
.home-hero h1, .home-hero .lead { text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.home-hero .video-toggle { z-index: 3; }

/* Stats band: title and 3-per-row layout */
.stats-title { text-align: center; margin: 0 0 30px; color: var(--blue-dark); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(3, 1fr); gap: 40px 24px; } }
.stat-unit { font-size: .6em; font-weight: 700; }

/* Social links */
.social { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.social-label { font-weight: 700; margin-inline-end: 4px; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: #fff; transition: background .2s; }
.social a:hover, .social a:focus-visible { background: var(--blue-dark); }
.social svg { width: 18px; height: 18px; }
.social-footer a { background: rgba(255, 255, 255, .12); }
.social-footer a:hover { background: rgba(255, 255, 255, .25); }

/* Two maps side by side on the Contact page */
.maps-grid { display: grid; gap: 24px; }
@media (min-width: 800px) { .maps-grid { grid-template-columns: 1fr 1fr; } }
.maps-grid h3 { margin: 0 0 10px; color: var(--blue-dark); }
.maps-grid .map { height: 340px; }

/* Small message shown after copying a phone number on desktop */
.toast { position: fixed; z-index: 70; bottom: 90px; left: 50%; transform: translate(-50%, 20px); max-width: min(520px, calc(100% - 32px)); background: var(--blue-dark); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Arabic home: mirror the hero video/photo so the flag sits behind the right-aligned text */
html[dir="rtl"] .home-hero .hero-bg { transform: scaleX(-1); }

.page-hero.hero-about { --hero-photo: url("/assets/img/hero-about-fff59d70.webp"); }
.page-hero.hero-academic { --hero-photo: url("/assets/img/hero-academic-6ef1e3f4.webp"); }
.page-hero.hero-certified { --hero-photo: url("/assets/img/hero-certified-a63d473c.webp"); }
.page-hero.hero-interpreting { --hero-photo: url("/assets/img/hero-interpreting-3c2191fb.webp"); }
.page-hero.hero-legal { --hero-photo: url("/assets/img/hero-legal-b60fd13c.webp"); }
.page-hero.hero-medical { --hero-photo: url("/assets/img/hero-medical-586f40ff.webp"); }
.page-hero.hero-technical { --hero-photo: url("/assets/img/hero-technical-dd0d3a49.webp"); }