/* ==========================================================================
   Programme story-section styles
   Used by the public programme detail page AND the live preview in the
   programme admin. Each <section> gets: class="ps {{ section.css_classes }}"
   ========================================================================== */

.ps {
  --ps-accent: #2d6a4f; --ps-accent-light: #74c69d; --ps-accent-soft: #eaf7f0;
  --ps-bg: #ffffff; --ps-text: #0f172a; --ps-muted: #64748b;
  --ps-card: #ffffff; --ps-line: #e2e8f0; --ps-shadow: 0 10px 30px rgba(15, 42, 28, .08);
  background: var(--ps-bg); color: var(--ps-text);
  padding: 72px 20px; position: relative;
}
.ps *, .ps *::before, .ps *::after { box-sizing: border-box; }
.ps-inner { max-width: 1120px; margin: 0 auto; }

/* ---- width ---- */
.ps-width-narrow .ps-inner { max-width: 760px; }
.ps-width-wide .ps-inner { max-width: 1320px; }
.ps-width-full .ps-inner { max-width: none; }

/* ---- spacing ---- */
.ps-space-compact { padding-top: 40px; padding-bottom: 40px; }
.ps-space-spacious { padding-top: 112px; padding-bottom: 112px; }

/* ---- accents ---- */
.ps-accent-green   { --ps-accent: #2d6a4f; --ps-accent-light: #74c69d; --ps-accent-soft: #eaf7f0; }
.ps-accent-forest  { --ps-accent: #1b4332; --ps-accent-light: #b7e4c7; --ps-accent-soft: #e3f1e9; }
.ps-accent-amber   { --ps-accent: #d97706; --ps-accent-light: #fbbf24; --ps-accent-soft: #fef3c7; }
.ps-accent-rose    { --ps-accent: #e11d48; --ps-accent-light: #fb7185; --ps-accent-soft: #ffe4e6; }
.ps-accent-cyan    { --ps-accent: #0e9f9a; --ps-accent-light: #5eead4; --ps-accent-soft: #ccfbf1; }
.ps-accent-violet  { --ps-accent: #7c3aed; --ps-accent-light: #a78bfa; --ps-accent-soft: #ede9fe; }
.ps-accent-neutral { --ps-accent: #334155; --ps-accent-light: #cbd5e1; --ps-accent-soft: #f1f5f9; }

/* ---- backgrounds ---- */
.ps-bg-soft   { --ps-bg: #f4f8f6; }
.ps-bg-mint   { --ps-bg: #eaf7f0; }
.ps-bg-amber  { --ps-bg: #fffbeb; }
.ps-bg-rose   { --ps-bg: #fff1f2; }
.ps-bg-cyan   { --ps-bg: #ecfeff; }
.ps-bg-violet { --ps-bg: #f5f3ff; }
.ps.ps-bg-forest, .ps.ps-bg-dark, .ps.ps-bg-gradient {
  --ps-text: #f8fafc; --ps-muted: rgba(234, 247, 240, .74);
  --ps-card: rgba(255, 255, 255, .06); --ps-line: rgba(255, 255, 255, .14);
  --ps-shadow: none; --ps-accent: var(--ps-accent-light); --ps-accent-soft: rgba(255, 255, 255, .08);
}
.ps.ps-bg-forest   { --ps-bg: #1b4332; }
.ps.ps-bg-dark     { --ps-bg: #08170f; }
.ps.ps-bg-gradient { --ps-bg: #0f2a1c; background: linear-gradient(135deg, #08170f 0%, #1b4332 60%, #2d6a4f 100%); }

/* ---- header block ---- */
.ps-head { max-width: 760px; margin-bottom: 40px; }
.ps-head:last-child { margin-bottom: 0; }
.ps-align-center .ps-head { margin-left: auto; margin-right: auto; text-align: center; }
.ps-align-right .ps-head { margin-left: auto; text-align: right; }

/* kicker */
.ps-kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ps-accent);
}
.ps-ks-pill .ps-kicker  { background: var(--ps-accent-soft); padding: 6px 14px; border-radius: 999px; }
.ps-ks-solid .ps-kicker { background: var(--ps-accent); color: #fff; padding: 6px 14px; border-radius: 8px; }
.ps-bg-forest.ps-ks-solid .ps-kicker, .ps-bg-dark.ps-ks-solid .ps-kicker, .ps-bg-gradient.ps-ks-solid .ps-kicker { color: #08170f; }
.ps-ks-line .ps-kicker::before { content: ""; width: 28px; height: 2px; background: var(--ps-accent); border-radius: 2px; }
.ps-align-right.ps-ks-line .ps-kicker { flex-direction: row-reverse; }

/* heading */
.ps-title { margin: 0 0 14px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: var(--ps-text); }
.ps-h-sm .ps-title { font-size: 22px; }
.ps-h-md .ps-title { font-size: clamp(26px, 3vw, 34px); }
.ps-h-lg .ps-title { font-size: clamp(30px, 4vw, 44px); }
.ps-h-xl .ps-title { font-size: clamp(36px, 5.5vw, 60px); line-height: 1.05; }

.ps-hs-underline .ps-title::after {
  content: ""; display: block; width: 56px; height: 4px; border-radius: 4px; background: var(--ps-accent); margin-top: 16px;
}
.ps-align-center.ps-hs-underline .ps-title::after { margin-left: auto; margin-right: auto; }
.ps-align-right.ps-hs-underline .ps-title::after { margin-left: auto; }
.ps-hs-accent_bar .ps-title { border-left: 5px solid var(--ps-accent); padding-left: 16px; }
.ps-align-center.ps-hs-accent_bar .ps-title { display: inline-block; text-align: left; }
.ps-align-right.ps-hs-accent_bar .ps-title { border-left: 0; border-right: 5px solid var(--ps-accent); padding: 0 16px 0 0; }
.ps-hs-gradient .ps-title {
  background: linear-gradient(90deg, var(--ps-accent) 0%, var(--ps-accent-light) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ps-hs-boxed .ps-title { display: inline-block; border: 2px solid var(--ps-accent); border-radius: 14px; padding: 10px 20px; }

.ps-intro { margin: 0; font-size: 17px; line-height: 1.65; color: var(--ps-muted); }
.ps-body { font-size: 16px; line-height: 1.7; color: var(--ps-muted); }

/* ---- repeatable items: stats, benefit cards, checklist ---- */
.ps-items { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ps-cols-2 .ps-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ps-cols-3 .ps-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ps-cols-4 .ps-items { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .ps-cols-3 .ps-items, .ps-cols-4 .ps-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .ps { padding-left: 16px; padding-right: 16px; }
  .ps-items, .ps-cols-2 .ps-items, .ps-cols-3 .ps-items, .ps-cols-4 .ps-items { grid-template-columns: 1fr; }
}

.ps-item { padding: 24px; border-radius: 16px; }
.ps-items-cards .ps-item    { background: var(--ps-card); box-shadow: var(--ps-shadow); border: 1px solid var(--ps-line); }
.ps-items-bordered .ps-item { border: 1px solid var(--ps-line); }
.ps-items-filled .ps-item   { background: var(--ps-accent-soft); }
.ps-items-minimal .ps-item  { padding: 8px 0; border-radius: 0; }
.ps-items-divided .ps-items { gap: 0; }
.ps-items-divided .ps-item  { border-radius: 0; border-left: 1px solid var(--ps-line); padding: 8px 28px; }
.ps-items-divided .ps-item:first-child { border-left: 0; }
@media (max-width: 600px) {
  .ps-items-divided .ps-item { border-left: 0; border-top: 1px solid var(--ps-line); padding: 18px 0; }
  .ps-items-divided .ps-item:first-child { border-top: 0; }
}

.ps-item-icon { font-size: 28px; color: var(--ps-accent); margin-bottom: 12px; display: inline-block; }
.ps-item-title { font-size: 17px; font-weight: 700; margin: 0 0 6px; color: var(--ps-text); }
.ps-item-body { margin: 0; color: var(--ps-muted); font-size: 15px; line-height: 1.6; }

/* stats */
.ps-stat-value { display: block; font-size: clamp(32px, 4vw, 46px); font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--ps-accent); }
.ps-stat-label { display: block; margin-top: 10px; font-weight: 700; font-size: 15px; color: var(--ps-text); }
.ps-stat-detail { display: block; margin-top: 4px; font-size: 14px; color: var(--ps-muted); }
.ps-align-center .ps-stat, .ps-align-center .ps-benefit { text-align: center; }
.ps-align-right .ps-stat { text-align: right; }

/* numbered benefit card */
.ps-benefit-num {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; margin-bottom: 14px;
  background: var(--ps-accent-soft); color: var(--ps-accent); font-weight: 800;
}
