/* ═══════════════════════════════════════════════════════════════════════
   MAIC UAE — Main Stylesheet
   Brand: Navy #10253B | Trust Blue #448AC1 | Sky Cyan #65B6E4 | Ice White #F7FBFF
   Fonts: Montserrat (headings) + Inter (body)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Fonts ── */
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter_18pt-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter_18pt-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter_18pt-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter_18pt-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

/* ── CSS Variables ── */
:root {
  --navy: #10253B;
  --navy-80: rgba(16, 37, 59, 0.80);
  --navy-45: rgba(16, 37, 59, 0.45);
  --navy-20: rgba(16, 37, 59, 0.20);
  --navy-10: rgba(16, 37, 59, 0.10);
  --trust-blue: #448AC1;
  --sky-cyan: #65B6E4;
  --steel-blue: #3C5C76;
  --ice-white: #F7FBFF;
  --cool-gray: #D8E3EC;
  --white: #FFFFFF;
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 24px rgba(16, 37, 59, 0.08);
  --shadow-lg: 0 8px 48px rgba(16, 37, 59, 0.12);
  --transition: 0.25s ease;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--navy);
  background: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Utility ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; color: var(--navy); line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; }
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--trust-blue);
}
.section-title { margin-bottom: 0.25rem; }
.section-rule {
  width: 48px; height: 4px;
  background: var(--sky-cyan);
  border-radius: 2px;
  margin-block: 16px 32px;
  margin-inline: 0;
}
.section-rule.centered { margin-block: 16px 32px; margin-inline: auto; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 14px 32px; border-radius: var(--radius-sm);
  transition: all var(--transition); cursor: pointer; border: none;
  text-align: center; justify-content: center;
}
.btn-primary {
  background: var(--trust-blue); color: var(--white);
  box-shadow: 0 4px 16px rgba(68, 138, 193, 0.3);
}
.btn-primary:hover { background: #3a7aad; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(68, 138, 193, 0.4); }
.btn-outline {
  background: transparent; color: var(--trust-blue);
  border: 2px solid var(--trust-blue);
}
.btn-outline:hover { background: var(--trust-blue); color: var(--white); }
.btn-white {
  background: var(--white); color: var(--navy);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.btn-white:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,0,0,0.12); }
.btn-whatsapp {
  background: #25D366; color: var(--white);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover { background: #1fb855; transform: translateY(-1px); }
.btn-lg { padding: 18px 40px; font-size: 1.05rem; }

/* ── Header / Navigation ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--navy-10);
  transition: all var(--transition);
}
.site-header.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,0.06); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 72px;
}
.logo { 
  height: 40px; width: auto; 
  display: inline-block; position: relative;
  transform-style: preserve-3d;
  perspective: 400px;
  overflow: hidden;
  border-radius: 6px;
}
.logo img { height: 40px; width: auto; display: block; position: relative; z-index: 1; }

/* ── Logo shine sweep ── */
.logo::after {
  content: '';
  position: absolute;
  top: -50%; left: -100%;
  width: 70%; height: 200%;
  z-index: 2;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255,255,255,0.15) 42%,
    rgba(255,255,255,0.4) 45%,
    rgba(255,255,255,0.15) 48%,
    transparent 55%
  );
  transform: skewX(-20deg);
  animation: logoShine 4s ease-in-out infinite;
}
@keyframes logoShine {
  0%   { left: -100%; }
  20%  { left: 150%; }
  100% { left: 150%; }
}

/* ── Footer logo float ── */
.footer-brand img {
  animation: logoFloat 5s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); filter: drop-shadow(0 8px 20px rgba(101, 182, 228, 0.4)); }
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-family: var(--font-body); font-weight: 500; font-size: 0.9rem;
  color: var(--navy-80); transition: color var(--transition);
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--sky-cyan); border-radius: 1px;
}
.nav-cta { margin-left: 8px; }
.lang-switch {
  font-family: var(--font-body); font-weight: 600; font-size: 0.85rem;
  color: var(--trust-blue); padding: 6px 14px;
  border: 1.5px solid var(--trust-blue); border-radius: 50px;
  transition: all var(--transition);
}
.lang-switch:hover { background: var(--trust-blue); color: var(--white); }

/* Mobile nav */
.mobile-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.mobile-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--navy); border-radius: 1px; transition: all var(--transition);
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .mobile-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--white); padding: 24px; gap: 20px;
    border-bottom: 1px solid var(--navy-10);
    box-shadow: var(--shadow);
  }
}

/* ── Hero ── */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  background: var(--navy); position: relative; overflow: hidden;
  padding: 120px 0 80px;
}
.hero::before {
  content: ''; position: absolute;
  width: 800px; height: 800px;
  background: var(--sky-cyan); opacity: 0.06;
  border-radius: 50%; top: -300px; right: -200px;
  transform: translate(calc(var(--mx, 0) * 0.7px), calc(var(--my, 0) * 0.7px));
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero::after {
  content: ''; position: absolute;
  width: 500px; height: 500px;
  background: var(--trust-blue); opacity: 0.04;
  border-radius: 50%; bottom: -150px; left: -100px;
  transform: translate(calc(var(--mx, 0) * -0.5px), calc(var(--my, 0) * -0.5px));
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-content { position: relative; z-index: 1; max-width: 680px; }
.hero-content h1 { color: var(--white); margin: 16px 0 24px; }
.hero-content h1 span { color: var(--sky-cyan); }
.hero-content p {
  font-size: 1.15rem; color: rgba(255,255,255,0.7);
  max-width: 540px; margin-bottom: 36px; line-height: 1.7;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-visual { display: none; }

/* ── Sections ── */
.section { padding: 100px 0; }
.section-alt { background: var(--ice-white); }
.section-dark { background: var(--navy); color: var(--white); }
.section-header { text-align: center; margin-bottom: 64px; }

/* ── Service Cards ── */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  justify-content: center;
}
.service-card {
  background: var(--white); border: 1px solid var(--navy-10);
  border-radius: var(--radius); padding: 36px 32px;
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--sky-cyan);
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: linear-gradient(90deg, var(--trust-blue), var(--sky-cyan));
  opacity: 0; transition: opacity var(--transition);
}
.service-card:hover::before { opacity: 1; }
.service-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  background: var(--ice-white); display: flex; align-items: center;
  justify-content: center; margin-bottom: 20px;
  color: var(--trust-blue);
}
.service-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.service-card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.service-card p { color: var(--navy-45); font-size: 0.92rem; line-height: 1.6; }
.service-card .card-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; font-weight: 600; font-size: 0.9rem;
  color: var(--trust-blue); transition: gap var(--transition);
}
.service-card .card-link:hover { gap: 10px; }

/* ── Stats ── */
.stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 32px; text-align: center;
}
.stat-item .stat-number {
  font-family: var(--font-display); font-size: 2.8rem; font-weight: 700;
  color: var(--sky-cyan); line-height: 1;
}
.stat-item .stat-label { color: rgba(255,255,255,0.7); margin-top: 8px; font-size: 0.95rem; }

/* ── About Page ── */
.about-hero {
  padding: 160px 0 80px; background: var(--navy);
  position: relative; overflow: hidden;
}
.about-hero h1 { color: var(--white); }
.about-hero p { color: rgba(255,255,255,0.6); font-size: 1.1rem; max-width: 640px; margin-top: 16px; }
.about-content { padding: 80px 0; }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
html[dir="rtl"] .about-grid {
  grid-template-columns: 1fr 1fr;  /* text (first col) on RIGHT in RTL, visual (second) on LEFT */
}
.about-grid .about-text h2 { margin-bottom: 20px; }
.about-grid .about-text p { color: var(--navy-80); margin-bottom: 16px; line-height: 1.7; }
.about-visual {
  background: var(--ice-white); border-radius: var(--radius);
  padding: 48px; text-align: center;
}
.values-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px; margin-top: 48px;
}
.value-card {
  background: var(--white); border: 1px solid var(--navy-10);
  border-radius: var(--radius); padding: 32px;
  text-align: center; transition: all var(--transition);
}
.value-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.value-card .value-icon {
  width: 56px; height: 56px; margin: 0 auto 16px;
  background: var(--ice-white); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--trust-blue);
}
.value-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.value-card p { color: var(--navy-45); font-size: 0.9rem; }

/* ── Service Detail Page ── */
.service-hero {
  padding: 160px 0 80px; background: var(--navy);
  position: relative; overflow: hidden;
}
.service-hero h1 { color: var(--white); }
.service-hero p { color: rgba(255,255,255,0.6); font-size: 1.1rem; max-width: 600px; margin-top: 16px; }
.service-detail { padding: 80px 0; }
.service-detail-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: 48px;
}
/* RTL: content body on RIGHT, sidebar on LEFT */
html[dir="rtl"] .service-detail-grid .service-body { grid-column: 1; }
html[dir="rtl"] .service-detail-grid .service-sidebar { grid-column: 2; }
/* RTL: dir=rtl auto-flips columns — col1→RIGHT, col2→LEFT */
.service-body h2 { margin: 40px 0 16px; }
.service-body h2:first-child { margin-top: 0; }
.service-body p { color: var(--navy-80); margin-bottom: 16px; line-height: 1.7; }
.service-body ul { margin: 16px 0 24px; padding-left: 20px; list-style: disc; }
.service-body ul li { color: var(--navy-80); margin-bottom: 8px; line-height: 1.6; }
.service-sidebar {
  position: sticky; top: 100px;
}
.sidebar-card {
  background: var(--ice-white); border: 1px solid var(--navy-10);
  border-radius: var(--radius); padding: 32px;
  margin-bottom: 24px;
}
.sidebar-card h3 { margin-bottom: 16px; font-size: 1.05rem; }
.sidebar-card ul li { padding: 8px 0; border-bottom: 1px solid var(--navy-10); }
.sidebar-card ul li:last-child { border-bottom: none; }
.sidebar-card ul li a {
  color: var(--navy-80); font-size: 0.92rem;
  transition: color var(--transition);
}
.sidebar-card ul li a:hover { color: var(--trust-blue); }

/* ── Contact Page ── */
.contact-hero {
  padding: 160px 0 80px; background: var(--navy);
  position: relative; overflow: hidden;
}
.contact-hero h1 { color: var(--white); }
.contact-hero p { color: rgba(255,255,255,0.6); font-size: 1.1rem; max-width: 600px; margin-top: 16px; }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  padding: 80px 0;
}
/* RTL: contact-info on RIGHT, contact-form-card on LEFT */
html[dir="rtl"] .contact-grid {
  grid-template-columns: 1fr 1fr;
}
.contact-info h2 { margin-bottom: 16px; }
.contact-info p { color: var(--navy-80); margin-bottom: 32px; line-height: 1.7; }
.contact-methods { display: flex; flex-direction: column; gap: 16px; }
.contact-method {
  display: flex; align-items: center; gap: 16px;
  padding: 20px; background: var(--ice-white);
  border-radius: var(--radius-sm); border: 1px solid var(--navy-10);
}
.contact-method .cm-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--white); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.contact-method .cm-label { font-size: 0.8rem; color: var(--navy-45); text-transform: uppercase; letter-spacing: 1px; }
.contact-method .cm-value { font-weight: 600; margin-top: 2px; }
.contact-form-card {
  background: var(--white); border: 1px solid var(--navy-10);
  border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow);
}
.contact-form-card h3 { margin-bottom: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-weight: 500; font-size: 0.9rem;
  margin-bottom: 6px; color: var(--navy);
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--navy-20);
  border-radius: var(--radius-sm); font-family: var(--font-body);
  font-size: 0.95rem; color: var(--navy); background: var(--white);
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--trust-blue);
}
.form-group textarea { min-height: 120px; resize: vertical; }

/* ── Blog ── */
.blog-hero {
  padding: 160px 0 80px; background: var(--navy);
  position: relative; overflow: hidden;
}
.blog-hero h1 { color: var(--white); }
.blog-hero p { color: rgba(255,255,255,0.6); font-size: 1.1rem; max-width: 600px; margin-top: 16px; }
.blog-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px; padding: 80px 0;
  justify-content: center;
}
.blog-card {
  background: var(--white); border: 1px solid var(--navy-10);
  border-radius: var(--radius); overflow: hidden;
  transition: all var(--transition);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card-image {
  height: 200px; background: var(--ice-white);
  display: flex; align-items: center; justify-content: center;
  color: var(--trust-blue);
}
.blog-card-image svg { width: 48px; height: 48px; opacity: 0.3; }
.blog-card-body { padding: 24px; }
.blog-card-body .blog-date {
  font-size: 0.8rem; color: var(--navy-45);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
}
.blog-card-body h3 { font-size: 1.1rem; margin-bottom: 10px; }
.blog-card-body p { color: var(--navy-80); font-size: 0.9rem; line-height: 1.6; }
.blog-card-body .read-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; font-weight: 600; font-size: 0.9rem;
  color: var(--trust-blue);
}

/* ── Footer ── */
.site-footer {
  background: var(--navy); color: rgba(255,255,255,0.6);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer-brand img { height: 32px; margin-bottom: 16px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.6; max-width: 300px; }
.footer-col h4 {
  color: var(--white); font-family: var(--font-display);
  font-weight: 600; font-size: 0.9rem; margin-bottom: 16px;
  letter-spacing: 0.5px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 0.9rem; transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 16px;
  font-size: 0.85rem;
}
.footer-bottom a { color: var(--sky-cyan); }
.footer-bottom a:hover { text-decoration: underline; }

/* ── Animations ── */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── RTL / Arabic ── */
/* Base direction — handled by dir="rtl" on html tag */

/* ── Arabic font stack ── */
/* Montserrat & Inter lack Arabic glyphs — Noto Naskh Arabic for print-quality rendering */
html[dir="rtl"] body {
  font-family: 'Noto Naskh Arabic', 'Segoe UI', 'Tahoma', 'IBM Plex Sans Arabic', sans-serif;
  line-height: 1.8;  /* Arabic benefits from slightly more line-height than Latin */
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6 {
  font-family: 'Noto Naskh Arabic', 'Segoe UI', 'Tahoma', sans-serif;
}

/* ── Header: logo on LEFT per design requirement ── */
html[dir="rtl"] .logo { order: 1; }
html[dir="rtl"] .nav-cta { margin-left: 0; margin-right: 8px; }

/* ── Text alignment ── */
/* Only right-align content containers — keep centered elements centered */
html[dir="rtl"] .hero-content,
html[dir="rtl"] .contact-info,
html[dir="rtl"] .service-body,
html[dir="rtl"] .about-text,
html[dir="rtl"] .blog-post-header,
html[dir="rtl"] .blog-post-body,
html[dir="rtl"] .footer-brand,
html[dir="rtl"] .footer-col,
html[dir="rtl"] .footer-bottom,
html[dir="rtl"] .service-card,
html[dir="rtl"] .blog-card-body,
html[dir="rtl"] .value-card,
html[dir="rtl"] .sidebar-card,
html[dir="rtl"] .contact-form-card,
html[dir="rtl"] .contact-method { text-align: right; }

/* ── Lists: flip padding ── */
html[dir="rtl"] .service-body ul { padding-left: 0; padding-right: 20px; }
html[dir="rtl"] .blog-post-body ul { padding-left: 0; padding-right: 20px; }

/* ── Service cards: gradient direction ── */
html[dir="rtl"] .service-card::before { background: linear-gradient(270deg, var(--trust-blue), var(--sky-cyan)); }

/* ── Card link / read-more arrows: HTML handles per-language (→ for EN, ← for AR) ── */

/* ── Form labels right-aligned ── */
html[dir="rtl"] .form-group label { text-align: right; }
html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group select,
html[dir="rtl"] .form-group textarea { text-align: right; }

/* ── Hero visual positioning ── */
html[dir="rtl"] .hero-visual { right: auto; left: 5%; }
html[dir="rtl"] .hero::before { right: auto; left: -200px; }
html[dir="rtl"] .hero::after { left: auto; right: -100px; }

/* ── Hero content ── */
html[dir="rtl"] .hero-content p { margin-left: 0; margin-right: 0; }

/* ── Centered elements: keep center alignment in RTL ── */
html[dir="rtl"] .section-header { text-align: center; }
html[dir="rtl"] .cta-banner { text-align: center; }
html[dir="rtl"] .about-visual { text-align: center; }

/* ── Hero right-alignment in RTL (mirrors EN left-alignment) ── */
html[dir="rtl"] .about-hero { text-align: right; }
html[dir="rtl"] .contact-hero { text-align: right; }
html[dir="rtl"] .blog-hero { text-align: right; }
html[dir="rtl"] .service-hero { text-align: right; }

/* ── Arabic typography: reset Latin-specific properties ── */
html[dir="rtl"] .eyebrow { letter-spacing: 0; }
html[dir="rtl"] h1 { letter-spacing: 0; }
html[dir="rtl"] h2 { letter-spacing: 0; }

/* ── Mobile nav ── */
@media (max-width: 900px) {
  html[dir="rtl"] .nav-links.open {
    text-align: right;
  }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { padding: 100px 0 60px; min-height: auto; }
  .hero-buttons { flex-direction: column; }
  .stats-row { grid-template-columns: 1fr; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .service-detail-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .cta-banner { padding: 40px 24px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
}

/* ── CTA Banner (at end so it overrides all content text colors) ── */
.cta-banner {
  background: linear-gradient(135deg, var(--navy), var(--steel-blue));
  border-radius: var(--radius); padding: 56px 48px;
  text-align: center; position: relative; overflow: hidden;
}
.cta-banner h2 { color: var(--white); margin-bottom: 16px; }
.cta-banner p { color: var(--white); max-width: 600px; margin: 0 auto 32px; font-size: 1.05rem; }

/* ═══════════════════════════════════════════════════
   ANIMATIONS & EFFECTS
   ═══════════════════════════════════════════════════ */

/* ── Particle canvas (hero constellation network) ── */
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── 3D card tilt perspective ── */
.service-card, .blog-card, .value-card {
  transform-style: preserve-3d;
  will-change: transform;
}

/* ── Enhanced scroll reveals ── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-slide-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* ── Stagger delays for cards in grids ── */
.services-grid .service-card:nth-child(1) { transition-delay: 0.05s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.12s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.19s; }
.services-grid .service-card:nth-child(4) { transition-delay: 0.26s; }
.services-grid .service-card:nth-child(5) { transition-delay: 0.33s; }
.services-grid .service-card:nth-child(6) { transition-delay: 0.40s; }

.blog-grid .blog-card:nth-child(1) { transition-delay: 0.05s; }
.blog-grid .blog-card:nth-child(2) { transition-delay: 0.12s; }
.blog-grid .blog-card:nth-child(3) { transition-delay: 0.19s; }
.blog-grid .blog-card:nth-child(4) { transition-delay: 0.26s; }

.values-grid .value-card:nth-child(1) { transition-delay: 0.05s; }
.values-grid .value-card:nth-child(2) { transition-delay: 0.12s; }
.values-grid .value-card:nth-child(3) { transition-delay: 0.19s; }
.values-grid .value-card:nth-child(4) { transition-delay: 0.26s; }

/* ── Animated gradient glow on CTA buttons ── */
.btn-primary {
  background: linear-gradient(135deg, var(--trust-blue), var(--sky-cyan), var(--trust-blue));
  background-size: 200% 200%;
  animation: btnGlow 4s ease infinite;
}
@keyframes btnGlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Hero hex shape ── */
.stat-item .stat-number {
  display: inline-block;
  animation: countReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes countReveal {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Reduced motion: respect user preference ── */
@media (prefers-reduced-motion: reduce) {
  .fade-up, .reveal-slide-left, .reveal-slide-right, .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero::before, .hero::after,
  .hero-visual .hex,
  .btn-primary {
    animation: none;
  }
  .service-card, .blog-card, .value-card {
    transform: none !important;
    transition: none !important;
  }
}
