/* ===== Base ===== */
:root {
  --blue: #1565C0;
  --blue-dark: #0D47A1;
  --blue-light: #1E88E5;
  --ink: #0F172A;
  --ink2: #475569;
  --bg: #F8FAFC;
  --line: #E2E8F0;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(13, 71, 161, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

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

/* ===== Navbar ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.navbar.scrolled { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; color: var(--blue-dark); }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  background: linear-gradient(160deg, var(--blue-light), var(--blue-dark));
  color: #fff; border-radius: 10px; font-size: 18px;
}
.nav-links { display: flex; gap: 26px; }
.nav-links a { font-size: 15px; color: var(--ink2); font-weight: 600; transition: color .2s; }
.nav-links a:hover { color: var(--blue); }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: .3s; }
.hamburger.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  background: linear-gradient(168deg, var(--blue-light) 0%, var(--blue) 52%, var(--blue-dark) 100%);
  color: #fff; text-align: center;
  padding: 90px 20px 120px;
  overflow: hidden;
}
.hero-badge {
  display: inline-block; background: rgba(255,255,255,0.16);
  padding: 7px 18px; border-radius: 30px; font-size: 13px; margin-bottom: 22px;
  border: 1px solid rgba(255,255,255,0.25);
}
.hero h1 { font-size: 44px; line-height: 1.35; margin-bottom: 18px; }
.hero-sub { max-width: 620px; margin: 0 auto 30px; font-size: 17px; opacity: 0.94; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-wave {
  position: absolute; bottom: -1px; left: 0; right: 0; height: 60px;
  background: var(--bg);
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
}

/* ===== Buttons ===== */
.btn { display: inline-block; padding: 13px 28px; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; transition: transform .15s, box-shadow .2s; border: none; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: #fff; color: var(--blue-dark); box-shadow: 0 6px 18px rgba(0,0,0,0.15); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.6); }
.section .btn-primary { background: linear-gradient(160deg, var(--blue-light), var(--blue-dark)); color: #fff; }

/* ===== Sections ===== */
.section { padding: 72px 0; }
.section-alt { background: #fff; }
.section-title { text-align: center; font-size: 30px; color: var(--ink); margin-bottom: 8px; }
.section-lead { text-align: center; color: var(--ink2); margin-bottom: 44px; font-size: 15px; }

/* ===== Cards ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; text-align: center; transition: transform .25s, box-shadow .25s;
  border-top: 4px solid var(--accent, var(--blue));
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-icon {
  width: 66px; height: 66px; margin: 0 auto 18px; display: grid; place-items: center;
  font-size: 30px; border-radius: 18px;
  background: color-mix(in srgb, var(--accent) 12%, #fff);
}
.card h3 { font-size: 19px; margin-bottom: 10px; color: var(--accent); }
.card p { color: var(--ink2); font-size: 14.5px; }

/* ===== Services ===== */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service {
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px 18px; text-align: center; cursor: pointer; transition: .2s;
}
.service:hover { background: #fff; border-color: var(--blue-light); box-shadow: var(--shadow); transform: translateY(-3px); }
.service span { font-size: 34px; display: block; margin-bottom: 10px; }
.service h4 { font-size: 15px; color: var(--ink); }

/* ===== Stats ===== */
.stats { background: linear-gradient(168deg, var(--blue) 0%, var(--blue-dark) 100%); color: #fff; }
.stats .section-title { color: #fff; margin-bottom: 40px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-num { font-size: 40px; font-weight: 800; }
.stat-label { font-size: 15px; opacity: 0.9; margin-top: 4px; }

/* ===== Contact ===== */
.contact-form { max-width: 560px; margin: 0 auto; }
.contact-form .row { display: flex; gap: 14px; margin-bottom: 14px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: 15px; background: var(--bg); transition: border-color .2s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--blue-light); background: #fff; }
.contact-form textarea { margin-bottom: 16px; resize: vertical; }
.contact-form .btn { width: 100%; }
.form-status { text-align: center; margin-top: 14px; color: #059669; font-weight: 600; min-height: 20px; }

/* ===== Footer ===== */
.footer { background: var(--ink); color: #cbd5e1; text-align: center; padding: 40px 20px; }
.footer-brand { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.footer-copy { margin-top: 12px; font-size: 13px; opacity: 0.7; }

/* ===== To top ===== */
.to-top {
  position: fixed; bottom: 24px; left: 24px; width: 46px; height: 46px;
  background: var(--blue); color: #fff; border: none; border-radius: 50%;
  font-size: 20px; cursor: pointer; opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .2s; box-shadow: var(--shadow); z-index: 90;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .hero h1 { font-size: 32px; }
  .cards, .services-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .nav-links {
    position: fixed; top: 66px; right: 0; left: 0;
    background: #fff; flex-direction: column; gap: 0; padding: 10px 20px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-140%); transition: transform .3s; box-shadow: var(--shadow);
  }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .hamburger { display: flex; }
}
@media (max-width: 500px) {
  .cards, .services-grid { grid-template-columns: 1fr; }
  .contact-form .row { flex-direction: column; }
}
