/* ═══════════════════════════════════════════
   عبدالعزيز الظاهري — Proposal & Profile
   Formal light palette: navy / white / gold
   ═══════════════════════════════════════════ */
:root {
  --navy: #102E4E;
  --navy-soft: #1C4670;
  --gold: #B98A2F;
  --gold-soft: #E7D3A8;
  --ink: #1E2A38;
  --muted: #5A6B7E;
  --line: #DCE4EC;
  --bg: #F2F5F8;
  --card: #FFFFFF;
  --wa-green: #075E54;
  --wa-bubble: #DCF8C6;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(16, 46, 78, .10);
  font-size: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* العناوين بخط كوفي رسمي، المتن بخط مقروء */
h1, h2, h3, .brand-name, .role, .block-title, .prop-title,
.foot-name, .kpi-num, .r-item strong, .btn {
  font-family: "Noto Kufi Arabic", "Tajawal", sans-serif;
}

img { max-width: 100%; display: block; }
.hidden { display: none !important; }

/* ─────────── Top bar ─────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1080px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem 1rem; gap: .75rem;
}
.brand { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.brand-photo {
  width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: 50%; object-fit: cover; object-position: top;
  border: 2px solid var(--gold);
  outline: 1px solid var(--gold-soft);
  outline-offset: 2px;
  box-shadow: 0 2px 10px rgba(16, 46, 78, .18);
}
.brand-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: .5rem; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  height: 42px;
  border: 1px solid transparent; cursor: pointer;
  font-family: inherit; font-size: .85rem; font-weight: 600;
  padding: 0 1.1rem; border-radius: 10px;
  transition: .25s;
}
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #A0731F);
  color: #fff; box-shadow: 0 4px 14px rgba(185,138,47,.35);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(185,138,47,.45); }

/* ─────────── Sheet (A4 printable) ─────────── */
main { max-width: 1080px; margin-inline: auto; padding: 1.5rem 1rem 3rem; }

.sheet {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 3vw, 2.4rem);
  border-top: 5px solid var(--gold);
}

/* Head */
.sheet-head {
  display: flex; align-items: center; gap: 1.25rem;
  padding-bottom: 1.1rem; margin-bottom: 1.1rem;
  border-bottom: 2px solid var(--line);
}
.avatar {
  width: 92px; height: 92px; object-fit: cover; object-position: top;
  border-radius: 50%;
  border: 3px solid var(--gold-soft);
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
.head-info { flex: 1; min-width: 0; }
.head-info h1 {
  font-size: clamp(1.25rem, 3.4vw, 1.7rem);
  color: var(--navy); font-weight: 700; line-height: 1.3;
}
.role { color: var(--gold); font-weight: 600; font-size: clamp(.85rem, 2.4vw, 1rem); }
.head-contact {
  display: flex; flex-wrap: wrap; gap: .35rem .5rem;
  color: var(--muted); font-size: .78rem; margin-top: .3rem;
  direction: ltr; justify-content: flex-end;
}
[dir="ltr"] .head-contact { justify-content: flex-start; }
.dot { color: var(--gold); }
.head-mark { color: var(--gold); opacity: .85; }

/* Blocks */
.sheet-block { margin-bottom: 1.15rem; }
.block-title {
  display: flex; align-items: center; gap: .6rem;
  color: var(--navy); font-size: 1.05rem; font-weight: 700;
  margin-bottom: .5rem;
}
.block-title::before {
  content: ""; width: 22px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}
.block-lead { color: var(--muted); font-size: .9rem; margin-bottom: .6rem; }
.about-text { font-size: .92rem; text-align: justify; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; }
.chip {
  font-size: .74rem; font-weight: 600; color: var(--navy);
  background: #EDF2F7; border: 1px solid var(--line);
  padding: .28rem .7rem; border-radius: 999px;
}
.tech-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
  margin-top: .8rem; font-size: .78rem; color: var(--muted);
}
.tech-strip strong { color: var(--navy); font-weight: 600; direction: ltr; }

/* خطوات مرقمة */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.step {
  display: flex; gap: .55rem; align-items: flex-start;
  padding: .6rem .7rem; border: 1px solid var(--line);
  border-radius: 10px; background: #FBFCFE;
}
.step i {
  font-style: normal; width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: var(--gold-soft);
  font-weight: 700; font-size: .85rem;
}
.step strong { display: block; color: var(--navy); font-size: .82rem; }
.step span { font-size: .72rem; color: var(--muted); line-height: 1.5; }

/* ما يشمله العرض */
.scope-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.scope-item {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 500; color: var(--ink);
  background: #FDFBF6; border: 1px solid #EEE3C8;
  padding: .35rem .75rem; border-radius: 999px;
}
.scope-item::before {
  content: "✓"; color: var(--gold); font-weight: 700;
}

/* سطر الخصوصية */
.privacy-line {
  display: flex; align-items: center; gap: .5rem;
  font-size: .82rem; color: var(--muted);
  margin-top: .9rem;
}
.privacy-line svg { color: var(--gold); flex: 0 0 16px; }

.cta-text { display: flex; flex-direction: column; gap: .3rem; }
.qr-mini {
  width: 64px; height: 64px; flex: 0 0 64px;
  background: #fff; border-radius: 8px; padding: 4px;
  border: none;
}

/* Problems & features */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem .9rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem; }
.w-item {
  display: flex; flex-direction: column; gap: .25rem;
  text-decoration: none; color: inherit;
  padding: .55rem .7rem; border-radius: 10px;
  border: 1px solid var(--line); background: #FBFCFE;
  transition: .2s;
}
.w-item:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow); }
.w-item strong { color: var(--navy); font-size: .82rem; }
.w-item span { font-size: .71rem; color: var(--muted); line-height: 1.5; }
.works-more { margin-top: .55rem; font-size: .78rem; color: var(--gold); font-weight: 600; }
.p-item, .f-item {
  display: flex; align-items: flex-start; gap: .55rem;
  font-size: .86rem; padding: .5rem .65rem;
  border-radius: 10px; border: 1px solid var(--line);
  background: #FBFCFE;
}
.p-item svg { color: #B3423A; flex: 0 0 18px; margin-top: .18rem; }
.f-item svg { color: var(--gold); flex: 0 0 18px; margin-top: .18rem; }
.f-item { background: #FDFBF6; border-color: #EEE3C8; }

/* Results strip */
.results-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(135deg, var(--navy), var(--navy-soft));
  border-radius: 12px; overflow: hidden;
  margin: 1.3rem 0;
}
.r-item {
  padding: .85rem .5rem; text-align: center; color: #fff;
  display: flex; flex-direction: column; gap: .15rem;
  border-inline-start: 1px solid rgba(255,255,255,.14);
}
.r-item:first-child { border-inline-start: none; }
.r-item strong { font-size: 1.15rem; color: var(--gold-soft); }
.r-item span { font-size: .68rem; opacity: .9; line-height: 1.4; }

/* Sheet foot */
.sheet-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 1rem;
  border-top: 2px solid var(--line);
}

/* الورقة الثانية: العرض */
.sheet-2 { margin-top: 1.75rem; }
.prop-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding-bottom: 1rem; margin-bottom: 1.1rem;
  border-bottom: 2px solid var(--line);
}
.prop-title { color: var(--navy); font-size: clamp(1.05rem, 3vw, 1.4rem); font-weight: 700; line-height: 1.4; }
.prop-sub { color: var(--muted); font-size: .88rem; margin-top: .3rem; }
.prop-mini {
  width: 58px; height: 58px; flex: 0 0 58px;
  border-radius: 50%; object-fit: cover; object-position: top;
  border: 2px solid var(--gold-soft); outline: 1px solid var(--navy); outline-offset: 2px;
}

/* الهدف */
.goal-line {
  display: flex; align-items: center; gap: .65rem;
  background: #FDFBF6; border: 1px solid #EEE3C8;
  border-inline-start: 4px solid var(--gold);
  border-radius: 10px; padding: .75rem .95rem;
  font-size: .92rem; font-weight: 500;
  margin-bottom: 1.15rem;
}
.goal-line svg { color: var(--gold); flex: 0 0 20px; }

/* فوائد الشركة */
.b-item {
  display: flex; align-items: flex-start; gap: .55rem;
  font-size: .86rem; padding: .5rem .65rem;
  border-radius: 10px; border: 1px solid #D8E6DC;
  background: #F6FBF7;
}
.b-item svg { color: #2E7D4F; flex: 0 0 18px; margin-top: .18rem; }

/* الخطوة التالية */
.cta-strip {
  display: flex; justify-content: space-between; align-items: center;
  gap: .8rem; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--navy), var(--navy-soft));
  color: #fff; border-radius: 12px;
  padding: .95rem 1.25rem; margin-top: 1.2rem;
  font-size: .92rem; font-weight: 500;
}
.cta-contact { color: var(--gold-soft); font-weight: 700; direction: ltr; }
.foot-name { font-weight: 700; color: var(--navy); }
.foot-role { color: var(--gold); font-size: .8rem; font-weight: 600; margin-bottom: .4rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.f-link {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--muted); font-size: .78rem; direction: ltr;
}
.f-link svg { color: var(--gold); }
.foot-qr { text-align: center; flex: 0 0 auto; }
.qr-box {
  width: 86px; height: 86px; margin-inline: auto;
  border: 1px solid var(--line); border-radius: 8px;
  display: grid; place-items: center; background: #fff; padding: 5px;
}
.qr-box img, .qr-box canvas { width: 100%; height: 100%; }
.qr-label { display: block; font-size: .62rem; color: var(--muted); margin-top: .3rem; max-width: 110px; }

/* ─────────── Web sections ─────────── */
.web-section { margin-top: 3rem; }
.section-head { text-align: center; margin-bottom: 1.6rem; }
.section-head h2 {
  color: var(--navy); font-size: clamp(1.3rem, 3.6vw, 1.7rem);
  position: relative; display: inline-block; padding-bottom: .45rem;
}
.section-head h2::after {
  content: ""; position: absolute; bottom: 0; inset-inline: 25%;
  height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}
.section-head p { color: var(--muted); font-size: .92rem; margin-top: .5rem; }

/* ─────────── WhatsApp phone demo ─────────── */
.phone-wrap { display: flex; justify-content: center; }
.phone {
  width: min(420px, 100%);
  background: #E5DDD5;
  background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,.35) 0 2px, transparent 3px),
                    radial-gradient(circle at 80% 70%, rgba(255,255,255,.25) 0 2px, transparent 3px);
  border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 8px #10243B, 0 0 0 9px #2A415C;
  display: flex; flex-direction: column;
  height: 560px;
}
.wa-header {
  background: var(--wa-green); color: #fff;
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .9rem;
}
.wa-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.18); display: grid; place-items: center;
}
.wa-title { display: flex; flex-direction: column; line-height: 1.3; }
.wa-title strong { font-size: .92rem; }
.wa-title em { font-style: normal; font-size: .7rem; opacity: .85; }

.wa-body {
  flex: 1; overflow-y: auto; padding: 1rem .8rem;
  display: flex; flex-direction: column; gap: .5rem;
  scroll-behavior: smooth;
}
.msg {
  max-width: 82%; padding: .5rem .75rem;
  border-radius: 12px; font-size: .85rem; line-height: 1.55;
  box-shadow: 0 1px 1px rgba(0,0,0,.08);
  white-space: pre-line; animation: pop .25s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.msg.bot { background: #fff; align-self: flex-start; border-start-start-radius: 3px; }
.msg.user { background: var(--wa-bubble); align-self: flex-end; border-start-end-radius: 3px; }
.msg time { display: block; font-size: .6rem; color: var(--muted); text-align: end; margin-top: .2rem; }

.typing { display: inline-flex; gap: 4px; padding: .65rem .8rem; }
.typing i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #9AA7B5; animation: blink 1s infinite;
}
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

.wa-chips {
  display: flex; gap: .4rem; padding: .5rem .7rem;
  overflow-x: auto; background: rgba(255,255,255,.6);
  scrollbar-width: none;
}
.wa-chips::-webkit-scrollbar { display: none; }
.wa-chip {
  flex: 0 0 auto; cursor: pointer;
  font-family: inherit; font-size: .74rem; font-weight: 600;
  color: var(--wa-green); background: #fff;
  border: 1px solid #C8D6CE; border-radius: 999px;
  padding: .35rem .8rem; transition: .2s;
}
.wa-chip:hover { background: var(--wa-green); color: #fff; }

.wa-input {
  display: flex; gap: .5rem; padding: .55rem .7rem;
  background: #F0F0F0;
}
.wa-input input {
  flex: 1; border: none; outline: none;
  font-family: inherit; font-size: .88rem;
  padding: .6rem .9rem; border-radius: 999px; background: #fff;
}
.wa-input button {
  width: 44px; height: 44px; border: none; cursor: pointer;
  border-radius: 50%; background: var(--wa-green); color: #fff;
  display: grid; place-items: center; transition: .2s;
}
.wa-input button:hover { transform: scale(1.06); }
[dir="rtl"] .wa-input button svg { transform: scaleX(-1); }

/* ─────────── Dashboard ─────────── */
.kpi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: .9rem; margin-bottom: 1rem;
}
.kpi {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem .8rem;
  text-align: center; border-top: 3px solid var(--gold);
}
.kpi-num { font-size: 1.7rem; font-weight: 700; color: var(--navy); display: block; }
.kpi-num small { font-size: .85rem; color: var(--gold); font-weight: 600; }
.kpi-label { font-size: .74rem; color: var(--muted); }

.charts-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem;
}
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem;
}
.chart-card h3, .insight-card h3 {
  color: var(--navy); font-size: .95rem; margin-bottom: .8rem;
  display: flex; align-items: center; gap: .5rem;
}
.insight-card h3 svg { color: var(--gold); }
.chart-card canvas { width: 100% !important; }

.insight-card { border-inline-start: 4px solid var(--gold); }
.insight-list { list-style: none; display: flex; flex-direction: column; gap: .65rem; }
.insight-list li {
  position: relative; font-size: .85rem;
  padding: .6rem .9rem; border-radius: 10px;
  background: #FDFBF6; border: 1px solid #EEE3C8;
}

/* ─────────── Site footer ─────────── */
.site-foot {
  text-align: center; color: var(--muted); font-size: .78rem;
  padding: 1.5rem 1rem 2.5rem;
}

/* ─────────── Responsive ─────────── */
@media (max-width: 760px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .results-strip { grid-template-columns: repeat(2, 1fr); }
  .r-item:nth-child(3) { border-inline-start: none; }
  .r-item { border-top: 1px solid rgba(255,255,255,.14); }
  .r-item:nth-child(-n+2) { border-top: none; }
}
@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .sheet-head { flex-direction: column; text-align: center; }
  .head-contact { justify-content: center !important; }
  .head-mark { display: none; }
  .sheet-foot { flex-direction: column; text-align: center; }
  .foot-links { justify-content: center; }
  .brand-name { display: none; }
  .phone { height: 520px; }
}
