/* =========================================================
   PROGRAMME HERO — shared banner for the programme listing pages
   /degree-programmes/  /pg-degree-programmes/  /diploma-programmes/  /phd-programmes/
   Markup: /include/programme-hero.php
   Mobile first: phone → >=768px tablet → >=992px desktop
   Kept compact: on desktop the counts sit in a card beside the text, not in a row below it.
   ========================================================= */
.pgh{
  --pgh-navy:#00328e;
  --pgh-deep:#001a4d;
  --pgh-accent:#1eb4ee;
  --pgh-red:#d61e3e;
  --pgh-red-dark:#b5132f;
  position:relative;isolation:isolate;overflow:hidden;
  padding:12px 0 38px;
  background:var(--pgh-deep);
  color:#fff;font-family:Roboto,Arial,sans-serif;text-align:left;
}
.pgh *,.pgh *::before,.pgh *::after{box-sizing:border-box;}

/* background photo + navy overlay */
.pgh__media{position:absolute;inset:0;z-index:-2;display:block;margin:0;}
.pgh__media img{display:block;width:100%;height:100%;object-fit:cover;object-position:60% 45%;}
.pgh::before{
  content:"";position:absolute;inset:0;z-index:-1;
  background:
    linear-gradient(180deg,rgba(0,26,77,.80) 0%,rgba(0,32,96,.88) 45%,rgba(0,22,66,.97) 100%);
}
/* thin accent line along the bottom edge */
.pgh::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:4px;z-index:-1;
  background:linear-gradient(90deg,var(--pgh-accent),var(--pgh-navy) 55%,var(--pgh-red));
}
.pgh__inner{position:relative;}

/* ---- breadcrumb ---- */
.pgh-crumb{margin:0 0 10px;font-size:13.5px;}
.pgh-crumb ol{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none;}
.pgh-crumb li{display:flex;align-items:center;margin:0;padding:0;list-style:none;}
.pgh-crumb a{color:rgba(255,255,255,.82);text-decoration:none;}
.pgh-crumb a:hover,.pgh-crumb a:focus-visible{color:#fff;text-decoration:underline;}
.pgh-crumb__sep{color:rgba(255,255,255,.5);}
.pgh-crumb__menu{position:relative;}
.pgh-crumb__toggle{
  display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:3px 10px 3px 12px;margin:0;
  border:1px solid rgba(255,255,255,.28);border-radius:999px;background:rgba(255,255,255,.10);
  color:#fff;font:500 13.5px/1.2 Roboto,Arial,sans-serif;cursor:pointer;
  transition:background .2s,border-color .2s;
}
.pgh-crumb__toggle:hover,.pgh-crumb__toggle:focus-visible{background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.5);outline:none;}
.pgh-crumb__toggle svg{transition:transform .2s;}
.pgh-crumb__toggle[aria-expanded="true"] svg{transform:rotate(180deg);}
.pgh-crumb__list{
  position:absolute;top:calc(100% + 8px);left:0;z-index:20;min-width:220px;margin:0;padding:6px;list-style:none;
  border-radius:12px;background:#fff;box-shadow:0 12px 32px -8px rgba(0,20,60,.45);
}
.pgh-crumb__list[hidden]{display:none;}
.pgh-crumb__list li{display:block;}
.pgh-crumb__list a{display:block;padding:10px 12px;border-radius:8px;color:#172b4d;font-weight:500;}
.pgh-crumb__list a:hover,.pgh-crumb__list a:focus-visible{background:#eef3fd;color:var(--pgh-navy);text-decoration:none;outline:none;}

/* ---- heading block ---- */
.pgh__eyebrow{
  display:inline-flex;align-items:center;gap:8px;margin:0 0 6px;
  font-size:11px;font-weight:700;line-height:1.3;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.88);
}
.pgh__eyebrow::before{content:"";flex:0 0 auto;width:20px;height:3px;border-radius:3px;background:var(--pgh-accent);}
.pgh__title{
  margin:0;padding:0;background:none;border:0;
  font-size:24px;line-height:1.15;font-weight:700;letter-spacing:-.01em;color:#fff;text-align:left;
}
.pgh__subtitle{
  display:block;margin-top:4px;
  font-size:14px;line-height:1.4;font-weight:400;letter-spacing:0;color:rgba(255,255,255,.88);text-transform:none;
}
.pgh__text{
  width:auto;max-width:640px;margin:8px 0 0;padding:0;
  font-size:13px;line-height:1.5;color:rgba(255,255,255,.80);text-align:left;
}

/* ---- buttons ---- */
.pgh__actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px;}
.pgh-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:8px 14px;
  border:1.5px solid transparent;border-radius:999px;
  font:600 14px/1.2 Roboto,Arial,sans-serif;text-decoration:none!important;white-space:nowrap;
  transition:background .2s,border-color .2s,color .2s,transform .2s,box-shadow .2s;
}
.pgh-btn svg{flex:0 0 auto;transition:transform .2s;}
.pgh-btn--primary{background:var(--pgh-red);color:#fff!important;box-shadow:0 8px 20px -8px rgba(214,30,62,.7);}
.pgh-btn--primary:hover,.pgh-btn--primary:focus-visible{background:var(--pgh-red-dark);outline:none;}
.pgh-btn--primary:hover svg{transform:translateX(3px);}
.pgh-btn--ghost{border-color:rgba(255,255,255,.55);background:rgba(255,255,255,.06);color:#fff!important;}
.pgh-btn--ghost:hover,.pgh-btn--ghost:focus-visible{border-color:#fff;background:rgba(255,255,255,.16);outline:none;}
.pgh-btn--ghost:hover svg{transform:translateY(2px);}
.pgh-btn:focus-visible{box-shadow:0 0 0 3px rgba(255,255,255,.45);}

/* ---- live counts ---- */
.pgh-stats{display:grid;grid-template-columns:repeat(3,1fr);margin:12px 0 0;padding:10px 0 0;border-top:1px solid rgba(255,255,255,.18);}
.pgh-stats__item{display:flex;flex-direction:column-reverse;justify-content:flex-end;gap:2px;padding:0 10px;border-left:1px solid rgba(255,255,255,.18);}
.pgh-stats__item:first-child{padding-left:0;border-left:0;}
.pgh-stats dt{margin:0;font-size:10.5px;font-weight:500;line-height:1.3;letter-spacing:.08em;text-transform:uppercase;color:rgba(255,255,255,.72);}
.pgh-stats dd{margin:0;font-size:20px;font-weight:700;line-height:1.1;color:#fff;}

/* ---- search bar floats over the hero's bottom edge ---- */
.pgh ~ .course-search-section{position:relative;z-index:5;margin-top:-24px;padding-top:0;overflow:visible;}
.pgh ~ .course-search-section .programme-search.btn-search{
  border-color:rgba(0,50,142,.12);
  box-shadow:0 14px 32px -12px rgba(0,26,77,.45),0 2px 6px rgba(0,26,77,.10);
}
.pgh ~ .course-search-section .programme-search.btn-search:hover,
.pgh ~ .course-search-section .programme-search.btn-search:focus-visible{
  border-color:var(--pgh-navy,#00328e);
  box-shadow:0 18px 38px -12px rgba(0,26,77,.5),0 2px 6px rgba(0,26,77,.12);
}

/* ---- tablet ---- */
@media (min-width:768px){
  .pgh{padding:14px 0 44px;}
  .pgh::before{
    background:
      linear-gradient(90deg,rgba(0,22,66,.96) 0%,rgba(0,34,102,.90) 42%,rgba(0,50,142,.62) 72%,rgba(0,50,142,.38) 100%),
      linear-gradient(0deg,rgba(0,22,66,.55) 0%,rgba(0,22,66,0) 45%);
  }
  .pgh-crumb{margin-bottom:12px;font-size:14px;}
  .pgh__eyebrow{font-size:12px;}
  .pgh__title{font-size:30px;max-width:760px;}
  .pgh__subtitle{font-size:16px;}
  .pgh__text{font-size:14.5px;}
  .pgh__actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:14px;}
  .pgh-btn{min-height:42px;padding:9px 22px;font-size:15px;}
  .pgh-stats{display:flex;max-width:520px;margin-top:14px;padding-top:12px;}
  .pgh-stats__item{flex:1;padding:0 20px;}
  .pgh-stats dd{font-size:24px;}
  .pgh-stats dt{font-size:11px;}
  .pgh ~ .course-search-section{margin-top:-26px;}
}

/* ---- desktop: counts move into a card beside the text ---- */
@media (min-width:992px){
  .pgh{padding:14px 0 44px;}
  .pgh-crumb{margin-bottom:10px;}
  .pgh__content{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:40px;}
  .pgh__content > *{grid-column:1;}
  .pgh__title{font-size:36px;}
  .pgh__subtitle{font-size:18px;}
  .pgh__text{font-size:15px;}
  .pgh-stats{
    grid-column:2;grid-row:1 / span 4;align-self:end;
    margin:0;padding:14px 4px;max-width:none;
    border:1px solid rgba(255,255,255,.18);border-radius:16px;
    background:rgba(0,26,77,.55);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  }
  .pgh-stats__item,.pgh-stats__item:first-child{padding:0 24px;}
  .pgh-stats__item:first-child{border-left:0;}
  .pgh-stats dd{font-size:28px;}
  .pgh__media img{object-position:center 42%;}
}
@media (min-width:1200px){
  .pgh__title{font-size:38px;}
}

@media (prefers-reduced-motion:reduce){
  .pgh-btn,.pgh-btn svg,.pgh-crumb__toggle svg{transition:none;}
}
