/* ==========================================================================
   Jumixa public-site design system (Phase 5A)
   Loaded only by layouts/main.php. The admin and client areas keep main.css.

   1. Tokens          5. Buttons         9.  Header / footer bands
   2. Base / reset    6. Cards           10. Product software access
   3. Layout          7. Forms / alerts  11. Blog / Insights
   4. Typography      8. Accessibility   12. Arabic / RTL
                         + motion        13. Reduced motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand */
  --color-primary: #2563EB;
  --color-primary-hover: #1D4ED8;
  --color-primary-active: #1E40AF;
  --color-primary-soft: #EEF3FE;
  --color-primary-text: #1D4ED8;      /* blue text on light surfaces (AA) */
  --color-navy: #0B132B;
  --color-navy-2: #121C3B;
  --color-gold: #C9A227;              /* decorative accents only (rules, icons, small marks) */
  --color-gold-text: #876A0E;         /* gold as text on light surfaces (AA) */

  /* Surfaces and text (light-first) */
  --bg: #F7F8FB;
  --surface: #FFFFFF;
  --surface-2: #F1F4F9;
  --border: #E3E8EF;
  --border-strong: #CBD5E1;
  --text: #0B132B;
  --text-2: #445066;
  --muted: #5B6678;

  /* Feedback */
  --success: #15803D;  --success-soft: #ECFDF3;  --success-border: #A7E3BD;
  --warning: #B45309;  --warning-soft: #FFF7EB;  --warning-border: #F5CF95;
  --error:   #B91C1C;  --error-soft:   #FEF2F2;  --error-border:   #F5B5B5;
  --info:    #1D4ED8;  --info-soft:    #EEF3FE;  --info-border:    #BFD0FA;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-display: clamp(2.375rem, 1.55rem + 3.4vw, 4rem);
  --fs-h1: clamp(2rem, 1.45rem + 2.3vw, 3.125rem);
  --fs-h2: clamp(1.625rem, 1.3rem + 1.4vw, 2.375rem);
  --fs-h3: clamp(1.25rem, 1.12rem + 0.55vw, 1.5rem);
  --fs-h4: 1.125rem;
  --fs-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --fs-body: 1rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.78rem;
  --lh-tight: 1.15;
  --lh-heading: 1.25;
  --lh-body: 1.65;
  --tracking-tight: -0.022em;

  /* Spacing (4px base) */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem; --space-5: 1.5rem;
  --space-6: 2rem; --space-7: 3rem; --space-8: 4rem; --space-9: 6rem; --space-10: 8rem;
  --section-y: clamp(4rem, 2.9rem + 4.4vw, 6.5rem);
  --gutter: clamp(1rem, 0.6rem + 1.8vw, 2rem);
  --container: 1240px;
  --header-h: 72px;

  /* Shape and depth */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(11, 19, 43, 0.05), 0 1px 3px rgba(11, 19, 43, 0.06);
  --shadow-md: 0 6px 16px -4px rgba(11, 19, 43, 0.09), 0 2px 4px -2px rgba(11, 19, 43, 0.05);
  --shadow-lg: 0 20px 44px -14px rgba(11, 19, 43, 0.20);
  --ring: 0 0 0 3px rgba(37, 99, 235, 0.22);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 150ms;
  --dur: 250ms;
}

/* Dark contrast bands (footer now; CTA bands in later phases via .theme-dark) */
.theme-dark,
.footer-premium {
  --bg: #0B132B;
  --surface: #121C3B;
  --surface-2: #18244A;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.20);
  --text: #F3F6FB;
  --text-2: #C3CCDB;
  --muted: #98A4B8;
  --color-primary-text: #93B4FF;
  --color-primary-soft: rgba(147, 180, 255, 0.12);
  --color-gold-text: #E2C35A;
  --shadow-sm: none;
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 44px -14px rgba(0, 0, 0, 0.55);
  background-color: var(--bg);
  color: var(--text);
}

/* Legacy token names used by existing views (inline styles), mapped to the new system.
   Declared on both scopes so they resolve against the local surface colours. */
:root,
.theme-dark,
.footer-premium {
  --bg-primary: var(--bg);
  --bg-secondary: var(--surface);
  --bg-tertiary: var(--surface-2);
  --border-color: var(--border);
  --border-color-hover: var(--border-strong);
  --text-primary: var(--text);
  --text-secondary: var(--text-2);
  --text-muted: var(--muted);
  --accent-glow: rgba(37, 99, 235, 0.10);
  --glass-bg: var(--surface);
  --glass-border: var(--border);
  --glass-blur: none;
  --font-serif: var(--font-sans);
  --transition-smooth: all var(--dur) var(--ease);
  --transition-fast: all var(--dur-fast) ease;
}
/* HSL triplets used as hsl(var(--accent-*)) in existing views */
:root {
  --accent-blue: 221, 83%, 53%;   /* #2563EB */
  --accent-gold: 44, 81%, 29%;    /* #876A0E – readable gold text */
  --accent-red: 0, 73%, 42%;      /* #B91C1C */
}
.theme-dark,
.footer-premium {
  --accent-blue: 222, 100%, 79%;  /* #93B4FF */
  --accent-gold: 46, 71%, 62%;    /* #E2C35A */
  --accent-red: 0, 86%, 74%;
}

/* --------------------------------------------------------------------------
   2. Base / reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  /* Clip decorative overflow without creating a scroll container (keeps position:sticky working) */
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;   /* fallback for browsers without 'clip' */
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01';
}

img, svg, video { max-width: 100%; }
img { height: auto; }
a { color: var(--color-primary-text); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--border); }
::selection { background: rgba(37, 99, 235, 0.18); }
main:focus { outline: none; }

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid { display: grid; gap: clamp(1.25rem, 0.9rem + 1.2vw, 2rem); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 992px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

.section-padding { padding-block: var(--section-y); }
.section-alt { background-color: var(--surface); border-block: 1px solid var(--border); }
.text-center { text-align: center; }

/* --------------------------------------------------------------------------
   4. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 700;
  line-height: var(--lh-heading);
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: var(--tracking-tight); }
h2 { font-size: var(--fs-h2); letter-spacing: -0.018em; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
p { text-wrap: pretty; }

.hero-title {
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -0.018em;
  margin-bottom: var(--space-4);
}

.section-subtitle,
.lead {
  font-size: var(--fs-lead);
  line-height: 1.7;
  color: var(--text-2);
  max-width: 62ch;
}
.section-subtitle { margin-bottom: var(--space-7); }

/* Small label above headings: uppercase text with a short gold rule */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-text);
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: '';
  width: 1.5rem;
  height: 2px;
  border-radius: 2px;
  background: var(--color-gold);
}

/* Legacy decorative text classes: now calm, solid colours (no gradient text) */
.text-gradient { color: var(--text); background: none; -webkit-text-fill-color: currentColor; }
.gold-gradient { color: var(--color-gold-text); background: none; -webkit-text-fill-color: currentColor; }
.serif-font { font-family: inherit; font-style: normal; font-weight: 600; color: var(--color-primary-text); }
.text-muted { color: var(--muted); }

/* --------------------------------------------------------------------------
   5. Buttons
   primary · secondary · outline · ghost/link · disabled · loading · sizes
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  color: var(--btn-fg);
  background-color: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
  transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease,
              color var(--dur-fast) ease, box-shadow var(--dur) var(--ease), transform var(--dur-fast) ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn i { font-size: 0.9em; }

.btn-primary {
  --btn-bg: var(--color-primary);
  --btn-fg: #FFFFFF;
  box-shadow: 0 1px 2px rgba(11, 19, 43, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn-primary:hover { --btn-bg: var(--color-primary-hover); box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.55); }
.btn-primary:active { --btn-bg: var(--color-primary-active); }

.btn-secondary {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-border: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { --btn-bg: var(--surface-2); --btn-border: #94A3B8; }

.btn-outline,
.btn-outline-gold {
  --btn-bg: transparent;
  --btn-fg: var(--color-primary-text);
  --btn-border: currentColor;
}
.btn-outline:hover,
.btn-outline-gold:hover { --btn-bg: var(--color-primary-soft); }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
}
.btn-ghost:hover { --btn-bg: var(--surface-2); }

.btn-link {
  --btn-fg: var(--color-primary-text);
  min-height: 0;
  padding: 0.25rem 0;
  border: 0;
  border-radius: var(--radius-sm);
}
.btn-link:hover { text-decoration: underline; }

.btn-sm { min-height: 38px; padding: 0.5rem 0.95rem; font-size: 0.875rem; border-radius: var(--radius-sm); }
.btn-lg { min-height: 52px; padding: 0.85rem 1.6rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

.btn:disabled,
.btn[aria-disabled="true"],
.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  pointer-events: none;
}

/* Loading state: keeps the button width, hides the label and shows a spinner */
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.1em;
  height: 1.1em;
  border-radius: 50%;
  border: 2px solid var(--btn-fg);
  border-inline-end-color: transparent;
  animation: jx-spin 0.7s linear infinite;
}
@keyframes jx-spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   6. Cards
   -------------------------------------------------------------------------- */
.card,
.premium-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.premium-card:hover,
.card-interactive:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.premium-card-icon {
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  font-size: 1.25rem;
  color: var(--color-primary-text);
  background-color: var(--color-primary-soft);
  border-radius: var(--radius-md);
}

/* Former glass panel: now a solid, quiet surface */
.glass-panel {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1.1rem + 1.5vw, 2.5rem);
  box-shadow: var(--shadow-md);
}

/* --------------------------------------------------------------------------
   7. Forms and alerts
   -------------------------------------------------------------------------- */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
}
.form-hint { margin-top: 0.4rem; font-size: var(--fs-xs); color: var(--muted); }
.form-error { margin-top: 0.4rem; font-size: var(--fs-xs); font-weight: 500; color: var(--error); }

.form-control {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 1rem;              /* 16px: prevents zoom-on-focus on iOS */
  line-height: 1.4;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 1px rgba(11, 19, 43, 0.03);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.form-control::placeholder { color: #8A94A6; opacity: 1; }
.form-control:hover { border-color: #94A3B8; }
.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--ring);
}
textarea.form-control { min-height: 140px; resize: vertical; }
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235B6678' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
}
[dir="rtl"] select.form-control { background-position: left 0.9rem center; }
.form-control:disabled { background-color: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.form-control.is-invalid,
.form-control[aria-invalid="true"] { border-color: var(--error); }
.form-control.is-invalid:focus,
.form-control[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.18); }
.form-control.is-valid { border-color: var(--success); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--color-primary); }

.alert {
  display: block;
  padding: 0.9rem 1.1rem;
  margin-bottom: var(--space-5);
  font-size: 0.9375rem;
  line-height: 1.55;
  border: 1px solid var(--info-border);
  border-radius: var(--radius-md);
  background-color: var(--info-soft);
  color: var(--color-navy);
}
.alert-success { background-color: var(--success-soft); border-color: var(--success-border); color: #14532D; }
.alert-danger,
.alert-error   { background-color: var(--error-soft);   border-color: var(--error-border);   color: #7F1D1D; }
.alert-warning { background-color: var(--warning-soft); border-color: var(--warning-border); color: #78350F; }
.alert-success i { color: var(--success); }
.alert-danger i, .alert-error i { color: var(--error); }
.global-flash { background-color: var(--surface) !important; border-inline-start-width: 4px; }

/* --------------------------------------------------------------------------
   8. Accessibility and motion
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}
.footer-premium :focus-visible,
.theme-dark :focus-visible { outline-color: #93B4FF; }
.btn:focus-visible { outline-offset: 3px; border-radius: var(--radius-md); }

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  z-index: 10001;
  padding: 0.75rem 1.1rem;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--color-navy);
  border-radius: var(--radius-md);
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Scroll reveal (core.js hides only blocks below the fold, then fades them in) */
.reveal-up.reveal-pending { opacity: 0; transform: translateY(14px); }
.reveal-up.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

/* Optional CMS 3D hero canvas (only loaded when such a section exists) */
#three-hero-container {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

.theme-toggle-btn { display: none !important; }

/* --------------------------------------------------------------------------
   9. Header, mobile navigation and footer (Phase 5B)
   Desktop navigation from 1200px; below that the menu button opens a panel
   (full-width sheet on phones, side drawer on tablets).
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur) var(--ease);
}
.site-header.scrolled { box-shadow: 0 8px 24px -16px rgba(11, 19, 43, 0.28); }
.site-header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 100%;
}

/* Logo. The default logo file is a wide transparent canvas: crop it to the wordmark band */
.site-logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.brand-logo { display: block; height: 40px; width: auto; max-width: 200px; object-fit: contain; }
.brand-logo--default {
  height: 28px;
  max-width: none;
  aspect-ratio: 1024 / 150;
  object-fit: cover;
  object-position: 50% 47%;
}
.logo-text {
  display: flex;
  align-items: center;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
}
.logo-x { color: var(--color-gold); }

/* Desktop navigation */
.site-nav { margin-inline: auto; }
.site-nav-list { display: flex; align-items: center; gap: 0.15rem; list-style: none; }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 0.8rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.nav-link:hover { color: var(--text); background-color: var(--surface-2); }
.nav-link.active { color: var(--text); font-weight: 600; }
.nav-link.active::after {
  content: '';
  position: absolute;
  inset-inline: 0.8rem;
  bottom: 0.2rem;
  height: 2px;
  border-radius: 2px;
  background: var(--color-primary);
}

/* Header actions */
.site-header-actions { display: flex; align-items: center; gap: 0.5rem; flex: 0 0 auto; }
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0 0.7rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.lang-switch:hover { color: var(--text); background-color: var(--surface-2); }
.lang-switch i { font-size: 0.85rem; color: var(--muted); }
.lang-switch [lang="ar"], .lang-switch:lang(ar) { font-family: 'Tajawal', var(--font-sans); }
.header-signin { color: var(--text-2); }

/* Menu button: three bars that turn into a cross while the menu is open */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  padding: 0;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.menu-toggle:hover { background-color: var(--surface-2); }
.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background-color: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur-fast) ease;
}
.menu-toggle-bars { position: relative; }
.menu-toggle-bars::before,
.menu-toggle-bars::after { content: ''; position: absolute; inset-inline-start: 0; }
.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars { background-color: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { transform: translateY(6px) rotate(45deg); background-color: var(--text); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); background-color: var(--text); }

/* Signed-in customer menu */
.client-menu { position: relative; }
.client-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.client-menu-trigger:hover { background-color: var(--surface-2); }
.client-menu-trigger .fa-circle-user { color: var(--color-primary-text); }
.client-menu-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-menu-caret { font-size: 0.65rem; color: var(--muted); transition: transform var(--dur-fast) ease; }
.client-menu-trigger[aria-expanded="true"] .client-menu-caret { transform: rotate(180deg); }
.client-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 1001;
  min-width: 220px;
  padding: 0.4rem;
  list-style: none;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.client-menu-list a,
.mobile-nav-account a,
.client-menu-list button.client-menu-signout,
.mobile-nav-account button.client-menu-signout {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.client-menu-list a:hover,
.client-menu-list a:focus-visible,
.mobile-nav-account a:hover { color: var(--text); background-color: var(--surface-2); }
/* Sign out is a POST form (CSRF-protected); its button looks exactly like the menu links */
.signout-form { margin: 0; }
button.client-menu-signout { width: 100%; margin: 0; background: none; border: 0; font: inherit; font-size: 0.9rem; line-height: inherit; text-align: start; cursor: pointer; }
button.client-menu-signout:hover, button.client-menu-signout:focus-visible { background-color: var(--surface-2); }
.client-menu-list i, .mobile-nav-account i { width: 1rem; text-align: center; color: var(--muted); }
.client-menu-sep { height: 1px; margin: 0.3rem 0.2rem; background-color: var(--border); }
a.client-menu-signout, a.client-menu-signout i,
.client-menu-list button.client-menu-signout, .mobile-nav-account button.client-menu-signout, button.client-menu-signout i { color: var(--error); }

/* Mobile / tablet navigation panel */
.mobile-nav-backdrop {
  position: fixed;
  inset-block: var(--header-h) 0;
  inset-inline: 0;
  z-index: 997;
  background-color: rgba(11, 19, 43, 0.45);
}
.mobile-nav-panel {
  position: fixed;
  inset-block-start: var(--header-h);
  inset-inline: 0;
  z-index: 998;
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.5rem var(--gutter) 1.5rem;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.mobile-nav-panel.is-open { opacity: 1; transform: none; }
.mobile-nav-panel[hidden], .mobile-nav-backdrop[hidden] { display: none; }
.mobile-nav-list { list-style: none; }
.nav-link-mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 52px;
  padding: 0.7rem 0.25rem;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.nav-link-mobile i { font-size: 0.75rem; color: var(--muted); }
.nav-link-mobile:hover { color: var(--color-primary-text); }
.nav-link-mobile.active { color: var(--color-primary-text); font-weight: 600; }
.nav-link-mobile.active i { color: var(--color-primary-text); }
.mobile-nav-actions { display: grid; gap: 0.75rem; margin-top: 1.25rem; }
.mobile-nav-account { padding: 0.5rem; border: 1px solid var(--border); border-radius: var(--radius-md); }
.mobile-nav-account ul { list-style: none; }
.mobile-nav-account-name { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.7rem 0.6rem; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); margin-bottom: 0.3rem; }
.mobile-nav-lang { display: flex; gap: 0.5rem; }
.mobile-nav-lang a {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.mobile-nav-lang a:hover { color: var(--text); border-color: var(--border-strong); }
.mobile-nav-lang a.is-current { color: var(--text); font-weight: 600; background-color: var(--surface-2); border-color: var(--border-strong); }
.mobile-nav-lang a[lang="ar"] { font-family: 'Tajawal', var(--font-sans); }

/* Page behind the open menu does not scroll */
html.is-nav-open,
html.is-nav-open body { overflow: hidden; }
/* Floating chat / WhatsApp launchers would sit on top of the open menu */
html.is-nav-open .whatsapp-fallback-btn,
html.is-nav-open .chatbot-fab,
html.is-nav-open .chatbot-window { visibility: hidden; }

/* Breakpoints: desktop navigation needs ~1150px (Arabic labels included); below 1200px use the menu */
@media (max-width: 1199.98px) {
  .site-nav, .header-desktop-only { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-header-actions { margin-inline-start: auto; }
}
@media (min-width: 640px) and (max-width: 1199.98px) {
  /* Tablets: the panel is a drawer on the inline-end side */
  .mobile-nav-panel {
    inset-inline-start: auto;
    width: min(400px, 100%);
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    padding-block: 1rem 2rem;
    border-bottom: 0;
    border-inline-start: 1px solid var(--border);
    transform: translateX(12px);
  }
  [dir="rtl"] .mobile-nav-panel { transform: translateX(-12px); }
  .mobile-nav-panel.is-open { transform: none; }
}
@media (max-width: 639.98px) {
  .header-cta { display: none; }
  .site-header-actions { gap: 0.35rem; }
}
@media (max-width: 399.98px) {
  .site-header-inner { gap: 0.5rem; }
  .brand-logo { height: 32px; max-width: 150px; }
  .brand-logo--default { height: 22px; max-width: none; }
  .lang-switch { padding: 0 0.5rem; }
  .lang-switch i { display: none; }
}

/* Footer (dark navy band; tokens come from the .footer-premium scope in section 1) */
.site-footer {
  padding-block: clamp(3.5rem, 2.6rem + 3vw, 5rem) 2rem;
  font-size: 0.9375rem;
  color: var(--text-2);
}
.site-footer-grid {
  display: grid;
  grid-template-columns: minmax(250px, 1.5fr) repeat(4, minmax(0, 1fr));
  gap: 2.5rem 2rem;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 0.85rem;
  background-color: #FFFFFF;           /* the full-colour logo needs a light surface to stay legible */
  border-radius: var(--radius-md);
  text-decoration: none;
}
.footer-logo { justify-self: start; width: fit-content; }
.footer-logo .brand-logo { height: 36px; }
.footer-logo .brand-logo--default { height: 24px; }
.footer-logo .logo-text { color: var(--color-navy); }
.site-footer-desc { margin-top: 1.25rem; max-width: 38ch; line-height: 1.65; color: var(--text-2); }
.site-footer-facts { display: grid; gap: 0.55rem; margin-top: 1.25rem; list-style: none; font-size: 0.875rem; }
.site-footer-facts li { display: flex; align-items: flex-start; gap: 0.6rem; }
.site-footer-facts i { width: 1rem; margin-top: 0.25rem; text-align: center; color: var(--color-gold-text); flex: 0 0 auto; }
.site-footer-verify { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.site-footer-verify-title { font-size: 0.8125rem; font-weight: 600; color: var(--text); margin-bottom: 0.6rem; }
.site-footer-verify-text { font-size: 0.8125rem; color: var(--muted); margin-bottom: 0.75rem; }
.site-footer-verify-badge {
  display: inline-block;
  max-width: 230px;
  padding: 0.35rem;
  background-color: #FFFFFF;
  border-radius: var(--radius-md);
  line-height: 0;
}
.site-footer-verify-badge img { width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }
a.site-footer-verify-badge:hover { box-shadow: 0 0 0 2px var(--color-gold-text); }

.site-footer-heading {
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.site-footer-col ul { display: grid; gap: 0.7rem; list-style: none; }
.site-footer-col a,
.site-footer-legal a {
  color: var(--text-2);
  text-decoration: none;
  text-underline-offset: 4px;
  transition: color var(--dur-fast) ease;
}
.site-footer-col a:hover,
.site-footer-legal a:hover { color: var(--text); text-decoration: underline; }
.site-footer-col a.site-footer-more { color: var(--color-primary-text); font-weight: 500; }
.site-footer-more i { font-size: 0.75em; margin-inline-start: 0.2rem; }
.site-footer-contact a { display: inline-flex; align-items: center; gap: 0.6rem; }
.site-footer-contact i { width: 1rem; text-align: center; color: var(--color-gold-text); }
.site-footer-col .site-footer-social { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.site-footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1rem;
  color: var(--text-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
}
.site-footer-social a:hover { color: var(--text); background-color: rgba(255, 255, 255, 0.06); text-decoration: none; }

.site-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
}
.site-footer-legal { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; list-style: none; }
.site-footer-legal a { color: var(--muted); }

[dir="rtl"] .site-footer-heading { letter-spacing: normal; text-transform: none; font-size: 0.875rem; }

@media (max-width: 1099.98px) {
  .site-footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .site-footer-brand {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 0 2.5rem;
    align-items: start;
  }
  .site-footer-brand > .footer-logo, .site-footer-brand > .site-footer-desc { grid-column: 1; }
  .site-footer-brand > .site-footer-facts { grid-column: 1; }
  .site-footer-brand > .site-footer-verify { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; padding-top: 0; border-top: 0; }
}
@media (max-width: 759.98px) {
  .site-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 1.5rem; }
  .site-footer-brand { display: block; }
  .site-footer-brand > .site-footer-verify { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
  .site-footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 359.98px) {
  .site-footer-grid { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   10. Products: independently hosted software access
   -------------------------------------------------------------------------- */
.product-type-badge {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-navy);
  background-color: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
[dir="rtl"] .product-type-badge { letter-spacing: normal; text-transform: none; font-size: 0.8rem; }
.product-card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; }
.product-access {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: var(--space-6);
  padding: 1.1rem;
  background-color: var(--color-primary-soft);
  border: 1px solid var(--info-border);
  border-radius: var(--radius-md);
}
.product-access-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-text);
}
.product-access .btn { white-space: normal; }
.product-access-note { font-size: var(--fs-xs); color: var(--muted); }

/* --------------------------------------------------------------------------
   11. Blog / Insights (logical properties: LTR and RTL)
   -------------------------------------------------------------------------- */
.blog-breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: var(--fs-sm); color: var(--muted); margin-block-end: 2rem; }
.blog-breadcrumbs a { color: var(--text-2); text-decoration: none; }
.blog-breadcrumbs a:hover { color: var(--color-primary-text); }
.blog-breadcrumbs [aria-current] { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
.blog-hero { max-width: 850px; margin-block-end: 3rem; }
.blog-hero .hero-title { margin-block-end: 1.25rem; font-size: var(--fs-h1); }
.blog-eyebrow { display: block; font-size: var(--fs-xs); text-transform: uppercase; color: var(--color-primary-text); letter-spacing: 0.08em; font-weight: 600; margin-block-end: 1rem; }
.blog-lead { color: var(--text-2); font-size: var(--fs-lead); line-height: 1.75; }
.blog-cats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block-end: 3rem; }
.blog-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.8rem; border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font-size: var(--fs-xs); font-weight: 500; text-decoration: none; list-style: none; line-height: 1.45; }
a.blog-chip:hover, .blog-chip.is-active { border-color: var(--color-primary); color: var(--color-primary-text); background: var(--color-primary-soft); }
.blog-chip-cat { color: var(--color-primary-text); border-color: var(--info-border); background: var(--color-primary-soft); }
.blog-chip-count { font-size: 0.72rem; opacity: 0.75; }
.blog-section { margin-block-end: 4rem; }
.blog-section-title { font-size: var(--fs-h3); margin-block-end: 1.5rem; color: var(--text); }
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 0.9rem + 1.2vw, 2rem); }
@media (max-width: 992px) { .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card { padding: 0; overflow: hidden; }
.blog-card-media { display: block; aspect-ratio: 3 / 2; background: var(--surface-2); overflow: hidden; }
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s var(--ease); }
.blog-card:hover .blog-card-media img { transform: scale(1.03); }
.blog-card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; align-items: flex-start; }
.blog-card-title { font-size: 1.15rem; line-height: 1.35; margin: 0; }
.blog-card-title a { color: var(--text); text-decoration: none; }
.blog-card-title a:hover { color: var(--color-primary-text); }
.blog-card-excerpt { color: var(--text-2); font-size: 0.9375rem; line-height: 1.65; margin: 0; flex: 1; }
.blog-meta { display: flex; flex-wrap: wrap; gap: 0.45rem; color: var(--muted); font-size: var(--fs-xs); }
.blog-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; }
.blog-empty { text-align: center; padding: 4rem 2rem; }
.blog-empty p { color: var(--text-2); margin-block-end: 1.5rem; font-size: var(--fs-lead); }
.blog-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem; margin-block-start: 1rem; }
.blog-page-link { min-width: 2.75rem; min-height: 2.75rem; padding: 0.5rem 0.9rem; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  text-decoration: none; text-align: center; display: inline-flex; gap: 0.4rem; align-items: center; justify-content: center; }
a.blog-page-link:hover { border-color: var(--color-primary); color: var(--color-primary-text); }
.blog-page-link.is-current { background: var(--color-primary); border-color: transparent; color: #FFFFFF; }
.blog-page-gap { color: var(--muted); }

/* Article */
.blog-article .container { max-width: 860px; }
.blog-article-header { margin-block-end: 2.5rem; display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.blog-article-title { font-size: var(--fs-h1); line-height: 1.15; font-weight: 700; color: var(--text); }
.blog-article-image { margin: 0 0 2.5rem; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.blog-article-image img { width: 100%; height: auto; display: block; }
.blog-preview-note { margin-block-end: 2rem; }
.blog-content { color: #26324A; font-size: 1.0625rem; line-height: 1.85; overflow-wrap: anywhere; }
.blog-content > * + * { margin-block-start: 1.2rem; }
.blog-content h2 { font-size: 1.6rem; color: var(--text); margin-block-start: 2.5rem; line-height: 1.3; }
.blog-content h3 { font-size: 1.3rem; color: var(--text); margin-block-start: 2rem; line-height: 1.35; }
.blog-content h4 { font-size: 1.1rem; color: var(--text); margin-block-start: 1.5rem; }
.blog-content a { color: var(--color-primary-text); text-decoration: underline; text-underline-offset: 3px; }
.blog-content ul, .blog-content ol { padding-inline-start: 1.5rem; }
.blog-content li + li { margin-block-start: 0.4rem; }
.blog-content blockquote { border-inline-start: 3px solid var(--color-gold); padding-inline-start: 1.2rem; color: var(--text); font-style: italic; }
[dir="rtl"] .blog-content blockquote { font-style: normal; }
.blog-content img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.blog-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.blog-content th, .blog-content td { border: 1px solid var(--border); padding: 0.6rem 0.8rem; text-align: start; }
.blog-content code { background: var(--surface-2); padding: 0.1rem 0.35rem; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9em; direction: ltr; unicode-bidi: isolate; }
.blog-content pre { background: var(--color-navy); color: #E6EBF5; padding: 1rem 1.2rem; border-radius: var(--radius-md); overflow-x: auto; direction: ltr; text-align: left; }
.blog-content pre code { background: none; padding: 0; color: inherit; }
.blog-content hr { border: 0; border-top: 1px solid var(--border); margin-block: 2rem; }
.blog-article-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-block: 2.5rem; }
.blog-tags-label { color: var(--muted); font-size: var(--fs-sm); }
.blog-cta { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; margin-block: 3rem 4rem; }
.blog-cta-title { font-size: 1.3rem; color: var(--text); margin-block-end: 0.5rem; }
.blog-cta p { color: var(--text-2); max-width: 55ch; }
.blog-cta-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.blog-back a { color: var(--text-2); text-decoration: none; display: inline-flex; gap: 0.5rem; align-items: center; }
.blog-back a:hover { color: var(--color-primary-text); }

/* --------------------------------------------------------------------------
   11b. Homepage (Phase 5C)
   -------------------------------------------------------------------------- */
.home-section { padding-block: var(--section-y); }
.home-section--alt { background-color: var(--surface); border-block: 1px solid var(--border); }
.home-section-head { max-width: 720px; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); }
.home-section-head .section-title { margin-bottom: 0.75rem; }
.home-section-head .lead { margin: 0; }
.home-section-head--split {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}
.home-section-head--split > div { max-width: 680px; }
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--color-primary-text);
  text-decoration: none;
}
.home-link:hover { text-decoration: underline; }
.home-link i { font-size: 0.8em; transition: transform var(--dur-fast) ease; }
.home-link:hover i { transform: translateX(3px); }
[dir="rtl"] .home-link:hover i { transform: scaleX(-1) translateX(3px); }

/* Hero: light surface with one restrained blue tint */
.home-hero {
  padding-block: clamp(2.25rem, 1.2rem + 4vw, 5rem) clamp(2.75rem, 1.6rem + 4.5vw, 5.5rem);
  background:
    radial-gradient(55% 60% at 88% 0%, rgba(37, 99, 235, 0.09), transparent 70%),
    linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
[dir="rtl"] .home-hero {
  background:
    radial-gradient(55% 60% at 12% 0%, rgba(37, 99, 235, 0.09), transparent 70%),
    linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%);
}
.home-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}
.home-hero-title {
  font-size: clamp(2.125rem, 1.35rem + 3.1vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin-bottom: 1.25rem;
}
.home-hero-lead { font-size: var(--fs-lead); line-height: 1.7; color: var(--text-2); max-width: 58ch; margin-bottom: 2rem; }
.home-hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.home-hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.75rem;
  list-style: none;
  font-size: 0.875rem;
  color: var(--muted);
}
.home-hero-facts li { display: inline-flex; align-items: center; gap: 0.45rem; }
.home-hero-facts i { color: var(--color-gold); }

/* Hero illustration: a stylised product dashboard (decorative) */
.home-hero-visual { position: relative; padding: 1.25rem 0.5rem 1.75rem; }
.hv-window {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hv-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding-inline: 14px;
  background-color: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.hv-bar > span { width: 9px; height: 9px; border-radius: 50%; background-color: var(--border-strong); }
.hv-url { flex: 0 1 55%; height: 14px; margin-inline-start: 12px; background: #FFFFFF; border: 1px solid var(--border); border-radius: var(--radius-pill); }
.hv-body { display: grid; grid-template-columns: 60px minmax(0, 1fr); min-height: 300px; }
.hv-side { display: grid; align-content: start; gap: 12px; padding: 18px 14px; background-color: var(--color-navy); }
.hv-side i { display: block; height: 8px; border-radius: 4px; background-color: rgba(255, 255, 255, 0.22); }
.hv-side i:first-child { background-color: var(--color-primary); }
.hv-main { display: grid; gap: 14px; padding: 18px; align-content: start; }
.hv-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hv-kpi { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); }
.hv-kpi b, .hv-kpi s { display: block; border-radius: 4px; }
.hv-kpi b { width: 55%; height: 7px; background-color: var(--border-strong); }
.hv-kpi s { width: 75%; height: 13px; margin-top: 9px; background-color: var(--color-navy); opacity: 0.85; }
.hv-kpi--accent s { background-color: var(--color-primary); opacity: 1; }
.hv-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.hv-chart span {
  flex: 1;
  height: var(--h);
  border-radius: 4px 4px 0 0;
  background-color: #DCE6FC;
}
.hv-chart span:nth-child(6) { background-color: #93B4FF; }
.hv-chart span:nth-child(8) { background-color: var(--color-primary); }
.hv-rows { display: grid; gap: 8px; }
.hv-rows i { display: block; height: 9px; border-radius: 4px; background-color: var(--surface-2); }
.hv-rows i:nth-child(2) { width: 85%; } .hv-rows i:nth-child(3) { width: 65%; }
.hv-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}
.hv-chip i { color: var(--color-primary); }
.hv-chip--ai { inset-inline-start: -0.75rem; bottom: 0.5rem; }
.hv-chip--app { inset-inline-end: -0.5rem; top: 0; }
.hv-chip--app i { color: var(--color-gold); }

/* What we offer */
.home-offer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 0.7rem + 1vw, 1.5rem); }
.home-offer h3 { font-size: 1.1875rem; margin-bottom: 0.5rem; }
.home-offer p { color: var(--text-2); margin-bottom: 1.25rem; flex: 1; }
.home-offer .home-link { margin-top: auto; }

/* Why Jumixa + process */
.home-why { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: start; }
.home-why-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1.75rem; list-style: none; }
.home-why-list li { display: flex; gap: 1rem; align-items: flex-start; }
.home-why-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-primary-text);
  background-color: var(--color-primary-soft);
  border-radius: var(--radius-md);
}
.home-why-list h3 { font-size: 1.0625rem; margin-bottom: 0.3rem; }
.home-why-list p { font-size: 0.9375rem; color: var(--text-2); }
.home-process {
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.home-process-title {
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
[dir="rtl"] .home-process-title { letter-spacing: normal; text-transform: none; font-size: 0.9375rem; }
.home-process-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; list-style: none; }
.home-process-steps li { display: grid; align-content: start; gap: 0.2rem; padding-top: 0.9rem; border-top: 2px solid var(--border-strong); }
.home-process-steps li:first-child { border-top-color: var(--color-primary); }
.home-process-num { font-size: 0.8125rem; font-weight: 700; color: var(--color-gold-text); }
.home-process-steps strong { font-size: 1rem; color: var(--text); }
.home-process-steps li > span:last-child { font-size: 0.875rem; color: var(--text-2); }

/* Products (database) */
.home-products-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 0.7rem + 1vw, 1.5rem); }
.product-tile {
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.product-tile:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-tile--software { border-color: var(--info-border); }
.product-tile-media { position: relative; display: block; aspect-ratio: 3 / 2; background-color: var(--surface-2); overflow: hidden; }
.product-tile-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-tile-body { display: flex; flex-direction: column; gap: 0.6rem; flex: 1; padding: 1.25rem 1.4rem 1.4rem; }
.product-tile-title { font-size: 1.125rem; line-height: 1.35; }
.product-tile-title a { color: var(--text); text-decoration: none; }
.product-tile-title a:hover { color: var(--color-primary-text); }
.product-tile-desc { flex: 1; font-size: 0.9375rem; line-height: 1.6; color: var(--text-2); }
.product-tile-host { display: flex; align-items: center; gap: 0.4rem; font-size: var(--fs-xs); color: var(--muted); }
.product-tile-host i { color: var(--color-primary-text); }
.product-tile-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.product-tile-price { font-size: 1.0625rem; font-weight: 700; color: var(--text); }
.product-tile-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-inline-start: auto; }

/* Services (database) */
.home-services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; list-style: none; }
.home-service {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.home-service .premium-card-icon { margin-bottom: 0; width: 2.75rem; height: 2.75rem; font-size: 1.1rem; }
.home-service h3 { font-size: 1.0625rem; margin-bottom: 0.3rem; }
.home-service p { font-size: 0.875rem; line-height: 1.6; color: var(--text-2); }

/* Projects (database) / capabilities fallback */
.home-projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 0.7rem + 1vw, 1.5rem); }
.home-project-img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-md); margin-bottom: 1rem; }
.home-project-cat { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-primary-text); margin-bottom: 0.4rem; }
[dir="rtl"] .home-project-cat { letter-spacing: normal; text-transform: none; }
.home-project h3 { font-size: 1.125rem; margin-bottom: 0.4rem; }
.home-project p { color: var(--text-2); font-size: 0.9375rem; }
.home-build-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; list-style: none; }
.home-build-grid li {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.home-build-grid i { font-size: 1.25rem; color: var(--color-primary-text); }
.home-build-grid h3 { font-size: 1.0625rem; margin-bottom: 0.3rem; }
.home-build-grid p { font-size: 0.9rem; color: var(--text-2); }

/* Final call to action (dark navy band, distinct from the footer below it) */
.home-cta {
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
  background-color: var(--color-navy);
  background-image: linear-gradient(135deg, #13204A 0%, var(--color-navy) 70%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.home-cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.75rem 3rem; }
.home-cta h2 { font-size: var(--fs-h2); color: var(--text); max-width: 22ch; }
.home-cta h2::before {
  content: '';
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-bottom: 1rem;
  border-radius: 2px;
  background-color: var(--color-gold);
}
.home-cta p { margin-top: 0.75rem; color: var(--text-2); font-size: var(--fs-lead); }
.home-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.home-cta .btn-outline { --btn-fg: #FFFFFF; --btn-border: rgba(255, 255, 255, 0.45); }
.home-cta .btn-outline:hover { --btn-bg: rgba(255, 255, 255, 0.08); --btn-border: #FFFFFF; }

[dir="rtl"] .home-hero-title { letter-spacing: normal; line-height: 1.3; max-width: 22ch; font-size: clamp(2rem, 1.3rem + 2.5vw, 3rem); }

@media (max-width: 1099.98px) {
  .home-build-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
  .home-hero-inner { grid-template-columns: minmax(0, 1fr); }
  .home-hero-visual { max-width: 560px; width: 100%; margin-inline: auto; }
  .home-why { grid-template-columns: minmax(0, 1fr); }
  .home-products-grid, .home-projects-grid, .home-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .home-offer-grid { grid-template-columns: minmax(0, 1fr); }
  .home-process-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-cta-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 639.98px) {
  /* Phones: keep the hero short so useful content appears quickly */
  .home-hero-visual { display: none; }
  .home-hero-lead { margin-bottom: 1.5rem; }
  .home-hero-actions .btn { flex: 1 1 auto; }
  .home-hero-facts { margin-top: 1.25rem; gap: 0.4rem 1.1rem; font-size: 0.8125rem; }
  .home-products-grid, .home-projects-grid, .home-services-grid, .home-why-list, .home-build-grid { grid-template-columns: minmax(0, 1fr); }
  .home-cta-actions { width: 100%; }
  .home-cta-actions .btn { flex: 1 1 auto; }
}
@media (max-width: 379.98px) {
  .home-process-steps { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   11c. Products listing and product page (Phase 5D)
   -------------------------------------------------------------------------- */
.products-page,
.product-page { padding-block: clamp(2rem, 1.4rem + 2.5vw, 3.5rem) var(--section-y); }
.page-head { max-width: 760px; margin-bottom: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem); }
.page-title { font-size: var(--fs-h1); margin-bottom: 0.75rem; }
.page-head .lead { margin: 0; }

/* Catalogue toolbar */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.catalog-search { position: relative; flex: 1 1 260px; }
.catalog-search i { position: absolute; inset-inline-start: 0.95rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.catalog-search .form-control { padding-inline-start: 2.6rem; }
.catalog-filter { flex: 0 1 240px; min-width: 180px; }
.catalog-count { margin: 1rem 0 1.25rem; font-size: var(--fs-sm); color: var(--muted); }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 0.7rem + 1vw, 1.5rem); }
.catalog-empty {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: clamp(2rem, 1.5rem + 2vw, 3.5rem) 1.5rem;
  text-align: center;
  background-color: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.catalog-empty .premium-card-icon { margin-bottom: 0.25rem; }
.catalog-empty h2 { font-size: 1.25rem; }
.catalog-empty p { color: var(--text-2); max-width: 46ch; }
.catalog-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 0.5rem; }
.catalog-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
  padding: 1.5rem clamp(1.25rem, 1rem + 1vw, 2rem);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.catalog-help h2 { font-size: 1.25rem; margin-bottom: 0.3rem; }
.catalog-help p { color: var(--text-2); }
.product-type-badge i { margin-inline-end: 0.15rem; color: var(--color-primary); }

/* Breadcrumbs */
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; list-style: none; font-size: var(--fs-sm); color: var(--muted); }
.breadcrumbs li { display: inline-flex; align-items: center; min-width: 0; }
.breadcrumbs li + li::before { content: '/'; margin-inline-end: 0.4rem; color: var(--border-strong); }
.breadcrumbs a { color: var(--text-2); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-primary-text); text-decoration: underline; }
.breadcrumbs li[aria-current] { display: inline-block; max-width: 42ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }

/* Product page: media + summary */
.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  column-gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  row-gap: clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem);
  align-items: start;
  margin-top: 1.25rem;
}
.product-media, .product-about, .product-how { grid-column: 1; }
.product-summary { grid-column: 2; grid-row: 1 / span 3; align-self: start; }
.product-hero--no-about .product-summary { grid-row: 1 / span 2; }
.product-media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.product-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-summary {
  display: grid;
  gap: 1rem;
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
@media (min-width: 1024px) and (min-height: 720px) {
  .product-summary { position: sticky; top: calc(var(--header-h) + 1.25rem); }
}
.product-kind {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  padding: 0.3rem 0.65rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary-text);
  background-color: var(--color-primary-soft);
  border-radius: var(--radius-sm);
}
.product-title { font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem); line-height: 1.2; }
.product-lead { color: var(--text-2); line-height: 1.65; }
.product-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.6rem; padding-top: 0.25rem; }
.product-price-value { font-size: 1.75rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.product-price-value--inquiry { font-size: 1.25rem; }
.product-price-note { font-size: var(--fs-sm); color: var(--muted); }
.product-summary .product-access { margin: 0; }
.product-actions { display: grid; gap: 0.6rem; }
.product-actions form { margin: 0; }
.product-enquiry-link { justify-self: center; font-size: var(--fs-sm); font-weight: 500; color: var(--color-primary-text); }
.product-facts { display: grid; gap: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--border); list-style: none; font-size: var(--fs-sm); color: var(--text-2); }
.product-facts li { display: flex; align-items: flex-start; gap: 0.6rem; }
.product-facts i { width: 1rem; margin-top: 0.2rem; text-align: center; color: var(--color-primary-text); flex: 0 0 auto; }

/* Product page: description and how it works */
.product-about h2,
.product-how h2 { font-size: var(--fs-h3); margin-bottom: 1rem; }
.product-description { color: var(--text-2); line-height: 1.75; overflow-wrap: anywhere; }
.product-description > * + * { margin-top: 1rem; }
.product-description h2, .product-description h3, .product-description h4 { color: var(--text); font-size: 1.125rem; margin-top: 1.5rem; }
.product-description ul, .product-description ol { padding-inline-start: 1.4rem; }
.product-description li + li { margin-top: 0.35rem; }
.product-description a { color: var(--color-primary-text); }
.product-how { padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); background-color: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.product-steps { display: grid; gap: 1rem; margin-bottom: 1.25rem; list-style: none; counter-reset: step; }
.product-steps li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); column-gap: 0.75rem; counter-increment: step; }
.product-steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-primary-text);
  background-color: var(--color-primary-soft);
  border-radius: 50%;
}
.product-steps strong { color: var(--text); }
.product-steps li > span { font-size: var(--fs-sm); color: var(--text-2); }
.product-related { margin-top: clamp(3rem, 2.4rem + 3vw, 5rem); padding-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); border-top: 1px solid var(--border); }
.product-related .section-title { margin: 0; }

[dir="rtl"] .product-kind { letter-spacing: normal; text-transform: none; font-size: var(--fs-sm); }

@media (max-width: 991.98px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-hero { grid-template-columns: minmax(0, 1fr); row-gap: 1.5rem; }
  .product-hero .product-media, .product-hero .product-summary, .product-hero .product-about, .product-hero .product-how { grid-column: auto; grid-row: auto; }
  .product-media { aspect-ratio: 16 / 9; }
}
@media (max-width: 639.98px) {
  .catalog-grid { grid-template-columns: minmax(0, 1fr); }
  .catalog-toolbar { padding: 0.6rem; }
  .catalog-toolbar .btn { flex: 1 1 auto; }
  .catalog-filter { flex: 1 1 100%; }
  .product-hero { row-gap: 1.25rem; margin-top: 1rem; }
  .product-media { aspect-ratio: 2 / 1; }
  .product-price-value { font-size: 1.5rem; }
}

/* --------------------------------------------------------------------------
   11d. Projects and FAQ pages (Phase 5E)
   -------------------------------------------------------------------------- */
.listing-page { padding-block: clamp(2rem, 1.4rem + 2.5vw, 3.5rem) var(--section-y); }
.catalog-help-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* Disclosure button + panel (shared by project details and the FAQ accordion) */
.disclosure-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 44px;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  text-align: start;
  background: none;
  border: 0;
  cursor: pointer;
}
.disclosure-toggle i {
  flex: 0 0 auto;
  font-size: 0.8rem;
  color: var(--muted);
  transition: transform var(--dur) var(--ease), color var(--dur-fast) ease;
}
.disclosure-toggle[aria-expanded="true"] i { color: var(--color-primary-text); }
.disclosure-toggle[aria-expanded="true"] .fa-chevron-down { transform: rotate(180deg); }
.disclosure-toggle[aria-expanded="true"] .fa-plus { transform: rotate(45deg); }
.disclosure-toggle:hover { color: var(--color-primary-text); }
.disclosure-toggle:focus-visible { border-radius: var(--radius-sm); }
.disclosure-panel > p { color: var(--text-2); line-height: 1.75; }

/* Projects */
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 0.7rem + 1vw, 1.5rem); }
.project-card {
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.project-card-media { aspect-ratio: 16 / 9; background-color: var(--surface-2); }
.project-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.project-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 2rem;
  color: var(--color-primary-text);
  background: linear-gradient(135deg, var(--color-primary-soft), var(--surface-2));
}
.project-card-body { display: flex; flex-direction: column; gap: 0.6rem; flex: 1; padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); }
.project-card-cat { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-primary-text); }
.project-card-title { font-size: 1.25rem; line-height: 1.3; }
.project-card-desc { color: var(--text-2); line-height: 1.7; }
.project-card .disclosure { margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.project-card .disclosure-toggle { font-size: 0.9375rem; color: var(--color-primary-text); }
.project-card .disclosure-panel > p { padding-top: 0.5rem; font-size: 0.9375rem; }
.project-empty { margin-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.project-build-title { font-size: var(--fs-h3); margin-bottom: 1.25rem; }
[dir="rtl"] .project-card-cat { letter-spacing: normal; text-transform: none; font-size: var(--fs-sm); }

/* FAQ */
.faq-body { max-width: 860px; }
.faq-group + .faq-group { margin-top: clamp(2rem, 1.6rem + 1.5vw, 2.75rem); }
.faq-group-title { font-size: var(--fs-h3); margin-bottom: 1rem; }
.accordion {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.accordion-item + .accordion-item { border-top: 1px solid var(--border); }
.accordion-heading { font-size: 1.0625rem; line-height: 1.45; }
.accordion-trigger { padding: 1rem clamp(1rem, 0.8rem + 1vw, 1.5rem); min-height: 56px; }
.accordion-trigger[aria-expanded="true"] { color: var(--color-primary-text); }
.accordion-trigger i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: var(--surface-2);
}
.accordion-panel > p { padding: 0 clamp(1rem, 0.8rem + 1vw, 1.5rem) 1.25rem; max-width: 70ch; }
.faq-page .catalog-help { max-width: 860px; }

@media (max-width: 767.98px) {
  .project-grid { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   11e. Contact page and "Get a Quote" dialog (Phase 5F)
   -------------------------------------------------------------------------- */
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.form-required-note { margin-bottom: 1rem; font-size: var(--fs-xs); color: var(--muted); }
.req { color: var(--error); font-weight: 700; }

/* Dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: rgba(11, 19, 43, 0.55);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.modal-overlay:not([hidden]) { display: flex; }
.modal-overlay.active { opacity: 1; }
.modal-card {
  position: relative;
  width: min(580px, 100%);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(10px);
  transition: transform var(--dur) var(--ease);
}
.modal-overlay.active .modal-card { transform: none; }
.modal-card:focus { outline: none; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.modal-title { font-size: 1.5rem; margin-bottom: 0.35rem; }
.modal-subtitle { font-size: 0.9375rem; line-height: 1.6; color: var(--text-2); }
.modal-close-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  color: var(--text-2);
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.modal-close-btn:hover { color: var(--text); background-color: var(--surface-2); }
.modal-form .form-group { margin-bottom: 1rem; }
.modal-note { margin-top: 0.75rem; text-align: center; font-size: var(--fs-xs); color: var(--muted); }
html.is-modal-open,
html.is-modal-open body { overflow: hidden; }

/* Contact page */
.contact-route-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 0.7rem + 1vw, 1.5rem); list-style: none; }
.contact-route {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: clamp(1.25rem, 1rem + 1vw, 1.5rem);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.contact-route .premium-card-icon { margin-bottom: 0.25rem; }
.contact-route h3 { font-size: 1.125rem; }
.contact-route p { flex: 1; font-size: 0.9375rem; color: var(--text-2); }
.contact-main {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  align-items: start;
  margin-top: clamp(2rem, 1.6rem + 1.5vw, 3rem);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.contact-form-card {
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.contact-form-card:focus { outline: none; }
.contact-form-title { font-size: var(--fs-h3); margin-bottom: 0.5rem; }
.contact-error { display: flex; gap: 0.6rem; align-items: flex-start; }
.contact-inquiry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.6rem 0.85rem;
  font-size: var(--fs-sm);
  color: var(--color-navy);
  background-color: var(--color-primary-soft);
  border-radius: var(--radius-md);
}
.contact-inquiry i { color: var(--color-primary-text); }
.form-privacy-note { margin-top: 0.85rem; text-align: center; font-size: var(--fs-xs); color: var(--muted); }
.form-privacy-note i { margin-inline-end: 0.3rem; }
.contact-success { display: grid; justify-items: center; gap: 0.85rem; padding: 2rem 0.5rem; text-align: center; }
.contact-success h2 { font-size: var(--fs-h3); }
.contact-success p { color: var(--text-2); max-width: 46ch; }
.contact-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.5rem;
  color: var(--success);
  background-color: var(--success-soft);
  border-radius: 50%;
}
.contact-details { padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); background-color: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.contact-details h2 { font-size: 1.25rem; margin-bottom: 1.25rem; }
.contact-detail-list { display: grid; gap: 1.1rem; margin-bottom: 1.5rem; list-style: none; }
.contact-detail-list li { display: flex; align-items: flex-start; gap: 0.85rem; }
.contact-detail-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-primary-text);
  background-color: var(--color-primary-soft);
  border-radius: var(--radius-md);
}
.contact-detail-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.contact-detail-list a, .contact-detail-value { font-weight: 600; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.contact-detail-list a:hover { color: var(--color-primary-text); text-decoration: underline; }
.contact-detail-note { font-size: var(--fs-sm); color: var(--muted); }
.contact-section { margin-top: clamp(3rem, 2.4rem + 3vw, 5rem); }
.contact-section .section-title { margin-bottom: 0.5rem; }
.contact-section-lead { margin-bottom: 1.5rem; }
.contact-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; }
.contact-steps li { align-content: start; padding: 1.25rem; background-color: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
[dir="rtl"] .contact-detail-label { letter-spacing: normal; text-transform: none; font-size: var(--fs-sm); }

@media (max-width: 991.98px) {
  .contact-main { grid-template-columns: minmax(0, 1fr); }
  .contact-route-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 559.98px) {
  .form-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 479.98px) {
  /* Phones: the dialog becomes a full-screen sheet */
  .modal-overlay { padding: 0; align-items: stretch; }
  .modal-card { width: 100%; max-height: none; height: 100%; border: 0; border-radius: 0; }
}

/* --------------------------------------------------------------------------
   11f. Blog / Insights polish (Phase 5G) - overrides the base blog rules in section 11
   -------------------------------------------------------------------------- */
.blog-page .breadcrumbs,
.blog-article .breadcrumbs { margin-bottom: 1.25rem; }
.blog-hero { max-width: 760px; margin-block-end: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem); }
.blog-cats { margin-block-end: clamp(2rem, 1.6rem + 1.5vw, 3rem); }
.blog-section { margin-block-end: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.blog-card-title a { overflow-wrap: anywhere; }
.blog-card-title { text-wrap: pretty; }
.blog-empty.catalog-empty { padding: clamp(2rem, 1.5rem + 2vw, 3.5rem) 1.5rem; }
.blog-empty.catalog-empty p { margin: 0; font-size: 1rem; }

/* Lead story: the first featured article spans the row with image and text side by side */
@media (min-width: 900px) {
  .blog-grid-featured > .blog-card:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
  .blog-grid-featured > .blog-card:first-child .blog-card-media { aspect-ratio: auto; min-height: 100%; }
  .blog-grid-featured > .blog-card:first-child .blog-card-body { padding: clamp(1.5rem, 1rem + 1.5vw, 2.5rem); justify-content: center; }
  .blog-grid-featured > .blog-card:first-child .blog-card-title { font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem); line-height: 1.25; }
  .blog-grid-featured > .blog-card:first-child .blog-card-excerpt { flex: 0 0 auto; font-size: 1rem; }
}

/* Article: readable column, clear metadata */
.blog-article > .container { max-width: 820px; }
.blog-article-header { margin-block-end: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem); gap: 0.9rem; }
.blog-article-title { font-size: clamp(1.875rem, 1.35rem + 2.1vw, 2.75rem); line-height: 1.18; letter-spacing: -0.022em; overflow-wrap: anywhere; text-wrap: balance; }
[dir="rtl"] .blog-article-title { letter-spacing: normal; line-height: 1.4; }
.blog-article-header .blog-lead { font-size: var(--fs-lead); }
.blog-article-meta { gap: 0.4rem 1.25rem; font-size: var(--fs-sm); padding-top: 0.9rem; border-top: 1px solid var(--border); width: 100%; }
.blog-article-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.blog-article-meta i { color: var(--muted); }
.blog-article-image { margin-block-end: clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem); background-color: var(--surface-2); }

/* Article body typography (stored article HTML is unchanged; only its presentation) */
.blog-content { max-width: 70ch; font-size: 1.0625rem; line-height: 1.8; }
[dir="rtl"] .blog-content { line-height: 1.95; }
.blog-content > :first-child { margin-block-start: 0; }
.blog-content h2 { font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.625rem); margin-block-start: 2.25rem; }
.blog-content h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem); margin-block-start: 1.75rem; }
.blog-content h2 + *, .blog-content h3 + *, .blog-content h4 + * { margin-block-start: 0.6rem; }
.blog-content strong { color: var(--text); }
.blog-content a:hover { color: var(--color-primary-hover); }
.blog-content ul li::marker { color: var(--color-primary); }
.blog-content blockquote { padding: 1rem 1.25rem; background-color: var(--surface); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
[dir="rtl"] .blog-content blockquote { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.blog-content figure img, .blog-content > p > img { display: block; }
.blog-content figcaption { margin-top: 0.5rem; font-size: var(--fs-sm); color: var(--muted); }
.blog-content table { width: fit-content; max-width: 100%; font-size: 0.9375rem; }
.blog-content td { background-color: var(--surface); }
.blog-content thead th { background-color: var(--surface-2); color: var(--text); font-weight: 600; }
.blog-content pre { font-size: 0.875rem; line-height: 1.6; }
.blog-article-tags { margin-block: 2rem; }

/* Closing call to action: dark navy band, as on the homepage */
.blog-cta.theme-dark {
  margin-block: clamp(2rem, 1.6rem + 2vw, 3rem) 1.5rem;
  padding: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem);
  background-color: var(--color-navy);
  background-image: linear-gradient(135deg, #13204A 0%, var(--color-navy) 75%);
  border-radius: var(--radius-lg);
}
.blog-cta.theme-dark .blog-cta-title { color: var(--text); }
.blog-cta.theme-dark p { color: var(--text-2); }
.blog-cta .btn-outline { --btn-fg: #FFFFFF; --btn-border: rgba(255, 255, 255, 0.45); }
.blog-cta .btn-outline:hover { --btn-bg: rgba(255, 255, 255, 0.08); --btn-border: #FFFFFF; }
.blog-back { margin-block: 0.5rem 0; }

/* Related articles: full-width band below the article */
.blog-article .blog-related .container { max-width: var(--container); }
.blog-related {
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
  padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem) 0;
  border-top: 1px solid var(--border);
}

@media (max-width: 639.98px) {
  .blog-cta-actions { width: 100%; }
  .blog-cta-actions .btn { flex: 1 1 auto; }
}

/* --------------------------------------------------------------------------
   12. Arabic / RTL
   Layout uses logical properties throughout; only typography and a few
   direction-specific details need RTL rules.
   -------------------------------------------------------------------------- */
[dir="rtl"] {
  --font-sans: 'Tajawal', 'Inter', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --lh-body: 1.8;
  --lh-heading: 1.45;
  --lh-tight: 1.35;
}
/* Tajawal has a smaller x-height than Inter: a slightly larger root size balances the two languages */
html[dir="rtl"] { font-size: 17px; }

/* Arabic letters must stay joined: no letter-spacing, no faux italics, no uppercase transforms */
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6,
[dir="rtl"] .hero-title, [dir="rtl"] .section-title, [dir="rtl"] .form-label,
[dir="rtl"] .eyebrow, [dir="rtl"] .blog-eyebrow, [dir="rtl"] .product-access-label {
  letter-spacing: normal;
}
[dir="rtl"] .hero-title { line-height: 1.3; }
[dir="rtl"] .eyebrow, [dir="rtl"] .blog-eyebrow, [dir="rtl"] .product-access-label { text-transform: none; font-size: var(--fs-sm); }
[dir="rtl"] .serif-font { font-style: normal; }

/* Brand wordmark, e-mail addresses, phone numbers and codes always read left-to-right */
[dir="rtl"] .logo-text,
[dir="rtl"] [dir="ltr"] {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Mirror only directional icons (arrows, chevrons, sign-in/out); other icons keep their shape */
[dir="rtl"] .fa-arrow-right, [dir="rtl"] .fa-arrow-left,
[dir="rtl"] .fa-arrow-right-long, [dir="rtl"] .fa-arrow-left-long,
[dir="rtl"] .fa-chevron-right, [dir="rtl"] .fa-chevron-left,
[dir="rtl"] .fa-angle-right, [dir="rtl"] .fa-angle-left,
[dir="rtl"] .fa-angles-right, [dir="rtl"] .fa-angles-left,
[dir="rtl"] .fa-caret-right, [dir="rtl"] .fa-caret-left,
[dir="rtl"] .fa-arrow-right-to-bracket, [dir="rtl"] .fa-right-to-bracket,
[dir="rtl"] .fa-right-from-bracket, [dir="rtl"] .fa-arrow-right-from-bracket,
[dir="rtl"] .fa-arrow-up-right-from-square,
[dir="rtl"] .fa-bars-staggered {
  transform: scaleX(-1);
}

/* Tables and inputs follow the reading direction; e-mail / phone / URL fields stay LTR */
[dir="rtl"] th, [dir="rtl"] td { text-align: start; }
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="tel"], [dir="rtl"] input[type="url"] {
  direction: ltr;
  text-align: end;
}

/* --------------------------------------------------------------------------
   13. Reduced motion: no animations, transitions or smooth scrolling
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-up.reveal-pending { opacity: 1; transform: none; }
  .btn.is-loading::after { animation-duration: 1.5s !important; animation-iteration-count: infinite !important; }
}
