/* ── رأس صفحة الدورة: الشكل المدرّج + المشهد + شريط الفعل ── */
.cdh{position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) 50%;align-items:center;gap:0;margin:.4rem auto 1.6rem;max-width:1180px;padding:2.4rem 2.6rem 2.6rem 1.4rem;filter:drop-shadow(0 14px 28px rgb(22 58 122 / .08))}
.cdh-shape{position:absolute;inset:0;width:100%;height:100%;z-index:-1;display:block;overflow:visible}
.cdh-shape--tall{display:none}
.cdh-scene{grid-column:2;grid-row:1;display:flex;justify-content:center;align-items:center;padding-inline:.4rem 1.2rem;min-width:0}
.cdh-scene .cs-svg{max-width:30rem}
.cdh-copy{grid-column:1;grid-row:1;display:flex;flex-direction:column;align-items:flex-start;gap:.7rem;text-align:start;padding:1.8rem 0 0 1rem;min-width:0}
.cdh-top{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.cdh-badge{display:inline-flex;align-items:center;padding:.36rem .9rem;border-radius:999px;background:#dfeafb;color:#163a7a;font-family:var(--font-display);font-size:.8rem;font-weight:700}
.cdh-badge--soft{background:#fff;border:1px solid #cfe0f6;color:#2a5aa0}
.cdh-badge--state{background:#fff7e3;border:1px solid #f1dfae;color:#8e5a08}
.cdh-title{position:relative;margin:.1rem 0 0;padding-bottom:.8rem;font-family:var(--font-display);font-size:clamp(1.6rem,2.6vw,2.3rem);font-weight:800;line-height:1.35;color:#0f2a5f;letter-spacing:0}
.cdh-title::after{content:"";position:absolute;inset-inline-start:0;bottom:0;width:3rem;height:4px;border-radius:4px;background:linear-gradient(90deg,#f5b400,#2f7fe0)}
.cdh-lead{margin:0;color:#5d738c;font-size:.98rem;line-height:1.9;max-width:32rem}
.cdh-lead p{margin:0 0 .4rem}
.cdh-lead p:last-child{margin-bottom:0}
.cdh-meta{list-style:none;margin:.1rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.45rem}
.cdh-meta li{display:flex;align-items:center;gap:.45rem;padding:.3rem .75rem .3rem .4rem;border-radius:999px;background:#fff;border:1px solid #d6e4f7;color:#2f4a6d;font-size:.82rem;font-weight:600}
.cdh-meta .nx-spot-ic{width:1.5rem;height:1.5rem;border-radius:.5rem;background:#eaf1fb}

/* العدّ التنازلي الهادئ */
.cdh-count{display:inline-flex;align-items:center;gap:.8rem;margin-top:.2rem;padding:.45rem .9rem;border-radius:.7rem;background:#fff;border:1px solid #d6e4f7}
.cdh-count-label{font-size:.78rem;font-weight:700;color:#7a8ea6}
.cdh-count-units{display:inline-flex;gap:.9rem}
.cdh-count-units b{display:inline-flex;align-items:baseline;gap:.25rem;font-family:var(--font-display);font-size:1.15rem;font-weight:800;color:#0f2a5f;line-height:1}
.cdh-count-units small{font-size:.68rem;font-weight:700;color:#5d738c}
.cdh-count-hint{margin:0;font-size:.85rem;font-weight:600;color:#5d738c}

/* شريط الفعل */
.cdh-foot{display:flex;align-items:stretch;gap:.8rem;flex-wrap:wrap;margin-top:.8rem;padding-top:1rem;border-top:1px solid #d6e4f7;width:100%}
.cdh-price{order:2;display:flex;flex-direction:column;justify-content:center;gap:.12rem;min-width:7rem;padding:.4rem .9rem;border-radius:.6rem;background:#fff;border:1px solid #d6e4f7;text-align:center}
.cdh-price small{font-size:.66rem;font-weight:700;color:#7a8ea6}
.cdh-price strong{font-family:var(--font-display);font-size:1.25rem;font-weight:800;color:#0f2a5f;line-height:1.1;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;gap:.2em}
.cdh-actions{flex:1 1 14rem;display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;min-width:0}
.cdh-actions form{display:contents}
.cdh-go{display:inline-flex;align-items:center;justify-content:center;flex:1 1 11rem;min-height:3.1rem;padding:.5rem 1.3rem;border:0;border-radius:.6rem;background:linear-gradient(135deg,#2563c7,#163a7a);color:#fff;font-family:var(--font-display);font-weight:700;font-size:.98rem;text-decoration:none;cursor:pointer;box-shadow:0 8px 18px rgb(22 58 122 / .2),inset 0 1px 0 rgb(255 255 255 / .16);transition:transform .2s ease,box-shadow .2s ease}
.cdh-go:hover{transform:translateY(-2px);box-shadow:0 12px 24px rgb(22 58 122 / .28),inset 0 1px 0 rgb(255 255 255 / .16);color:#fff}
.cdh-ghost{display:inline-flex;align-items:center;justify-content:center;min-height:3.1rem;padding:.5rem 1.1rem;border-radius:.6rem;background:#fff;border:1px solid #c9d9ef;color:#163a7a;font-family:var(--font-display);font-weight:700;font-size:.92rem;text-decoration:none;cursor:pointer}
.cdh-ghost:hover{border-color:#163a7a}
.cdh-note{display:inline-flex;align-items:center;padding:.35rem .7rem;border-radius:.6rem;background:#fff;border:1px dashed #c9d9ef;color:#4a5b76;font-size:.85rem;font-weight:600}
.cdh-code{display:flex!important;gap:.5rem;flex:1 1 100%;flex-wrap:wrap}
.cdh-code .form-input{flex:1 1 9rem;min-height:3.1rem;border:1px solid #c9d9ef;border-radius:.6rem;padding:.4rem .8rem;font-size:1rem;background:#fff}
.cdh-late{display:flex!important;flex-direction:column;gap:.5rem;flex:1 1 100%}
.cdh-late .form-textarea{border:1px solid #c9d9ef;border-radius:.6rem;padding:.5rem .8rem;background:#fff;font-size:.9rem}
.cdh-actions .entry-code-panel,.cdh-actions .lf-entry{flex:1 1 100%}

/* ── الشاشات المتوسطة ── */
@media (max-width:1100px){
  .cdh{grid-template-columns:minmax(0,1fr) 46%;padding:2rem 1.6rem 2.2rem 1rem}
  .cdh-scene .cs-svg{max-width:24rem}
  .cdh-copy{padding:1.4rem 0 0 .6rem}
}
/* ── الآيباد العمودي والجوال ── */
@media (max-width:860px){
  .cdh{grid-template-columns:1fr;gap:.5rem;padding:1.5rem 1.1rem 1.3rem;max-width:34rem}
  .cdh-shape--wide{display:none}
  .cdh-shape--tall{display:block}
  .cdh-scene{grid-column:auto;grid-row:auto;padding:0}
  .cdh-scene .cs-svg{max-width:24.5rem}
  .cdh-copy{grid-column:auto;grid-row:auto;padding:0 .3rem;gap:.55rem}
  .cdh-title{font-size:1.5rem;line-height:1.4;padding-bottom:.7rem}
  .cdh-lead{font-size:.93rem;line-height:1.8;max-width:none}
  .cdh-count{width:100%;justify-content:space-between}
  .cdh-foot{margin-top:.2rem;padding-top:.5rem;gap:.6rem;align-items:center}
  .cdh-price{flex:0 0 auto;min-width:5.8rem;padding:.3rem .55rem;border-radius:.5rem}
  .cdh-price small{font-size:.62rem}
  .cdh-price strong{font-size:1.1rem}
  .cdh-actions{flex:1 1 auto}
  .cdh-go{flex:1 1 auto;min-height:2.8rem;font-size:.95rem;border-radius:.5rem}
}
@media (max-width:420px){
  .cdh{padding:1.3rem .9rem 1.2rem}
  .cdh-title{font-size:1.38rem}
}
@media (prefers-reduced-motion:reduce){.cdh-go{transition:none}}


/* شريط الفعل: زر أضيق ورسوم بجانبه */
.cdh-foot{justify-content:flex-start;gap:1rem}
.cdh-actions{flex:0 1 auto}
.cdh-go{flex:0 1 auto;min-width:12.5rem}
.cdh-price{order:2;margin-inline-start:.2rem}

@media (max-width:860px){
  .cdh-foot{justify-content:space-between;gap:.6rem}
  .cdh-actions{flex:1 1 auto}
  .cdh-go{flex:1 1 auto;min-width:0}
  .cdh-price{margin:0}
}

/* ── تنسيق موحّد مع تفاصيل الدورة ── */
.cdh-title{padding-bottom:0;padding-inline-start:.9rem}
.cdh-title::after{content:none}
.cdh-title::before{content:"";position:absolute;inset-inline-start:0;top:.18em;bottom:.18em;width:4px;border-radius:3px;background:#163a7a}
.cdh-meta{gap:.5rem}
.cdh-count{gap:1rem;padding:.5rem 1rem}
.cdh-count-units{gap:1.1rem}
@media (max-width:860px){
  .cdh-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border:1px solid #d6e4f7;border-radius:.6rem;background:#fff;overflow:hidden;width:100%}
  .cdh-meta li{flex-direction:column;justify-content:center;text-align:center;gap:.3rem;padding:.6rem .35rem;border:0;border-inline-end:1px solid #e3ecf9;border-radius:0;background:transparent;font-size:.74rem;line-height:1.35}
  .cdh-meta li:last-child{border-inline-end:0}
  .cdh-meta .nx-spot-ic{width:1.6rem;height:1.6rem;border-radius:.45rem;background:#eaf1fb}
  .cdh-count{width:100%;justify-content:flex-start;gap:.8rem;padding:.5rem .8rem;border-radius:.6rem}
  .cdh-count-label{font-size:.76rem}
  .cdh-count-units{gap:.8rem}
  .cdh-count-units b{font-size:1.05rem}
  .cdh-foot{justify-content:space-between;gap:.6rem;align-items:center;margin-top:.1rem;padding-top:.6rem}
  .cdh-actions{flex:0 0 63%}
  .cdh-go{flex:1 1 auto;min-height:2.8rem;font-size:.95rem;border-radius:.5rem;padding:.35rem .8rem;box-shadow:0 6px 14px rgb(22 58 122 / .18)}
  .cdh-price{flex:0 1 auto;min-width:5.6rem;padding:.3rem .5rem;border-radius:.5rem;gap:.05rem}
  .cdh-price small{font-size:.62rem}
  .cdh-price strong{font-size:1.1rem}
}

.cdh-start{display:inline-flex;align-items:center;gap:.5rem;margin:.1rem 0 0;padding:.45rem .9rem;border-radius:.6rem;background:#fff;border:1px solid #d6e4f7;font-size:.86rem;color:#5d738c;font-weight:700}
.cdh-start b{font-family:var(--font-display);font-weight:800;color:#0f2a5f;font-size:.95rem}
@media (max-width:860px){.cdh-start{width:100%;justify-content:flex-start;padding:.45rem .8rem}.cdh-start b{font-size:.9rem}}

.cdh-title{color:#163a7a}
.cdh-lead{font-size:.95rem;line-height:1.8;max-width:30rem}
.cdh-price{min-width:8rem}
@media (max-width:860px){.cdh-price{min-width:6.6rem}}

/* ── رأس الدورة بالقالب الثابت: الصورة التصميمية بدل المشهد ── */
.cdh-scene--static{align-items:center}
.cdh-cover{margin:0;width:100%;max-width:30rem;aspect-ratio:4/3;border-radius:16px;overflow:hidden;background:#dfeafb;box-shadow:0 18px 40px rgb(22 58 122 / .16)}
.cdh-cover img{display:block;width:100%;height:100%;object-fit:cover}
@media (max-width:860px){.cdh-cover{max-width:24rem;border-radius:12px}}
