:root {
  --green: #0f3d2e;
  --green-dark: #08261c;
  --gold: #c9a24a;
  --gold-light: #e6c97a;
  --ink: #1d2a24;
  --muted: #5f6f67;
  --bg: #ffffff;
  --bg-alt: #f5f3ec;
  --line: #e4dfd0;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(8, 38, 28, 0.10);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: "Tajawal", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.9;
  font-size: 17px;
}

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

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-block;
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .5px;
  margin-bottom: 8px;
}

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 38, 28, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201, 162, 74, .25);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--green-dark); font-weight: 800; font-size: 15px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 17px; }
.brand-text small { color: var(--gold-light); font-size: 13px; }

.main-nav ul { display: flex; gap: 6px; list-style: none; }
.main-nav a {
  color: #e9efe9; padding: 8px 14px; border-radius: 8px;
  font-weight: 500; transition: background .2s, color .2s;
}
.main-nav a:hover, .main-nav a.active { background: rgba(201,162,74,.15); color: var(--gold-light); }

.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .3s; }

/* ===== Hero ===== */
.hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(201,162,74,.18), transparent 40%),
    linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
  padding: 110px 0 130px;
  position: relative; overflow: hidden;
  min-height: 560px;
}
/* صورة النائب على الجهة اليسرى، تتلاشى نحو النص */
.hero-photo {
  position: absolute; top: 0; bottom: 0; left: 0; width: 52%;
  -webkit-mask-image: linear-gradient(to left, transparent 0%, #000 38%);
          mask-image: linear-gradient(to left, transparent 0%, #000 38%);
}
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,38,28,.55), transparent 35%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-text { max-width: 560px; text-shadow: 0 2px 12px rgba(8,38,28,.6); }
.hero h1 { font-size: 52px; font-weight: 800; line-height: 1.3; margin-bottom: 18px; }
.hero .lead { font-size: 19px; color: #d6e2da; max-width: 620px; }
.hero .lead strong { color: var(--gold-light); }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.btn { display: inline-block; padding: 12px 28px; border-radius: 10px; font-weight: 700; transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--green-dark); box-shadow: 0 8px 20px rgba(201,162,74,.35); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.5); color: #fff; }

.portrait {
  width: 180px; height: 180px; margin: 0 auto 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold-light), var(--gold));
  border: 5px solid #fff; box-shadow: 0 8px 24px rgba(8,38,28,.18);
  color: var(--green-dark); font-weight: 800; font-size: 26px; line-height: 1.3;
  position: relative; overflow: hidden;
}
.portrait img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
}

/* ===== Stats ===== */
.stats { margin-top: -50px; position: relative; z-index: 2; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 12px;
}
.stats-grid.cols-1 { grid-template-columns: 1fr; max-width: 420px; }
.stats-grid.cols-2 { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
.stats-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stats-empty { display: none; }
.stat { text-align: center; padding: 6px 12px; border-left: 1px solid var(--line); }
.stat:last-child { border-left: 0; }
.stat .num { display: block; font-size: 38px; font-weight: 800; color: var(--green); }
.stat .label { color: var(--muted); font-size: 15px; }

/* ===== Sections ===== */
.section { padding: 90px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-size: 36px; color: var(--green); font-weight: 800; line-height: 1.4; }
.section-head .sub { color: var(--muted); margin-top: 8px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.about-text p { margin-bottom: 18px; color: #33423b; }
.about-text strong { color: var(--green); }
.info-box { background: var(--bg-alt); border-radius: var(--radius); padding: 28px; border-top: 4px solid var(--gold); }
.info-box h3 { text-align: center; color: var(--green); margin-bottom: 14px; font-size: 20px; }
.info-box dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; }
.info-box dt { color: var(--muted); font-size: 15px; }
.info-box dd { font-weight: 700; font-size: 15px; }

/* Timeline */
.timeline { list-style: none; position: relative; max-width: 760px; margin: 0 auto; padding-right: 36px; }
.timeline::before { content: ""; position: absolute; right: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 36px; }
.timeline li::before {
  content: ""; position: absolute; right: -34px; top: 8px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--gold);
}
.timeline li.highlight::before { background: var(--gold); box-shadow: 0 0 0 6px rgba(201,162,74,.2); }
.timeline time { color: var(--gold); font-weight: 700; font-size: 15px; }
.timeline h3 { color: var(--green); font-size: 20px; margin: 2px 0 4px; }
.timeline p { color: var(--muted); }

/* Work 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: 28px; display: flex; flex-direction: column; gap: 8px;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .tag { align-self: flex-start; background: rgba(15,61,46,.08); color: var(--green); font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 20px; }
.card time { color: var(--gold); font-size: 14px; font-weight: 700; }
.card h3 { color: var(--green); font-size: 20px; line-height: 1.5; }
.card p { color: var(--muted); font-size: 16px; flex: 1; }
.card a { color: var(--green); font-weight: 700; font-size: 15px; }
.card a:hover { color: var(--gold); }

/* Legacy */
.section-dark { background: linear-gradient(135deg, var(--green-dark), var(--green)); color: #e3ebe5; }
.legacy-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.legacy-text h2 { color: #fff; font-size: 34px; margin-bottom: 18px; line-height: 1.4; }
.legacy-text p { margin-bottom: 14px; }
blockquote {
  background: rgba(255,255,255,.06); border-right: 4px solid var(--gold);
  border-radius: var(--radius); padding: 28px; font-size: 20px; line-height: 1.9; color: #fff;
}
blockquote cite { display: block; margin-top: 14px; font-style: normal; font-size: 15px; color: var(--gold-light); }

/* Contact */
.socials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 900px; margin: 0 auto; }
.social {
  display: flex; align-items: center; gap: 16px; padding: 22px;
  border-radius: var(--radius); border: 1px solid var(--line); background: #fff;
  transition: transform .2s, box-shadow .2s;
}
.social:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.social svg { width: 46px; height: 46px; padding: 10px; border-radius: 12px; fill: #fff; flex-shrink: 0; }
.social span { display: flex; flex-direction: column; line-height: 1.5; }
.social small { color: var(--muted); direction: ltr; text-align: right; }
.social.fb svg { background: #1877f2; }
.social.ig svg { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); }
.social.x svg { background: #111; }
.social.wa svg { background: #25d366; }
.social.tg svg { background: #229ed9; }
.social.yt svg { background: #ff0000; }
.social.tt svg { background: #111; }

/* News cards & article page */
.card .card-img { width: calc(100% + 56px); margin: -28px -28px 8px; height: 190px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.empty-news { grid-column: 1 / -1; text-align: center; color: var(--muted); }
.article { max-width: 820px; }
.article .tag { display: inline-block; background: rgba(15,61,46,.08); color: var(--green); font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 20px; margin-left: 8px; }
.article time { color: var(--gold); font-weight: 700; font-size: 15px; }
.article h1 { color: var(--green); font-size: 34px; line-height: 1.5; margin: 10px 0 20px; }
.article-img { width: 100%; max-height: 480px; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; }
.article-body p { margin-bottom: 16px; color: #33423b; overflow-wrap: anywhere; }
.article-link a { color: var(--green); font-weight: 700; }
.article-back { color: var(--gold-light); font-weight: 700; }
@media (max-width: 560px) { .article h1 { font-size: 26px; } }

/* Footer */
.site-footer { background: var(--green-dark); color: #c5d3ca; padding: 32px 0; text-align: center; }
.site-footer strong { color: #fff; }
.disclaimer { font-size: 14px; color: #8fa498; margin-top: 4px; }

/* ===== Complaints modal ===== */
.main-nav a.nav-cta { background: var(--gold); color: var(--green-dark); font-weight: 700; }
.main-nav a.nav-cta:hover { background: var(--gold-light); color: var(--green-dark); }

body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8,38,28,.7); backdrop-filter: blur(3px); }
.modal-box {
  position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: #fff; border-radius: 18px; padding: 32px; border-top: 5px solid var(--gold);
  box-shadow: 0 30px 60px rgba(0,0,0,.3); animation: pop .25s ease;
}
@keyframes pop { from { opacity: 0; transform: perspective(1200px) translateY(30px) rotateX(-14deg) scale(.96); } }
.modal-close {
  position: absolute; top: 12px; left: 14px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--bg-alt); font-size: 24px; line-height: 1; cursor: pointer; color: var(--muted);
}
.modal-close:hover { background: var(--line); color: var(--ink); }
.modal-head { text-align: center; margin-bottom: 22px; }
.modal-head h2 { color: var(--green); font-size: 28px; line-height: 1.4; }
.modal-head p { color: var(--muted); font-size: 15px; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 700; color: var(--green); margin-bottom: 6px; font-size: 15px; }
.field b { color: #c0392b; }
.field small { color: var(--muted); font-weight: 400; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 16px; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fcfbf7; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field input[dir="ltr"] { text-align: right; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,74,.2); background: #fff; }
.field .invalid { border-color: #c0392b; }

.upload {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 22px; border: 2px dashed var(--gold); border-radius: 12px; background: #fbf8ef; cursor: pointer;
  transition: background .2s;
}
.upload:hover, .upload.drag { background: #f5eed8; }
.upload svg { width: 44px; height: 44px; fill: var(--gold); }
.upload strong { color: var(--green); }
.upload small { color: var(--muted); font-size: 13px; }
.upload-preview { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.upload-preview[hidden] { display: none; }
.upload-preview img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; }
.remove-image { border: 0; background: none; color: #c0392b; font: inherit; font-weight: 700; cursor: pointer; }

.form-error { color: #c0392b; font-weight: 700; min-height: 1.5em; font-size: 15px; }
.btn-block { display: block; width: 100%; border: 0; font: inherit; font-weight: 700; font-size: 17px; cursor: pointer; }
.btn-block:disabled { opacity: .6; cursor: wait; transform: none; }

.form-success { text-align: center; padding: 10px 0; }
.form-success[hidden] { display: none; }
.form-success .check {
  width: 70px; height: 70px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center; background: var(--green); color: var(--gold-light); font-size: 36px;
}
.form-success h3 { color: var(--green); font-size: 24px; }
.form-success strong { color: var(--green); font-size: 22px; direction: ltr; display: inline-block; }
.form-success .muted { color: var(--muted); margin: 6px 0 20px; }

@media (max-width: 560px) {
  .modal-box { padding: 26px 18px; }
}

/* ===== Track complaint ===== */
.btn-outline { border: 1.5px solid var(--line); color: var(--green); background: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.btn-outline:hover { border-color: var(--gold); }
.success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.success-actions .btn { border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.success-actions .btn-outline { border: 1.5px solid var(--line); }
.track-result[hidden] { display: none; }
.track-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.track-head strong { color: var(--green); font-size: 20px; }
.track-badge { padding: 4px 14px; border-radius: 20px; font-weight: 700; font-size: 15px; background: #f5eed8; color: #7a5d17; }
.track-badge.s-1 { background: #e3eefa; color: #23578f; }
.track-badge.s-2 { background: #e2f3e9; color: #1e6b43; }
.track-steps { list-style: none; display: flex; margin-bottom: 20px; counter-reset: step; }
.track-steps li {
  flex: 1; text-align: center; position: relative; font-size: 14px; color: var(--muted); padding-top: 34px;
}
.track-steps li::before {
  counter-increment: step; content: counter(step, arabic-indic);
  position: absolute; top: 0; right: 50%; transform: translateX(50%);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 2px solid var(--line); color: var(--muted); font-weight: 700; z-index: 1;
}
.track-steps li::after {
  content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: var(--line);
}
.track-steps li:last-child::after { display: none; }
.track-steps li.done { color: var(--green); font-weight: 700; }
.track-steps li.done::before { background: var(--green); border-color: var(--green); color: #fff; content: "✓"; }
.track-steps li.done::after { background: var(--green); }
.track-steps li.current::before { box-shadow: 0 0 0 5px rgba(201,162,74,.25); }
.track-dates { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin-bottom: 16px; font-size: 15px; }
.track-dates dt { color: var(--muted); }
.track-dates dd { font-weight: 700; direction: ltr; text-align: right; }
.track-reply { background: var(--bg-alt); border-right: 4px solid var(--gold); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.track-reply h3 { color: var(--green); font-size: 16px; margin-bottom: 4px; }
.track-reply p { white-space: pre-wrap; overflow-wrap: anywhere; }
.track-reply small { color: var(--muted); }
.track-note { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.track-note[hidden], .track-reply[hidden] { display: none; }

/* Reveal on scroll */
.reveal {
  opacity: 0; transform: perspective(1000px) translateY(40px) rotateX(16deg);
  transform-origin: center top; transition: opacity .8s ease, transform .9s cubic-bezier(.2,.8,.2,1);
}
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute; top: 72px; right: 0; left: 0;
    background: var(--green-dark); max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .main-nav.open { max-height: 420px; }
  .main-nav ul { flex-direction: column; padding: 12px 24px 20px; gap: 2px; }
  .main-nav a { display: block; }

  .about-grid, .legacy-inner { grid-template-columns: 1fr; }
  .hero { min-height: 0; padding-top: 340px; }
  .hero-photo {
    width: 100%; height: 420px; bottom: auto;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  }
  .hero-photo::after { display: none; }
  .hero-photo img { object-position: center 15%; }
  .hero h1 { font-size: 40px; }
  .cards, .socials { grid-template-columns: 1fr; }
  .stats-grid, .stats-grid.cols-3 { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
  .stats-grid.cols-1 { grid-template-columns: 1fr; }
  .stat:nth-child(2) { border-left: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .hero { padding: 300px 0 90px; }
  .hero-photo { height: 380px; }
  .hero h1 { font-size: 32px; }
  .section { padding: 64px 0; }
  .section-head h2 { font-size: 28px; }
  .stat .num { font-size: 30px; }
  .brand-text small { display: none; }
}

/* ===== المؤثرات ثلاثية الأبعاد ===== */
/* حقل الجزيئات خلف الواجهة (يُرسم من 3d.js) */
.hero { --mx: 0; --my: 0; }
.hero-3d { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* عمق الواجهة: النص والصورة يتحركان باتجاهين متعاكسين مع الفأرة */
.hero-inner { perspective: 1100px; }
.hero-text {
  transform: rotateY(calc(var(--mx) * 7deg)) rotateX(calc(var(--my) * -5deg)) translateZ(20px);
  transform-style: preserve-3d; transition: transform .35s ease-out;
}
.hero-text h1 { transform: translateZ(40px); }
.hero-actions { transform: translateZ(30px); }
.hero-photo img {
  transform: scale(1.08) translate3d(calc(var(--mx) * -14px), calc(var(--my) * -10px), 0);
  transition: transform .5s ease-out;
}
.hero h1 {
  text-shadow: 0 1px 0 rgba(201,162,74,.55), 0 2px 0 rgba(201,162,74,.4), 0 3px 0 rgba(160,125,50,.35),
               0 4px 0 rgba(120,95,40,.3), 0 10px 24px rgba(8,38,28,.7);
}

/* أزرار بارزة لها حافة سفلية وتنضغط عند النقر */
.btn-gold { box-shadow: 0 5px 0 #957329, 0 12px 24px rgba(201,162,74,.35); }
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 8px 0 #957329, 0 18px 30px rgba(201,162,74,.4); }
.btn-gold:active { transform: translateY(3px); box-shadow: 0 2px 0 #957329, 0 6px 12px rgba(201,162,74,.3); }
.btn-ghost { box-shadow: 0 5px 0 rgba(0,0,0,.25); }
.btn-ghost:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }

/* شعار يدور كعملة ذهبية */
.brand { perspective: 400px; }
.brand-mark {
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), inset 0 2px 0 rgba(255,255,255,.45), 0 4px 10px rgba(0,0,0,.3);
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
}
.brand:hover .brand-mark { transform: rotateY(360deg); }

/* الأرقام بارزة */
.stat .num { text-shadow: 0 1px 0 #cfd8d2, 0 2px 0 #b9c6be, 0 3px 0 #a3b3aa, 0 6px 12px rgba(8,38,28,.18); }

/* نقاط المسيرة كرات مضيئة */
.timeline li::before {
  background: radial-gradient(circle at 35% 30%, #fff, #f3e6c2 60%, #d9bd75);
  box-shadow: 0 3px 6px rgba(8,38,28,.25);
}
.timeline li.highlight::before {
  background: radial-gradient(circle at 35% 30%, #fff3cf, var(--gold) 55%, #8f6d22);
  box-shadow: 0 0 0 6px rgba(201,162,74,.2), 0 4px 10px rgba(8,38,28,.3);
}

/* إمالة البطاقات مع طبقات عمق ولمعة تتبع المؤشر */
.tilt { transform-style: preserve-3d; will-change: transform; position: relative; }
.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.35), transparent 55%);
  opacity: 0; transition: opacity .3s;
}
.tilt.tilting::after { opacity: 1; }
.tilt.tilting { box-shadow: 0 30px 50px rgba(8,38,28,.22); }
.card.tilt > h3, .card.tilt > .tag, .social.tilt > svg, .info-box.tilt .portrait { transform: translateZ(36px); }
.card.tilt > time, .card.tilt > p, .social.tilt > span, .info-box.tilt h3 { transform: translateZ(20px); }
.portrait { box-shadow: 0 14px 30px rgba(8,38,28,.28), inset 0 0 0 1px rgba(255,255,255,.4); }
.social svg { box-shadow: 0 6px 14px rgba(0,0,0,.2); }
blockquote.tilt.tilting::after { background: radial-gradient(circle at var(--gx) var(--gy), rgba(230,201,122,.2), transparent 55%); }

/* احترام إعداد تقليل الحركة في النظام */
@media (prefers-reduced-motion: reduce) {
  .reveal { transform: none; transition: opacity .4s ease; }
  .hero-text, .hero-photo img { transform: none; transition: none; }
  .brand:hover .brand-mark { transform: none; }
  .modal-box { animation: none; }
}

/* ===== نموذج راقٍ: خطوات، أيقونات الحقول، بطاقات نوع الشكوى ===== */
.form-steps { list-style: none; display: flex; gap: 8px; margin: -6px 0 22px; padding: 6px; background: var(--bg-alt); border-radius: 40px; }
.form-steps li {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 7px 6px; border-radius: 30px; font-size: 14px; font-weight: 700; color: var(--muted); transition: background .3s, color .3s;
}
.form-steps i {
  font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 1.5px solid var(--line); font-size: 13px; transition: all .3s;
}
.form-steps li.current { background: #fff; color: var(--green); box-shadow: 0 2px 8px rgba(8,38,28,.08); }
.form-steps li.current i { border-color: var(--gold); color: var(--green); }
.form-steps li.done { color: var(--green); }
.form-steps li.done i { background: var(--green); border-color: var(--green); color: var(--gold-light); font-size: 0; }
.form-steps li.done i::after { content: "✓"; font-size: 13px; }

.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; height: 50px; line-height: 1.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9a24a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 14px center; background-size: 18px; padding-left: 40px;
}
.field input, .field select { min-height: 50px; }
.field .ico { padding-right: 44px; background-repeat: no-repeat; background-size: 20px; }
.field input.ico { background-position: right 14px center; }
.field select.ico {
  background-position: left 14px center, right 14px center; background-size: 18px, 20px;
}
.field .ico-user { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa69f' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6'/%3E%3C/svg%3E"); }
.field .ico-phone { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa69f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='2' width='12' height='20' rx='3'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E"); }
.field .ico-hash { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa69f' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M5 9h15M4 15h15M10 3 8 21M16 3l-2 18'/%3E%3C/svg%3E"); }
select.ico-pin, .field select.ico-pin { background-image:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9a24a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"),
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa69f' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E"); }
.field input.ico:focus, .field select.ico:focus { background-color: #fff; }

.chips-field { border: 0; min-width: 0; }
.chips-field legend { font-weight: 700; color: var(--green); margin-bottom: 8px; font-size: 15px; padding: 0; }
.chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 84px; padding: 10px 4px; border: 1.5px solid var(--line); border-radius: 12px; background: #fcfbf7;
  transition: border-color .2s, background .2s, transform .15s, box-shadow .2s;
}
.chip em { font-style: normal; font-size: 12.5px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.chip-ico { width: 26px; height: 26px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chip:hover span { border-color: var(--gold-light); transform: translateY(-2px); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(201,162,74,.35); }
.chip input:checked + span {
  background: var(--green); border-color: var(--green); box-shadow: 0 8px 18px rgba(8,38,28,.22);
}
.chip input:checked + span em { color: #fff; }
.chip input:checked + span .chip-ico { stroke: var(--gold-light); }
.chips.invalid .chip span { border-color: #e3a49b; }
.counter { display: block; text-align: left; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.counter.warn { color: #c0392b; }
@media (max-width: 560px) {
  .chips { grid-template-columns: repeat(2, 1fr); }
  .chip span { min-height: 52px; flex-direction: row; justify-content: flex-start; gap: 10px; padding: 8px 12px; text-align: right; }
  .chip-ico { width: 22px; height: 22px; flex: none; }
  .form-steps li { font-size: 12.5px; gap: 5px; }
}

/* ===== حجز موعد ===== */
.day-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.day-chip, .time-chip {
  font: inherit; cursor: pointer; border: 1.5px solid var(--line); background: #fcfbf7; color: var(--ink);
  transition: border-color .2s, background .2s, transform .15s;
}
.day-chip {
  flex: none; width: 78px; padding: 8px 4px; border-radius: 14px; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; line-height: 1.3;
}
.day-chip small { font-size: 12px; color: var(--muted); font-weight: 700; }
.day-chip b { font-size: 24px; color: var(--green); }
.day-chip span { font-size: 11.5px; color: var(--muted); }
.time-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.time-chip { padding: 10px 4px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.day-chip:hover:not(:disabled), .time-chip:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-1px); }
.day-chip.on, .time-chip.on { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 6px 14px rgba(8,38,28,.2); }
.day-chip.on small, .day-chip.on span { color: var(--gold-light); }
.day-chip.on b { color: #fff; }
.day-chip:disabled, .time-chip:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.appt-when { font-weight: 700; color: var(--green); font-size: 18px; }
.muted { color: var(--muted); }
@media (max-width: 560px) { .time-grid { grid-template-columns: repeat(3, 1fr); } }

/* ===== قصص النجاح ===== */
.stories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.story-card {
  background: #fff; border-radius: var(--radius); padding: 24px; border-top: 4px solid var(--gold);
  box-shadow: 0 4px 18px rgba(8,38,28,.06); display: flex; flex-direction: column; gap: 12px;
}
.story-top { display: flex; align-items: center; gap: 8px; color: var(--green); font-weight: 700; font-size: 15px; flex-wrap: wrap; }
.story-top em { font-style: normal; font-size: 13px; color: var(--muted); background: var(--bg-alt); padding: 2px 10px; border-radius: 20px; margin-right: auto; }
.story-ico { width: 34px; height: 34px; padding: 6px; border-radius: 10px; background: rgba(15,61,46,.08); fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.story-card p { color: var(--ink); flex: 1; line-height: 1.9; }
.story-card small { color: #1e6b43; font-weight: 700; }
@media (max-width: 900px) { .stories { grid-template-columns: 1fr; } }

/* زر تثبيت التطبيق */
.install-btn { display: none; }
.install-btn.show { display: inline-flex; }
.install-fab {
  position: fixed; bottom: 18px; left: 18px; z-index: 60; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  background: var(--green-dark); color: var(--gold-light); padding: 10px 18px; border-radius: 30px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); border: 1px solid rgba(201,162,74,.5);
}
.install-fab[hidden] { display: none; }

/* منع السحب الأفقي على الموبايل: تكبير صورة الواجهة وحركات الظهور كانت تطلع خارج الشاشة.
   clip بدل hidden حتى يبقى الشريط العلوي ثابتاً (sticky). */
html, body { overflow-x: clip; }
.hero, .hero-photo { overflow: hidden; }
@supports not (overflow: clip) { body { overflow-x: hidden; } }
