/* =====================================================================
   «الفرص والمنح» (opportunities.html + opportunity-*.html, 22 Nov) — التحالف الوطني | NACDW v2
   Owner's choice «ف١ + س١»:
   - list page = the programmes list card (programs.css .mj-jrow) + status / date / «لمن؟»
   - details page = the programme page layout (programs.css .pd-intro / .pdx) + apply buttons, status box under the
     contents list, criteria as a tick list, governorates as chips, the PDF as a file card, «هل أنت جاهز للتقديم؟»
   - apply = the «طلب الشراكة» popup (partner.css) + answer cards for the multiple-choice questions
   Tokens only; medium weights; no new shadows.
   ===================================================================== */

/* ---------- hero (list page): same height as the programmes / jobs heroes ---------- */
.op-hero .hero-bg{ object-position:30% 45%; }
@media (min-width:981px){ .op-hero .hero-grid{ padding-top:150px; padding-bottom:56px; } }

/* ---------- status pill + date (shared) ---------- */
#mj .op-st{ display:inline-flex; align-items:center; gap:7px; height:30px; padding:0 13px; border-radius:999px; font-size:13.5px; font-weight:600; white-space:nowrap; }
#mj .op-st.on{ background:#E3F3EF; color:var(--base); }
#mj .op-st.on::before{ content:""; width:7px; height:7px; border-radius:50%; background:var(--teal-c); }
#mj .op-st.off{ background:#F0F2F2; color:var(--medium); }

/* ---------- list page ---------- */
#mj .op-list{ padding:96px 0; }
#mj .op-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:10px 18px; margin-bottom:14px; }
#mj .op-d{ display:inline-flex; align-items:center; gap:7px; font-size:14px; font-weight:500; color:var(--medium); }
#mj .op-d svg{ width:16px; height:16px; }
#mj .op-who{ display:flex; align-items:center; gap:8px; margin-top:14px; font-size:15px; color:var(--body); }
#mj .op-who svg{ width:18px; height:18px; flex:none; color:var(--base); }
#mj .op-who b{ font-weight:600; color:var(--dark); }
/* the opportunity image is an announcement banner with writing on it: show it whole, never cropped */
#mj .op-row .op-ph{ min-height:0; align-self:center; aspect-ratio:1033 / 571; background:#fff; }
#mj .op-row .op-ph img{ object-fit:contain; }

/* ---------- details page ---------- */
#mj .op-acts{ display:flex; flex-wrap:wrap; gap:12px; margin-top:28px; }
#mj .op-acts .mj-btn svg, #mj .op-side .mj-btn svg, #mj .op-cta .mj-btn svg{ width:18px; height:18px; }
#mj .op-banner{ aspect-ratio:1033 / 571; background:#fff; }
#mj .op-banner img{ object-fit:contain; }
/* quick facts: status / posted / who may apply (icons swapped for these three) */
#mj .op-glance > div:nth-child(1)::before{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E5B52' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
#mj .op-glance > div:nth-child(2)::before{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E5B52' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E"); }
#mj .op-glance > div:nth-child(3)::before{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E5B52' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
#mj .op-glance .op-st{ margin-top:2px; }

/* status + apply box under the contents list (sticky with it) */
#mj .op-side{ margin-top:28px; padding:20px; border-radius:var(--r-md); background:var(--soft); display:grid; gap:10px; justify-items:start; }
#mj .op-side p{ font-size:14.5px; line-height:1.7; color:var(--body); }
#mj .pdx-toc .op-side a.mj-btn{ display:inline-flex; width:100%; justify-content:center; margin:0; padding:0 24px; border:1.5px solid transparent;
  font-size:15px; font-weight:500; line-height:1; color:#fff; background:var(--green-900); }   /* .pdx-toc a (the contents links) must not reach the button */
#mj .pdx-toc .op-side a.mj-btn:hover{ background:var(--green); color:#fff; }
/* three partners: one row of three (never two + one) */
@media (min-width:981px){ #mj.op-detail .pd-partners{ grid-template-columns:repeat(3,minmax(0,1fr)); } }

/* criteria: tick list */
#mj .op-checks{ list-style:none; margin:0; padding:0; display:grid; gap:14px; }
#mj .op-checks li{ position:relative; padding-inline-start:36px; font-size:16.5px; font-weight:500; line-height:1.85; color:var(--dark); }
#mj .op-checks li::before{ content:""; position:absolute; inset-inline-start:0; top:.25em; width:24px; height:24px; border-radius:50%;
  background:#E3F3EF 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.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / 13px; }
/* governorates: chips */
#mj .op-govs{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:10px; }
#mj .op-govs li{ padding:8px 18px; border-radius:999px; border:1px solid var(--line); background:#fff; font-size:15.5px; font-weight:500; color:var(--dark); }
/* the PDF as a file card */
#mj .op-file{ display:inline-flex; align-items:center; gap:14px; padding:14px 22px 14px 18px; border:1px solid var(--line); border-radius:var(--r-md); background:#fff; text-decoration:none; transition:border-color .2s, background .2s; }
#mj .op-file > svg{ width:30px; height:30px; flex:none; color:var(--base); }
#mj .op-file b{ display:block; font-size:16px; font-weight:600; color:var(--dark); }
#mj .op-file small{ display:block; font-size:13px; color:var(--medium); }
#mj .op-file:hover{ border-color:var(--base); background:var(--soft); }
#mj .op-file:focus-visible{ outline:2px solid var(--base); outline-offset:3px; }
/* «هل أنت جاهز للتقديم؟» */
#mj .op-cta{ margin-top:8px; padding:36px 40px; border-radius:var(--r-lg); background:var(--base); color:#fff; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px 32px; }
#mj .op-cta h2{ grid-column:1; font-size:clamp(1.35rem, 2vw, 1.65rem); font-weight:700; color:#fff; }
#mj .op-cta p{ grid-column:1; font-size:15.5px; color:rgba(255,255,255,.8); }
#mj .op-cta .mj-btn{ grid-column:2; grid-row:1 / span 2; background:#fff; color:var(--base); }
#mj .op-cta .mj-btn:hover{ background:#EAF2F0; }
#mj.op-detail .pdx{ padding-bottom:96px; }

/* ---------- apply popup (partner.css look) ---------- */
#mj .op-modal .pt-steps{ max-width:700px; }
#mj .op-modal .pt-steps .tt{ font-size:12px; }
#mj .op-modal .pt-fields{ gap:28px; }
#mj .op-q{ border:0; margin:0; padding:0; min-width:0; }
#mj .op-q legend.lbl{ float:right; width:100%; margin-bottom:10px; padding:0; line-height:1.75; }
#mj .op-q legend.lbl + *{ clear:both; }
/* answer cards: the whole card is the click target */
#mj .op-opts{ display:grid; gap:8px; }
#mj .op-yn{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
#mj .pt-f .op-opt{ position:relative; display:flex; align-items:flex-start; gap:12px; padding:13px 16px; border:1px solid var(--line); border-radius:var(--r);
  background:#fff; font-size:15px; font-weight:500; line-height:1.7; color:var(--dark); cursor:pointer; transition:border-color .2s, background .2s; }
#mj .pt-f .op-opt:hover{ border-color:#C9D6D3; }
#mj .pt-f .op-opt input{ flex:none; width:18px; height:18px; margin:4px 0 0; padding:0; border:0; box-shadow:none; accent-color:var(--base); cursor:pointer; }
#mj .pt-f .op-opt:has(input:checked){ border-color:var(--base); background:#F1F7F5; }
#mj .pt-f .op-opt:has(input:focus-visible){ outline:2px solid var(--base); outline-offset:2px; }
#mj .op-big{ padding:18px 18px; }
#mj .op-big b{ display:block; font-size:16px; font-weight:700; color:var(--dark); }
#mj .op-big small{ display:block; margin-top:2px; font-size:13.5px; color:var(--medium); }
#mj .pt-f.bad .op-opt{ border-color:#F0B4AE; }
#mj .op-modal .pt-f textarea{ min-height:96px; }
/* not a member: the live form's message, and the form stops here */
#mj .op-stop{ display:flex; align-items:flex-start; gap:12px; padding:16px 18px; border-radius:var(--r); background:#FFF6EC; border:1px solid #F7D4AE; }
#mj .op-stop[hidden]{ display:none; }
#mj .op-stop svg{ width:22px; height:22px; flex:none; color:var(--acc); margin-top:2px; }
#mj .op-stop p{ font-size:15.5px; font-weight:600; line-height:1.8; color:var(--dark); }
#mj .op-modal .pt-nav .btn:disabled{ opacity:.45; cursor:not-allowed; }
/* review: the questions are long — question above its answer */
#mj .op-modal .pt-rg .it{ grid-template-columns:minmax(0,1fr); gap:4px; }
#mj .op-modal .pt-done .btn{ padding:0 24px; border:1.5px solid transparent; background:var(--green-900); color:#fff; }

/* ---------- responsive ---------- */
@media (max-width:980px){
  #mj .op-list{ padding:64px 0; }
  #mj .op-side{ display:none; }                   /* the contents list becomes the drop-down; the apply buttons stay in the intro and the end */
  #mj .op-cta{ grid-template-columns:minmax(0,1fr); padding:28px 24px; }
  #mj .op-cta .mj-btn{ grid-column:1; grid-row:auto; justify-self:start; margin-top:12px; }
}
@media (max-width:767px){
  #mj .op-row .op-ph{ min-height:0; margin-inline:0; border-radius:var(--r-md); }
  #mj .op-acts .mj-btn{ flex:1 1 100%; justify-content:center; }
  #mj .op-yn{ grid-template-columns:minmax(0,1fr); }
  #mj .op-checks li{ font-size:15.5px; }
}
#mj .op-form:has(.pt-review.on) .pt-req{ display:none; }   /* «كل الأسئلة مطلوبة» is not needed on the review */

/* 22 Nov (owner): never two identical «قدّم الآن» buttons on screen — opp.js adds .gone to the side box while the intro
   buttons or the end box are in view */
#mj .op-side{ transition:opacity .25s, visibility .25s; }
#mj .op-side.gone{ opacity:0; visibility:hidden; }
@media (prefers-reduced-motion:reduce){ #mj .op-side{ transition:none; } }

/* 22 Nov (owner chose «ت٢»): the end of the page is a quiet centred line — a thin rule, a small title, one sentence and the
   button; no green band */
#mj .op-cta{ display:grid; grid-template-columns:minmax(0,1fr); justify-items:center; gap:8px; margin-top:8px; padding:48px 0 8px;
  border-top:1px solid var(--line-2); border-radius:0; background:none; color:inherit; text-align:center; }
#mj .op-cta h2{ grid-column:auto; font-size:clamp(1.25rem, 1.8vw, 1.45rem); font-weight:700; color:var(--base); }
#mj .op-cta p{ grid-column:auto; font-size:15.5px; color:var(--medium); }
#mj .op-cta .mj-btn{ grid-column:auto; grid-row:auto; justify-self:center; margin-top:10px; background:var(--green-900); color:#fff; }
#mj .op-cta .mj-btn:hover{ background:var(--green); }
@media (max-width:980px){ #mj .op-cta{ padding:40px 0 0; } #mj .op-cta .mj-btn{ justify-self:center; } }
/* the last section already ends with a rule: no second line above the centred apply line */
#mj .op-cta{ border-top:0; padding-top:16px; }
@media (max-width:980px){ #mj .op-cta{ padding-top:8px; } }

/* 22 Nov (owner): «متحطوش ف كارت حط البتن بس» + «زرار بس» at the end.
   Side: only the button under the contents list (no box, no status, no text). End: only the button, under «المرفقات». */
#mj .op-side{ display:block; margin-top:24px; padding:0; border-radius:0; background:none; }
#mj .pdx-toc .op-side a.mj-btn{ width:auto; }
#mj .op-cta{ display:block; margin:0; padding:8px 0 0; border:0; background:none; text-align:start; }
#mj .op-cta .mj-btn{ margin:0; }
/* the button follows «المرفقات» directly: no closing rule / gap under the last section */
#mj.op-detail .pdx-main > section.pdx-sec:last-of-type{ border-bottom:0; padding-bottom:0; margin-bottom:32px; }

/* 22 Nov (owner): «البتن كده صغير أوي» → the end button is a big one across the content column;
   «ف الجنب خليه ف النص» → the side button is centred under the contents list */
#mj .op-cta .mj-btn{ display:flex; width:100%; height:60px; justify-content:center; gap:12px; font-size:17px; font-weight:600; }
#mj .op-cta .mj-btn svg{ width:20px; height:20px; }
#mj .op-side{ text-align:center; }
#mj .pdx-toc .op-side a.mj-btn{ display:inline-flex; width:auto; margin-inline:auto; }

/* 22 Nov (owner chose «ن٢»): the last section is «المرفقات والتقديم» — the file card and the apply button side by side,
   the same height (the separate end button is gone) */
#mj .op-fa{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); justify-items:stretch; align-items:stretch; gap:14px; margin:0; padding:0; text-align:start; }
#mj .op-fa .op-file{ display:flex; min-height:76px; }
#mj .op-go{ display:flex; align-items:center; justify-content:center; gap:12px; min-height:76px; padding:0 24px; border-radius:var(--r-md);
  background:var(--green-900); color:#fff; font-size:17px; font-weight:600; text-decoration:none; transition:background .2s; }
#mj .op-go svg{ width:20px; height:20px; }
#mj .op-go:hover{ background:var(--green); }
#mj .op-go:focus-visible{ outline:2px solid var(--base); outline-offset:3px; }
@media (max-width:767px){ #mj .op-fa{ grid-template-columns:minmax(0,1fr); } #mj .op-fa .op-file, #mj .op-go{ min-height:68px; } }

/* 22 Nov (owner): «خليه زي البتن بتاعنا» — the apply button is the site's standard button (.mj-btn .mj-btn-base: pill,
   48px, 15px), placed beside the file card, both on one line and centred on each other */
#mj .op-fa{ display:flex; flex-wrap:wrap; align-items:center; gap:16px; }
#mj .op-fa .op-file{ display:inline-flex; min-height:0; }
#mj .op-fa .op-go{ display:inline-flex; min-height:0; height:48px; padding:0 24px; border-radius:999px; font-size:15px; font-weight:500; background:var(--green-900); color:#fff; }
#mj .op-fa .op-go svg{ width:18px; height:18px; }
#mj .op-fa .op-go:hover{ background:var(--green); }
@media (max-width:767px){ #mj .op-fa{ display:flex; } #mj .op-fa .op-file{ min-height:0; } }
#mj .op-fa .op-go{ width:auto; flex:none; justify-content:center; gap:10px; }   /* not the old full-width end button */
/* 22 Nov (owner «خلي الاتنين بتن مع بعض»): «قدّم الآن» + «ملف المعلومات (PDF)» = the same two site buttons as in the intro */
#mj .op-fa{ gap:12px; }
#mj .op-fa .op-pdf{ display:inline-flex; flex:none; width:auto; }
#mj .op-fa .op-pdf svg{ width:18px; height:18px; }
@media (max-width:767px){ #mj .op-fa .mj-btn{ flex:1 1 100%; justify-content:center; } }
/* the two buttons = exactly the intro pair (.mj-btn 48px / 15px / 500): primary «قدّم الآن» + outline «ملف المعلومات» */
#mj .op-fa .mj-btn{ height:48px; padding:0 24px; font-size:15px; font-weight:500; gap:10px; border-radius:999px; }
#mj .op-fa .mj-btn svg{ width:18px; height:18px; }
#mj .op-fa .op-pdf{ background:transparent; color:var(--green-900); border:1.5px solid var(--green-900); }
#mj .op-fa .op-pdf:hover{ background:rgba(255,255,255,.35); color:var(--green-900); }

/* 22 Nov (owner): «خلي الاتنين بتن قد بعض» — the apply + PDF pair (intro and «المرفقات والتقديم») are two equal columns,
   each as wide as the wider of the two, so the primary is never the smaller one */
#mj .op-acts, #mj .op-fa{ display:inline-grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; }
#mj .op-acts .mj-btn, #mj .op-fa .mj-btn{ width:100%; justify-content:center; }
@media (max-width:767px){
  #mj .op-acts, #mj .op-fa{ display:grid; grid-template-columns:minmax(0,1fr); width:100%; }
}
