/* Home page and topic pages (the new layout).
   The header, footer and fonts come from frame.css. */

:root{
  --blue:#0b5bd3; --blue-dark:#0948a6; --navy:#003087;
  --ink:#111827; --muted:#4b5563; --line:#dbe5f2; --tint:#e8f1fd;
  --crisis:#b42318;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body.pcn-page{margin:0;font-family:"Public Sans",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;color:var(--ink);line-height:1.45;
  background:linear-gradient(135deg,#e8f3ff 0%,#dbeafe 40%,#eef2ff 100%) fixed;background-color:#e8f3ff}
:where(.pcn-page) :is(h1,h2,h3,p,ul){margin:0;padding:0}
:where(.pcn-page) ul{list-style:none}
:where(.pcn-page) a{color:var(--blue);text-decoration:none}
:where(.pcn-page) a:hover{text-decoration:underline}
.pcn-page :focus-visible{outline:3px solid #ffbf47;outline-offset:2px;border-radius:8px}
.pcn-page svg{flex:none}
.vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}

/* illustrated Weymouth and Portland background behind the top of the page */
.hero{position:relative;overflow-x:clip}
.pcn-scene{position:absolute;top:0;left:0;width:100%;pointer-events:none}
.pcn-scene-d{height:470px}
.pcn-scene-p{display:none;height:520px}
.hero::after{content:"";position:absolute;left:0;right:0;top:0;height:470px;pointer-events:none;
  background:linear-gradient(180deg,rgba(255,255,255,0) 0%,rgba(255,255,255,0) 72%,#e5f0fd 100%)}

/* two-column layout: menu on the left */
.layout{position:relative;z-index:1;max-width:1240px;margin:0 auto;padding:200px 32px 56px;display:grid;
  grid-template-columns:300px minmax(0,1fr);grid-template-rows:auto 1fr;grid-template-areas:"side intro" "side rest";column-gap:28px;row-gap:28px;align-items:start}
.side{grid-area:side;position:sticky;top:16px}
.intro-card{grid-area:intro}
.rest{grid-area:rest;display:flex;flex-direction:column;gap:28px;min-width:0}

/* menu */
.menu-card{background:rgba(255,255,255,.96);border-radius:20px;padding:16px;box-shadow:0 10px 25px rgba(15,23,42,.10)}
.menu-label{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:2px 4px 12px}
.crisis-btn{display:flex;align-items:center;gap:12px;min-height:52px;padding:10px 14px;margin-bottom:8px;border-radius:12px;background:var(--crisis);color:#fff!important;font-size:16px;font-weight:700}
.crisis-btn small{display:none}
.crisis-btn .ti{width:auto;height:auto;background:none}
.crisis-btn .tt{display:flex;flex-direction:column}
.crisis-btn:hover{background:#9b1d13;text-decoration:none!important}
.crisis-btn[aria-current="page"]{box-shadow:0 0 0 3px #fff inset,0 0 0 2px var(--crisis)}
.menu{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff}
.menu li+li{border-top:1px solid #eef1f5}
.menu a{display:flex;align-items:center;gap:12px;min-height:48px;padding:6px 14px;font-size:16px;font-weight:600;color:var(--ink)}
.menu a:hover{background:#f5f9ff;text-decoration:none}
.menu a .ti{width:auto;height:auto;background:none}
.menu a .ti svg{width:20px;height:20px}
.menu a .tt{flex:1;display:flex;flex-direction:column}
.menu a small{display:none}
.menu a[aria-current="page"]{background:var(--tint);color:var(--navy);box-shadow:inset 4px 0 0 var(--blue)}
.menu .group{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);padding:12px 14px 4px;background:#f7f9fd}
.menu .group+li{border-top:0}

/* intro */
.intro-card{background:rgba(255,255,255,.92);border-radius:20px;padding:24px 28px;box-shadow:0 10px 25px rgba(15,23,42,.08)}
.intro-card h1{font-size:40px;line-height:1.1;letter-spacing:-.02em;font-weight:800;color:var(--navy)}
.intro-card p{font-size:18px;color:#1f2937;margin-top:10px;max-width:680px}
.intro-card .urgent{font-size:15px;color:#7a1f17}
.crumb{font-size:14px;color:var(--muted);margin-bottom:6px}
.crumb a{font-weight:600}

/* panels */
.panel{background:#fff;border-radius:20px;padding:24px;box-shadow:0 10px 25px rgba(15,23,42,.06)}
.pcn-page h2{font-size:22px;font-weight:800;color:var(--ink);line-height:1.25}
.sub{font-size:15px;color:var(--muted);margin-top:4px}
.onphoto{display:inline-block;align-self:flex-start;background:rgba(255,255,255,.9);padding:4px 14px;border-radius:999px;margin-bottom:14px}

/* GP practices */
.gp-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-top:16px}
.gp{display:flex;flex-direction:column;justify-content:space-between;gap:14px;min-height:96px;padding:16px;border-radius:14px;background:var(--tint);color:var(--ink)!important}
.gp:hover{background:#dbe9fc;text-decoration:none!important}
.gp b{font-size:16px;line-height:1.3}
.gp .short{display:none}
.go{display:inline-flex;align-items:center;gap:6px;font-size:14px;font-weight:700;color:var(--blue)}

/* blood pressure (feature card) */
.feature{display:flex;align-items:center;gap:20px;background:#fff;border-radius:20px;padding:22px 24px 22px 32px;box-shadow:0 10px 25px rgba(15,23,42,.06);position:relative;overflow:hidden}
.feature::before{content:"";position:absolute;inset:0 auto 0 0;width:8px;background:#e05a4f}
.ficon{width:60px;height:60px;border-radius:16px;background:#fdecea;display:flex;align-items:center;justify-content:center;flex:none}
.ftxt{flex:1;min-width:0}
.fkick{font-size:12.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#a3261b}
.ftxt h2{margin-top:2px}
.ftxt p{font-size:16px;color:var(--muted);margin-top:4px}

/* buttons */
.btn,.btn2{white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 18px;border-radius:12px;font:700 16px "Public Sans",system-ui,sans-serif;cursor:pointer;text-decoration:none!important}
.btn{background:var(--blue);color:#fff!important;border:0}
.btn:hover{background:var(--blue-dark)}
.btn2{background:#f4f7fb;border:1px solid #c9d3e0;color:var(--ink)!important}
.btn2:hover{background:#e9eff7}

/* NHS digital services */
.digital{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:14px}
.dg{display:flex;align-items:flex-start;gap:12px;padding:16px;border-radius:16px;background:#fff;color:var(--ink)!important;box-shadow:0 4px 12px rgba(15,23,42,.05)}
.dg:hover{box-shadow:0 6px 18px rgba(15,23,42,.10);text-decoration:none!important}
.ti{width:42px;height:42px;border-radius:12px;background:var(--tint);display:flex;align-items:center;justify-content:center;flex:none}
.tt{display:flex;flex-direction:column}
.tt b{font-size:15.5px;line-height:1.25}
.tt small{font-size:13.5px;color:var(--muted);line-height:1.3;margin-top:2px;font-weight:400}

/* What's On */
.whatson{display:flex;gap:24px}
.whatson .txt{width:360px;flex:none;display:flex;flex-direction:column;gap:12px;justify-content:center}
.btns{display:flex;gap:10px;flex-wrap:wrap}
.map{flex:1;min-height:300px;border-radius:16px;overflow:hidden;background:linear-gradient(135deg,#dbe9f8,#eef4fb)}
.map iframe{display:block;width:100%;height:100%;min-height:300px;border:0}
.map-dialog{width:min(1100px,94vw);max-height:90vh;border:0;border-radius:18px;padding:0;box-shadow:0 30px 80px rgba(15,23,42,.35)}
.map-dialog::backdrop{background:rgba(15,23,42,.55)}
.map-dialog .md-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line)}
.map-dialog .md-head h2{font-size:18px}
.map-dialog .md-close{min-width:44px;min-height:44px;border:0;border-radius:10px;background:#f1f5fb;font-size:20px;cursor:pointer}
.map-dialog iframe{display:block;width:100%;height:min(75vh,700px);border:0}

/* topic pages: service cards */
.notice{display:flex;gap:14px;align-items:flex-start;background:#fdecea;border:1px solid #f5c2bd;border-radius:16px;padding:14px 16px;margin-top:16px;font-size:15.5px;color:#374151}
.svcs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.svc{background:#fff;border-radius:16px;padding:18px 20px;display:flex;flex-direction:column;gap:10px;box-shadow:0 6px 18px rgba(15,23,42,.06)}
.svc h3{font-size:17px;font-weight:700;line-height:1.3;color:var(--ink)}
.svc p{font-size:15px;color:var(--muted)}
.tags{display:flex;flex-wrap:wrap;gap:6px}
.tag{font-size:12.5px;font-weight:700;padding:3px 9px;border-radius:999px;background:var(--tint);color:#003087}
.tag.red{background:#b42318;color:#fff}
.tag.grey{background:#f1f3f6;color:#374151}
.acts{display:flex;gap:8px;margin-top:auto;padding-top:4px;flex-wrap:wrap}
.acts a,.acts span{display:inline-flex;align-items:center;min-height:40px;font-size:14px;font-weight:700;padding:8px 15px;border-radius:999px;line-height:1.2}
.acts .p{background:var(--blue);color:#fff!important}
.acts .p:hover{background:var(--blue-dark);text-decoration:none}
.acts .s{background:#f4f7fb;border:1px solid #cbd5e1;color:#374151!important}
.acts .s:hover{background:#e9eff7;text-decoration:none}
.acts span.s{font-weight:600}
.showmore{display:none}
.more{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 28px;margin-top:10px}
.more li{border-bottom:1px solid #eef1f5}
.more a{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:13px 0;min-height:48px;font-size:15px;font-weight:600;color:var(--ink)}
.more a:hover{color:var(--blue)}
.more small{font-weight:500;color:var(--muted);font-size:13px;white-space:nowrap}
.more-sum{display:block;font-weight:400;color:var(--muted);font-size:13.5px;margin-top:2px}
.empty{font-size:15px;color:var(--muted);margin-top:8px}

/* ---------- medium screens ---------- */
@media (max-width:1099px){
  .layout{grid-template-columns:260px minmax(0,1fr);padding:180px 24px 48px;column-gap:20px}
  .gp-grid{grid-template-columns:repeat(2,1fr)}
  .gp{min-height:72px}
  .digital{grid-template-columns:repeat(2,1fr)}
  .whatson{flex-direction:column}
  .whatson .txt{width:auto}
  .svcs{grid-template-columns:1fr}
}
@media (max-width:860px) and (min-width:701px){
  .more{grid-template-columns:1fr}
}

/* ---------- phones ---------- */
@media (max-width:700px){
  .pcn-scene-d{display:none}
  .pcn-scene-p{display:block}
  .hero::after{height:520px}
  .layout{display:flex;flex-direction:column;gap:22px;padding:20px 16px 40px}
  .side{position:static}
  .intro-card{order:-1}
  .intro-card{padding:18px}
  .intro-card h1{font-size:28px}
  .intro-card p{font-size:16px}
  .panel{padding:18px}
  .pcn-page h2{font-size:20px}

  /* home: intro, then the topics as tiles with a short description */
  .home .intro-card{margin-top:84px}
  .home .side{order:0}
  .home .rest{order:1}
  .home .menu-card{background:none;box-shadow:none;padding:0}
  .home .menu-label{display:inline-block;background:rgba(255,255,255,.9);padding:4px 12px;border-radius:999px;font-size:18px;font-weight:800;text-transform:none;letter-spacing:0;color:var(--ink);margin:0 0 10px}
  .home .crisis-btn{min-height:64px;border-radius:16px;margin-bottom:12px;box-shadow:0 6px 18px rgba(15,23,42,.10)}
  .home .crisis-btn small{display:block;font-size:13.5px;font-weight:400;color:#fde7e5;margin-top:2px}
  .home .crisis-btn .ti{width:42px;height:42px;background:rgba(255,255,255,.18)}
  .home .menu{border:0;background:none;overflow:visible;display:flex;flex-direction:column;gap:10px}
  .home .menu li+li{border:0}
  .home .menu a{min-height:64px;padding:10px 14px;border-radius:16px;background:rgba(255,255,255,.95);box-shadow:0 6px 18px rgba(15,23,42,.10)}
  .home .menu a .ti{width:42px;height:42px;background:var(--tint)}
  .home .menu a small{display:block}
  .home .menu a > svg:last-child{display:none}
  .home .menu .group{background:rgba(255,255,255,.9);border-radius:999px;align-self:flex-start;padding:4px 12px;margin-top:6px}

  /* topic: intro, recommended, more, then all topics */
  .topic .intro-card{margin-top:40px}
  .topic .rest{order:1}
  .topic .side{order:2}
  .topic .menu-label::before{content:"All topics"}
  .topic .menu-label span{display:none}

  .gp-grid{grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
  .gp{min-height:52px;flex-direction:row;align-items:center;padding:0 12px;gap:6px;border-radius:12px}
  .gp b{font-size:15px}
  .gp .full,.gp .go .lbl{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .gp .short{display:inline}
  .gp:last-child{grid-column:span 2}
  .feature{flex-wrap:wrap;padding:18px 18px 18px 26px;gap:14px}
  .feature .btn{width:100%}
  .ficon{width:52px;height:52px}
  .ftxt{flex:1 1 200px}
  .digital{grid-template-columns:1fr 1fr;gap:10px}
  .dg{flex-direction:column;gap:8px;padding:14px}
  .map,.map iframe{min-height:220px}
  .whatson .btns .btn,.whatson .btns .btn2{flex:1}
  .svcs{grid-template-columns:1fr}
  .svcs.pcn-collapsed .pcn-extra{display:none}
  .showmore{display:flex;width:100%;margin-top:12px}
  .showmore[hidden]{display:none}
  .more{grid-template-columns:1fr}
}
@media print{
  .pcn-scene,.hero::after,.side{display:none}
  .layout{display:block}
}
