/* =====================================================================
   صفحة «اتصل بنا» (contact.html, 16 Nov) — التحالف الوطني | NACDW v2
   Loaded AFTER partner.css: the fields, upload area, file list, confirmation and buttons are the partner form's
   (.pt-f, .pt-drop, .pt-files, .pt-done, .pt-nav .btn). This file only adds:
     1. the page layout (17 Nov: contact-details panel, then the form under it)
     2. the states the partner form does not have: filled, valid, disabled, sending, send error
     3. the FAQ accordion
   Tokens only (site.css + #mj in areas.css). The one motion is the FAQ open/close (short, and off for
   prefers-reduced-motion) and the sending spinner (it tells the visitor something is happening).
   ===================================================================== */

/* ---------- 0. hero (16 Nov): the «مجالات عملنا» / «انضم إلينا» hero, unchanged; only what is page-specific ---------- */
/* the people sit on the left of the photo: keep them in frame as the screen narrows (the copy sits on the right) */
.ct-hero .hero-bg{ object-position:6% 45%; }
/* same hero height as «انضم إلينا» / «منصات التحالف» (the empty block stands in for the areas numbers row) */
.ct-hero .hero-copy::after{ content:""; display:block; height:3.1em; font-size:17px; }

/* ---------- 1. layout ---------- */
/* first section under the hero: 96 / 64 like the other pages with a photo hero */
#mj .ct-sec{ padding-top:96px; padding-bottom:96px; }
/* 17 Nov (designer): one column at every size: the contact details first, right under the hero, then the form,
   both the full width of the container (no empty side next to either of them) */
#mj .ct-grid{ display:grid; grid-template-columns:minmax(0,1fr); grid-template-areas:"info" "form"; gap:32px; }
#mj .ct-card{ grid-area:form; }
#mj .ct-info{ grid-area:info; }
/* contact-details panel: the footer's green, so it reads as "the Alliance's own details".
   17 Nov v2 (designer: "too many lines, tidy it up"): no divider lines at all. Each detail is its own soft tile (a lighter
   green, rounded) with the icon on top, then the label, then the value; the four tiles have equal widths and heights,
   so the row reads as one even block. Desktop 4 tiles in a row, tablet 2 × 2, phone one under the other. */
#mj .ct-info{ background:var(--base); color:#fff; border-radius:var(--r-lg); padding:36px 36px 40px; box-shadow:0 18px 40px -28px rgba(14,91,82,.5); }
#mj .ct-info h2{ font-size:22px; font-weight:700; color:#fff; margin:0 0 24px; }
#mj .ct-info ul{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:16px; }
#mj .ct-info li{ display:flex; flex-direction:column; align-items:flex-start; gap:16px; padding:24px 22px; border-radius:var(--r-md); background:rgba(255,255,255,.06); }
#mj .ct-info .ic{ flex:none; width:46px; height:46px; border-radius:50%; display:grid; place-items:center; background:rgba(255,255,255,.1); color:var(--acc); }
#mj .ct-info .ic svg{ width:21px; height:21px; }
#mj .ct-info .k{ display:block; font-size:14px; color:rgba(255,255,255,.7); margin-bottom:4px; }
#mj .ct-info li span:not(.k):not(.ic), #mj .ct-info li a{ font-size:16px; font-weight:600; line-height:1.75; color:#fff; }
#mj .ct-info li a{ text-decoration:underline; text-decoration-color:rgba(255,255,255,.35); text-underline-offset:5px; transition:text-decoration-color .2s, color .2s; }
#mj .ct-info li a:hover{ color:#FFD9B3; text-decoration-color:currentColor; }
#mj .ct-info li a:focus-visible{ outline:2px solid #fff; outline-offset:3px; border-radius:4px; }

/* form card head */
#mj .ct-fh{ padding-bottom:20px; margin-bottom:24px; border-bottom:1px solid var(--line-2); }
#mj .ct-fh .eyebrow{ font-size:13px; font-weight:700; color:var(--acc); }
#mj .ct-fh h2{ margin-top:4px; font-size:clamp(1.35rem, 2vw, 1.6rem); line-height:1.4; font-weight:700; color:var(--base); }
#mj .ct-fs{ border:0; margin:0; padding:0; min-width:0; }

/* actions row: privacy line + send (the partner form's .pt-nav row) */
#mj .ct-actions{ justify-content:space-between; gap:24px; }
#mj .ct-privacy{ margin:0; max-width:420px; font-size:14px; line-height:1.8; color:var(--medium); }
#mj .ct-actions .ct-send{ margin-inline-start:auto; flex:none; }
#mj .pt-done .btn-outline{ padding:0 24px; border:1.5px solid var(--green-900); background:transparent; color:var(--green-900); }   /* 17 Nov: = homepage .btn-outline */
#mj .pt-done .btn-outline:hover{ background:rgba(255,255,255,.35); }

/* ---------- 2. states ---------- */
/* filled: a slightly firmer border once there is something in the field */
#mj .ct-form .pt-f input:not(:placeholder-shown), #mj .ct-form .pt-f textarea:not(:placeholder-shown){ border-color:#C9D6D3; }
/* valid (checked on leaving the field): green border + a tick at the end of the field */
#mj .ct-form .pt-f.ok input{ border-color:var(--base); padding-left:44px;   /* physical left: the email/phone fields are dir="ltr" */
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E5B52' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat; background-size:18px; background-position:left 16px center; }
#mj .ct-form .pt-f.ok textarea{ border-color:var(--base); }
/* error: partner.css styles [aria-invalid] and .err; add the icon in front of the message */
#mj .ct-form .pt-f .err{ display:flex; align-items:flex-start; gap:6px; }
#mj .ct-form .pt-f .err::before{ content:""; flex:none; width:16px; height:16px; margin-top:3px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B42318' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7.5v5.5M12 16.4v.1'/%3E%3C/svg%3E") no-repeat center / contain; }
#mj .ct-form .pt-f .err:empty{ display:none; }
/* disabled (while sending): every control greys out and stops taking input */
#mj .ct-form .ct-fs:disabled .pt-f input, #mj .ct-form .ct-fs:disabled .pt-f textarea{ background-color:var(--soft); color:var(--medium); border-color:var(--line); cursor:not-allowed; opacity:.75; }
#mj .ct-form .ct-fs:disabled .pt-drop{ cursor:not-allowed; opacity:.6; pointer-events:none; }
#mj .ct-form .ct-fs:disabled .pt-files .rm{ visibility:hidden; }
/* one file only: once chosen, the drop area gives way to the file row (it comes back when the file is removed) */
#mj .ct-file.has .pt-drop{ display:none; }
/* sending: spinner inside the button, button keeps its size */
#mj .ct-send .sp{ display:none; width:18px; height:18px; border-radius:50%; border:2px solid rgba(255,255,255,.35); border-top-color:#fff; }
#mj .ct-send.is-loading{ cursor:progress; background:var(--green-900); opacity:.9; }
#mj .ct-send.is-loading .sp{ display:inline-block; animation:ctSpin .8s linear infinite; }
#mj .ct-send.is-loading svg{ display:none; }
#mj .ct-send:focus-visible{ outline:2px solid var(--green-900); outline-offset:3px; }
@keyframes ctSpin{ to{ transform:rotate(360deg); } }
/* send error (the whole message could not be sent): a banner at the top of the form; the data stays in the fields */
#mj .ct-alert{ display:flex; align-items:flex-start; gap:12px; margin-bottom:22px; padding:14px 16px; border:1px solid #F4C7C2; border-radius:var(--r); background:#FDF0EE; color:#8A1C12; }
#mj .ct-alert[hidden]{ display:none; }
#mj .ct-alert .ic{ flex:none; font-size:20px; margin-top:2px; color:#B42318; }
#mj .ct-alert p{ margin:0; font-size:15px; font-weight:600; line-height:1.8; }

/* ---------- 3. FAQ ---------- */
#mj .ct-faq{ background:var(--soft); padding:96px 0; }
/* 17 Nov (designer): the heading in its usual place at the top of the section, the questions under it at the full
   width of the container (no longer heading on one side / questions on the other) */
#mj .ct-faq-grid{ display:grid; grid-template-columns:minmax(0,1fr); gap:36px; }
#mj .ct-faq-hd .mj-h2{ font-size:clamp(1.7rem, 2.6vw, 2.25rem); line-height:1.4; }
#mj .ct-qs{ display:flex; flex-direction:column; gap:12px; }
#mj .ct-q{ background:#fff; border:1px solid var(--line); border-radius:var(--r-md); transition:border-color .2s, box-shadow .2s; }
#mj .ct-q:hover{ border-color:#C9D6D3; }
#mj .ct-q.on{ border-color:var(--base); box-shadow:0 14px 30px -24px rgba(14,91,82,.45); }
#mj .ct-q h3{ margin:0; font-size:inherit; }
#mj .ct-qb{ width:100%; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 24px; text-align:right;
  font-size:17px; font-weight:700; line-height:1.7; color:var(--dark); border-radius:var(--r-md); transition:color .2s; }
#mj .ct-qb:hover, #mj .ct-q.on .ct-qb{ color:var(--base); }
#mj .ct-qb:focus-visible{ outline:2px solid var(--base); outline-offset:2px; }
#mj .ct-qb .ic{ flex:none; width:36px; height:36px; border-radius:50%; display:grid; place-items:center; background:var(--soft); color:var(--base); font-size:18px;
  transition:background .2s, color .2s, transform .25s ease; }
#mj .ct-qb .ic svg{ stroke-width:2.2; }
#mj .ct-q.on .ct-qb .ic{ background:var(--base); color:#fff; transform:rotate(180deg); }   /* 16 Nov: chevron down -> up when open */
/* answer: height animates with the grid-rows technique; [hidden] is removed by JS before opening */
#mj .ct-a{ display:grid; grid-template-rows:0fr; transition:grid-template-rows .25s ease; }
#mj .ct-q.on .ct-a{ grid-template-rows:1fr; }
#mj .ct-a[hidden]{ display:none; }
#mj .ct-a .in{ overflow:hidden; }
#mj .ct-a .tx{ padding:0 24px 22px; font-size:16px; line-height:1.95; color:var(--body); }
#mj .ct-a .tx p + ul, #mj .ct-a .tx p + p{ margin-top:8px; }
#mj .ct-a ul{ list-style:none; margin:0; padding:0; display:grid; gap:8px; }
#mj .ct-a li{ position:relative; padding-inline-start:20px; }
#mj .ct-a li::before{ content:""; position:absolute; inset-inline-start:0; top:.8em; width:7px; height:7px; border-radius:50%; background:var(--acc); }
#mj .ct-a b{ color:var(--dark); }
#mj .ct-a a{ color:var(--base); font-weight:700; text-decoration:underline; text-underline-offset:4px; }
@media (prefers-reduced-motion:reduce){
  #mj .ct-a, #mj .ct-qb .ic, #mj .ct-q{ transition:none; }
  #mj .ct-send.is-loading .sp{ animation-duration:2.4s; }
}

/* ---------- tablet ---------- */
@media (max-width:1100px){
  #mj .ct-grid{ gap:24px; }
  #mj .ct-faq-grid{ gap:28px; }
}
@media (max-width:980px){
  /* the panel lays its four tiles out 2 × 2 */
  #mj .ct-info{ padding:28px 24px 28px; }
  #mj .ct-info ul{ grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px; }
  #mj .ct-faq{ padding:72px 0; }
  #mj .ct-sec{ padding-top:64px; padding-bottom:72px; }
}
/* ---------- phones ---------- */
@media (max-width:767px){
  /* one tile under the other; the icon moves beside the text so each tile stays short */
  #mj .ct-info{ padding:24px 16px; border-radius:var(--r-md); }
  #mj .ct-info h2{ font-size:19px; margin-bottom:18px; padding-inline:4px; }
  #mj .ct-info ul{ grid-template-columns:minmax(0,1fr); gap:10px; }
  #mj .ct-info li{ flex-direction:row; gap:14px; padding:16px; }
  #mj .ct-info .ic{ width:40px; height:40px; }
  #mj .ct-info .ic svg{ width:19px; height:19px; }
  #mj .ct-actions{ flex-direction:column-reverse; align-items:stretch; gap:16px; }
  #mj .ct-actions .ct-send{ width:100%; justify-content:center; margin:0; }   /* 17 Nov: 48px like the homepage buttons (was 52px) */
  #mj .ct-privacy{ max-width:none; text-align:center; font-size:13.5px; }
  #mj .ct-qb{ padding:16px 18px; font-size:16px; gap:12px; }
  #mj .ct-qb .ic{ width:32px; height:32px; font-size:16px; }
  #mj .ct-a .tx{ padding:0 18px 18px; font-size:15.5px; }
  #mj .ct-faq{ padding:56px 0; }
  #mj .ct-sec{ padding-top:48px; padding-bottom:56px; }
}

/* 21 Nov (owner): shorter hero, same as «البرامج والمبادرات» (programs.css): less space above and below the copy and
   no reserved empty row under the lead. Desktop only; phones unchanged. */
@media (min-width:981px){
  .ct-hero .hero-grid{ padding-top:150px; padding-bottom:56px; }
  .ct-hero .hero-copy::after{ display:none; }
}

/* =====================================================================
   22 Nov (owner): «مربع التواصل والفورم كبير أوي». Same design and order, only smaller:
   - both blocks at a narrower measure (1080, like the jobs list) instead of the full 1280
   - contact box: shorter (title smaller, tiles with the icon beside the text instead of above it)
   - form: less padding, a shorter message box, a one-line upload strip instead of the tall drop area
   Scoped to .ct-page so the partner popup (same partner.css fields) is untouched.
   ===================================================================== */
.ct-page .ct-sec .wrap{ max-width:1120px; }
#mj.ct-page .ct-sec{ padding-top:72px; padding-bottom:80px; }
#mj.ct-page .ct-grid{ gap:24px; }

#mj.ct-page .ct-info{ padding:24px 28px 28px; }
#mj.ct-page .ct-info h2{ font-size:18px; margin-bottom:16px; }
#mj.ct-page .ct-info ul{ gap:12px; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,.85fr) minmax(0,1.15fr); }   /* widths follow the text: address on two lines, the rest on one */
#mj.ct-page .ct-info li{ flex-direction:row; align-items:center; gap:12px; padding:14px 16px; }
#mj.ct-page .ct-info .ic{ width:40px; height:40px; }
#mj.ct-page .ct-info .ic svg{ width:19px; height:19px; }
#mj.ct-page .ct-info .k{ font-size:13px; margin-bottom:0; }
#mj.ct-page .ct-info li span:not(.k):not(.ic), #mj.ct-page .ct-info li a{ font-size:14.5px; line-height:1.65; }

#mj.ct-page .ct-card{ padding:28px 32px 30px; }
#mj.ct-page .ct-fh{ padding-bottom:14px; margin-bottom:18px; }
#mj.ct-page .ct-fh h2{ font-size:clamp(1.25rem, 1.8vw, 1.45rem); }
#mj.ct-page .ct-form .pt-f input{ height:48px; }
#mj.ct-page .ct-form .pt-f textarea{ height:116px; min-height:96px; }
#mj.ct-page .ct-form .pt-drop{ flex-direction:row; min-height:0; padding:12px 18px; gap:12px; }
#mj.ct-page .ct-form .pt-drop .ic{ width:36px; height:36px; font-size:17px; }


@media (max-width:767px){
  #mj.ct-page .ct-sec{ padding-top:48px; padding-bottom:56px; }
  #mj.ct-page .ct-info{ padding:20px 16px; }
  #mj.ct-page .ct-info ul{ grid-template-columns:minmax(0,1fr); gap:10px; }
  #mj.ct-page .ct-card{ padding:22px 18px 24px; }
}

/* 22 Nov (owner): «العنوان حطه خريطة مش كلام». The address tile is now a Google map (pin = Google's place «مقر التحالف الوطني للعمل
   الأهلي التنموي», 30.0377615, 31.4448167, in الياسمين 6 as the address says; not lazy-loaded, it sits near the top); the address text stays for screen readers only.
   (The live nacdw.org/contact map points at Melbourne — a template leftover — so it was not reused.) */
/* 22 Nov v2 (owner): «الخريطة صغيرة والعنوان مش واضح، كبّرها واكتب معاها العنوان»: the map is the big tile on the right,
   the full address written under it in the same tile; email, phone and hours stacked on its left */
#mj.ct-page .ct-info ul{ grid-template-columns:minmax(0,1.45fr) minmax(0,1fr); }
#mj.ct-page .ct-info li.ct-map{ grid-row:1 / span 3; flex-direction:column; align-items:stretch; gap:0; padding:0; overflow:hidden; }
#mj.ct-page .ct-map iframe{ display:block; flex:1 1 auto; width:100%; min-height:230px; border:0; background:#E8EEEC; }
#mj.ct-page .ct-addr{ display:flex; align-items:center; gap:12px; padding:14px 16px; }
#mj.ct-page .ct-addr .ic{ flex:none; width:40px; height:40px; border-radius:50%; display:grid; place-items:center; background:rgba(255,255,255,.1); color:var(--acc); }
#mj.ct-page .ct-addr .ic svg{ width:19px; height:19px; }
@media (max-width:767px){
  #mj.ct-page .ct-info ul{ grid-template-columns:minmax(0,1fr); }
  #mj.ct-page .ct-info li.ct-map{ grid-row:auto; }
  #mj.ct-page .ct-map iframe{ min-height:220px; }
}
