/* ==========================================================================
   Blog post
   Loads after service-page.css and inherits every token from .asp-root.
   Only what an article needs beyond the service-page system lives here.
   ========================================================================== */

/* ------------------------------------------------------------------ hero -- */

/* .asp-banner is built for a 620px service hero with centred text over a
   photograph. An article headline needs less height and reads better ranged
   left at a measure, so the modifier overrides only those two things. */
.asp-blog .asp-banner--post {
  min-height: 0;
  padding: calc(var(--asp-header-h, 104px) + 76px) 24px 72px;
  text-align: left;
}

.asp-bp-head { max-width: 820px; margin: 0 auto; }

.asp-bp-title { font-size: 46px; line-height: 53px; }

.asp-bp-standfirst {
  margin: 26px 0 0;
  max-width: 56ch;
  font-size: 19px;
  line-height: 31px;
  font-weight: 500;
  color: rgba(255, 255, 255, .88);
}

/* ------------------------------------------------------------------ meta -- */

/* Byline, date and reading time on one rule. The byline is optional, so the
   row has to look deliberate without it — date and reading time always render
   rather than leaving the band half empty. */
.asp-bp-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .22);
}

/* Clinician headshots are cut-outs on transparent backgrounds, so a bare
   circle just lets the band show through and the portrait reads as floating.
   A pale disc behind it turns the cut-out into a deliberate avatar: the dark
   suit and the face both sit on light, and the ring separates it from the
   band. object-position lifts the frame so the face lands in the circle
   rather than the chest, whatever the source crop. */
.asp-bp-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 12%;
  flex-shrink: 0;
  margin-right: -6px;
  background: linear-gradient(180deg, #DCEEFB 0%, #B9DDF5 100%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35), 0 2px 8px rgba(0, 0, 0, .18);
}

.asp-bp-byline { display: flex; flex-direction: column; gap: 2px; }

.asp-bp-author {
  font-weight: 700;
  font-size: 16px;
  line-height: 22px;
  color: #fff !important;
  text-decoration: none;
}

a.asp-bp-author { text-decoration: underline; text-underline-offset: 3px; }
a.asp-bp-author:hover { color: var(--blue-100) !important; }

.asp-bp-cred { font-size: 14px; line-height: 20px; color: rgba(255, 255, 255, .78); }

.asp-bp-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 20px;
  color: rgba(255, 255, 255, .78);
}

.asp-bp-facts li { display: flex; align-items: center; gap: 18px; }
.asp-bp-facts li + li::before { content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255, 255, 255, .45); }

/* The breadcrumb follows the dark hero on a pale band, as on a service page. */
.asp-blog .asp-breadcrumb { padding: 18px 0; }

/* ------------------------------------------------------------------ body -- */

/* post_content arrives as whatever the editor produced, so this styles plain
   tags rather than classes. Scoped to .asp-bp-body so nothing leaks. */
.asp-bp-body {
  max-width: 760px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 30px;
  color: var(--ink);
}

.asp-bp-body > :first-child { margin-top: 0; }
.asp-bp-body > :last-child { margin-bottom: 0; }

.asp-bp-body p { margin: 0 0 22px; }

.asp-bp-body h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 34px;
  line-height: 40px;
  letter-spacing: -.01em;
  color: var(--blue-500);
  margin: 46px 0 16px;
}

.asp-bp-body h3 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 19px;
  line-height: 27px;
  color: var(--blue-700);
  margin: 34px 0 12px;
}

.asp-bp-body ul,
.asp-bp-body ol { margin: 0 0 22px; padding-left: 22px; }
.asp-bp-body li { margin-bottom: 10px; }
.asp-bp-body li::marker { color: var(--blue-300); }

.asp-bp-body a {
  color: var(--blue-700) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.asp-bp-body a:hover { color: var(--blue-500) !important; }

.asp-bp-body strong { font-weight: 700; color: #1d1d1d; }

.asp-bp-body blockquote {
  margin: 30px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--blue-300);
  font-size: 19px;
  line-height: 31px;
  color: var(--blue-700);
}

.asp-bp-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

.asp-bp-body hr {
  border: 0;
  border-top: 1px solid var(--blue-100);
  margin: 40px 0;
}

/* ------------------------------------------------------------- final CTA -- */

.asp-bp-final { max-width: 760px; }
.asp-bp-final h2 { margin: 0; }

/* Badge spacing comes from a context modifier, as everywhere else. */
.asp-reviews--article-final { margin-top: 28px; }

/* ---------------------------------------------------------------- mobile -- */

@media (max-width: 980px) {
  .asp-blog .asp-banner--post { padding: calc(var(--asp-header-h, 104px) + 48px) 24px 52px; }
  .asp-bp-title { font-size: 36px; line-height: 42px; }
  .asp-bp-standfirst { font-size: 17px; line-height: 27px; }
  .asp-bp-body { font-size: 16px; line-height: 28px; }
  .asp-bp-body h2 { font-size: 28px; line-height: 34px; margin-top: 38px; }
}

@media (max-width: 600px) {
  .asp-bp-title { font-size: 30px; line-height: 36px; }
  .asp-bp-byline { gap: 12px; }
  .asp-bp-avatar { width: 46px; height: 46px; }
}

/* ==========================================================================
   Blog index and archives
   ========================================================================== */

.asp-bi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

.asp-bi-card { display: flex; }

.asp-bi-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-decoration: none !important;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.asp-bi-link:hover {
  transform: translateY(-3px);
  border-color: var(--blue-300);
  box-shadow: 0 10px 28px rgba(10, 116, 169, .16);
}

/* Most articles have no featured image, and an empty grey box reads as a
   fault. A brand gradient carrying the article topic reads as a decision.
   The tone is keyed to the post id so a card looks the same every render. */
.asp-bi-thumb {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* With a featured image the panel is a 16:9 image well. Without one it is a
   colour band carrying the topic, sized to the text rather than to a ratio —
   a 16:9 block holding one line leaves three quarters of it empty. */
.asp-bi-thumb--image { aspect-ratio: 16 / 9; }

.asp-bi-thumb--plain {
  min-height: 96px;
  padding: 20px 22px;
}

.asp-bi-thumb--1 { background: linear-gradient(135deg, #023B58 0%, #0A74A9 100%); }
.asp-bi-thumb--2 { background: linear-gradient(135deg, #0A74A9 0%, #5BC1EE 100%); }
.asp-bi-thumb--3 { background: linear-gradient(135deg, #0179B4 0%, #82C885 100%); }
.asp-bi-thumb--4 { background: linear-gradient(135deg, #1C7CAB 0%, #0095DE 100%); }

.asp-bi-thumb-label {
  position: relative;
  font-family: var(--display);
  font-size: 22px;
  line-height: 28px;
  color: rgba(255, 255, 255, .94);
  text-wrap: balance;
}

.asp-bi-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 24px;
}

.asp-bi-pill {
  align-self: flex-start;
  background: var(--faq-closed);
  color: var(--blue-700);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 14px;
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.asp-bi-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 23px;
  line-height: 29px;
  color: var(--blue-500);
  margin-bottom: 10px;
  text-wrap: balance;
}

.asp-bi-link:hover .asp-bi-title { color: var(--blue-700); }

.asp-bi-excerpt {
  font-size: 15px;
  line-height: 24px;
  color: var(--ink);
  margin-bottom: 18px;
}

/* Footer pinned to the bottom so cards of different heights still line up. */
.asp-bi-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--blue-100);
  font-size: 13px;
  line-height: 19px;
  color: #5A6B76;
}

.asp-bi-foot > * { display: flex; align-items: center; gap: 14px; }
.asp-bi-foot > * + *::before {
  content: '';
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #A9BCC7;
}

.asp-bi-author { font-weight: 700; color: var(--blue-700); }
.asp-bi-date,
.asp-bi-read { white-space: nowrap; }

/* ---------------------------------------------------------------- pager -- */

.asp-bi-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}

.asp-bi-pager .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--blue-100);
  background: var(--white);
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-700) !important;
  text-decoration: none !important;
}

.asp-bi-pager a.page-numbers:hover {
  background: var(--faq-closed);
  border-color: var(--blue-300);
}

.asp-bi-pager .page-numbers.current {
  background-image: var(--grad-brand-h);
  border-color: transparent;
  color: #fff !important;
}

.asp-bi-pager .page-numbers.dots { border-color: transparent; background: none; }

.asp-bi-empty {
  text-align: center;
  font-size: 17px;
  color: #5A6B76;
  padding: 40px 0;
}

/* --------------------------------------------------------------- mobile -- */

@media (max-width: 1100px) {
  .asp-bi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .asp-bi-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .asp-bi-title { font-size: 21px; line-height: 27px; }
}

/* Author archive: route on to the profile page, which carries the bio,
   credentials and schema the listing does not. */
.asp-bi-profile-link {
  margin: 18px 0 0;
  font-size: 15px;
  line-height: 22px;
}
.asp-bi-profile-link a {
  color: rgba(255, 255, 255, .92);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .4);
  padding-bottom: 2px;
}
.asp-bi-profile-link a:hover,
.asp-bi-profile-link a:focus-visible { border-bottom-color: rgba(255, 255, 255, .9); }
