:root {
  --primary: #0D8A7C;
  --primary-dark: #0A6B61;
  --primary-light: #14B8A6;
  --primary-surface: #E6F7F5;
  --secondary: #1B6B93;
  --secondary-light: #E8F3F8;
  --bg: #F5F8F9;
  --surface: #ffffff;
  --text: #14222A;
  --muted: #5A6B73;
  --hint: #8A9AA3;
  --border: #D5E0E4;
  --success: #1F9D6A;
  --shadow: 0 14px 36px rgba(13, 138, 124, 0.14);
  --radius: 18px;
  --radius-lg: 24px;
  --font: "Cairo", "Manrope", system-ui, -apple-system, sans-serif;
  --space: 1rem;
  --header-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(27, 107, 147, 0.12), transparent 60%),
    radial-gradient(700px 360px at -10% 10%, rgba(13, 138, 124, 0.14), transparent 55%),
    var(--bg);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  padding-bottom: calc(72px + var(--safe-bottom));
}

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

a {
  color: var(--primary-dark);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

a:hover { color: var(--secondary); }

button,
.btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.container {
  width: min(1120px, calc(100% - 1.25rem));
  margin-inline: auto;
}

.bg-glow { display: none; }

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(245, 248, 249, 0.92);
  border-bottom: 1px solid rgba(213, 224, 228, 0.85);
  padding-top: var(--safe-top);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--text);
  min-width: 0;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(13, 138, 124, 0.22);
}

.brand strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.15;
}

.brand small {
  color: var(--hint);
  font-size: .7rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}

.nav-toggle {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  display: none;
  position: absolute;
  inset-inline: 0;
  top: calc(100% + .35rem);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: .75rem;
  flex-direction: column;
  align-items: stretch;
  gap: .25rem;
  box-shadow: var(--shadow);
  max-height: min(78vh, 560px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.site-nav.open { display: flex; }

.site-nav a {
  color: var(--muted);
  font-weight: 700;
  font-size: 1rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--primary);
  background: var(--primary-surface);
}

.lang-switch {
  border: 1px solid var(--border) !important;
  justify-content: center !important;
  margin-top: .25rem;
}

.site-nav .btn {
  width: 100%;
  margin-top: .35rem;
  justify-content: center;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff !important;
  border: none;
  border-radius: 999px;
  padding: .95rem 1.25rem;
  min-height: 48px;
  font-weight: 800;
  font-family: inherit;
  font-size: 1rem;
  box-shadow: 0 10px 24px rgba(13, 138, 124, 0.28);
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
  text-align: center;
}

.btn:active { transform: scale(.98); }
.btn-sm { padding: .7rem 1rem; min-height: 44px; font-size: .95rem; }
.btn-ghost {
  background: transparent;
  color: var(--primary) !important;
  border: 1.5px solid var(--primary);
  box-shadow: none;
}
.btn-block { width: 100%; }

/* ========== Hero ========== */
.hero {
  padding: 1.25rem 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--primary-surface);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: .4rem .85rem;
  font-weight: 800;
  font-size: .8rem;
  margin-bottom: .85rem;
}

.hero h1 {
  margin: 0 0 .85rem;
  font-size: clamp(1.55rem, 7.2vw, 2.15rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.hero p.lead {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.7;
}

.hero-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: .7rem;
  margin-bottom: 1rem;
}

.hero-actions .btn { width: 100%; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
}

.stat {
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .7rem .55rem;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: .82rem;
  color: var(--primary-dark);
  line-height: 1.3;
}

.stat span {
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.35;
  display: block;
  margin-top: .15rem;
}

.hero-visual {
  position: relative;
  min-height: auto;
  order: -1;
}

.hero-visual .main-shot {
  width: 100%;
  height: min(52vw, 260px);
  min-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-visual .float-card {
  position: absolute;
  width: 38%;
  max-width: 132px;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: var(--shadow);
  animation: floaty 5s ease-in-out infinite;
}

.hero-visual .float-card img {
  width: 100%;
  height: 78px;
  object-fit: cover;
}

.hero-visual .float-a { inset-inline-start: 4%; bottom: 8%; animation-delay: .2s; }
.hero-visual .float-b { inset-inline-end: 4%; top: 8%; animation-delay: 1s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ========== Sections ========== */
.section { padding: 2rem 0; }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 1.25rem;
}

.section-head h2 {
  margin: 0 0 .45rem;
  font-size: clamp(1.35rem, 5.5vw, 1.85rem);
  line-height: 1.35;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(20, 34, 42, 0.05);
  display: grid;
  grid-template-columns: 112px 1fr;
  min-height: 112px;
}

.feature-card img {
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
}

.feature-card .body {
  padding: .9rem .95rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-card h3 {
  margin: 0 0 .3rem;
  font-size: 1rem;
  line-height: 1.3;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.55;
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  align-items: center;
}

.split img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.split .copy h2 {
  margin: 0 0 .6rem;
  font-size: clamp(1.3rem, 5vw, 1.7rem);
  line-height: 1.35;
}

.split .copy p {
  color: var(--muted);
  font-size: .95rem;
  margin: 0 0 1rem;
}

.split .copy .btn { width: 100%; }

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}

.step {
  background: linear-gradient(180deg, #fff, var(--primary-surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: .85rem;
  align-items: start;
}

.step .num {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 800;
  margin: 0;
}

.step h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: .9rem; }

.cta-band {
  margin: .5rem 0 1.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  color: #fff;
  min-height: 220px;
  display: grid;
  align-items: end;
}

.cta-band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-band .overlay {
  position: relative;
  z-index: 1;
  padding: 1.35rem 1.15rem calc(1.35rem + .25rem);
  background: linear-gradient(180deg, rgba(10, 107, 97, .25), rgba(10, 70, 75, .92));
}

.cta-band h2 {
  margin: 0 0 .45rem;
  font-size: clamp(1.25rem, 5vw, 1.6rem);
  line-height: 1.35;
}

.cta-band p {
  margin: 0 0 1rem;
  opacity: .95;
  font-size: .92rem;
}

.cta-band .btn {
  width: 100%;
  background: #fff !important;
  color: var(--primary-dark) !important;
}

/* ========== Inner pages ========== */
.page-hero { padding: 1rem 0 .65rem; }

.page-hero .banner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  min-height: 180px;
}

.page-hero .banner img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.page-hero .banner .caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.1rem 1rem;
  background: linear-gradient(transparent, rgba(10, 40, 45, .82));
  color: #fff;
}

.page-hero .banner .caption h1 {
  margin: 0 0 .25rem;
  font-size: clamp(1.35rem, 5.5vw, 1.75rem);
  line-height: 1.3;
}

.page-hero .banner .caption p {
  margin: 0;
  opacity: .92;
  font-size: .9rem;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin: .85rem 0 1.5rem;
  box-shadow: 0 8px 22px rgba(20, 34, 42, 0.04);
}

.content-card p,
.content-card li {
  font-size: .95rem;
  line-height: 1.7;
}

.content-card ul,
.steps-list { padding-inline-start: 1.15rem; }
.steps-list li { margin-bottom: .55rem; }

.download-gallery {
  margin-top: 1.15rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
}

.download-gallery figure {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.download-gallery img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.download-gallery figcaption {
  padding: .8rem 1rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.download-gallery .download-wide {
  display: grid;
  grid-template-columns: 1fr;
}

.download-gallery .download-wide img { height: 180px; }

.store-card {
  display: block;
  color: inherit;
  border-radius: 18px;
  overflow: hidden;
}
.store-card figure { margin: 0; height: 100%; }
.store-card:active { transform: scale(.99); }
.btn.is-disabled,
a.btn.is-disabled {
  opacity: .55;
  pointer-events: none;
  box-shadow: none;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
  margin-top: 1rem;
}

.form-grid .full { grid-column: 1 / -1; }

label {
  display: block;
  font-weight: 800;
  margin-bottom: .35rem;
  font-size: .9rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: .95rem 1rem;
  min-height: 48px;
  font: inherit;
  font-size: 16px; /* يمنع تكبير iOS التلقائي */
  background: #fff;
  color: var(--text);
}

textarea { min-height: 140px; resize: vertical; }

input:focus,
textarea:focus {
  outline: 2px solid rgba(13, 138, 124, .25);
  border-color: var(--primary);
}

.alert {
  padding: .9rem 1rem;
  border-radius: 14px;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: .92rem;
}

.alert-ok { background: #e8f8f0; color: var(--success); }
.alert-err { background: #fdeeee; color: #C44747; }

/* ========== Footer ========== */
.site-footer {
  background: #102028;
  color: rgba(255, 255, 255, .84);
  padding: 2rem 0 calc(1.25rem + var(--safe-bottom));
  margin-top: 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.footer-brand {
  margin-bottom: .55rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: .65rem;
}

.footer-brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
}

.site-footer h4 {
  margin: 0 0 .55rem;
  color: #fff;
  font-size: 1rem;
}

.site-footer a {
  display: block;
  color: rgba(255, 255, 255, .78);
  margin-bottom: .2rem;
  padding: .45rem 0;
  min-height: 40px;
}

.site-footer a:hover { color: #fff; }

.footer-bottom {
  margin-top: 1.25rem;
  padding-top: .9rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .85rem;
}

/* ========== Sticky mobile CTA ========== */
.mobile-cta {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 90;
  padding: .65rem .85rem calc(.65rem + var(--safe-bottom));
  background: rgba(245, 248, 249, .94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
}

.mobile-cta .btn {
  min-height: 46px;
  padding: .7rem .5rem;
  font-size: .92rem;
  box-shadow: none;
}

.mobile-cta .btn-ghost { background: #fff; }

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 30, 36, .35);
  z-index: 90;
}

.nav-backdrop.show { display: block; }

/* ========== Tablet ========== */
@media (min-width: 640px) {
  .container { width: min(1120px, calc(100% - 2rem)); }
  .hero-actions { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .feature-card img {
    height: 150px;
    min-height: 150px;
  }
  .steps { grid-template-columns: 1fr 1fr; }
  .download-gallery { grid-template-columns: 1fr 1fr; }
  .download-gallery .download-wide {
    grid-column: 1 / -1;
    grid-template-columns: 1.4fr .6fr;
  }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .hero-visual .main-shot {
    height: 300px;
    min-height: 280px;
  }
  .stat strong { font-size: .95rem; }
  .stat span { font-size: .78rem; }
}

/* ========== Desktop ========== */
@media (min-width: 921px) {
  body { padding-bottom: 0; font-size: 17px; }
  .mobile-cta,
  .nav-backdrop { display: none !important; }

  .nav-toggle { display: none; }

  .header-inner { min-height: 72px; }

  .site-nav {
    display: flex !important;
    position: static;
    inset: auto;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: .75rem;
    box-shadow: none;
    max-height: none;
    overflow: visible;
  }

  .site-nav a {
    padding: .35rem .25rem;
    min-height: auto;
    font-size: .95rem;
    border-radius: 0;
  }

  .site-nav a.active,
  .site-nav a:hover { background: transparent; }

  .site-nav .btn {
    width: auto;
    margin-top: 0;
  }

  .lang-switch {
    border-radius: 999px !important;
    padding: .3rem .75rem !important;
  }

  .hero {
    padding: 3.2rem 0 2rem;
    grid-template-columns: 1.05fr .95fr;
    gap: 2.4rem;
    align-items: center;
  }

  .hero-visual { order: 0; min-height: 420px; }

  .hero-visual .main-shot {
    height: 420px;
    min-height: 420px;
  }

  .hero-visual .float-card {
    width: min(220px, 48%);
    max-width: none;
    border-radius: 18px;
    border-width: 4px;
  }

  .hero-visual .float-card img { height: 140px; }
  .hero-visual .float-a { inset-inline-start: -6%; bottom: 16%; }
  .hero-visual .float-b { inset-inline-end: -4%; top: 8%; }

  .hero h1 { font-size: clamp(2rem, 3.4vw, 3rem); }
  .hero p.lead { font-size: 1.08rem; }
  .hero-actions {
    display: flex;
    grid-template-columns: none;
  }
  .hero-actions .btn { width: auto; }

  .hero-stats { gap: .85rem; }
  .stat { text-align: start; padding: .9rem; }
  .stat strong { font-size: 1.15rem; }
  .stat span { font-size: .85rem; }

  .section { padding: 3.4rem 0; }
  .section-head { margin-bottom: 2rem; }
  .section-head h2 { font-size: clamp(1.7rem, 2.5vw, 2.2rem); }

  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
  }

  .feature-card {
    display: block;
    transition: transform .2s ease;
  }

  .feature-card:hover { transform: translateY(-4px); }
  .feature-card img { height: 170px; }
  .feature-card .body { padding: 1.15rem 1.2rem 1.35rem; }
  .feature-card h3 { font-size: 1.1rem; }
  .feature-card p { font-size: .95rem; }

  .split {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .split img { height: 360px; }
  .split .copy .btn { width: auto; }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .step {
    display: block;
    padding: 1.4rem;
  }

  .step .num { margin-bottom: .8rem; }

  .cta-band {
    min-height: 280px;
    align-items: center;
    margin: 1rem 0 3rem;
    border-radius: 30px;
  }

  .cta-band .overlay {
    padding: 2.5rem;
    background: linear-gradient(90deg, rgba(10, 107, 97, .88), rgba(27, 107, 147, .55));
  }

  .cta-band .btn { width: auto; }

  .page-hero { padding: 2.4rem 0 1rem; }
  .page-hero .banner { border-radius: 28px; min-height: 240px; }
  .page-hero .banner img { height: 280px; }
  .page-hero .banner .caption { padding: 1.5rem; }
  .page-hero .banner .caption h1 { font-size: 2rem; }

  .content-card {
    padding: 1.5rem;
    margin: 1.25rem 0 3rem;
    border-radius: 22px;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 1.5rem;
  }

  .site-footer {
    padding: 3rem 0 1.5rem;
    margin-top: 2rem;
  }

  .site-footer a {
    padding: 0;
    min-height: auto;
    margin-bottom: .35rem;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .hero h1 { font-size: 1.4rem; }
  .hero-stats { gap: .4rem; }
  .stat { padding: .55rem .35rem; }
  .stat strong { font-size: .74rem; }
  .stat span { font-size: .62rem; }
  .feature-card { grid-template-columns: 96px 1fr; }
  .mobile-cta { grid-template-columns: 1fr; }
}
