/* Learning Hub programme presentation — consolidated source of truth */

.learning-detail:has(.programmes-view){
  width:100%;max-width:none;margin:0;padding:0;background:#f8f3e9;
}
.learning-detail:has(.programmes-view) .detail-toolbar{
  position:relative;top:auto;left:auto;z-index:20;
  box-sizing:border-box;width:100%;height:72px;min-height:72px;
  margin:0;padding:0 56px;display:flex;align-items:center;
  background:#f8f3e9;border-bottom:1px solid #e4d6bb;
}
.learning-detail:has(.programmes-view) #backToCatalogue{
  display:inline-flex;align-items:center;justify-content:center;
  margin:0;padding:10px 16px;background:#050505;border:1px solid #d4a73e;
  border-radius:999px;color:#fff;font-size:13px/;font-weight:800;
}
.learning-detail:has(.programme-group-view) .detail-toolbar{display:none!important}

.programmes-view,.programme-group-view{width:100%;max-width:none;margin:0;padding:0}
.programmes-view>.eyebrow,.programmes-view>h1,.programmes-view>p{display:none}

.programmes-hero{
  position:relative;width:100%;height:360px;min-height:360px;margin:0;
  display:flex;align-items:center;justify-content:center;overflow:hidden;
  border:0;border-bottom:1px solid #d4a73e;border-radius:0;
  background:
    linear-gradient(rgba(0,0,0,.34),rgba(0,0,0,.34)),
    url('https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=2200&q=92')
    center 42%/cover no-repeat;
}
.programmes-hero-copy{
  position:relative;z-index:2;box-sizing:border-box;
  width:min(1000px,calc(100% - 80px));margin:0 auto;padding:28px 40px;
  text-align:center;color:#fff;
}
.programmes-hero-copy .eyebrow{display:block;margin:0 0 12px;color:#f1cf74}
.programmes-hero-copy h1{
  max-width:980px;margin:0 auto;color:#fff;
  font:700 clamp(44px,4.4vw,62px)/1.02 Georgia,serif;
  text-shadow:0 2px 16px rgba(0,0,0,.5);
}
.programmes-hero-copy p{
  max-width:820px;margin:14px auto 0;color:#fff;font-size:15px;line-height:1.5;
  text-shadow:0 1px 8px rgba(0,0,0,.55);
}

.programme-folders{
  box-sizing:border-box;width:min(1120px,calc(100% - 56px));
  margin:36px auto 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:22px;
}
.programme-folder{
  position:relative;height:270px;padding:0;overflow:hidden;
  border:1px solid rgba(212,167,62,.65);border-radius:18px;
  background:#111;color:#fff;text-align:left;box-shadow:0 12px 30px rgba(52,37,13,.12);
}
.programme-folder>img{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.folder-shade{position:absolute;inset:0;background:linear-gradient(0deg,rgba(5,5,5,.84),rgba(5,5,5,.08) 72%)}
.folder-copy{position:absolute;z-index:2;left:24px;right:24px;bottom:22px}
.folder-copy small,.folder-copy b{color:#f1cf74}.folder-copy strong{color:#fff}

.programme-group-hero{
  position:relative;width:100%;height:360px;min-height:360px;margin:0;
  display:flex;align-items:center;justify-content:center;overflow:hidden;
  border-bottom:2px solid #d4a73e;background-size:cover!important;background-repeat:no-repeat!important;
}
.programme-group-hero .inline-back{
  position:absolute;z-index:5;top:18px;left:56px;margin:0;padding:10px 16px;
  border:1px solid #d4a73e;border-radius:999px;background:rgba(255,253,248,.97);
  color:#111;font-size:12px;font-weight:800;
}
.programme-group-hero .programme-hero-copy{padding-top:34px}
.group-core .programme-group-hero{background-position:center 52%!important}
.group-business .programme-group-hero{background-position:center 50%!important}
.group-higher .programme-group-hero{background-position:center 48%!important}
.group-primary .programme-group-hero{background-position:center 42%!important}

.programme-group-body{padding:34px 0 60px!important}
.programme-group-view{overflow:hidden}
.programme-group-view .programme-items{
  box-sizing:border-box;width:min(1120px,calc(100% - 56px));margin:0 auto!important;
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px;align-items:stretch;
}
.programme-group-view .programme-items>.detail-card{
  grid-column:auto!important;min-width:0;width:100%;height:100%;margin:0;
  display:flex;flex-direction:column;overflow:hidden;
  border:1px solid rgba(212,167,62,.42);border-radius:18px;background:#fff;
  box-shadow:0 10px 28px rgba(52,37,13,.07);
}
.programme-group-view .programme-items>.detail-card:last-child:nth-child(3n+1){grid-column:2!important}
.group-higher .programme-items>.detail-card:nth-child(4){grid-column:1!important}
.group-higher .programme-items>.detail-card:nth-child(5){grid-column:2!important}
.programme-group-view .visual-card>img{display:block;width:100%;height:190px;object-fit:cover;object-position:center}
.programme-group-view .card-body{
  box-sizing:border-box;min-height:285px;height:100%;padding:20px 22px 22px;
  display:flex;flex-direction:column;
}
.programme-group-view .detail-card h2,.programme-group-view .detail-card p{text-align:center}
.programme-group-view .detail-card a{align-self:center}
.programme-group-view .subject-book{margin-top:auto!important}

.group-primary .programme-items{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;max-width:860px!important;gap:24px!important;
}
.group-primary .programme-items>.detail-card{grid-column:auto!important}

@media(max-width:900px){
  .programme-group-view .programme-items{grid-template-columns:repeat(2,minmax(0,1fr))}
  .programme-group-view .programme-items>.detail-card{grid-column:auto!important}
  .programme-group-hero .inline-back{left:24px}
}
@media(max-width:760px){
  .group-primary .programme-items{grid-template-columns:1fr!important;max-width:430px!important}
}
@media(max-width:620px){
  .learning-detail:has(.programmes-view) .detail-toolbar{height:60px;min-height:60px;padding:0 16px}
  .programmes-hero{height:310px;min-height:310px}
  .programmes-hero-copy{width:calc(100% - 34px);padding:24px 20px}
  .programmes-hero-copy h1{font-size:38px}
  .programme-folders,.programme-group-view .programme-items{width:calc(100% - 32px);grid-template-columns:1fr}
  .programme-folder{height:230px}
  .programme-group-hero{height:300px;min-height:300px}
  .programme-group-hero .inline-back{left:16px;top:14px}
  .programme-group-view .card-body{min-height:0}
}

/* Higher Education: balanced 3 + 2 centred grid */
.group-higher .programme-items{
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:22px!important;align-items:stretch!important;
}
.group-higher .programme-items>.detail-card{
  grid-column:span 2!important;width:100%!important;min-width:0!important;height:100%!important;
}
.group-higher .programme-items>.detail-card:nth-child(4){grid-column:2 / span 2!important}
.group-higher .programme-items>.detail-card:nth-child(5){grid-column:4 / span 2!important}
.group-higher .visual-card>img{height:190px!important;object-fit:cover!important;object-position:center!important}
.group-higher .card-body{min-height:285px!important;height:100%!important}
@media(max-width:900px){
 .group-higher .programme-items{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .group-higher .programme-items>.detail-card,
 .group-higher .programme-items>.detail-card:nth-child(4),
 .group-higher .programme-items>.detail-card:nth-child(5){grid-column:auto!important}
}
@media(max-width:620px){
 .group-higher .programme-items{grid-template-columns:1fr!important}
}


/* Programme hero: edge-to-edge banner; no blank cream gutters */
.learning-detail:has(.programmes-view) .detail-toolbar{position:absolute!important;z-index:30!important;background:transparent!important;border:0!important;pointer-events:none}
.learning-detail:has(.programmes-view) #backToCatalogue{pointer-events:auto}
.programmes-hero{
  width:100vw!important;max-width:none!important;height:420px!important;min-height:420px!important;
  margin-left:calc(50% - 50vw)!important;margin-right:calc(50% - 50vw)!important;
  background-position:center 38%!important;background-size:cover!important;
}
.programmes-hero-copy{width:min(1080px,calc(100% - 48px))!important}
.programmes-hero-copy h1{font-size:clamp(46px,4.7vw,68px)!important}

/* Group pages: full-width hero, image covers complete banner */
.programme-group-hero{
  width:100vw!important;max-width:none!important;height:390px!important;min-height:390px!important;
  margin-left:calc(50% - 50vw)!important;margin-right:calc(50% - 50vw)!important;
  background-size:cover!important;
}
.group-higher .programme-group-hero{background-position:center 44%!important}

/* Higher Education: true centred 3 + 2 presentation */
.group-higher .programme-group-body{padding:38px 0 64px!important}
.group-higher .programme-items{
  width:min(1140px,calc(100% - 48px))!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:24px!important;
}
.group-higher .programme-items>.detail-card{grid-column:span 2!important}
.group-higher .programme-items>.detail-card:nth-child(4){grid-column:2 / span 2!important}
.group-higher .programme-items>.detail-card:nth-child(5){grid-column:4 / span 2!important}
@media(max-width:900px){
 .programmes-hero{height:360px!important;min-height:360px!important}
 .group-higher .programme-items{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .group-higher .programme-items>.detail-card,.group-higher .programme-items>.detail-card:nth-child(4),.group-higher .programme-items>.detail-card:nth-child(5){grid-column:auto!important}
}
@media(max-width:620px){
 .programmes-hero,.programme-group-hero{height:310px!important;min-height:310px!important}
 .group-higher .programme-items{grid-template-columns:1fr!important}
}

/* Higher Education final alignment: 3 cards + centred 2 cards */
.group-higher .programme-items{
  width:min(1120px,calc(100% - 64px))!important;
  margin:0 auto!important;
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:24px!important;
}
.group-higher .programme-items>.detail-card{grid-column:span 2!important;max-width:none!important}
.group-higher .programme-items>.detail-card:nth-child(1){grid-column:1 / span 2!important}
.group-higher .programme-items>.detail-card:nth-child(2){grid-column:3 / span 2!important}
.group-higher .programme-items>.detail-card:nth-child(3){grid-column:5 / span 2!important}
.group-higher .programme-items>.detail-card:nth-child(4){grid-column:2 / span 2!important}
.group-higher .programme-items>.detail-card:nth-child(5){grid-column:4 / span 2!important}
@media(max-width:900px){
 .group-higher .programme-items{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .group-higher .programme-items>.detail-card:nth-child(n){grid-column:auto!important}
}
@media(max-width:620px){
 .group-higher .programme-items{grid-template-columns:1fr!important}
}

/* FINAL programme layout correction — full-bleed banners + balanced five-card higher grid */
.programmes-view{width:100%!important;max-width:none!important;padding-left:0!important;padding-right:0!important}
.programmes-view .programmes-hero{
 width:100%!important;max-width:none!important;margin:0!important;
 height:390px!important;min-height:390px!important;border-radius:0!important;
 background-size:cover!important;background-position:center 42%!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
}
.programmes-view .programmes-hero-copy{max-width:1050px!important;margin:auto!important;padding:40px 28px!important;text-align:center!important}
.programmes-view .programmes-hero-copy h1{max-width:940px!important;margin:0 auto!important;font-size:clamp(44px,4.6vw,66px)!important;line-height:1.03!important}

.programme-group-view{width:100%!important;max-width:none!important}
.programme-group-view .programme-group-hero{
 width:100%!important;max-width:none!important;margin:0!important;
 height:390px!important;min-height:390px!important;border-radius:0!important;
 background-size:cover!important;background-position:center!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
}
.programme-group-view .programme-hero-copy{width:min(1050px,calc(100% - 48px))!important;margin:auto!important;text-align:center!important}
.programme-group-view .programme-hero-copy h1{font-size:clamp(44px,4.6vw,66px)!important;line-height:1.03!important;margin:0 auto!important}
.group-core .programme-group-hero{background-position:center 55%!important}
.group-higher .programme-group-hero{background-position:center 50%!important}

.group-higher .programme-items{
 width:min(1120px,calc(100% - 56px))!important;margin:0 auto!important;
 display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;
 gap:24px!important;justify-content:center!important;
}
.group-higher .programme-items>.detail-card:nth-child(1){grid-column:1 / span 2!important}
.group-higher .programme-items>.detail-card:nth-child(2){grid-column:3 / span 2!important}
.group-higher .programme-items>.detail-card:nth-child(3){grid-column:5 / span 2!important}
.group-higher .programme-items>.detail-card:nth-child(4){grid-column:2 / span 2!important}
.group-higher .programme-items>.detail-card:nth-child(5){grid-column:4 / span 2!important}
.group-higher .programme-items>.detail-card{width:100%!important;max-width:none!important;margin:0!important}
@media(max-width:900px){
 .group-higher .programme-items{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .group-higher .programme-items>.detail-card:nth-child(n){grid-column:auto!important}
}
@media(max-width:620px){
 .programmes-view .programmes-hero,.programme-group-view .programme-group-hero{height:320px!important;min-height:320px!important}
 .group-higher .programme-items{grid-template-columns:1fr!important;width:calc(100% - 32px)!important}
}


/* CLEAN FINAL OVERRIDES — programme landing + five-card higher layout */
.programmes-view{width:100%!important;max-width:none!important;padding:0!important}
.programmes-view .programmes-hero{
 width:100%!important;max-width:none!important;margin:0 0 34px!important;
 height:390px!important;min-height:390px!important;border:0!important;border-radius:0!important;
 background-size:cover!important;background-position:center 44%!important;
 display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;
}
.programmes-view .programmes-hero-copy{width:min(1000px,calc(100% - 64px))!important;margin:auto!important;padding:0!important;text-align:center!important}
.programmes-view .programmes-hero-copy h1{max-width:900px!important;margin:12px auto 14px!important;font-size:clamp(46px,4.6vw,66px)!important;line-height:1!important}
.programmes-view .programmes-hero-copy p{max-width:860px!important;margin:0 auto!important}
.programmes-view .programme-folders{width:min(1140px,calc(100% - 48px))!important;margin:0 auto!important}

.group-higher .programme-items{width:min(1120px,calc(100% - 56px))!important;margin:0 auto!important;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:24px!important}
.group-higher .programme-items>.detail-card:nth-child(1){grid-column:1/span 2!important}
.group-higher .programme-items>.detail-card:nth-child(2){grid-column:3/span 2!important}
.group-higher .programme-items>.detail-card:nth-child(3){grid-column:5/span 2!important}
.group-higher .programme-items>.detail-card:nth-child(4){grid-column:2/span 2!important}
.group-higher .programme-items>.detail-card:nth-child(5){grid-column:4/span 2!important}
@media(max-width:900px){.group-higher .programme-items{grid-template-columns:repeat(2,minmax(0,1fr))!important}.group-higher .programme-items>.detail-card:nth-child(n){grid-column:auto!important}}
@media(max-width:620px){.group-higher .programme-items{grid-template-columns:1fr!important;width:calc(100% - 32px)!important}.programmes-view .programmes-hero{height:320px!important;min-height:320px!important}}
