/* Layout idea: the site's own header and footer around one narrow card, with the questions numbered down the page. */
:root {
  --theme: #0772ce;
  --theme-deep: #0868bd;
  --theme-bright: #078bd3;
  --navy: #082c4d;
  --title: #272e39;
  --body: #565656;
  --muted: #66727f;
  --line: #e6edf5;
  --field-line: #d5dde6;
  --wash: #f5f8fc;
  --error: #c82333;
  --font: "Almarai", "Noto Sans Arabic", Tahoma, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--body);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

h1, p, ul, fieldset { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
img { max-width: 100%; }

.icon { width: 1em; height: 1em; flex: none; }

.container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Site header ---------- */

.topbar {
  padding: 8px 0;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
}
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
}
.topbar__address { display: flex; align-items: center; gap: 6px; }
.topbar__contacts { display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap; }
.topbar__contacts li { display: flex; align-items: center; gap: 8px; }
.topbar__icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-size: 14px;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 4px;
}
.masthead__logo { display: block; height: 104px; width: auto; }

.mainnav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: -26px;
  padding: 15px 16px;
  background: #000;
  border-radius: 10px;
}
.mainnav li + li { border-inline-start: 1px solid rgba(255, 255, 255, .55); }
.mainnav a {
  display: block;
  padding-inline: 19px;
  color: #fff;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}
.mainnav a:hover { color: #8fcbff; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 19px 38px;
  border: 0;
  border-radius: 30px;
  background: var(--theme);
  color: #fff;
  font: 700 16px/1 var(--font);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease;
}
.btn:hover { background: var(--theme-deep); }
.btn[disabled] { background: #7fa9cf; cursor: progress; }
.btn--wide { width: 100%; padding-block: 22px; font-size: 18px; }

:is(a, button, .input):focus-visible,
.upload__input:focus-visible + .upload__box {
  outline: 3px solid rgba(7, 114, 206, .4);
  outline-offset: 2px;
}

/* ---------- Page ---------- */

.page {
  flex: 1 0 auto;
  padding: 66px 16px 60px;
  background:
    radial-gradient(circle at top right, rgba(0, 153, 255, .08), transparent 30%),
    radial-gradient(circle at bottom left, rgba(0, 190, 180, .07), transparent 30%),
    var(--wash);
}
.page__inner { max-width: 780px; margin-inline: auto; }

.banner {
  position: relative;
  margin-bottom: 24px;
  padding: 22px 30px;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--theme-deep), var(--theme-bright));
  box-shadow: 0 15px 40px rgba(0, 93, 170, .18);
  color: #fff;
  text-align: center;
}
.banner::before {
  content: "";
  position: absolute;
  top: -100px;
  left: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.banner h1 {
  position: relative;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.3;
  text-wrap: balance;
}
.banner p { position: relative; margin-top: 6px; font-size: 15px; opacity: .92; text-wrap: balance; }

.card {
  padding: 8px 36px 36px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(19, 55, 90, .08);
}

.alert {
  margin-top: 24px;
  padding: 14px 20px;
  border: 1px solid #f1c2c7;
  border-radius: 16px;
  background: #fdf1f2;
  color: var(--error);
  font-weight: 700;
}

/* ---------- Questions ---------- */

.q {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 16px;
  padding-block: 28px;
  border-bottom: 1px solid var(--line);
}
.q__num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--theme);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}

/* Two questions side by side. Below 768px there is no room for two inputs, so they stack. */
@media (min-width: 768px) {
  .q-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    border-bottom: 1px solid var(--line);
  }
  .q-row > .q { border-bottom: 0; }
}

.label {
  display: block;
  margin-bottom: 12px;
  padding: 0;
  color: var(--title);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}
.label--sub { font-size: 16px; }
.hint { color: var(--muted); font-size: 14px; }

.input {
  display: block;
  width: 100%;
  height: 55px;
  padding-inline: 24px;
  border: 1px solid var(--field-line);
  border-radius: 30px;
  background: #fff;
  color: var(--title);
  font: 400 16px var(--font);
  transition: border-color .2s ease;
}
.input::placeholder { color: #8a95a1; opacity: 1; }
.input:focus { border-color: var(--theme); }
.input--number { text-align: right; letter-spacing: .02em; }
.input--number::placeholder { text-align: right; }
.input.is-invalid { border-color: var(--error); }

/* Phone: a fixed +, the country code box, then the number box, read left to right. */
.phone { display: flex; gap: 10px; }
.phone__code { position: relative; flex: 0 0 96px; }
.phone__plus {
  position: absolute;
  inset-block: 0;
  left: 20px;
  display: flex;
  align-items: center;
  color: var(--title);
  font: 400 16px var(--font);
  pointer-events: none;
}
.phone__code .input { padding-inline: 34px 12px; }
.phone > .input { flex: 1; min-width: 0; }
.phone .input,
.phone .input::placeholder { text-align: left; }

.error {
  margin-top: 8px;
  color: var(--error);
  font-size: 14px;
  font-weight: 700;
}

/* ---------- Yes/no style choices ---------- */

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice label { position: relative; display: block; cursor: pointer; }
.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 55px;
  padding-inline: 16px;
  border: 1px solid var(--field-line);
  border-radius: 30px;
  background: #fff;
  color: var(--title);
  font-weight: 700;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.choice label:hover span { border-color: var(--theme); }
.choice input:checked + span { border-color: var(--theme); background: var(--theme); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid rgba(7, 114, 206, .4); outline-offset: 2px; }
.choice.is-invalid span { border-color: var(--error); }

.reveal { display: none; margin-top: 20px; }
.reveal.is-open { display: block; }

/* ---------- File uploads ---------- */

.upload__zone { position: relative; }

/* The real input sits over the box, so tapping and drag-and-drop work without extra code. */
.upload__input {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 170px;
  padding: 18px;
  border: 2px dashed #bfd2e6;
  border-radius: 20px;
  background: var(--wash);
  text-align: center;
  transition: border-color .2s ease, background-color .2s ease;
}
.upload__input:hover + .upload__box { border-color: var(--theme); }

.upload__prompt { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.upload__prompt .icon { margin-bottom: 4px; color: var(--theme); font-size: 30px; }
.upload__prompt strong { color: var(--title); font-size: 15px; line-height: 1.5; }

.upload.has-file .upload__box { border-style: solid; border-color: var(--theme); background: #fff; }
.upload.has-file .upload__prompt { display: none; }
.upload.has-error .upload__box { border-color: var(--error); }

.upload__preview { display: block; max-height: 120px; border-radius: 10px; }
.upload__file { color: var(--theme); font-size: 44px; line-height: 1; }
.upload__meta {
  max-width: 100%;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.upload__clear {
  position: relative;
  z-index: 2;
  display: block;
  margin: 8px auto 0;
  padding: 2px 8px;
  border: 0;
  background: none;
  color: var(--error);
  font: 700 14px var(--font);
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Submit ---------- */

.actions { padding-top: 28px; }
.progress { margin-top: 14px; text-align: center; }
.progress__track { height: 8px; overflow: hidden; border-radius: 8px; background: var(--line); }
.progress__bar { width: 0; height: 100%; border-radius: 8px; background: var(--theme); transition: width .2s linear; }
.progress .hint { margin-top: 6px; }

/* ---------- Confirmation ---------- */

.done { padding: 44px 32px; text-align: center; }
.done__mark {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--theme);
  color: #fff;
  font-size: 38px;
}
.done h1 { margin-bottom: 18px; color: var(--title); font-size: 30px; font-weight: 800; }
.done__ref {
  margin: 2px 0 14px;
  color: var(--theme);
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.done__note { max-width: 34em; margin-inline: auto; text-wrap: pretty; }
.done__thanks { margin-top: 14px; color: var(--title); font-weight: 700; }
.done .btn { margin-top: 26px; }

/* ---------- Site footer ---------- */

.footer { padding: 15px 16px; background: var(--navy); color: #fff; text-align: center; }

.whatsapp-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
  color: #fff;
  font-size: 32px;
}

/* ---------- Small screens ---------- */

@media (max-width: 991px) {
  .topbar__address, .topbar__contacts .topbar__email, .mainnav { display: none; }
  .topbar__inner { justify-content: center; }
  .page { padding-top: 28px; }
  .masthead__logo { height: 84px; }
  .masthead .btn { padding: 15px 22px; font-size: 14px; }
}

@media (max-width: 600px) {
  .container { padding-inline: 16px; }
  .banner { padding: 18px 20px; }
  .banner h1 { font-size: 28px; }
  .card { padding: 4px 18px 24px; }
  .q { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding-block: 22px; }
  .q__num { width: 34px; height: 34px; font-size: 16px; }
  .whatsapp-float { width: 50px; height: 50px; font-size: 28px; right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
