/* ============================================
   Mindexia — Stylesheet
   ============================================ */

:root {
  --navy: #1E4781;
  --navy-dark: #163661;
  --blue: #46A5E2;
  --blue-light: #eaf4fc;
  --ink: #17202a;
  --gray: #5b6572;
  --gray-light: #a3a3a3;
  --border: #e6ecf2;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(30, 71, 129, 0.08);
  --shadow-lg: 0 20px 50px rgba(30, 71, 129, 0.16);
  --container: 1180px;
  --ease: cubic-bezier(.22,.9,.32,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[dir="rtl"] body { direction: rtl; }
html[dir="ltr"] body { direction: ltr; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; }

.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .5px;
  color: var(--blue);
  background: var(--blue-light);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 52px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  margin: 0 0 14px;
  color: var(--navy);
}

.section-head p {
  color: var(--gray);
  font-size: 17px;
  margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  transition: all .25s var(--ease);
  white-space: nowrap;
}

.btn svg { width: 18px; height: 18px; flex: none; }
html[dir="rtl"] .btn svg { transform: scaleX(-1); }

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(30, 71, 129, 0.28);
}
.btn-primary:hover { background: var(--navy-dark); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); transform: translateY(-2px); }

.btn-light {
  background: var(--white);
  color: var(--navy);
}
.btn-light:hover { background: var(--blue-light); transform: translateY(-2px); }

.btn-block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: all .3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 6px 24px rgba(20,40,70,.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 84px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 42px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a {
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--blue);
  transition: width .25s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-toggle {
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lang-toggle:hover { border-color: var(--blue); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 6px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--navy);
  margin: 5px 0;
  border-radius: 2px;
  transition: all .25s var(--ease);
}

/* ---------- Hero ---------- */
.hero {
  padding: 168px 0 100px;
  background: linear-gradient(180deg, #f5f9fd 0%, #ffffff 78%);
  overflow: hidden;
  position: relative;
}

.hex {
  position: absolute;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  background: var(--blue-light);
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
html[dir="rtl"] .hero-grid { direction: rtl; }

.hero-copy h1 {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 22px;
  color: var(--navy);
}
.hero-copy h1 .rotate-word {
  color: var(--blue);
  display: inline-block;
  min-width: 1ch;
}

.hero-copy p {
  font-size: 18px;
  color: var(--gray);
  max-width: 520px;
  margin: 0 0 34px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}
.hero-visual .glow {
  position: absolute;
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(70,165,226,.28), rgba(70,165,226,0) 70%);
  border-radius: 50%;
}
.hero-visual img {
  position: relative;
  width: min(380px, 80%);
  filter: drop-shadow(0 30px 40px rgba(30,71,129,.18));
  animation: float 5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

/* ---------- Process ---------- */
.process {
  background: var(--navy);
  padding: 100px 0;
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.process-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: all .3s var(--ease);
}
.process-card:hover {
  background: rgba(255,255,255,.1);
  transform: translateY(-4px);
}
.process-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.process-icon {
  width: 50px; height: 50px;
  border-radius: 13px;
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.process-icon svg { width: 24px; height: 24px; color: var(--white); }
.process-num {
  font-size: 26px;
  font-weight: 800;
  color: rgba(255,255,255,.18);
  letter-spacing: 1px;
}
.process-card h3 {
  font-size: 17.5px;
  font-weight: 800;
  color: var(--white);
  margin: 0 0 10px;
}
.process-card p {
  color: #c6d7ec;
  font-size: 14.5px;
  margin: 0;
}

/* ---------- About ---------- */
.about {
  padding: 110px 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}
.about-art {
  position: relative;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--navy), var(--blue));
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.about-art img { width: 46%; filter: brightness(0) invert(1); opacity: .95; }
.about-art::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,.18) 0, transparent 40%),
                     radial-gradient(circle at 85% 80%, rgba(255,255,255,.14) 0, transparent 45%);
}
.about-copy h2 {
  font-size: clamp(26px, 3.6vw, 34px);
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 18px;
}
.about-copy p {
  color: var(--gray);
  font-size: 16.5px;
  margin: 0 0 28px;
}
.about-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.about-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--navy);
  font-size: 14.5px;
}
.about-points svg { width: 20px; height: 20px; color: var(--blue); flex: none; }

/* ---------- Services ---------- */
.services { padding: 110px 0; background: #f8fbfd; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 28px;
  transition: all .3s var(--ease);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  transition: background .3s var(--ease);
}
.service-icon svg { width: 28px; height: 28px; color: var(--white); }
.service-card:hover .service-icon { background: var(--blue); }

.service-card h3 {
  font-size: 19px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 10px;
}
.service-card p {
  color: var(--gray);
  font-size: 15px;
  margin: 0 0 18px;
}
.service-card ul li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  padding: 5px 0;
}
.service-card ul li svg { width: 15px; height: 15px; color: var(--blue); flex: none; }

/* ---------- Sectors ---------- */
.sectors { padding: 110px 0; }
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.sector-card {
  border-radius: var(--radius);
  padding: 36px 30px;
  color: var(--white);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.sector-card::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 90% 0%, rgba(255,255,255,.18), transparent 55%);
}
.sector-card:nth-child(1) { background: linear-gradient(150deg, #1E4781, #2c62ab); }
.sector-card:nth-child(2) { background: linear-gradient(150deg, #17355f, #1E4781); }
.sector-card:nth-child(3) { background: linear-gradient(150deg, #2c8fd6, #46A5E2); }
.sector-card h3 { font-size: 20px; font-weight: 800; margin: 0 0 10px; position: relative; }
.sector-card p { font-size: 14.5px; color: rgba(255,255,255,.88); margin: 0; position: relative; }

/* ---------- CTA banner ---------- */
.cta {
  margin: 0 24px;
  max-width: calc(var(--container) - 48px);
  margin-inline: auto;
  border-radius: 28px;
  background: linear-gradient(120deg, var(--navy), #2c62ab 60%, var(--blue));
  padding: 64px 48px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 15% 20%, rgba(255,255,255,.14), transparent 40%),
                     radial-gradient(circle at 85% 85%, rgba(255,255,255,.12), transparent 40%);
}
.cta h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; margin: 0 0 12px; position: relative; }
.cta p { color: rgba(255,255,255,.85); margin: 0 0 30px; position: relative; }
.cta .btn { position: relative; }

/* ---------- Contact ---------- */
.contact { padding: 110px 0; background: #f8fbfd; }
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
}
.contact-info {
  background: var(--navy);
  border-radius: 24px;
  padding: 44px 36px;
  color: var(--white);
}
.contact-info h3 { font-size: 22px; font-weight: 800; margin: 0 0 14px; }
.contact-info p { color: #c6d7ec; font-size: 15px; margin: 0 0 30px; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}
.contact-item .ic {
  width: 42px; height: 42px; flex: none;
  border-radius: 12px;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
}
.contact-item .ic svg { width: 20px; height: 20px; }
.contact-item .lbl { font-size: 13px; color: #a9c2de; font-weight: 600; }
.contact-item .val { font-size: 15px; font-weight: 700; }
.social-row { display: flex; gap: 10px; margin-top: 30px; }
.social-row a {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  transition: background .25s var(--ease);
}
.social-row a:hover { background: var(--blue); }
.social-row svg { width: 18px; height: 18px; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fbfdff;
  transition: border-color .2s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 13px; color: var(--gray-light); margin-top: 14px; text-align: center; }
.form-success {
  display: none;
  background: var(--blue-light);
  color: var(--navy);
  border-radius: 10px;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 14.5px;
  margin-bottom: 18px;
  text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #10233f;
  color: #b9c9dd;
  padding: 70px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand img { height: 38px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: 14.5px; max-width: 320px; line-height: 1.8; }
.footer-col h4 { color: var(--white); font-size: 16px; font-weight: 800; margin: 0 0 18px; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col a { font-size: 14.5px; transition: color .2s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 13.5px;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a:hover { color: var(--white); }

/* ---------- Utilities ---------- */
.reveal {
  opacity: 1;
  transform: none;
}
.js-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js-ready .reveal.in { opacity: 1; transform: translateY(0); }

body [data-lang="en"] { display: none; }
html[data-lang="ar"] body [data-lang="en"] { display: none; }
html[data-lang="en"] body [data-lang="ar"] { display: none; }
html[data-lang="en"] body [data-lang="en"] { display: revert; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-art { order: -1; }
  .services-grid, .sectors-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; }
  .header-inner { height: 72px; }
  .hero { padding: 128px 0 70px; }
  .services-grid, .sectors-grid, .process-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cta { padding: 46px 26px; border-radius: 20px; }
  .contact-form { padding: 26px; }
  .contact-info { padding: 32px 24px; }

  .nav-links.open {
    display: flex;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 30px rgba(20,40,70,.08);
  }
}
