:root {
  --blue: #2b4a9b;
  --blue-dark: #1f3676;
  --red: #e5202a;
  --ink: #16203a;
  --muted: #5b6680;
  --line: #dfe4ef;
  --soft: #f4f6fb;
  --white: #fff;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  font-family: -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", Tahoma, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
button, input, textarea { font: inherit; color: inherit; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.section { padding-top: 56px; padding-bottom: 56px; }
.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); line-height: 1.15; margin-bottom: 16px; }
h2 { font-size: 1.6rem; margin-bottom: 24px; }
h3 { font-size: 1.05rem; margin-bottom: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 20px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-outline { border-color: var(--line); color: var(--ink); background: var(--white); }
.btn-outline:hover { border-color: var(--blue); }
:focus-visible { outline: 3px solid #8fa6e6; outline-offset: 2px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 12px; padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.2; }
.brand small { display: block; font-weight: 500; color: var(--muted); }
.site-header nav { display: flex; align-items: center; gap: 14px; }
.lang { font-weight: 600; text-decoration: none; }

/* Hero */
.hero { background: var(--soft); }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
  padding-top: 56px; padding-bottom: 56px;
}
.kicker { color: var(--red); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin-bottom: 8px; }
.lead { color: var(--muted); font-size: 1.1rem; margin-bottom: 26px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-photo { border-radius: var(--radius); box-shadow: 0 18px 40px rgba(22, 32, 58, .16); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; border-top: 4px solid var(--blue); }
.card p { color: var(--muted); font-size: .95rem; }

/* Steps */
.band { background: var(--soft); }
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 26px; }
.steps li { counter-increment: step; background: var(--white); border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); }
.steps li::before {
  content: counter(step); display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; margin-bottom: 10px;
  background: var(--red); color: var(--white); font-weight: 700;
}
.note { margin-top: 18px; color: var(--muted); font-size: .9rem; }

/* Contact */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.contact dt { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 20px; padding-bottom: 20px; }

/* Chat widget */
.chat-toggle {
  position: fixed; inset-block-end: 20px; inset-inline-end: 20px; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: 14px 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--red); color: var(--white); font-weight: 700;
  box-shadow: 0 10px 26px rgba(229, 32, 42, .35);
}
.badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--white); color: var(--red); font-size: .8rem; line-height: 22px; text-align: center;
}

.chat-panel {
  position: fixed; inset-block-end: 20px; inset-inline-end: 20px; z-index: 30;
  width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 40px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(22, 32, 58, .3); border: 1px solid var(--line);
}
.chat-panel > header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--blue); color: var(--white);
}
.chat-panel > header button { background: none; border: 0; color: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }

.chat-start { padding: 18px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.chat-start label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; }
.chat-start input, .chat-form textarea {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); width: 100%;
}
.chat-start .btn { justify-content: center; }
.small { font-size: .78rem; color: var(--muted); }
.chat-error { color: #b3141c; font-size: .88rem; background: #fdecee; border-radius: 8px; padding: 8px 10px; margin: 0 12px; }
.chat-start .chat-error { margin: 0; }

.chat-thread { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--soft); }
.msg { max-width: 82%; padding: 8px 12px; border-radius: 14px; font-size: .95rem; overflow-wrap: anywhere; }
.msg p { white-space: pre-wrap; }
.msg time { display: block; font-size: .7rem; opacity: .7; margin-top: 2px; }
.msg-customer { align-self: flex-end; background: var(--blue); color: var(--white); border-end-end-radius: 4px; }
.msg-staff { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-end-start-radius: 4px; }
.msg-system { align-self: center; background: none; color: var(--muted); font-size: .85rem; text-align: center; max-width: 100%; }
.msg a { color: inherit; }
.msg img { max-width: 200px; max-height: 200px; border-radius: 8px; margin: 2px 0; background: var(--white); }
.msg .file { display: inline-block; font-weight: 600; }

.chat-form { padding: 10px 12px 8px; border-top: 1px solid var(--line); }
.chat-row { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 4px; }
.chat-form textarea { resize: none; max-height: 110px; }
.chat-form .btn { padding: 9px 16px; }
.chat-attach {
  flex: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); font-size: 1.5rem; color: var(--blue); position: relative;
}
.chat-attach input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.chat-attach:focus-within { outline: 3px solid #8fa6e6; outline-offset: 2px; }
.chat-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--soft); border-radius: 8px; padding: 4px 10px; margin-bottom: 6px; font-size: .85rem;
}
.chat-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-chip button { background: none; border: 0; font-size: 1.2rem; cursor: pointer; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 36px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .site-header nav .btn { display: none; }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .chat-panel { inset: 0; width: 100%; height: 100%; border-radius: 0; border: 0; }
}
