/* ============================================
   MAOF ENGINEERS — DESIGN SYSTEM
   ============================================ */

/* --- Tokens --- */
:root {
  --c-navy:   #1a2e4a;
  --c-gold:   #e8a020;
  --c-gold-d: #c8861a;
  --c-white:  #ffffff;
  --c-bg:     #f5f6f8;
  --c-bg2:    #eef0f4;
  --c-text:   #2d2d2d;
  --c-muted:  #6b7280;
  --c-border: #d1d5db;

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow:    0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);

  --transition: 0.2s ease;

  --container: 1200px;
  --gap: 1.5rem;
}

/* --- Utilities --- */
.hidden { display: none !important; }

/* --- Skip link (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  right: 0;
  background: var(--c-navy);
  color: var(--c-white);
  padding: .75rem 1.5rem;
  z-index: 9999;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top .2s;
}
.skip-link:focus { top: 0; outline: 2px solid var(--c-gold); outline-offset: 2px; }
body.ltr .skip-link { right: auto; left: 0; }

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }

/* --- Base --- */
body {
  font-family: 'Heebo', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-white);
  direction: rtl;
}
body.ltr {
  direction: ltr;
  font-family: 'Inter', sans-serif;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--c-navy);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { color: var(--c-text); }
.text-muted { color: var(--c-muted); }
.text-gold  { color: var(--c-gold); }
.text-navy  { color: var(--c-navy); }
.text-center { text-align: center; }
.text-white { color: var(--c-white); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 5rem 0; }
.section--alt { background: var(--c-bg); }
.section--navy { background: var(--c-navy); color: var(--c-white); }
.section--navy h2, .section--navy h3 { color: var(--c-white); }

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-header p {
  margin-top: .75rem;
  font-size: 1.1rem;
  color: var(--c-muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.section-label {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: .5rem;
}

/* --- Grid --- */
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--c-gold);
  color: var(--c-navy);
}
.btn-primary:hover {
  background: var(--c-gold-d);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-outline {
  border: 2px solid var(--c-white);
  color: var(--c-white);
}
.btn-outline:hover {
  background: var(--c-white);
  color: var(--c-navy);
}
.btn-navy {
  background: var(--c-navy);
  color: var(--c-white);
}
.btn-navy:hover {
  background: #142338;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* --- Cards --- */
.card {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: rgba(232,160,32,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--c-gold);
}
.card-icon svg { width: 26px; height: 26px; }

/* --- Gold accent line --- */
.accent-line {
  width: 48px;
  height: 4px;
  background: var(--c-gold);
  border-radius: 2px;
  margin: 1rem 0;
}
.text-center .accent-line { margin-left: auto; margin-right: auto; }

/* --- Divider --- */
hr { border: none; border-top: 1px solid var(--c-border); }

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: .25rem .75rem;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
  background: rgba(232,160,32,.15);
  color: var(--c-gold-d);
}

/* --- Stat block --- */
.stat-value {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--c-gold);
  line-height: 1;
}
.stat-label {
  font-size: .95rem;
  color: var(--c-muted);
  margin-top: .25rem;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: rgba(26,46,74,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-lg); }

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

.logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}
.logo-mark {
  width: 40px;
  height: 40px;
  background: var(--c-gold);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--c-navy);
  letter-spacing: -.03em;
}
.logo-text {
  line-height: 1.2;
  color: var(--c-white);
}
.logo-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}
.logo-text span {
  font-size: .75rem;
  color: rgba(255,255,255,.6);
}

.main-nav { display: flex; align-items: center; gap: .25rem; }
.main-nav a {
  padding: .5rem .9rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  color: rgba(255,255,255,.8);
  transition: all var(--transition);
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--c-white);
  background: rgba(255,255,255,.1);
}

.header-actions { display: flex; align-items: center; gap: .75rem; }

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: .25rem;
  background: rgba(255,255,255,.1);
  border-radius: 100px;
  padding: .2rem .3rem;
}
.lang-switcher a {
  padding: .25rem .6rem;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  transition: all var(--transition);
}
.lang-switcher a.active,
.lang-switcher a:hover {
  background: var(--c-gold);
  color: var(--c-navy);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Mobile nav */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    inset: 72px 0 auto;
    flex-direction: column;
    align-items: stretch;
    background: var(--c-navy);
    padding: 1rem;
    gap: .25rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .header-actions .btn { display: none; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--c-navy) 0%, #0f1e30 60%, #1a3555 100%);
  position: relative;
  overflow: hidden;
  padding-top: 72px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero-bg.jpg') center/cover no-repeat;
  opacity: .12;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--c-white), transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 1.5rem;
}
.hero-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-gold);
}
.hero h1 { color: var(--c-white); margin-bottom: 1.25rem; }
.hero h1 em { color: var(--c-gold); font-style: normal; }
.hero p {
  font-size: 1.2rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 2.5rem;
  max-width: 520px;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
  background: var(--c-navy);
  padding: 3rem 0;
}
.stats-bar .grid { text-align: center; }
.stats-bar .stat-label { color: rgba(255,255,255,.65); }

/* ============================================
   SERVICES
   ============================================ */
.services-grid { margin-top: 0; }
.service-card .card-icon { background: rgba(26,46,74,.07); color: var(--c-navy); }
.service-card:hover .card-icon { background: rgba(232,160,32,.12); color: var(--c-gold); }
.service-card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.service-card p { font-size: .95rem; color: var(--c-muted); }

/* ============================================
   ABOUT STRIP
   ============================================ */
.about-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-strip img {
  border-radius: var(--radius-lg);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}
.about-strip .text-content h2 { margin-bottom: 1rem; }
.about-strip .text-content p { color: var(--c-muted); margin-bottom: 1.5rem; }

/* ============================================
   STAKEHOLDERS
   ============================================ */
.stakeholder-card { text-align: center; }
.stakeholder-card h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--c-navy);
}
.stakeholder-card ul li {
  font-size: .9rem;
  color: var(--c-muted);
  padding: .35rem 0;
  border-bottom: 1px solid var(--c-border);
}
.stakeholder-card ul li:last-child { border-bottom: none; }

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: linear-gradient(135deg, var(--c-navy), #0f1e30);
  text-align: center;
  padding: 6rem 0;
}
.cta-section h2 { color: var(--c-white); margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,.7); font-size: 1.15rem; margin-bottom: 2rem; }

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}
.contact-info h3 { margin-bottom: 1.5rem; }
.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.contact-item-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: rgba(26,46,74,.07);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--c-navy);
}
.contact-item-icon svg { width: 20px; height: 20px; }
.contact-item-text strong { display: block; font-size: .85rem; color: var(--c-muted); margin-bottom: .15rem; }
.contact-item-text span { font-weight: 500; }

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--c-navy);
  margin-bottom: .4rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  font: inherit;
  font-size: .95rem;
  background: var(--c-white);
  color: var(--c-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  direction: inherit;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--c-gold);
  box-shadow: 0 0 0 3px rgba(232,160,32,.15);
}

/* --- Focus visible (WCAG AA keyboard nav) --- */
:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: 2px;
}
.btn:focus-visible {
  outline-offset: 4px;
}
.main-nav a:focus-visible,
.footer-links a:focus-visible,
.lang-switcher a:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
  background: rgba(26,46,74,.05);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--c-gold);
}
.form-success svg { color: var(--c-gold); margin: 0 auto 1rem; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: #0d1a29;
  color: rgba(255,255,255,.65);
  padding: 3rem 0 1.5rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 1.5rem;
}
.footer-logo .logo-text { color: rgba(255,255,255,.9); }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { font-size: .9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--c-gold); }
.footer-social { display: flex; gap: .75rem; }
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  color: rgba(255,255,255,.7);
}
.footer-social a:hover { background: var(--c-gold); color: var(--c-navy); }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom {
  text-align: center;
  font-size: .85rem;
  color: rgba(255,255,255,.35);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 3.5rem 0; }
  .grid-2, .grid-3, .about-strip, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-strip img { order: -1; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-social { justify-content: center; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .stats-bar .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   LTR OVERRIDES (English)
   ============================================ */
body.ltr .hero-label::before { /* already works */ }
body.ltr .accent-line { margin-left: 0; }
body.ltr .contact-grid { grid-template-columns: 1.4fr 1fr; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { opacity: 0; }
.fade-up.visible { animation: fadeUp .5s ease forwards; }
.fade-up:nth-child(2) { animation-delay: .1s; }
.fade-up:nth-child(3) { animation-delay: .2s; }
.fade-up:nth-child(4) { animation-delay: .3s; }
.fade-up:nth-child(5) { animation-delay: .4s; }
.fade-up:nth-child(6) { animation-delay: .5s; }
