/* =============================================================================
   EK RUNNING PHYSIO COACHING — blog (loaded only on /blog/ pages)
   -----------------------------------------------------------------------------
   Additive layer on top of main.css. Every colour, font, radius and easing is
   an existing design-system token — nothing here restyles the main site, and
   main.css is untouched. The reduced-motion rule at the end of main.css
   already covers the transitions below.
   ========================================================================== */

/* --- listing shell ------------------------------------------------------------ */
.blog-section { padding-block: clamp(3rem, 7vw, 5rem); }
.blog-section .intro { margin-bottom: 2rem; }

/* --- category filter chips ---------------------------------------------------- */
.blog-filters {
  display: flex; flex-wrap: wrap; gap: .6rem;
  margin-bottom: 2.2rem;
}
.blog-chip {
  font: inherit;
  font-size: .82rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--stone);
  background: transparent;
  border: 1px solid var(--line-gold);
  border-radius: 999px;
  padding: .4rem .95rem;
  cursor: pointer;
  transition: all .2s ease;
}
.blog-chip:hover { color: var(--gold-hi); border-color: rgba(201, 162, 75, .6); }
.blog-chip[aria-pressed="true"] {
  background: rgba(201, 162, 75, .12);
  border-color: rgba(201, 162, 75, .55);
  color: var(--gold-hi);
}

/* --- featured article --------------------------------------------------------- */
.blog-featured {
  position: relative;
  display: grid; gap: 0;
  background: linear-gradient(180deg, #231A0E 0%, #1A130A 100%);
  border: 1px solid rgba(201, 162, 75, .55);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  margin-bottom: 2.6rem;
}
.blog-featured::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-gold);
  z-index: 1;
}
@media (min-width: 860px) {
  .blog-featured { grid-template-columns: 1.05fr .95fr; }
}
.blog-featured-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(400px 300px at 70% 20%, rgba(201, 162, 75, .14), transparent 65%),
    var(--espresso);
}
.blog-featured-media img { width: 100%; height: 100%; object-fit: cover; }
.blog-featured-body {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 1rem;
  padding: 2.2rem 2rem;
}
@media (min-width: 860px) {
  .blog-featured-body { justify-content: center; padding: 2.6rem 2.4rem; }
}
.blog-featured-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -.01em;
}
.blog-featured-title a { color: var(--ivory); text-decoration: none; }
.blog-featured-title a:hover { color: var(--gold-hi); }
.blog-featured-excerpt { color: var(--stone); line-height: 1.7; }
/* Same pill as the "Most popular" service badge, sat in the card's own flow */
.blog-badge {
  align-self: flex-start;
  background: var(--grad-cta); color: var(--espresso);
  font-size: .72rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .32rem .8rem; border-radius: 999px;
}

/* --- article grid ------------------------------------------------------------- */
.blog-grid { display: grid; gap: 1.4rem; }
@media (min-width: 640px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.bcard {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-gold);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.bcard:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 162, 75, .5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
.bcard-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(400px 300px at 70% 20%, rgba(201, 162, 75, .14), transparent 65%),
    var(--espresso);
  border-bottom: 1px solid var(--line-gold);
}
.bcard-media img { width: 100%; height: 100%; object-fit: cover; }
.bcard-body {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: .7rem;
  padding: 1.5rem 1.6rem 1.6rem;
  flex: 1;
}
.bcard-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  line-height: 1.25;
}
.bcard-title a { color: var(--ivory); text-decoration: none; }
.bcard-title a:hover { color: var(--gold-hi); }
.bcard-excerpt {
  color: var(--stone);
  font-size: .93rem; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.bcard-more { margin-top: auto; padding-top: .3rem; }

/* --- meta row (category · date · author) --------------------------------------- */
.blog-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
  font-size: .76rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--stone);
}
.blog-cat { color: var(--gold); }
.blog-dot { color: var(--line-gold); }
.blog-meta time { font-variant-numeric: tabular-nums; letter-spacing: .1em; }

/* --- inline read-more link ------------------------------------------------------ */
.blog-more {
  font-weight: 800; font-size: .9rem;
  color: var(--gold);
  text-decoration: none;
  transition: color .2s ease;
}
.blog-more:hover { color: var(--gold-hi); }
.blog-more::after { content: " →"; }

/* --- states (loading / empty / error / not connected) ---------------------------- */
.blog-note {
  border: 1px solid var(--line-gold);
  border-radius: 12px;
  background: rgba(30, 23, 16, .55);
  padding: 1.6rem 1.8rem;
  color: var(--stone);
  line-height: 1.7;
}
.blog-note a { color: var(--gold); }
.blog-grid .blog-note, .blog-article .blog-note { grid-column: 1 / -1; }
.bcard--skel { border-color: rgba(201, 162, 75, .12); }
.bcard--skel .bcard-media { width: 100%; border-radius: 0; }
.bcard--skel .bcard-body { gap: .85rem; }
.skel-line--short { width: 6rem; }
.skel-line--wide  { width: 100%; height: 1.3rem; }
.skel-line--title { width: 80%; height: 2.2rem; margin: .8rem 0 1.6rem; }

/* --- single article -------------------------------------------------------------- */
.blog-back {
  display: inline-block;
  margin-bottom: 1.6rem;
  font-size: .84rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--stone);
  text-decoration: none;
  transition: color .2s ease;
}
.blog-back::before { content: "← "; }
.blog-back:hover { color: var(--gold-hi); }

.blog-article-wrap { max-width: 46rem; }
.blog-article-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -.01em;
  margin: .9rem 0 1rem;
}
.blog-article-excerpt {
  color: var(--stone);
  font-size: clamp(1rem, 2vw, 1.14rem);
  line-height: 1.72;
  margin-bottom: 1.8rem;
}
.blog-article-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-gold);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 2.4rem;
  background:
    radial-gradient(400px 300px at 70% 20%, rgba(201, 162, 75, .14), transparent 65%),
    var(--espresso);
}
.blog-article-media img { width: 100%; height: 100%; object-fit: cover; }
.blog-article-shell { display: flex; flex-direction: column; }

/* --- article prose ---------------------------------------------------------------- */
.prose { max-width: 46rem; }
.prose > * + * { margin-top: 1.15rem; }
.prose p { color: var(--stone); font-size: 1.03rem; line-height: 1.8; }
.prose h2, .prose h3, .prose h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ivory);
  line-height: 1.25;
  margin-top: 2.4rem;
}
.prose h2 { font-size: 1.55rem; }
.prose h3 { font-size: 1.28rem; }
.prose h4 { font-size: 1.08rem; }
.prose a { color: var(--gold); text-underline-offset: 3px; }
.prose a:hover { color: var(--gold-hi); }
.prose strong { color: var(--ivory); font-weight: 800; }
.prose ul, .prose ol { color: var(--stone); padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 1.4rem; line-height: 1.7; margin-top: .6rem; }
.prose ul > li::before {
  content: "◆"; position: absolute; left: 0; top: .45em;
  font-size: .5em; color: var(--gold);
}
.prose ol { counter-reset: prose-ol; }
.prose ol > li { counter-increment: prose-ol; }
.prose ol > li::before {
  content: counter(prose-ol) ".";
  position: absolute; left: 0; top: 0;
  font-weight: 800; color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.prose blockquote {
  margin: 2rem 0;
  border-left: 3px solid transparent;
  border-image: var(--grad-rule) 1;
  border-image-width: 0 0 0 3px;
  border-radius: 0 8px 8px 0;
  background: rgba(201, 162, 75, .09);
  padding: 1.1rem 1.4rem;
  color: var(--ivory);
  font-size: 1.05rem; line-height: 1.7;
}
.prose blockquote p { color: inherit; }
.prose figure { margin: 2rem 0; }
.prose figure img {
  width: 100%;
  border: 1px solid var(--line-gold);
  border-radius: 14px;
}
.prose figcaption {
  margin-top: .6rem;
  font-size: .85rem; color: var(--stone); font-style: italic;
}
.prose code {
  background: rgba(201, 162, 75, .1);
  border-radius: 5px;
  padding: .1em .4em;
  font-size: .92em;
}

/* --- narrow phones -------------------------------------------------------------------- */
/* Matches the step-down in main.css so blog cards keep the same rhythm as the
   rest of the site on a phone, and gives the category chips a comfortable
   touch target (~40px rather than ~30px). */
@media (max-width: 520px) {
  .blog-featured-body { padding: 1.7rem 1.25rem; }
  .bcard-body { padding: 1.3rem 1.25rem 1.4rem; }
  .blog-note { padding: 1.3rem 1.25rem; }
  .blog-chip { padding: .55rem 1rem; }
}

/* --- Notion block types ------------------------------------------------------------- */
/* Images: Notion reports no intrinsic size, so the frame reserves the space and
   the picture fades into it once decoded — no layout shift as it loads. */
.prose-figure { margin: 2rem 0; }
.prose-figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line-gold);
  border-radius: 14px;
  background: var(--espresso);
}

.prose hr {
  height: 1px;
  border: 0;
  margin: 2.6rem 0;
  background: var(--grad-gold);
  opacity: .5;
}

/* Callout — the same gold-tinted panel used for the clinician note on services */
.prose-callout {
  display: flex; gap: .9rem;
  margin: 2rem 0;
  border-left: 3px solid transparent;
  border-image: var(--grad-rule) 1;
  border-image-width: 0 0 0 3px;
  border-radius: 0 10px 10px 0;
  background: rgba(201, 162, 75, .09);
  padding: 1.15rem 1.4rem;
}
.prose-callout-icon { font-size: 1.15rem; line-height: 1.6; }
.prose-callout-body { flex: 1; }
.prose-callout-body > * + * { margin-top: .8rem; }
.prose-callout p { color: var(--ivory); }

/* Code block */
.prose-code {
  margin: 2rem 0;
  overflow-x: auto;
  background: #100C07;
  border: 1px solid var(--line-gold);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  font-size: .88rem;
  line-height: 1.7;
}
.prose-code code { background: none; padding: 0; color: var(--ivory); }

/* Table */
.prose-table { margin: 2rem 0; overflow-x: auto; }
.prose-table table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose-table th, .prose-table td {
  border: 1px solid var(--line-gold);
  padding: .7rem .9rem;
  text-align: left;
  vertical-align: top;
  color: var(--stone);
}
.prose-table th {
  color: var(--gold-hi);
  font-weight: 800;
  letter-spacing: .06em;
  background: rgba(201, 162, 75, .09);
}

/* Toggle */
.prose-toggle { border-top: 1px solid var(--line-gold); margin-top: 1.2rem; }
.prose-toggle:last-of-type { border-bottom: 1px solid var(--line-gold); }
.prose-toggle summary {
  list-style: none;
  padding: .95rem 2rem .95rem 0;
  font-weight: 700;
  cursor: pointer;
  position: relative;
}
.prose-toggle summary::-webkit-details-marker { display: none; }
.prose-toggle summary::after {
  content: "+";
  position: absolute; right: .25rem; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  color: var(--gold);
}
.prose-toggle[open] summary::after { content: "–"; }
.prose-toggle > *:not(summary) { padding-bottom: 1rem; }

.prose-todo { color: var(--stone); }
.prose-todo span { color: var(--gold); margin-right: .3rem; }

/* Embeds (video) and link cards */
.prose-embed {
  position: relative;
  margin: 2rem 0;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-gold);
  border-radius: 14px;
  overflow: hidden;
  background: var(--espresso);
}
.prose-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose-bookmark {
  margin: 1.6rem 0;
  border: 1px solid var(--line-gold);
  border-radius: 10px;
  background: rgba(30, 23, 16, .55);
  padding: .9rem 1.1rem;
  overflow-wrap: anywhere;
}

/* Multi-column layouts — how galleries are built in Notion */
.prose-columns { display: grid; gap: 1.2rem; margin: 2rem 0; }
@media (min-width: 720px) {
  .prose-columns[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
  .prose-columns[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
  .prose-columns[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
}
.prose-columns .prose-figure { margin: 0; }
.prose-column > * + * { margin-top: 1rem; }

/* Tags, under the article */
.blog-tags {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-gold);
}
.blog-tag {
  font-size: .72rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--stone);
  border: 1px solid var(--line-gold);
  border-radius: 999px;
  padding: .28rem .8rem;
}
