:root {
  --navy: #224368;
  --navy-2: #18324f;
  --navy-3: #0f263d;
  --sky: #dee9ef;
  --sky-2: #edf4f7;
  --ink: #142437;
  --muted: #64748b;
  --bg: #f5f8fa;
  --surface: rgba(255,255,255,.82);
  --surface-solid: #ffffff;
  --line: rgba(34,67,104,.14);
  --accent: #6ea4c5;
  --accent-2: #9bc6db;
  --success: #2f7d66;
  --shadow: 0 18px 50px rgba(22,45,73,.12);
  --shadow-soft: 0 10px 28px rgba(22,45,73,.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --container: 1180px;
}

html[data-theme="dark"] {
  --ink: #f1f6f9;
  --muted: #a8bac9;
  --bg: #0b1621;
  --surface: rgba(18,35,51,.82);
  --surface-solid: #112333;
  --line: rgba(222,233,239,.13);
  --sky-2: #102535;
  --shadow: 0 18px 50px rgba(0,0,0,.28);
  --shadow-soft: 0 10px 28px rgba(0,0,0,.2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(110,164,197,.14), transparent 30%),
    radial-gradient(circle at 92% 12%, rgba(34,67,104,.12), transparent 28%),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.8;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background-image:
    linear-gradient(30deg, transparent 48%, rgba(34,67,104,.035) 49%, rgba(34,67,104,.035) 51%, transparent 52%),
    linear-gradient(-30deg, transparent 48%, rgba(34,67,104,.025) 49%, rgba(34,67,104,.025) 51%, transparent 52%);
  background-size: 58px 58px;
  z-index: -1;
}
a { color: inherit; }
img, svg { display:block; max-width:100%; }
button, a { -webkit-tap-highlight-color: transparent; }

.container { width: min(var(--container), calc(100% - 40px)); margin-inline:auto; }

.site-header {
  position: sticky;
  top: 14px;
  z-index: 50;
  padding-top: 14px;
}
.navbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 14px 11px 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-soft);
  border-radius: 22px;
}
.brand { display:flex; align-items:center; gap:12px; text-decoration:none; min-width:max-content; }
.brand-mark {
  width: 46px; height:46px; border-radius:15px; flex:0 0 auto;
  background: linear-gradient(145deg, var(--navy), #2f628f);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 10px 22px rgba(34,67,104,.24);
  display:grid; place-items:center;
}
.brand-mark svg { width:31px; height:31px; }
.brand-copy { display:flex; flex-direction:column; line-height:1.25; }
.brand-name { font-size:19px; font-weight:800; letter-spacing:.2px; }
.brand-tagline { color:var(--muted); font-size:11px; font-weight:600; }
.nav-links { display:flex; align-items:center; gap:4px; }
.nav-links a {
  text-decoration:none; color:var(--muted); font-size:14px; font-weight:700;
  padding:10px 13px; border-radius:12px; transition:.2s ease;
}
.nav-links a:hover, .nav-links a.active { color:var(--navy); background:rgba(110,164,197,.11); }
html[data-theme="dark"] .nav-links a:hover, html[data-theme="dark"] .nav-links a.active { color:#dcecf6; }
.nav-actions { display:flex; align-items:center; gap:8px; }
.icon-btn, .lang-btn {
  border:1px solid var(--line); background:var(--surface-solid); color:var(--ink); cursor:pointer;
  min-height:42px; border-radius:13px; font-weight:800; box-shadow:0 4px 14px rgba(22,45,73,.05);
}
.icon-btn { width:42px; display:grid; place-items:center; font-size:17px; }
.lang-btn { padding:0 13px; font-size:12px; }
.mobile-menu-btn { display:none; }

.hero { padding: 78px 0 36px; }
.hero-grid { display:grid; grid-template-columns: 1.08fr .92fr; align-items:center; gap:56px; }
.eyebrow {
  display:inline-flex; align-items:center; gap:9px; border:1px solid rgba(34,67,104,.13);
  background:var(--surface); box-shadow:var(--shadow-soft); color:var(--navy);
  padding:8px 13px; border-radius:999px; font-size:13px; font-weight:800;
}
html[data-theme="dark"] .eyebrow { color:#d8ebf6; }
.eyebrow-dot { width:8px; height:8px; background:var(--success); border-radius:50%; box-shadow:0 0 0 5px rgba(47,125,102,.11); }
h1 { margin:18px 0 16px; line-height:1.13; font-size:clamp(42px,6vw,76px); letter-spacing:-1.6px; }
.hero h1 .soft { color:var(--navy); }
html[data-theme="dark"] .hero h1 .soft { color:#9fc8df; }
.hero-lead { font-size:clamp(17px,2vw,21px); color:var(--muted); max-width:660px; margin:0 0 26px; }
.hero-actions { display:flex; flex-wrap:wrap; gap:12px; }
.btn {
  text-decoration:none; display:inline-flex; align-items:center; justify-content:center; gap:10px;
  min-height:50px; padding:0 18px; border-radius:15px; font-weight:800; border:1px solid var(--line);
  transition:.2s ease; cursor:pointer;
}
.btn-primary { background:linear-gradient(145deg,var(--navy),#2f628f); color:#fff; border-color:transparent; box-shadow:0 12px 26px rgba(34,67,104,.22); }
.btn-primary:hover { transform:translateY(-1px); box-shadow:0 16px 30px rgba(34,67,104,.28); }
.btn-secondary { background:var(--surface-solid); }
.btn-secondary:hover { border-color:rgba(34,67,104,.25); transform:translateY(-1px); }

.hero-visual { position:relative; min-height:440px; display:grid; place-items:center; }
.orbit {
  position:absolute; width:390px; height:390px; border:1px solid rgba(34,67,104,.12); border-radius:50%;
  animation:spin 24s linear infinite;
}
.orbit::before, .orbit::after { content:""; position:absolute; width:13px; height:13px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 7px rgba(110,164,197,.1); }
.orbit::before { top:28px; left:76px; }
.orbit::after { bottom:55px; right:32px; }
@keyframes spin { to { transform:rotate(360deg); } }
.device-card {
  width:min(350px,92%); aspect-ratio:.78; border-radius:38px; padding:13px;
  background:linear-gradient(160deg,#244a70,#112b44); box-shadow:0 34px 80px rgba(20,42,66,.32); transform:rotate(3deg);
  position:relative;
}
.device-screen { height:100%; border-radius:29px; overflow:hidden; background:linear-gradient(180deg,#eef5f8,#f9fbfc); padding:24px 20px; color:#17314d; position:relative; }
.device-screen::after { content:""; position:absolute; inset:auto -25% -17% -25%; height:55%; background:radial-gradient(circle at center,rgba(34,67,104,.16),transparent 65%); }
.mini-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:34px; }
.mini-logo { display:flex; align-items:center; gap:9px; font-weight:900; }
.mini-logo-badge { width:33px;height:33px;border-radius:11px;background:#224368; display:grid; place-items:center;color:white;font-size:16px; }
.mini-date { font-size:11px; color:#678; }
.prayer-panel { background:#224368; color:#fff; border-radius:24px; padding:20px; box-shadow:0 17px 34px rgba(34,67,104,.24); position:relative; overflow:hidden; }
.prayer-panel::before { content:""; position:absolute; width:130px;height:130px;border:1px solid rgba(255,255,255,.12);border-radius:50%;left:-50px;top:-52px; }
.prayer-name { font-size:13px; opacity:.78; }
.prayer-time { font-size:38px; line-height:1.2; font-weight:900; letter-spacing:-1px; margin-top:4px; }
.prayer-sub { font-size:11px; opacity:.75; margin-top:8px; }
.mini-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-top:13px; position:relative; z-index:2; }
.mini-card { min-height:82px; background:#fff; border:1px solid #dfe8ed; border-radius:17px; padding:13px; box-shadow:0 8px 22px rgba(34,67,104,.07); }
.mini-card b { display:block; margin-top:7px; font-size:13px; }
.mini-card span { font-size:10px; color:#789; }

.section { padding:62px 0; }
.section-head { display:flex; justify-content:space-between; gap:30px; align-items:end; margin-bottom:26px; }
.section-title { margin:0; font-size:clamp(28px,4vw,42px); line-height:1.25; }
.section-kicker { color:var(--navy); font-weight:900; font-size:13px; letter-spacing:.3px; margin-bottom:6px; }
html[data-theme="dark"] .section-kicker { color:#9fc8df; }
.section-desc { color:var(--muted); max-width:650px; margin:0; }
.cards-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.feature-card, .legal-card, .content-card {
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-lg); box-shadow:var(--shadow-soft);
}
.feature-card, .legal-card { padding:24px; transition:.25s ease; }
.feature-card:hover, .legal-card:hover { transform:translateY(-4px); box-shadow:var(--shadow); border-color:rgba(34,67,104,.22); }
.card-icon { width:50px;height:50px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(145deg,var(--sky),#edf5f8);color:var(--navy);font-size:22px;margin-bottom:18px; }
html[data-theme="dark"] .card-icon { background:#173149; color:#c8e1ef; }
.feature-card h3, .legal-card h3 { margin:0 0 8px; font-size:20px; }
.feature-card p, .legal-card p { margin:0; color:var(--muted); font-size:14px; }
.legal-card { text-decoration:none; position:relative; overflow:hidden; }
.legal-card::after { content:"↗"; position:absolute; inset-inline-end:20px; top:20px; width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:rgba(110,164,197,.11); color:var(--navy);font-weight:900; }
html[dir="rtl"] .legal-card::after { content:"↖"; }

.trust-banner {
  padding:30px; border-radius:var(--radius-xl); color:white; position:relative; overflow:hidden;
  background:linear-gradient(125deg,#173552,#285d87 65%,#3a789f); box-shadow:0 25px 55px rgba(34,67,104,.23);
  display:grid; grid-template-columns:1.2fr .8fr; gap:30px; align-items:center;
}
.trust-banner::before { content:""; position:absolute; width:330px;height:330px;border:1px solid rgba(255,255,255,.12);border-radius:50%;left:-130px;top:-170px; }
.trust-banner h2 { margin:0 0 8px; font-size:30px; }
.trust-banner p { margin:0; color:rgba(255,255,255,.76); }
.trust-points { display:grid;grid-template-columns:repeat(2,1fr);gap:10px;position:relative;z-index:1; }
.trust-pill { padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.11);font-size:13px;font-weight:800; }

/* Legal pages */
.page-hero { padding:64px 0 30px; }
.page-hero-inner { padding:34px; border:1px solid var(--line); border-radius:var(--radius-xl); background:linear-gradient(130deg,rgba(222,233,239,.75),rgba(255,255,255,.6)); box-shadow:var(--shadow-soft); position:relative; overflow:hidden; }
html[data-theme="dark"] .page-hero-inner { background:linear-gradient(130deg,rgba(25,54,77,.78),rgba(17,35,51,.88)); }
.page-hero-inner::after { content:""; position:absolute; width:260px;height:260px;border:1px solid rgba(34,67,104,.12);border-radius:50%; inset-inline-end:-90px; top:-110px; }
.page-hero h1 { font-size:clamp(34px,5vw,54px); margin:0 0 8px; }
.page-hero p { color:var(--muted); max-width:750px; margin:0; }
.meta-row { display:flex; flex-wrap:wrap; gap:9px; margin-top:18px; }
.meta-chip { border:1px solid var(--line); background:var(--surface); border-radius:999px; padding:7px 11px; font-size:12px; font-weight:800; color:var(--muted); }

.legal-layout { display:grid; grid-template-columns:260px minmax(0,1fr); gap:24px; align-items:start; }
.toc { position:sticky; top:105px; padding:18px; border:1px solid var(--line); background:var(--surface); border-radius:18px; box-shadow:var(--shadow-soft); }
.toc-title { font-size:12px; color:var(--muted); font-weight:900; margin:0 0 9px; text-transform:uppercase; letter-spacing:.7px; }
.toc a { display:block; padding:8px 10px; border-radius:10px; text-decoration:none; color:var(--muted); font-size:13px; font-weight:700; }
.toc a:hover { background:rgba(110,164,197,.11); color:var(--navy); }
.legal-content { display:grid; gap:16px; }
.content-card { padding:26px; scroll-margin-top:115px; }
.content-card h2 { margin:0 0 9px; font-size:23px; color:var(--navy); line-height:1.35; }
html[data-theme="dark"] .content-card h2 { color:#b8d8ea; }
.content-card p { margin:0; color:var(--muted); }
.content-card p + p { margin-top:10px; }
.callout { display:flex; gap:13px; align-items:flex-start; padding:18px; border:1px solid rgba(47,125,102,.18); background:rgba(47,125,102,.07); border-radius:16px; margin:6px 0 18px; }
.callout-icon { width:38px;height:38px;border-radius:12px;background:rgba(47,125,102,.12);color:var(--success);display:grid;place-items:center;flex:0 0 auto;font-weight:900; }
.callout strong { display:block; margin-bottom:3px; }
.callout p { margin:0;color:var(--muted);font-size:14px; }

.support-grid { display:grid; grid-template-columns:1.1fr .9fr; gap:20px; }
.support-main { padding:30px; }
.contact-box { padding:24px; border-radius:20px; background:linear-gradient(145deg,var(--navy),#315f87);color:#fff; }
.contact-box a { color:#fff; font-weight:900; text-decoration:none; word-break:break-all; }
.check-list { padding:0; margin:16px 0 0; list-style:none; display:grid; gap:10px; }
.check-list li { display:flex; gap:10px; align-items:flex-start; color:var(--muted); }
.check-list li::before { content:"✓"; width:24px;height:24px;border-radius:8px;background:rgba(47,125,102,.1);color:var(--success);display:grid;place-items:center;font-weight:900;flex:0 0 auto;margin-top:3px; }

.site-footer { padding:34px 0 48px; }
.footer-inner { border-top:1px solid var(--line); padding-top:24px; display:flex; justify-content:space-between; align-items:center; gap:18px; color:var(--muted); font-size:13px; }
.footer-links { display:flex; flex-wrap:wrap; gap:14px; }
.footer-links a { text-decoration:none; }
.footer-links a:hover { color:var(--navy); }

.lang-ar, .lang-en { display:none; }
html[data-lang="ar"] .lang-ar { display:block; }
html[data-lang="en"] .lang-en { display:block; }
html[data-lang="ar"] { direction:rtl; }
html[data-lang="en"] { direction:ltr; }

@media (max-width: 900px) {
  .nav-links { display:none; position:absolute; top:82px; inset-inline:20px; padding:10px; background:var(--surface-solid); border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow); flex-direction:column; align-items:stretch; }
  .nav-links.open { display:flex; }
  .mobile-menu-btn { display:grid; }
  .hero { padding-top:52px; }
  .hero-grid { grid-template-columns:1fr; gap:20px; }
  .hero-copy { text-align:center; }
  .hero-lead { margin-inline:auto; }
  .hero-actions { justify-content:center; }
  .hero-visual { min-height:380px; }
  .orbit { width:330px; height:330px; }
  .device-card { width:300px; }
  .cards-3 { grid-template-columns:1fr; }
  .trust-banner { grid-template-columns:1fr; }
  .legal-layout { grid-template-columns:1fr; }
  .toc { position:relative; top:auto; display:none; }
  .support-grid { grid-template-columns:1fr; }
}

@media (max-width: 620px) {
  .container { width:min(100% - 24px,var(--container)); }
  .site-header { top:7px; padding-top:7px; }
  .navbar { min-height:62px; padding:8px 9px 8px 12px; border-radius:18px; }
  .brand-mark { width:40px;height:40px;border-radius:13px; }
  .brand-name { font-size:17px; }
  .brand-tagline { display:none; }
  .lang-btn { min-height:38px; padding-inline:10px; }
  .icon-btn { width:38px; min-height:38px; }
  .hero { padding:42px 0 18px; }
  h1 { font-size:42px; }
  .hero-visual { min-height:330px; }
  .orbit { width:285px;height:285px; }
  .device-card { width:255px; border-radius:31px; }
  .device-screen { border-radius:23px; padding:19px 16px; }
  .prayer-time { font-size:31px; }
  .mini-grid { gap:7px; }
  .mini-card { min-height:69px;padding:10px; }
  .section { padding:44px 0; }
  .section-head { display:block; }
  .feature-card, .legal-card, .content-card { padding:20px; }
  .trust-banner { padding:24px; border-radius:22px; }
  .trust-points { grid-template-columns:1fr; }
  .page-hero { padding-top:42px; }
  .page-hero-inner { padding:24px; border-radius:22px; }
  .page-hero h1 { font-size:35px; }
  .footer-inner { flex-direction:column; align-items:flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration:.01ms!important; animation-iteration-count:1!important; scroll-behavior:auto!important; transition:none!important; }
}
