/* ===== الخطوط ===== */
@font-face {
  font-family: 'ITF Qomra Arabic';
  src: url('fonts/itfQomraArabic-Medium.otf') format('opentype');
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: 'ITF Qomra Arabic';
  src: url('fonts/itfQomraArabic-Bold.otf') format('opentype');
  font-weight: 700; font-display: swap;
}

/* ===== المتغيرات ===== */
:root {
  --sy-green: #007A33;
  --sy-green-dark: #005622;
  --sy-green-light: #35A368;
  --sy-white: #ffffff;
  --sy-black: #0b0b0b;
  --sy-red: #CE1126;
  --glass-bg: rgba(255,255,255,0.75);
  --glass-border: rgba(255,255,255,0.55);
  --glass-shadow: 0 12px 40px rgba(0,0,0,0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  font-family: 'ITF Qomra Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  font-weight: 500;
  color: var(--sy-black);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(0,122,51,0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(0,122,51,0.14), transparent 60%),
    linear-gradient(135deg, #f4faf6 0%, #eef7f1 40%, #f7faf8 100%);
  overflow-x: hidden;
}

/* ===== الخلفية ===== */
.bg-layer { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55;
  animation: floatBlob 20s ease-in-out infinite;
}
.b1 { width: 520px; height: 520px; background: #8ee3ae; top: -160px; right: -140px; }
.b2 { width: 460px; height: 460px; background: #d3ecd9; bottom: -160px; left: -140px; animation-delay: -7s; }
.b3 { width: 380px; height: 380px; background: #b5e0c3; top: 40%; left: 40%; animation-delay: -14s; }

@keyframes floatBlob {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(30px,-40px) scale(1.08); }
}

/* ===== بطاقة زجاجية ===== */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  animation: fadeUp .7s cubic-bezier(.2,.8,.2,1);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== الشاشات ===== */
.screen { display: none; }
.screen.active { display: block; animation: fadeUp .55s cubic-bezier(.2,.8,.2,1); }

/* ===== الهوية (الشعار + الاسم) ===== */
.brand-header {
  display: flex; align-items: center; gap: 18px;
  justify-content: center; margin-bottom: 28px; flex-wrap: wrap;
}
.brand-logo {
  height: 78px; width: auto; object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0,122,51,0.25));
}
.brand-text { display: flex; flex-direction: column; text-align: right; }
.brand-org { font-weight: 700; color: var(--sy-green-dark); font-size: 19px; line-height: 1.3; }
.brand-sub { font-size: 13px; color: #6b7280; margin-top: 2px; }

@media (max-width: 576px) {
  .brand-header { flex-direction: column; text-align: center; gap: 12px; }
  .brand-text { text-align: center; }
  .brand-logo { height: 64px; }
  .brand-org { font-size: 17px; }
  .brand-sub { font-size: 12px; }
}

/* ===== العنوان الرئيسي ===== */
.title-main {
  background: linear-gradient(90deg, var(--sy-green) 0%, var(--sy-green-light) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.pill-badge {
  background: rgba(0,122,51,.1); color: var(--sy-green-dark);
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
}

/* ===== السؤال ===== */
.question-box {
  background: rgba(255,255,255,0.6);
  border-radius: 18px;
  border: 1px dashed rgba(0,122,51,.3);
}

/* ===== أزرار الاختيار ===== */
.choice-btn {
  background: #fff; border: 2px solid rgba(0,0,0,.06);
  border-radius: 18px; padding: 26px 16px;
  font-size: 16px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: all .3s cubic-bezier(.2,.8,.2,1);
  color: var(--sy-black);
}
.choice-btn i { font-size: 32px; }
.choice-btn:hover { transform: translateY(-4px); }
.choice-yes i { color: var(--sy-green); }
.choice-yes:hover {
  border-color: var(--sy-green);
  box-shadow: 0 16px 32px rgba(0,122,51,.2);
  background: linear-gradient(180deg, #fff 0%, #eaf7ee 100%);
}
.choice-no i { color: #9aa0a6; }
.choice-no:hover { border-color: #cfd4d6; box-shadow: 0 12px 24px rgba(0,0,0,.06); }

/* ===== أزرار ===== */
.btn-syrian {
  background: linear-gradient(135deg, var(--sy-green), var(--sy-green-dark));
  color: #fff; border: none; border-radius: 14px;
  font-weight: 700; padding: 12px 28px;
  box-shadow: 0 10px 24px rgba(0,122,51,.3);
  transition: all .25s ease;
}
.btn-syrian:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 32px rgba(0,122,51,.4); }
.btn-syrian:disabled { opacity: .7; cursor: not-allowed; }

.btn-ghost {
  background: transparent; border: 2px solid rgba(0,0,0,.1);
  border-radius: 14px; padding: 10px 18px;
  font-weight: 700; color: var(--sy-black);
  transition: all .2s;
}
.btn-ghost:hover { background: rgba(0,0,0,.04); }

.btn-wa {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff; border: none; border-radius: 14px; font-weight: 700;
  box-shadow: 0 10px 24px rgba(37,211,102,.35);
}
.btn-wa:hover { color: #fff; transform: translateY(-2px); }

/* ===== الحقول ===== */
.form-control, .form-select {
  border-radius: 12px;
  border: 2px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.9);
  padding: 12px 14px;
  transition: all .2s;
  font-size: 15px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--sy-green);
  box-shadow: 0 0 0 4px rgba(0,122,51,.12);
  background: #fff;
}

.field-label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: #374151;
  margin-bottom: 8px;
}

.req-mark { color: var(--sy-red); font-weight: 700; }
.opt-mark { color: #9aa0a6; font-weight: 500; font-size: 12px; }

.form-hint {
  font-size: 12.5px;
  color: #6b7280;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: rgba(0,122,51,.05);
  border-radius: 10px;
  border-right: 3px solid var(--sy-green-light);
}
.form-hint i { color: var(--sy-green); font-size: 14px; }

/* ===== عناوين الأقسام ===== */
.section-title {
  font-weight: 700; color: var(--sy-green-dark);
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 8px; margin-bottom: 4px;
  border-bottom: 2px solid rgba(0,122,51,.15);
  font-size: 15px;
}

/* ===== معلومات السكن ===== */
.residence-info {
  padding: 10px 14px; border-radius: 12px;
  background: rgba(0,122,51,.08);
  color: var(--sy-green-dark);
  font-size: 13px; font-weight: 600;
}

/* ===== شريط التقدم ===== */
.progress-thin { height: 6px; background: rgba(0,0,0,.06); border-radius: 99px; overflow: hidden; }
.progress-thin .progress-bar {
  background: linear-gradient(90deg, var(--sy-green), var(--sy-green-light));
  transition: width .4s ease;
}

/* ===== أزرار النموذج ===== */
.form-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
@media (max-width: 576px) {
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
}

/* ===== النجاح ===== */
.success-check svg { width: 96px; height: 96px; stroke: var(--sy-green); stroke-width: 4; stroke-linecap: round; }
.success-check circle { stroke-dasharray: 166; stroke-dashoffset: 166; animation: drawCircle .8s cubic-bezier(.65,0,.45,1) forwards; }
.success-check path { stroke-dasharray: 48; stroke-dashoffset: 48; animation: drawCheck .5s .6s cubic-bezier(.65,0,.45,1) forwards; }
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck  { to { stroke-dashoffset: 0; } }

.wa-box { background: linear-gradient(135deg, #eafff1 0%, #d4ffe2 100%); border-radius: 18px; }
.wa-icon { font-size: 42px; color: #25D366; display: block; margin-bottom: 6px; }

.decline-icon {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(0,122,51,.1); color: var(--sy-green);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}

/* ===== Tom Select ===== */
.ts-wrapper.single .ts-control,
.ts-wrapper.multi  .ts-control {
  border-radius: 12px !important;
  border: 2px solid rgba(0,0,0,.08) !important;
  background: rgba(255,255,255,.9) !important;
  padding: 10px 12px !important;
  min-height: 48px;
  box-shadow: none !important;
  font-family: inherit !important;
}
.ts-wrapper.focus .ts-control {
  border-color: var(--sy-green) !important;
  box-shadow: 0 0 0 4px rgba(0,122,51,.12) !important;
  background: #fff !important;
}
.ts-dropdown {
  border-radius: 12px !important;
  border: 2px solid rgba(0,122,51,.15) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,.12) !important;
  overflow: hidden;
}
.ts-dropdown .option { padding: 10px 14px !important; font-family: inherit !important; }
.ts-dropdown .option.active,
.ts-dropdown .option:hover {
  background: linear-gradient(90deg, rgba(0,122,51,.08), transparent) !important;
  color: var(--sy-green-dark) !important;
}
.ts-dropdown .option .small-path {
  display: block; font-size: 11px; color: #6b7280; margin-top: 2px;
}
.ts-wrapper.multi .ts-control > div {
  background: linear-gradient(135deg, var(--sy-green), var(--sy-green-dark)) !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
  border: none !important;
}
.ts-wrapper.multi .ts-control > div .remove {
  color: #fff !important; border-left: 1px solid rgba(255,255,255,.4) !important;
}
.ts-control input::placeholder,
.ts-control .item { font-family: inherit !important; }

/* ===== موبايل ===== */
@media (max-width: 576px) {
  .glass-card { border-radius: 18px; }
  .choice-btn { padding: 22px 10px; font-size: 14px; }
  .choice-btn i { font-size: 26px; }
  .section-title { font-size: 14px; }
  .form-control, .form-select { font-size: 16px; } /* منع zoom على iOS */
  .field-label { font-size: 13.5px; }
}

/* ===== شارة الجهة في قوائم Tom Select ===== */
.ts-option-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.ts-option-row .small-path {
  flex-basis: 100%;
}
.side-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .3px;
  white-space: nowrap;
}
.side-shamiya {
  background: rgba(0, 122, 51, .12);
  color: #005622;
  border: 1px solid rgba(0, 122, 51, .25);
}
.side-jazira {
  background: rgba(206, 17, 38, .10);
  color: #8B0A18;
  border: 1px solid rgba(206, 17, 38, .25);
}