/* ==========================================================================
   ATS – Advanced Technical Systems
   Plain CSS, no build step. Uses logical properties so the same rules
   work for English (LTR) and Arabic (RTL).
   ========================================================================== */

:root {
  --navy: #1e3c72;
  --navy-800: #183262;
  --navy-900: #122752;
  --navy-950: #0b1a39;
  --red: #ec2d3c;
  --red-600: #d41f2e;
  --blue: #2c6cb0;
  --tint: #f4f7fc;
  --tint-2: #e9eff8;
  --line: #dbe3ef;
  --ink: #172338;
  --muted: #5a6a82;
  --white: #fff;

  --font-head: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(18, 39, 82, .18);
  --shadow-lg: 0 24px 60px -20px rgba(18, 39, 82, .35);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[dir="rtl"] {
  --font-head: "Cairo", "Montserrat", system-ui, sans-serif;
  --font-body: "Cairo", system-ui, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[dir="rtl"] body { line-height: 1.8; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; color: var(--navy-900); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { line-height: 1.4; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.icon { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .icon-dir, [dir="rtl"] .lb-next .icon { transform: scaleX(-1); }
.lb-prev .icon { transform: scaleX(-1); }
[dir="rtl"] .lb-prev .icon { transform: none; }

.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 200; background: var(--red); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .9em 1.6em; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-head); font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  text-decoration: none; transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--red { background: var(--red); color: #fff; box-shadow: 0 10px 24px -10px rgba(236, 45, 60, .7); }
.btn--red:hover { background: var(--red-600); }
.btn--ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn--sm { padding: .6em 1.2em; font-size: .85rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .7; pointer-events: none; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .7em;
  font-family: var(--font-head); font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); margin-bottom: 1rem;
}
[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: .95rem; }
.eyebrow::before { content: ""; width: 28px; height: 3px; background: currentColor; border-radius: 2px; }
.eyebrow--light { color: #fff; }
.eyebrow--light::before { background: var(--red); }
.section-title { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); font-weight: 800; letter-spacing: -.02em; }
[dir="rtl"] .section-title { letter-spacing: 0; }
.section-lead { font-size: 1.08rem; color: var(--muted); max-width: 62ch; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }
.section--tint { background: var(--tint); }
.section--navy { background: var(--navy); color: #dfe7f5; overflow: hidden; }
.section--navy .section-title { color: #fff; }
.section--navy .section-lead { color: #b9c7e2; }
.section-head { text-align: center; margin-inline: auto; max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head .section-lead { margin-inline: auto; }
.section-head--start { text-align: start; margin-inline: 0; }
.section-head--start .section-lead { margin-inline: 0; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 100; height: var(--header-h);
  transition: background .3s, box-shadow .3s, height .3s;
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: block; position: relative; width: 170px; flex: none; }
.brand-logo { width: 100%; transition: opacity .3s; }
.brand-logo--color { position: absolute; inset: 0; opacity: 0; }
.main-nav { margin-inline-start: auto; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 8px 14px; border-radius: 8px; text-decoration: none;
  font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: #fff; position: relative;
  transition: color .2s;
}
.main-nav a::after {
  content: ""; position: absolute; inset-inline: 14px; bottom: 2px; height: 2px; background: var(--red);
  transform: scaleX(0); transition: transform .25s var(--ease);
}
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); }
.nav-cta-mobile { display: none; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: #fff;
  font-weight: 600; font-size: .9rem; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35);
  transition: background .2s, color .2s, border-color .2s;
}
.lang-switch[lang="ar"] { font-family: "Cairo", sans-serif; font-size: .95rem; }
.lang-switch[lang="en"] { font-family: "Montserrat", sans-serif; }
.lang-switch:hover { background: rgba(255, 255, 255, .12); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; color: #fff; }
.nav-toggle .icon { width: 28px; height: 28px; }
.nav-toggle .icon-close { display: none; }

.site-header.is-scrolled, .site-header.is-open { background: rgba(255, 255, 255, .97); box-shadow: 0 6px 24px -12px rgba(18, 39, 82, .3); backdrop-filter: saturate(1.4) blur(10px); }
.site-header.is-scrolled { --header-h: 66px; }
.is-scrolled .brand-logo--white, .is-open .brand-logo--white { opacity: 0; }
.is-scrolled .brand-logo--color, .is-open .brand-logo--color { opacity: 1; }
.is-scrolled .main-nav a, .is-open .main-nav a { color: var(--navy-900); }
.is-scrolled .lang-switch, .is-open .lang-switch { color: var(--navy); border-color: var(--line); }
.is-scrolled .lang-switch:hover { background: var(--tint); }
.is-scrolled .nav-toggle, .is-open .nav-toggle { color: var(--navy); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(100svh, 920px); display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--header-h) + 60px); color: #fff; overflow: hidden; isolation: isolate; background: var(--navy-950);
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% center; animation: heroZoom 18s ease-out both; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 26, 57, .94) 0%, rgba(18, 39, 82, .82) 42%, rgba(18, 39, 82, .35) 100%),
    linear-gradient(0deg, rgba(11, 26, 57, .9) 0%, rgba(11, 26, 57, 0) 45%);
}
[dir="rtl"] .hero-media::after {
  background:
    linear-gradient(270deg, rgba(11, 26, 57, .94) 0%, rgba(18, 39, 82, .82) 42%, rgba(18, 39, 82, .35) 100%),
    linear-gradient(0deg, rgba(11, 26, 57, .9) 0%, rgba(11, 26, 57, 0) 45%);
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }

/* Diagonal brand shapes, echoing the printed profile */
.hero-shape { position: absolute; z-index: -1; inset-block-start: 0; inset-inline-end: 0; width: 38%; height: 100%; pointer-events: none; }
.hero-shape::before { content: ""; position: absolute; }
.hero-shape::before { inset-inline-end: 0; top: 0; width: 100%; height: 18%; background: var(--red); clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%); opacity: .9; }
[dir="rtl"] .hero-shape::before { clip-path: polygon(0 0, 70% 0, 100% 100%, 0 100%); }

.hero-content { padding-bottom: clamp(40px, 6vw, 72px); }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 1.3rem + 4.4vw, 4.4rem); font-weight: 800; letter-spacing: -.03em; max-width: 15ch; margin-bottom: .4em; }
[dir="rtl"] .hero h1 { letter-spacing: 0; max-width: 18ch; line-height: 1.3; }
.hero-title-sub { display: block; margin-top: .25em; font-size: .42em; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #fff; }
.hero-title-sub::before { content: ""; display: inline-block; vertical-align: middle; width: 1.6em; height: 3px; background: var(--red); margin-inline-end: .6em; border-radius: 2px; }
[dir="rtl"] .hero-title-sub { letter-spacing: 0; font-size: .5em; }
.hero-lead { font-size: clamp(1.05rem, .95rem + .45vw, 1.25rem); color: #cfdaf0; max-width: 56ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 clamp(28px, 4vw, 48px);
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.stat { padding: 22px 26px; display: flex; flex-direction: column-reverse; gap: 2px; }
.stat + .stat { border-inline-start: 1px solid rgba(255, 255, 255, .14); }
.stat dd { margin: 0; font-family: "Montserrat", var(--font-head); font-weight: 800; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); color: #fff; line-height: 1.1; direction: ltr; text-align: start; }
[dir="rtl"] .stat dd { text-align: end; }
.stat dt { font-size: .85rem; color: #b9c7e2; font-weight: 500; }
.stat dt::before { content: ""; display: block; width: 24px; height: 3px; background: var(--red); margin-block: 8px 6px; border-radius: 2px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-text p { color: #3c4a60; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.pillars li { padding: 16px; border-radius: var(--radius-sm); background: var(--tint); border-inline-start: 3px solid var(--red); }
.pillars strong { display: block; font-family: var(--font-head); color: var(--navy); font-size: .95rem; }
.pillars span { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
[dir="rtl"] .pillars span { letter-spacing: 0; font-size: .9rem; }

.about-media { position: relative; margin: 0; }
.about-media::before {
  content: ""; position: absolute; inset-inline-end: -18px; top: -18px; width: 55%; height: 60%;
  background: var(--red); border-radius: var(--radius); z-index: -1;
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
}
[dir="rtl"] .about-media::before { clip-path: polygon(0 0, 80% 0, 100% 100%, 0 100%); }
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.about-media figcaption {
  position: absolute; inset-inline-start: 20px; bottom: -28px; max-width: calc(100% - 40px);
  background: var(--navy); color: #fff; padding: 16px 22px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  border-inline-start: 4px solid var(--red);
}
.about-media figcaption strong { display: block; font-family: var(--font-head); }
.about-media figcaption span { font-size: .85rem; color: #b9c7e2; }

.mission {
  margin: clamp(72px, 9vw, 110px) 0 32px; padding: clamp(28px, 4vw, 48px); border-radius: var(--radius);
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-900) 100%); color: #fff; position: relative; overflow: hidden;
}
.mission::after {
  content: ""; position: absolute; inset-inline-end: 0; top: 0; width: 34%; height: 100%;
  background: var(--red); clip-path: polygon(70% 0, 100% 0, 100% 100%, 40% 100%); opacity: .95;
}
[dir="rtl"] .mission::after { clip-path: polygon(0 0, 30% 0, 60% 100%, 0 100%); }
.mission-text { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.2rem, 1rem + 1vw, 1.7rem); line-height: 1.4; max-width: 34ch; margin: 0; position: relative; z-index: 1; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fact { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: box-shadow .3s, transform .3s var(--ease), border-color .3s; }
.fact:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: transparent; }
.fact-badge {
  flex: none; display: grid; place-items: center; min-width: 64px; height: 56px; padding: 0 10px; border-radius: 12px;
  background: var(--navy); color: #fff; font-family: "Montserrat", sans-serif; font-weight: 800; font-size: 1.05rem;
}
.fact h3 { font-size: 1rem; margin-bottom: .25em; }
.fact h3::after { content: ""; display: block; width: 36px; height: 2px; background: var(--red); margin-top: 6px; }
.fact p { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.55; }

/* ---------- Expertise ---------- */
.expertise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: none; }
.expertise-card { padding: 34px 28px; position: relative; overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s; }
.expertise-card::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--red); transform: scaleY(.25); transform-origin: top; transition: transform .4s var(--ease); }
.expertise-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.expertise-card:hover::before { transform: scaleY(1); }
.card-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--navy); color: #fff; margin-bottom: 22px; }
.card-icon .icon { width: 26px; height: 26px; }
.card-num { position: absolute; inset-inline-end: 24px; top: 22px; font-family: "Montserrat", sans-serif; font-weight: 800; font-size: 2.6rem; color: var(--tint-2); line-height: 1; }
.expertise-card h3 { font-size: 1.2rem; }
.expertise-card p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- Services tabs ---------- */
.tabs { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.tab-list { display: flex; flex-direction: column; gap: 6px; position: sticky; top: calc(var(--header-h) + 20px); }
.tab {
  display: flex; align-items: center; gap: 14px; text-align: start; width: 100%;
  padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent;
  font-family: var(--font-head); font-weight: 700; font-size: .98rem; color: var(--navy-900);
  transition: background .2s, color .2s, border-color .2s;
}
.tab:hover { background: var(--tint); }
.tab-num { font-family: "Montserrat", sans-serif; font-size: .78rem; color: var(--muted); min-width: 22px; }
.tab[aria-selected="true"] { background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.tab[aria-selected="true"] .tab-num { color: var(--red); }

.tab-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: clamp(24px, 3vw, 40px); background: var(--tint); border-radius: var(--radius); min-height: 100%; }
.js .tab-panel[hidden] { display: none; }
.no-js .tab-panel { margin-bottom: 20px; }
.no-js .tab-list { display: none; }
.no-js .tabs { grid-template-columns: 1fr; }
.tab-panel:not([hidden]) { animation: fadeUp .45s var(--ease) both; }
.tab-body h3 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); }
.tab-body > p { color: #3c4a60; }
.check-list { display: grid; gap: 10px; margin-top: 18px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--navy-900); font-size: .95rem; }
.check-list .icon { color: #fff; background: var(--red); border-radius: 50%; padding: 4px; width: 22px; height: 22px; stroke-width: 3; margin-top: 2px; }

.mini-steps { margin-top: 26px; padding: 20px; background: var(--navy); border-radius: var(--radius-sm); color: #fff; }
.mini-steps-title { font-family: var(--font-head); font-weight: 700; margin-bottom: 14px; }
.mini-steps ol { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.mini-steps ol::before { content: ""; position: absolute; top: 13px; inset-inline: 10%; height: 2px; background: rgba(255, 255, 255, .25); }
.mini-steps li { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #b9c7e2; position: relative; }
[dir="rtl"] .mini-steps li { text-transform: none; letter-spacing: 0; font-size: .82rem; }
.mini-steps li span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff; font-size: .8rem; }

.tab-media { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; align-content: start; }
.tab-media--3.lead-portrait > :first-child { grid-row: span 2; }
.tab-media--3.lead-landscape { grid-auto-rows: auto; }
.tab-media--3.lead-landscape > :first-child { grid-column: span 2; aspect-ratio: 16 / 9; }
.tab-media--3.lead-landscape > :not(:first-child) { aspect-ratio: 4 / 3; }
.tab-media--2 > * { aspect-ratio: 3 / 4; }
.tab-media--3.lead-portrait > * { min-height: 190px; }

.media-btn { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--tint-2); }
.media-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.media-btn:hover img { transform: scale(1.05); }
.media-zoom { position: absolute; inset-inline-end: 10px; bottom: 10px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--navy); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
.media-btn:hover .media-zoom, .media-btn:focus-visible .media-zoom { opacity: 1; transform: none; }
.media-zoom .icon { width: 18px; height: 18px; }

/* ---------- Process ---------- */
.process-shape { position: absolute; inset-inline-start: 0; bottom: 0; width: 220px; height: 120px; background: var(--red); clip-path: polygon(0 0, 60% 0, 100% 100%, 0 100%); opacity: .95; }
[dir="rtl"] .process-shape { clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; }
.steps::before { content: ""; position: absolute; top: 46px; inset-inline: 8%; height: 2px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .35) 0 8px, transparent 8px 16px); }
.step { position: relative; padding: 28px 24px; border-radius: var(--radius); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); text-align: center; transition: background .3s, transform .3s var(--ease); }
.step:hover { background: rgba(255, 255, 255, .1); transform: translateY(-4px); }
.step-num { display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto 16px; border-radius: 12px; background: var(--red); color: #fff; font-family: "Montserrat", sans-serif; font-weight: 800; font-size: .9rem; position: relative; }
.step strong { display: block; font-family: var(--font-head); color: #fff; font-size: 1.05rem; }
.step > span:last-child { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: #b9c7e2; }
[dir="rtl"] .step > span:last-child { letter-spacing: 0; font-size: .95rem; }
.process-banner { margin-top: 28px; padding: 26px 30px; border-radius: var(--radius); background: #fff; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; justify-content: space-between; position: relative; z-index: 1; }
.process-banner strong { font-family: var(--font-head); color: var(--navy); font-size: 1.25rem; }

/* ---------- Industries ---------- */
.industries-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.industries .section-head { margin-bottom: 0; }
.industry-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.industry {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius-sm);
  background: var(--tint); border: 1px solid transparent; font-family: var(--font-head); font-weight: 700; color: var(--navy-900); font-size: .95rem;
  transition: background .25s, border-color .25s, transform .25s var(--ease);
}
.industry:hover { background: #fff; border-color: var(--line); transform: translateX(4px); box-shadow: var(--shadow); }
[dir="rtl"] .industry:hover { transform: translateX(-4px); }
.industry-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--navy); color: #fff; transition: background .25s; }
.industry:hover .industry-icon { background: var(--red); }
.industry:last-child:nth-child(odd) { grid-column: span 2; }

/* ---------- Projects ---------- */
.project-list { display: grid; gap: 28px; }
.project { display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.project:nth-child(even) .project-media { order: 2; }
.project-media { border-radius: 0; min-height: 320px; }
.project-index { position: absolute; inset-inline-start: 20px; top: 20px; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--red); color: #fff; font-family: "Montserrat", sans-serif; font-weight: 800; font-size: 1.1rem; box-shadow: var(--shadow); }
.project-body { padding: clamp(24px, 3.5vw, 44px); }
.project-tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--tint-2); color: var(--blue); font-weight: 700; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
[dir="rtl"] .project-tag { letter-spacing: 0; font-size: .85rem; }
.project h3 { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.75rem); margin-bottom: .2em; }
.project-sub { color: var(--blue); font-weight: 600; font-size: .95rem; }
.project-body > p:not([class]) { color: #3c4a60; font-size: .96rem; }
.project-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 20px 0; }
.project-meta div { padding: 12px 14px; background: var(--tint); border-radius: var(--radius-sm); border-top: 3px solid var(--blue); }
.project-meta div.is-value { border-top-color: var(--red); background: var(--navy); }
.project-meta dt { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
[dir="rtl"] .project-meta dt { letter-spacing: 0; font-size: .8rem; }
.project-meta dd { margin: 2px 0 0; font-family: var(--font-head); font-weight: 700; color: var(--navy-900); font-size: .95rem; line-height: 1.3; }
.project-meta .is-value dt { color: #b9c7e2; }
.project-meta .is-value dd { color: #fff; }
.project-scope-title { font-family: var(--font-head); font-weight: 700; font-size: .85rem; color: var(--navy); margin-bottom: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .82rem; color: var(--navy-900); background: #fff; }
.project-highlight { margin: 18px 0 0; font-family: var(--font-head); font-weight: 700; color: var(--red); font-size: .9rem; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 12px; }
.gallery-grid li:nth-child(1) { grid-row: span 2; }
.gallery-grid li:nth-child(2) { grid-column: span 2; }
.gallery-grid li:nth-child(7) { grid-row: span 2; }
.gallery-grid li:nth-child(8) { grid-column: span 2; }

/* ---------- Partners ---------- */
.logo-group-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); text-align: center; margin: 44px 0 18px; display: flex; align-items: center; gap: 16px; }
[dir="rtl"] .logo-group-title { letter-spacing: 0; font-size: 1rem; }
.logo-group-title::before, .logo-group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.logo-group-title:first-of-type { margin-top: 0; }
.logo-card { display: grid; place-items: center; background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--line); padding: 18px 22px; height: 110px; }
.logo-card img { max-height: 70px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(.15); transition: filter .3s, transform .3s; }
.logo-card:hover img { filter: none; transform: scale(1.04); }
.logo-grid--clients { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.logo-grid--clients .logo-card { height: 130px; border-top: 3px solid var(--navy); }
.logo-grid--clients .logo-card:nth-child(3n+1) { border-top-color: var(--red); }

.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 50s linear infinite; }
.marquee-track--contractors { animation-duration: 80s; animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track .logo-card { width: 190px; flex: none; }
@keyframes marquee { to { transform: translateX(calc(-50% - 7px)); } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.office { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.office:first-of-type { border-top: 1px solid var(--line); margin-top: 8px; }
.office-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--tint); color: var(--red); }
.office h3 { font-size: 1.05rem; margin-bottom: .3em; }
.office p { margin: 0; color: var(--muted); }
.office-phone { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 700; color: var(--navy); text-decoration: none; }
.office-phone:hover { color: var(--red); }
.office-phone .icon { width: 16px; height: 16px; }
.contact-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.contact-links a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--navy); color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem; transition: background .25s; word-break: break-word; }
.contact-links a:hover { background: var(--red); }
.contact-links small { display: block; font-size: .72rem; font-weight: 500; color: #b9c7e2; }
.contact-links a:hover small { color: #ffe3e5; }

.contact-form { padding: clamp(24px, 3.5vw, 40px); position: relative; }
.contact-form::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--navy) 0 70%, var(--red) 70%); border-radius: var(--radius) var(--radius) 0 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .88rem; color: var(--navy-900); margin-bottom: 6px; }
.req { color: var(--red); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--tint);
  font: inherit; font-size: 1rem; color: var(--ink); transition: border-color .2s, box-shadow .2s, background .2s;
}
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); background: #fff; box-shadow: 0 0 0 4px rgba(30, 60, 114, .12); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--red); background: #fff5f6; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 600; font-size: .92rem; }
.form-status.is-ok { background: #e8f7ee; color: #146c3c; }
.form-status.is-error { background: #fdecee; color: #a51624; }

.map { margin-top: clamp(40px, 6vw, 64px); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); height: 360px; background: var(--tint); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: saturate(.85); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #b9c7e2; padding-top: 104px; position: relative; overflow: hidden; }
.footer-shape { position: absolute; inset-inline-end: 0; top: 0; width: 280px; height: 56px; background: var(--red); clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%); }
[dir="rtl"] .footer-shape { clip-path: polygon(0 0, 70% 0, 100% 100%, 0 100%); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 48px; position: relative; z-index: 1; }
.footer-brand img { width: 190px; margin-bottom: 18px; }
.footer-brand p { max-width: 36ch; font-size: .92rem; }
.footer-nav { display: grid; gap: 10px; align-content: start; }
.footer-nav a, .footer-contact a { text-decoration: none; transition: color .2s; font-size: .95rem; }
.footer-nav a:hover, .footer-contact a:hover { color: #fff; }
.footer-contact { display: grid; gap: 12px; align-content: start; }
.footer-contact a { display: inline-flex; align-items: center; gap: 10px; }
.footer-contact .icon { color: var(--red); }
.lang-switch--footer { border: 0; padding: 0; color: inherit; font-size: .95rem; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 22px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }
.footer-bottom p { margin: 0; }
.to-top { text-decoration: none; }
.to-top:hover { color: #fff; }

/* ---------- Lightbox ---------- */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 18, 40, .94); color: #fff; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; animation: fadeIn .25s; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; max-width: min(1200px, 88vw); text-align: center; }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: var(--radius-sm); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox figcaption { margin-top: 14px; color: #cfdaf0; font-weight: 500; }
.lb-close, .lb-nav { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; transition: background .2s; }
.lb-close:hover, .lb-nav:hover { background: var(--red); }
.lb-close { top: 20px; inset-inline-end: 20px; }
.lb-prev { inset-inline-start: 20px; top: 50%; translate: 0 -50%; }
.lb-next { inset-inline-end: 20px; top: 50%; translate: 0 -50%; }
.lightbox:not(.has-nav) .lb-nav { display: none; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .main-nav a { padding: 8px 10px; font-size: .88rem; }
  .header-cta { display: none; }
  .logo-grid--clients { grid-template-columns: repeat(3, 1fr); }
  .tabs { grid-template-columns: 1fr; }
  .tab-list { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; scroll-snap-type: x mandatory; }
  .tab-list::-webkit-scrollbar { display: none; }
  .tab { width: auto; white-space: nowrap; flex: none; border-color: var(--line); scroll-snap-align: start; }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: #fff; margin: 0;
    padding: 12px var(--gutter) 24px; box-shadow: 0 20px 40px -20px rgba(18, 39, 82, .35);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s;
  }
  .site-header.is-open .main-nav { opacity: 1; visibility: visible; transform: none; }
  .is-open .nav-toggle .icon-open { display: none; }
  .is-open .nav-toggle .icon-close { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { color: var(--navy-900); padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .main-nav a::after { display: none; }
  .nav-cta-mobile { display: block; }
  .nav-cta-mobile a { color: var(--red); border-bottom: 0; }
  .brand { width: 140px; }

  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .14); }
  .hero-shape { width: 55%; }

  .about-grid, .industries-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-media { margin-inline-end: 18px; }
  .facts, .expertise-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps::before { display: none; }
  .tab-panel { grid-template-columns: 1fr; }
  .project, .project:nth-child(even) { grid-template-columns: 1fr; }
  .project:nth-child(even) .project-media { order: 0; }
  .project-media { min-height: 0; aspect-ratio: 16 / 10; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
  .gallery-grid li:nth-child(n) { grid-row: auto; grid-column: auto; }
  .gallery-grid li:nth-child(1), .gallery-grid li:nth-child(6) { grid-column: span 2; grid-row: span 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 600px) {
  .header-actions { gap: 4px; }
  .lang-switch { padding: 6px 10px; }
  .header-actions .lang-switch .icon { display: none; }
  .hero h1 { font-size: clamp(2rem, 1.2rem + 5vw, 2.6rem); }
  .hero-actions .btn { flex: 1 1 auto; }
  .stat { padding: 16px 18px; }
  .pillars { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .pillars li { padding: 12px 10px; }
  .facts, .expertise-grid, .steps, .industry-list { grid-template-columns: 1fr; }
  .industry:last-child:nth-child(odd) { grid-column: auto; }
  .form-row, .contact-links { grid-template-columns: 1fr; gap: 0; }
  .contact-links { gap: 10px; }
  .logo-grid--clients { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .logo-card { height: 92px; padding: 14px; }
  .logo-grid--clients .logo-card { height: 110px; }
  .marquee-track .logo-card { width: 150px; }
  .mini-steps ol { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .mini-steps li { font-size: .62rem; }
  .tab-media--3 > :first-child { grid-row: auto; grid-column: span 2; aspect-ratio: 4 / 3; }
  .tab-media--3 > * { min-height: 140px; }
  .mission::after { width: 22%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .site-footer { padding-top: 80px; }
  .footer-shape { width: 160px; height: 36px; }
  .map { height: 280px; }
  .lb-nav { top: auto; bottom: 20px; translate: none; }
  .lb-prev { inset-inline-start: calc(50% - 60px); }
  .lb-next { inset-inline-end: calc(50% - 60px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee-track [aria-hidden="true"] { display: none; }
  .marquee { mask-image: none; -webkit-mask-image: none; }
}

@media print {
  .site-header, .map, .contact-form, .lightbox, .hero-shape { display: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
