:root {
  --navy: #071a2b;
  --blue: #168bd2;
  --cyan: #49b8e8;
  --light: #f4f8fb;
  --ink: #17232e;
  --muted: #62717e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--ink); background: #fff; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(1160px, 92%); margin: auto; }

nav {
  position: sticky; top: 0; z-index: 40;
  background: #071a2b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: env(safe-area-inset-top, 0);
}
.nav {
  min-height: 76px; position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 800; min-width: 0; }
.brand img { width: 58px; height: 58px; object-fit: contain; border-radius: 8px; flex-shrink: 0; }
.brand small { display: block; font-size: 10px; letter-spacing: 2px; color: #9fd8f3; }
.links { display: flex; gap: 25px; color: #dceaf3; font-size: 14px; }
.links a { padding: 8px 0; }
.links a:hover { color: #61c5ef; }

.menu-toggle {
  display: none; width: 44px; height: 44px; margin-left: auto; flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.22); background: transparent; border-radius: 8px;
  padding: 11px 10px; flex-direction: column; justify-content: center; gap: 5px; cursor: pointer;
}
.menu-toggle span { display: block; height: 2px; width: 100%; background: #fff; border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.btn {
  display: inline-block; padding: 13px 21px; border-radius: 7px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff; font-weight: 700; border: 0; cursor: pointer;
}
.btn.alt { background: transparent; border: 1px solid #b9d8e9; }

.hero {
  min-height: 0; color: #fff; display: flex; align-items: center; position: relative;
  background: linear-gradient(90deg, rgba(3, 18, 31, 0.95) 0%, rgba(3, 18, 31, 0.82) 48%, rgba(3, 18, 31, 0.35) 100%),
    url("assets/img-34d3312e82b6.png") center/cover;
  scroll-margin-top: 88px;
}
.hero-content {
  width: min(860px, 92%); max-width: 860px; margin: auto;
  padding: 52px 0 84px; text-align: center;
}
.hero-content > p { margin-left: auto; margin-right: auto; max-width: 760px; }
.eyebrow { color: #6cccf2; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; }
h1 {
  font-size: clamp(36px, 4.6vw, 62px); line-height: 1.05;
  margin: 12px 0 16px; letter-spacing: -1.4px;
}
.hero p { font-size: 18px; color: #dbe7ee; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; justify-content: center; }

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: #d9e5ec; margin-top: -32px; position: relative; z-index: 5;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 18px 40px rgba(7, 26, 43, 0.12);
}
.stat {
  background: #fff; padding: 22px 16px; text-align: center;
  min-height: 124px; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.stat strong {
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(22px, 2vw, 30px); line-height: 1.15; min-height: 2.45em; color: #0a77b7;
}
.stat span { font-size: 13px; color: var(--muted); }

section { padding: 92px 0; scroll-margin-top: 88px; }
.section-head { max-width: 820px; margin-bottom: 42px; }
.section-head h2 { font-size: 40px; line-height: 1.15; margin: 8px 0 12px; color: var(--navy); }
.section-head p { color: var(--muted); }
h1, .section-head h2, .about h2, .contact-info h2, .card h3 { text-wrap: balance; }

.services { background: var(--light); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.card {
  background: #fff; padding: 28px; padding-top: 18px; border-radius: 10px;
  border: 1px solid #e2ebf0; box-shadow: 0 8px 25px rgba(9, 40, 65, 0.05);
  overflow: hidden; display: flex; flex-direction: column; height: 100%;
}
.card .num { font-size: 12px; font-weight: 800; color: var(--blue); letter-spacing: 2px; }
.card h3 { font-size: 20px; margin: 10px 0; line-height: 1.3; }
.card p { color: var(--muted); font-size: 14px; margin: 0; margin-top: auto; }
.grid .card:last-child:nth-child(3n+1) { grid-column: 2; }

.service-slider {
  height: 210px; margin: -18px -28px 22px; position: relative; overflow: hidden; background: #eaf2f7;
}
.service-slider img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.01); transition: opacity 0.8s ease, transform 4.5s ease;
}
.service-slider img.active { opacity: 1; transform: scale(1); }

.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.portrait {
  width: min(100%, 420px); aspect-ratio: 1; margin-inline: auto;
  border-radius: 50%; overflow: hidden; display: block;
  box-shadow: 0 18px 44px rgba(7, 26, 43, 0.16);
}
.portrait img { width: 112%; height: 112%; margin: -6%; object-fit: cover; object-position: center; }
.about h2 { font-size: 42px; margin: 8px 0 20px; color: var(--navy); }
.about p { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.tag { background: #edf6fb; color: #126b9e; padding: 7px 11px; border-radius: 30px; font-size: 12px; font-weight: 700; }

.gallery { background: var(--navy); color: #fff; }
.gallery .section-head h2 { color: #fff; }
.gallery .section-head p { color: #bad0de; }
.photos { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 260px 260px; gap: 12px; }
.photos img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.photos img:first-child { grid-row: 1 / 3; }

.contact { background: #f5f9fc; }
.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 45px; }
.contact-info { background: var(--navy); color: #fff; padding: 38px; border-radius: 12px; }
.contact-info h2 { font-size: 36px; margin-top: 0; }
.contact-info p { color: #bfd2df; }
.contact-line { padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, 0.13); font-size: 14px; }
.contact-info a { color: #b9ddf3; text-decoration: underline; text-underline-offset: 3px; }
.arabic { direction: rtl; font-family: "Geeza Pro", "Noto Naskh Arabic", Arial, sans-serif; display: inline-block; }

form { background: #fff; padding: 36px; border-radius: 12px; box-shadow: 0 12px 30px rgba(8, 35, 55, 0.08); }
.form-title { font-size: 25px; margin-top: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: #4d5f6d; }
input, textarea { width: 100%; padding: 13px; border: 1px solid #d6e0e6; border-radius: 6px; font: inherit; }
textarea { min-height: 135px; resize: vertical; }
.full { grid-column: 1 / -1; }
.optional { font-weight: 400; color: #7a8791; }

.form-status { margin: 0 0 16px; padding: 12px 14px; border-radius: 8px; font-size: 14px; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: #e8f7ee; color: #1f6b42; border: 1px solid #b9e6c9; }
.form-status.err { background: #fdeeee; color: #9b2c2c; border: 1px solid #f3c0c0; }
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
form .btn[disabled] { opacity: 0.65; cursor: not-allowed; }

footer { background: #04131f; color: #9fb4c2; padding: 30px 0; font-size: 13px; }
.foot { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.visitor-counter { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: #d5e4ee; }
.visitor-counter strong { background: rgba(255, 255, 255, 0.08); color: #8fd0f2; padding: 4px 9px; border-radius: 6px; font-size: 15px; min-width: 42px; text-align: center; }
.visitor-icon { color: #168bd2; }

.mobile-quick-bar { display: none; }

.links a:focus-visible, .btn:focus-visible, .menu-toggle:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #49b8e8; outline-offset: 3px;
}

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid .card:last-child:nth-child(3n+1) { grid-column: auto; }
  .grid .card:last-child:nth-child(odd) { grid-column: 1 / -1; width: min(100%, 520px); justify-self: center; }
}

@media (max-width: 940px) {
  .links:not(.open) { display: none !important; }
  .menu-toggle { display: flex; order: 3; width: 48px; height: 48px; }
  .brand { order: 1; flex: 1; }
  .links { order: 4; }
  nav .btn { display: none; }
  .links {
    display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 30;
    flex-direction: column; gap: 0; padding: 6px 4% 14px;
    background: #071a2b; border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
  .links.open {
    display: flex; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
    max-height: calc(100dvh - 64px); overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .links a { padding: 14px 4px; min-height: 48px; display: flex; align-items: center; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 16px; }
  .nav { position: static; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 860px) {
  html { scroll-padding-top: 72px; }
  section, .hero { scroll-margin-top: 72px; }
  .wrap { width: min(100%, 94%); }
  .nav { min-height: 64px; gap: 12px; padding-block: 8px; }
  .brand img { width: 44px; height: 44px; }
  .brand > div { font-size: 15px; line-height: 1.15; }
  .brand small { font-size: 9px; letter-spacing: 1.2px; }
  .hero {
    background: linear-gradient(180deg, rgba(3, 18, 31, 0.94) 0%, rgba(3, 18, 31, 0.9) 100%),
      url("assets/img-34d3312e82b6.png") center/cover !important;
  }
  .hero-content { padding: 28px 0 32px !important; }
  .eyebrow { font-size: 11px; letter-spacing: 1.6px; }
  h1 { font-size: clamp(30px, 8.2vw, 38px) !important; line-height: 1.08; }
  .hero p { font-size: 15px !important; line-height: 1.55; color: #e8f2f8; }
  .hero-actions { flex-direction: column; gap: 10px; margin-top: 20px; width: 100%; }
  .hero-actions .btn { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; }
  .stats, .grid, .about-grid, .contact-grid, .form-grid { grid-template-columns: 1fr; }
  .stats { margin-top: 0 !important; gap: 10px; background: transparent !important; box-shadow: none !important; border-radius: 14px; }
  .stat { border-radius: 12px; box-shadow: 0 10px 24px rgba(7, 26, 43, 0.08); min-height: 0; }
  .stat strong { min-height: 0; font-size: 26px; }
  .grid .card:last-child:nth-child(odd) { grid-column: auto; width: auto; justify-self: stretch; }
  section { padding: 52px 0 !important; }
  .section-head { margin-bottom: 28px; }
  .section-head h2, .about h2, .contact-info h2 { font-size: 28px !important; }
  .section-head p, .about p { font-size: 15px; }
  .about-grid { gap: 28px; }
  .portrait { width: min(72vw, 280px); }
  .gallery .section-head p { color: #c5d9e6; }
  .photos { grid-template-columns: 1fr 1fr !important; grid-template-rows: none !important; }
  .photos img { height: auto !important; aspect-ratio: 4/3; }
  .photos img:first-child { grid-column: 1 / -1; grid-row: auto !important; aspect-ratio: 16/10; }
  .card { padding: 20px; border-radius: 12px; }
  .service-slider { height: 200px !important; margin: -18px -20px 18px; width: calc(100% + 40px); }
  .contact-grid { gap: 16px; }
  .contact-info, form { padding: 20px !important; border-radius: 12px; }
  .contact-line { font-size: 15px; padding: 12px 0; }
  input, textarea { font-size: 16px !important; padding: 14px 12px; border-radius: 8px; }
  form label { font-size: 11px; }
  .form-title { font-size: 22px !important; }
  form .btn { width: 100%; min-height: 48px; font-size: 16px; }
  .foot { flex-direction: column; text-align: center; gap: 12px; }
  footer { padding: 24px 0 calc(76px + env(safe-area-inset-bottom, 0px)) !important; font-size: 12px; }
  .mobile-quick-bar {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(7, 26, 43, 0.96); border-top: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .mobile-quick-bar a {
    min-height: 44px; display: flex; align-items: center; justify-content: center;
    border-radius: 8px; font-size: 13px; font-weight: 700; color: #fff; background: rgba(255, 255, 255, 0.08);
  }
  .mobile-quick-bar a.primary { background: linear-gradient(135deg, var(--blue), var(--cyan)); }
}

@media (max-width: 520px) {
  h1 { font-size: 34px; letter-spacing: -0.8px; }
  .btn { width: 100%; text-align: center; }
  .stats { border-radius: 0; }
}

@media (max-width: 420px) {
  .brand small { display: none; }
  .photos { grid-template-columns: 1fr !important; }
  .photos img:first-child { aspect-ratio: 4/3; }
}
