/* Blog: list of articles, article pages and the author page. Loaded only on /blog/ pages.
   Card grid follows badcreditloanscanada.ca/blog (1 / 2 / 3 per row), colours and type from site.css. */

.intro--blog { padding-bottom: clamp(2rem, 4vw, 2.75rem); }
.intro--blog .intro__lede { max-width: 46rem; margin-inline: auto; text-align: center; }

/* Client rule: H1 on one line across the full width from ~1024px.
   Longest titles are 60 characters, about 34em wide in Fraunces 700. */
@media (min-width: 64rem) {
  .intro--blog .intro__inner { max-width: none; }
  .intro--blog h1 { font-size: min(2.75rem, calc((100vw - 4.5rem) / 34)); }
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.9rem;
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--quiet);
}
.blog-meta a { font-weight: 600; }
.blog-meta--card { justify-content: flex-start; margin: 0 0 0.5rem; font-size: 0.875rem; }

/* ------------------------------------------------------------ card grid */

.blog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40.0625rem) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 62rem) {
  .blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--round);
  box-shadow: 0 18px 34px -28px rgba(35, 24, 15, 0.55);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.blog-card:hover { border-color: var(--bronze); box-shadow: 0 22px 38px -26px rgba(35, 24, 15, 0.6); }
.blog-card:focus-within { outline: 3px solid var(--umber); outline-offset: 2px; }

.blog-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--parchment); }
.blog-card__media img { width: 100%; height: 100%; object-fit: cover; }

.blog-card__body { display: flex; flex: 1; flex-direction: column; padding: 1.15rem 1.25rem 1.3rem; }

.blog-card__title { margin: 0 0 0.6rem; font-size: 1.25rem; line-height: 1.25; }
.blog-card__title a { color: var(--ink); text-decoration: none; }
.blog-card__title a::after { content: ""; position: absolute; inset: 0; }
.blog-card__title a:focus-visible { outline: none; }
.blog-card:hover .blog-card__title a { color: var(--umber-deep); }

.blog-card__excerpt { margin: 0 0 1rem; font-size: 0.975rem; line-height: 1.6; }
.blog-card__more { margin-top: auto; font-weight: 600; color: var(--umber); }

.blog-h2 { margin: 0 0 1.25rem; font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem); text-align: center; }

/* --------------------------------------------------------------- article */

.pic--wide { width: 100%; float: none; margin: 1.25rem 0 1.5rem; }
@media (min-width: 46rem) {
  .pic--wide { width: 100%; float: none; margin-inline: 0; }
}

.disclosure {
  clear: both;
  margin: 1.25rem 0 1.5rem;
  padding: 1.1rem 1.25rem 0.4rem;
  background: var(--white);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--bronze);
  border-radius: var(--round-sm);
}
.disclosure__title { margin: 0 0 0.6rem; font-weight: 600; color: var(--ink); }

/* ---------------------------------------------------------------- author */

.byline {
  display: grid;
  gap: 1rem 1.5rem;
  clear: both;
  margin-top: 2.75rem;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--round);
}
.byline__photo { width: 6rem; height: 6rem; border-radius: 50%; object-fit: cover; }
.byline__name { margin: 0 0 0.15rem; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--ink); }
.byline__role { margin: 0 0 0.75rem; font-weight: 600; color: var(--umber-deep); }
.byline p:last-child { margin-bottom: 0; }

@media (min-width: 40rem) {
  .byline { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
}

.profile { display: grid; gap: 1.5rem 2.5rem; align-items: start; }
.profile__photo { width: min(16rem, 70vw); margin-inline: auto; border-radius: var(--round); box-shadow: 0 18px 34px -24px rgba(35, 24, 15, 0.55); }
.profile__role { margin: 0 0 1rem; font-weight: 600; color: var(--umber-deep); }

@media (min-width: 52rem) {
  .profile { grid-template-columns: 16rem minmax(0, 1fr); }
  .profile__photo { margin: 0; }
}

.tags,
.copy .tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.5rem 0 0; padding: 0; list-style: none; }
.copy .tags li,
.tags li {
  margin: 0;
  padding: 0.25rem 0.75rem;
  background: var(--parchment);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--ink);
}

.blog-section { clear: both; margin-top: 2.75rem; padding-top: 2.25rem; border-top: 1px solid var(--rule); }
