/* ============================================================
   BLUE — contact page (.ct namespace)
   Compact hero ▸ two-column grid (info card + B2C/B2B form)
   ▸ full-width Google map ▸ calm trust strip.
   Depends on main.css tokens/components (.field, .btn, .chip,
   .eyebrow, .social-row.on-light). RTL: logical props only;
   the +966 phone group + the ref chip are forced dir:ltr.
   ============================================================ */

/* ---------------------------------------------- hero */
.ct-hero { padding-block: clamp(46px, 7vw, 92px) clamp(24px, 3.5vw, 40px); }
.ct-hero-title { margin-top: 14px; max-width: 18ch; }
.ct-hero-lead { margin-top: 16px; max-width: 56ch; }

/* ---------------------------------------------- main grid */
.ct-main { padding-block: clamp(20px, 3vw, 40px) clamp(64px, 9vw, 120px); }
.ct-grid {
  display: grid; grid-template-columns: .82fr 1.18fr;
  gap: clamp(22px, 3vw, 44px); align-items: start;
}
@media (max-width: 900px) { .ct-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------- info card */
.ct-info {
  background: var(--paper); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  padding: clamp(22px, 3vw, 32px); display: grid; gap: 24px;
}
.ct-info-list { display: grid; gap: 20px; }
.ct-item { display: flex; gap: 14px; align-items: flex-start; }
.ct-ic {
  flex: none; width: 44px; height: 44px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--powder-2); color: var(--royal);
}
.ct-ic svg { width: 21px; height: 21px; }
.ct-item-body { display: grid; gap: 3px; min-width: 0; }
.ct-item-label {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft);
}
.ct-item-val { font-size: var(--text-md); color: var(--ink); line-height: 1.55; }
.ct-item-val a { transition: color .2s; }
.ct-item-val a:hover { color: var(--royal); text-decoration: underline; }
.ct-item-val .ct-sub { display: block; color: var(--ink-soft); font-size: var(--text-sm); }
.ct-demo-tag {
  display: inline-block; font-weight: 700; font-size: var(--text-2xs);
  letter-spacing: .14em; text-transform: uppercase; color: var(--brass-ink);
  border: 1px solid rgba(192, 154, 94, .45); border-radius: var(--r-pill);
  padding: 1px 8px; margin-inline-start: 6px; vertical-align: middle;
}
/* phone digits stay LTR even in Arabic */
.ct-item-val .ct-ltr { unicode-bidi: isolate; direction: ltr; }

.ct-follow { border-top: 1px solid var(--line-soft); padding-top: 22px; display: grid; gap: 12px; }
.ct-follow-label {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft);
}
.ct-follow .social-row { margin-top: 0; }

/* ---------------------------------------------- form card */
.ct-formcard {
  position: relative; background: var(--paper); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  padding: clamp(22px, 3vw, 36px);
}
.ct-form { display: grid; gap: 20px; }
.ct-form-head { display: grid; gap: 6px; }
.ct-form-title { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; letter-spacing: -.02em; }
.ct-form-sub { font-size: var(--text-sm); color: var(--ink-soft); }

/* segmented audience toggle (tablist) */
.ct-seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  background: var(--powder-2); border: 1px solid var(--line-soft); border-radius: var(--r-pill);
}
.ct-seg-btn {
  border: 0; background: transparent; border-radius: var(--r-pill);
  padding: 11px 12px; font-family: inherit; font-size: var(--text-sm); font-weight: 700;
  color: var(--ink-soft); letter-spacing: .01em;
  transition: background .28s var(--ease-out), color .2s, box-shadow .28s var(--ease-out);
}
.ct-seg-btn[aria-selected="true"] {
  background: var(--royal); color: #fff;
  box-shadow: 0 8px 18px -10px rgba(var(--royal-rgb), .8);
}
.ct-seg-btn:hover:not([aria-selected="true"]) { color: var(--ink); }
.ct-seg-btn:focus-visible { outline: 2px solid var(--royal); outline-offset: 2px; }

/* field-set panels */
.ct-panel { display: grid; gap: 18px; }
.ct-panel[hidden] { display: none; }
.ct-panel-help {
  font-size: var(--text-sm); color: var(--ink-soft); line-height: 1.55;
  background: var(--powder-2); border-radius: var(--r-md); padding: 12px 16px;
}
@media (prefers-reduced-motion: no-preference) {
  .ct-panel.ct-swap-in { animation: ct-swap .42s var(--ease-out); }
}
@keyframes ct-swap {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.ct-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 520px) { .ct-row2 { grid-template-columns: 1fr; } }
.ct-field textarea { resize: vertical; min-height: 112px; }
.ct-optional { font-weight: 600; letter-spacing: .04em; text-transform: none; color: var(--ink-soft); opacity: .7; margin-inline-start: 4px; }

/* +966 phone group — always LTR so the chip leads + digits read L→R */
.ct-phone { display: flex; }
.ct-prefix {
  display: flex; align-items: center; padding: 0 14px;
  border: 1px solid var(--line); border-inline-end: 0;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  background: var(--powder-2); color: var(--ink);
  font-weight: 700; font-size: var(--text-sm); letter-spacing: .04em;
  transition: border-color .2s;
}
.ct-phone input { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* inline validation */
.ct-err { display: none; font-size: var(--text-xs); color: var(--danger); line-height: 1.45; }
.ct-field.ct-invalid .ct-err { display: block; }
.ct-field.ct-invalid input,
.ct-field.ct-invalid select,
.ct-field.ct-invalid textarea { border-color: var(--danger); box-shadow: 0 1px 0 0 var(--danger); }
.ct-field.ct-invalid .ct-prefix { border-color: var(--danger); }
.ct-field.ct-invalid > label { color: var(--danger); }

/* consent checkbox */
.ct-consent { gap: 8px; }
.ct-check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.ct-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ct-check-box {
  flex: none; width: 22px; height: 22px; margin-top: 1px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--paper);
  display: grid; place-items: center; transition: background .2s, border-color .2s;
}
.ct-check-box::after {
  content: ''; width: 6px; height: 11px; margin-bottom: 2px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
  opacity: 0; transition: opacity .18s;
}
.ct-check input:checked + .ct-check-box { background: var(--royal); border-color: var(--royal); }
.ct-check input:checked + .ct-check-box::after { opacity: 1; }
.ct-check input:focus-visible + .ct-check-box { box-shadow: 0 0 0 3px rgba(var(--royal-rgb), .2); }
.ct-check-txt { font-size: var(--text-sm); color: var(--ink); line-height: 1.55; }
.ct-consent.ct-invalid .ct-check-box { border-color: var(--danger); }
.ct-consent.ct-invalid .ct-check-txt { color: var(--danger); }

/* submit + demo note */
.ct-submit { width: 100%; justify-content: center; padding: 16px 30px; font-size: var(--text-md); margin-top: 2px; }
.ct-demo-note { text-align: center; font-size: var(--text-xs); color: var(--ink-soft); letter-spacing: .04em; }

/* ---------------------------------------------- success panel (replaces form) */
.ct-success {
  display: grid; gap: 15px; justify-items: center; text-align: center;
  padding: clamp(18px, 4vw, 44px) 6px;
}
.ct-success[hidden] { display: none; }
.ct-success-badge {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--powder); color: var(--royal);
}
.ct-success-badge svg { width: 30px; height: 30px; }
.ct-success .eyebrow::before { display: none; }
.ct-success-title { font-family: var(--font-display); font-weight: 600; font-size: var(--text-xl); line-height: 1.2; color: var(--ink); max-width: 22ch; }
.ct-success-body { color: var(--ink-soft); max-width: 42ch; line-height: 1.6; }
.ct-ref-wrap { display: grid; gap: 8px; justify-items: center; margin-top: 4px; }
.ct-ref-label { font-size: var(--text-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.ct-ref {
  font-size: var(--text-md); font-weight: 700; letter-spacing: .18em;
  color: var(--brass-ink); border: 1px solid rgba(192, 154, 94, .4);
  border-radius: var(--r-pill); padding: 8px 22px;
  direction: ltr; unicode-bidi: isolate;
}
.ct-success-demo { font-size: var(--text-xs); color: var(--ink-soft); }
.ct-success .btn { margin-top: 6px; }

/* ---------------------------------------------- google map */
.ct-map-wrap { margin-top: clamp(28px, 4vw, 52px); display: grid; gap: 14px; }
.ct-map {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; background: var(--powder-2); box-shadow: var(--shadow-sm);
  aspect-ratio: 21 / 9; max-height: 520px; min-height: 380px;
}
.ct-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.ct-map-card {
  position: absolute; inset-inline-start: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px);
  display: grid; gap: 7px; justify-items: start;
  max-width: min(340px, calc(100% - 48px));
  padding: 22px 24px; border-radius: var(--r-md);
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line-soft); box-shadow: var(--shadow-md);
}
.ct-map-eyebrow { font-size: var(--text-2xs); font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--royal); }
.ct-map-card b { font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); }
.ct-map-addr { font-size: var(--text-sm); color: var(--ink-soft); line-height: 1.55; }
.ct-map-card .btn { margin-top: 8px; }
@media (max-width: 640px) {
  .ct-map { aspect-ratio: auto; max-height: none; min-height: 520px; }
  .ct-map-card { inset-inline-end: 16px; }
}

/* ---------------------------------------------- trust strip */
.ct-trust { margin-top: clamp(28px, 4vw, 52px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ct-trust-item {
  display: flex; gap: 12px; align-items: center;
  padding: 16px 18px; border: 1px solid var(--line-soft); border-radius: var(--r-md);
  background: var(--paper);
}
.ct-trust-item svg { width: 24px; height: 24px; color: var(--royal); flex: none; }
.ct-trust-item b { display: block; font-size: var(--text-sm); line-height: 1.3; }
.ct-trust-item span { font-size: var(--text-xs); color: var(--ink-soft); }
@media (max-width: 760px) { .ct-trust { grid-template-columns: 1fr; } }

/* ---------------------------------------------- RTL (Arabic page) */
/* phone group + ref keep LTR — handled inline via dir="ltr", reinforced here */
[dir="rtl"] .ct-phone { direction: ltr; }
[dir="rtl"] .ct-ref { direction: ltr; }

/* ---------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
}
