/* Care programmes page (services/programmes.html). Shared chrome from site.css, page shell from services.css. */

/* hero: the four programmes as a photo picker */
.phero.care .wrap{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:48px}
.pick{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:min(100%,calc((100vh - var(--tb,0px) - var(--hh,92px) - 36px) * .86),560px);margin:0 0 0 auto}
.pick a{position:relative;display:block;aspect-ratio:1;border-radius:var(--r-md);overflow:hidden;background:var(--green-deep);text-decoration:none;color:var(--ivory);isolation:isolate;transition:transform .45s cubic-bezier(.16,.6,.2,1),box-shadow .45s}
.pick img{width:100%;height:100%;object-fit:cover;object-position:50% 30%;display:block;transition:transform .9s cubic-bezier(.16,.6,.2,1)}
.pick a::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(39,46,26,0) 40%,rgba(39,46,26,.82) 100%);z-index:1}
.pick span{position:absolute;left:18px;right:18px;bottom:16px;z-index:2;font-family:'Newsreader',serif;font-size:clamp(20px,1.7vw,25px);line-height:1.1;text-wrap:balance}
.pick small{display:block;font-family:'Jost',sans-serif;font-size:12px;letter-spacing:.06em;color:var(--turmeric-light);margin-bottom:4px}
.pick a:hover,.pick a:focus-visible{transform:translateY(-4px);box-shadow:0 22px 40px -22px rgba(39,46,26,.55)}
.pick a:hover img{transform:scale(1.05)}
.pick a:focus-visible{outline:2px solid var(--turmeric);outline-offset:3px}

/* chapters */
.chap{padding:88px 0;border-top:1px solid var(--line)}
.chap:nth-of-type(odd){background:var(--ivory-2)}
.chap .wrap{display:grid;grid-template-columns:minmax(0,.78fr) minmax(0,1.22fr);gap:64px;align-items:start}
.chap:nth-of-type(even) .wrap{grid-template-columns:minmax(0,1.22fr) minmax(0,.78fr)}
.chap:nth-of-type(even) .photo{order:2}
.chap .photo{position:sticky;top:calc(var(--hh,92px) + 16px);margin:0;aspect-ratio:4/5;border-radius:var(--r-lg);overflow:hidden;background:var(--sand);box-shadow:0 30px 50px -36px rgba(43,37,32,.45)}
.chap .photo img{width:100%;height:100%;object-fit:cover;display:block}
.chap .dev{display:block;font-size:34px;line-height:1;color:var(--green);margin-bottom:8px}
.chap h2{font-size:clamp(34px,3.8vw,52px);line-height:1.04;text-wrap:balance}
.chap .for{margin:12px 0 0;font-size:16px;color:var(--copper-text)}
.chap .lede{margin:22px 0 0;font-size:16px;line-height:1.65;color:var(--ink);max-width:60ch;text-wrap:pretty}

/* about the programme: what it is and how it runs */
.info{margin:14px 0 0}
.info p{margin:0;max-width:60ch;font-size:16px;line-height:1.65;color:var(--muted);text-wrap:pretty}

/* included */
.incl{list-style:none;margin:30px 0 0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:14px 28px}
.incl li{display:grid;grid-template-columns:22px minmax(0,1fr);gap:12px;align-items:start;font-size:16px;line-height:1.5;color:var(--ink)}
.incl svg{width:22px;height:22px;fill:none;stroke:var(--green);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;margin-top:1px}

/* who / doctor */
.meta{margin:28px 0 0;padding:18px 0 0;border-top:1px solid var(--line);display:flex;flex-wrap:wrap;gap:10px 40px}
.meta div{display:grid;gap:3px}
.meta dt{font-size:16px;color:var(--copper-text)}
.meta dd{margin:0;font-size:16px;color:var(--ink)}

/* actions */
.chap .acts{display:flex;flex-wrap:wrap;align-items:center;gap:14px 24px;margin-top:28px}

@media (max-width:1100px){.incl{grid-template-columns:1fr}}
@media (max-width:900px){
  .phero.care .wrap{grid-template-columns:1fr}
  .pick{width:100%;margin:0}
  .chap{padding:64px 0}
  .chap .wrap,.chap:nth-of-type(even) .wrap{grid-template-columns:1fr;gap:32px}
  .chap:nth-of-type(even) .photo{order:0}
  .chap .photo{position:static;top:auto;aspect-ratio:4/3;max-height:440px}   /* top:auto: motion.js sets position:relative inline, and the desktop sticky top would push the photo over the title */
  .incl{grid-template-columns:1fr}
}
@media (max-width:480px){
  .pick{gap:8px}
  .pick span{left:12px;right:12px;bottom:10px;font-size:17px}
}

/* phones: the four ways in as a 2 x 2 under the reason; each chapter with a shorter photo and one wide button */
@media (max-width:720px){
  .phero.care .wrap{gap:0}   /* the shared phone hero stacks its parts with their own margins */
  .pick{gap:10px}
  .pick a{aspect-ratio:1/1.08}
  .pick span{text-align:center}
  .chap{padding:52px 0}
  .chap .wrap,.chap:nth-of-type(even) .wrap{gap:24px}
  .chap .photo{aspect-ratio:16/10}
  .chap .dev{font-size:28px}
  .chap h2{font-size:clamp(32px,9vw,40px)}
  .chap .acts{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
  .chap .acts .btn{width:100%;min-height:52px}
}

/* phones: centred, as on the homepage; the "included" icons sit above their text */
@media (max-width:720px){
  .chap .copy{text-align:center}
  .chap .lede,.info p{text-align:justify;text-align-last:center}
  .incl{justify-items:center;gap:18px}
  .incl li{grid-template-columns:minmax(0,1fr);justify-items:center;text-align:center;gap:6px;max-width:32ch}
  .meta{justify-content:center;text-align:center}
}
