/* Blog and post archive styles; loaded only for blog, archive and single posts. */

/* Blog archive and article layouts share the site's card and type system. */
.blog main.asta-content > .wp-block-query,
.archive main.asta-content > .wp-block-query {
  width: min(1160px, calc(100vw - 48px));
  max-width: none;
  margin: 0 auto;
}
.blog main.asta-content > .wp-block-query > .wp-block-post-template,
.archive main.asta-content > .wp-block-query > .wp-block-post-template {
  display: grid;
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 32px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.blog .wp-block-post-template > .wp-block-post,
.archive .wp-block-post-template > .wp-block-post {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  border: 1px solid #e3e9df;
  border-radius: var(--asta-radius);
  background: var(--asta-color-white);
  box-shadow: 0 10px 28px rgb(31 36 44 / 7%);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.blog .wp-block-post-featured-image,
.archive .wp-block-post-featured-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  background: var(--asta-color-surface);
}
.blog .wp-block-post-featured-image > a,
.archive .wp-block-post-featured-image > a { display: block; width: 100%; height: 100%; }
.blog .wp-block-post-featured-image img,
.archive .wp-block-post-featured-image img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform .35s ease;
}
.blog .wp-block-post-title,
.archive .wp-block-post-title {
  min-height: 4.2em;
  margin: 0;
  padding: 21px 22px 0;
  color: var(--asta-ink);
  font-size: clamp(1.2rem, 1.45vw, 1.38rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.3;
  text-wrap: balance;
}
.blog .wp-block-post-title a,
.archive .wp-block-post-title a { color: inherit; text-decoration: none; }
.blog .wp-block-post-title a:hover,
.archive .wp-block-post-title a:hover { color: var(--asta-dark-green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; }
.blog .wp-block-post-date.asta-post-card__date,
.archive .wp-block-post-date.asta-post-card__date {
  margin: 0;
  min-height: 52px;
  box-sizing: border-box;
  padding: 10px 22px;
  border-top: 1px solid #edf1eb;
}
.blog .wp-block-post-excerpt,
.archive .wp-block-post-excerpt {
  flex: 1 0 auto;
  margin: 0;
  padding: 9px 22px 18px;
  color: #5b6558;
  font-size: .96rem;
  line-height: 1.65;
}
.blog .wp-block-post-excerpt__excerpt,
.archive .wp-block-post-excerpt__excerpt { margin: 0; }
.blog .wp-block-post-template > .wp-block-post a:focus-visible,
.archive .wp-block-post-template > .wp-block-post a:focus-visible {
  outline: 3px solid var(--asta-dark-green);
  outline-offset: -4px;
}
@media (hover: hover) {
  .blog .wp-block-post-template > .wp-block-post:hover,
  .archive .wp-block-post-template > .wp-block-post:hover {
    transform: translateY(-3px);
    border-color: #cbdcc3;
    box-shadow: 0 16px 34px rgb(31 36 44 / 12%);
  }
  .blog .wp-block-post-template > .wp-block-post:hover .wp-block-post-featured-image img,
  .archive .wp-block-post-template > .wp-block-post:hover .wp-block-post-featured-image img { transform: scale(1.025); }
}
.blog .wp-block-query-pagination,
.archive .wp-block-query-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 44px auto 0;
  color: #596555;
}
.blog .wp-block-query-pagination-numbers,
.archive .wp-block-query-pagination-numbers { display: flex; align-items: center; gap: 6px; }
.blog .wp-block-query-pagination a,
.blog .wp-block-query-pagination .page-numbers,
.archive .wp-block-query-pagination a,
.archive .wp-block-query-pagination .page-numbers {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid #e3e9df;
  border-radius: 10px;
  background: var(--asta-color-white);
  color: var(--asta-dark-green);
  font-weight: 650;
  text-decoration: none;
}
.blog .wp-block-query-pagination .current,
.archive .wp-block-query-pagination .current { border-color: var(--asta-green); background: var(--asta-color-action); color: var(--asta-color-white); }

body.single-post main.asta-content > .wp-block-post-featured-image {
  width: min(900px, calc(100vw - 48px));
  max-width: none;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: 0 auto clamp(36px, 5vw, 56px);
  border-radius: var(--asta-radius);
  background: var(--asta-color-surface);
}
body.single-post main.asta-content > .wp-block-post-featured-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body.single-post main.asta-content > .wp-block-post-content {
  width: min(800px, calc(100vw - 48px));
  max-width: none;
  margin: 0 auto;
  color: #303b2f;
  font-size: 1rem;
  line-height: 1.75;
}
body.single-post main.asta-content > .wp-block-post-content > * { width: 100%; max-width: none; }
body.single-post main.asta-content > .wp-block-post-content > p {
  margin: 0 0 1.1em;
  font-size: 1rem;
  line-height: 1.75;
}
body.single-post main.asta-content > .wp-block-post-content > p.has-large-font-size {
  font-size: 1.2rem;
  line-height: 1.6;
}
body.single-post main.asta-content > .wp-block-post-content > h2 {
  margin: 2.25em 0 .65em;
  color: var(--asta-ink);
  font-size: clamp(1.65rem, 2.6vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.2;
  text-wrap: balance;
}
body.single-post main.asta-content > .wp-block-post-content > h3 {
  margin: 1.8em 0 .6em;
  color: var(--asta-ink);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
}
body.single-post main.asta-content > .wp-block-post-content > h4 {
  margin: 1.5em 0 .5em;
  color: var(--asta-ink);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
}
body.single-post main.asta-content > .wp-block-post-content > :is(ul, ol) {
  margin: 0 0 1.25em;
  padding-inline-start: 1.35em;
  line-height: 1.7;
}
body.single-post main.asta-content > .wp-block-post-content > :is(ul, ol) li { margin: 0 0 .45em; padding-left: .2em; }
body.single-post main.asta-content > .wp-block-post-content > blockquote {
  margin: 1.5em 0;
  padding: 1em 1.25em;
  border-left: 4px solid var(--asta-green);
  border-radius: 0 var(--asta-radius) var(--asta-radius) 0;
  background: #f6f9f4;
  color: #354432;
}
body.single-post main.asta-content > .wp-block-post-content > blockquote p { margin: 0; }
body.single-post main.asta-content > .wp-block-post-content > .wp-block-group { border-radius: var(--asta-radius); }
body.single-post main.asta-content > .wp-block-post-content .wp-block-table {
  width: 100%;
  margin: 1.7em 0;
  overflow-x: auto;
  border: 1px solid #dce5d7;
  border-radius: var(--asta-radius);
}
body.single-post main.asta-content > .wp-block-post-content .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: .94rem;
  line-height: 1.5;
}
body.single-post main.asta-content > .wp-block-post-content .wp-block-table :is(th, td) {
  padding: .72em .85em;
  border: 1px solid #dce5d7;
  text-align: left;
}
body.single-post main.asta-content > .wp-block-post-content .wp-block-table th { background: var(--asta-color-surface); color: var(--asta-ink); font-weight: 700; }
body.single-post main.asta-content > .wp-block-post-content .wp-block-table tbody tr:nth-child(even) { background: #f8faf7; }
body.single-post main.asta-content > .wp-block-post-content :is(.wp-block-image, .wp-block-embed) { margin-block: 1.8em; }
body.single-post main.asta-content > .wp-block-post-content .wp-block-image img { display: block; border-radius: var(--asta-radius); }
body.single-post main.asta-content > .wp-block-post-content a { color: var(--asta-dark-green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
body.single-post main.asta-content > .wp-block-post-content a:hover { color: var(--asta-green); }
body.single-post main.asta-content > .wp-block-post-content > :last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  .blog main.asta-content > .wp-block-query,
  .archive main.asta-content > .wp-block-query { width: min(100%, calc(100vw - 40px)); }
  .blog main.asta-content > .wp-block-query > .wp-block-post-template,
  .archive main.asta-content > .wp-block-query > .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .blog .wp-block-post-title,
  .archive .wp-block-post-title { min-height: 3.9em; }
}
@media (max-width: 600px) {
  .blog main.asta-content > .wp-block-query,
  .archive main.asta-content > .wp-block-query { width: calc(100vw - 32px); }
  .blog main.asta-content > .wp-block-query > .wp-block-post-template,
  .archive main.asta-content > .wp-block-query > .wp-block-post-template { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .blog .wp-block-post-title,
  .archive .wp-block-post-title { min-height: 0; padding: 18px 18px 0; font-size: 1.22rem; }
  .blog .wp-block-post-date.asta-post-card__date,
  .archive .wp-block-post-date.asta-post-card__date { padding: 10px 18px; }
  .blog .wp-block-post-excerpt,
  .archive .wp-block-post-excerpt { padding: 8px 18px 14px; }
  .blog .wp-block-query-pagination,
  .archive .wp-block-query-pagination { flex-wrap: wrap; gap: 6px; margin-top: 32px; }
  .blog .wp-block-query-pagination a,
  .blog .wp-block-query-pagination .page-numbers,
  .archive .wp-block-query-pagination a,
  .archive .wp-block-query-pagination .page-numbers { min-width: 36px; min-height: 36px; padding: 5px 9px; }
  body.single-post main.asta-content > .wp-block-post-featured-image { width: calc(100vw - 32px); margin-bottom: 32px; }
  body.single-post main.asta-content > .wp-block-post-content { width: calc(100vw - 40px); font-size: .98rem; line-height: 1.72; }
  body.single-post main.asta-content > .wp-block-post-content > h2 { margin-top: 1.9em; font-size: 1.55rem; }
  body.single-post main.asta-content > .wp-block-post-content > h3 { margin-top: 1.5em; font-size: 1.25rem; }
  body.single-post main.asta-content > .wp-block-post-content .wp-block-table table { min-width: 520px; }
}
@media (prefers-reduced-motion: reduce) {
  .blog .wp-block-post-template > .wp-block-post,
  .archive .wp-block-post-template > .wp-block-post,
  .blog .wp-block-post-featured-image img,
  .archive .wp-block-post-featured-image img { transition: none; }
}

/* Feature the newest article beside the blog heading. */
.blog .asta-archive-hero.asta-blog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.05fr);
  align-items: center;
  gap: 24px;
  min-height: 350px;
}
.blog .asta-blog-hero > .asta-blog-hero__intro,
.blog .asta-blog-hero > .asta-blog-hero__latest {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
}
.blog .asta-blog-hero__intro h1 { max-width: 100%; }
.blog .asta-blog-hero__latest .asta-post-grid { display: block; }
.blog .asta-blog-hero__latest .asta-post-card--featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  height: clamp(360px, 28vw, 420px);
  min-height: 0;
  border-color: #e0e8db;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgb(31 36 44 / 12%);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.blog .asta-blog-hero__latest .asta-post-card--featured > a {
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.blog .asta-blog-hero__latest .asta-post-card--featured img {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: cover;
  transition: transform .35s ease;
}
.blog .asta-blog-hero__latest .asta-post-card--no-image { grid-template-columns: minmax(0, 1fr); }
.blog .asta-blog-hero__latest .asta-post-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 3vw, 38px);
  padding-bottom: 14px;
}
.blog .asta-blog-hero__latest .asta-post-card__eyebrow {
  width: fit-content;
  margin: 0 0 15px;
  padding: 6px 11px;
  border-radius: var(--asta-radius-pill);
  background: #edf5e8;
  color: var(--asta-dark-green);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .035em;
  line-height: 1.3;
}
.blog .asta-blog-hero__latest .asta-post-card__body h3 {
  margin: 0 0 14px;
  color: var(--asta-ink);
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.2;
  text-wrap: balance;
}
.blog .asta-blog-hero__latest .asta-post-card__body h3 a { color: inherit; text-decoration: none; }
.blog .asta-blog-hero__latest .asta-post-card__body h3 a:hover { color: var(--asta-dark-green); text-decoration: underline; text-underline-offset: .16em; }
.blog .asta-blog-hero__latest .asta-post-card__date {
  min-height: 0;
  margin: auto 0 0;
  padding: 12px 0 4px;
}
.blog .asta-blog-hero__latest .asta-post-card__body > .asta-post-card__excerpt {
  margin: 0;
  color: #5b6558;
  font-size: .96rem;
  line-height: 1.65;
}
.blog .asta-blog-hero__latest .asta-post-card--featured a:focus-visible {
  outline: 3px solid var(--asta-dark-green);
  outline-offset: -4px;
}
@media (hover: hover) {
  .blog .asta-blog-hero__latest .asta-post-card--featured:hover {
    transform: translateY(-3px);
    border-color: #cbdcc3;
    box-shadow: 0 20px 48px rgb(31 36 44 / 16%);
  }
  .blog .asta-blog-hero__latest .asta-post-card--featured:hover img { transform: scale(1.025); }
}
@media (max-width: 900px) {
  .blog .asta-archive-hero.asta-blog-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .blog .asta-blog-hero__latest .asta-post-card--featured { height: clamp(320px, 44vw, 400px); }
}
@media (max-width: 700px) {
  .blog .asta-blog-hero__latest .asta-post-card--featured { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .blog .asta-blog-hero__latest .asta-post-card--featured > a { height: auto; aspect-ratio: 16 / 9; }
  .blog .asta-blog-hero__latest .asta-post-card--featured img { height: auto; aspect-ratio: 16 / 9; }
  .blog .asta-blog-hero__latest .asta-post-card__body { padding: 22px; padding-bottom: 14px; }
}
@media (max-width: 600px) {
  .blog .asta-archive-hero.asta-blog-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 32px 20px; }
  .blog .asta-blog-hero__latest .asta-post-card--featured { grid-template-columns: minmax(0, 1fr); height: auto; }
  .blog .asta-blog-hero__latest .asta-post-card--featured img { height: auto; aspect-ratio: 16 / 9; }
  .blog .asta-blog-hero__latest .asta-post-card__body { padding: 21px; padding-bottom: 14px; }
  .blog .asta-blog-hero__latest .asta-post-card__body h3 { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) {
  .blog .asta-blog-hero__latest .asta-post-card--featured,
  .blog .asta-blog-hero__latest .asta-post-card--featured img { transition: none; }
}

/* Align full-bleed archive headers with the archive content gutter. */
.blog main.asta-content > .asta-archive-hero,
.archive main.asta-content > .asta-archive-hero {
  width: calc(100% + 48px) !important;
  max-width: none !important;
  margin-inline: -24px !important;
}

@media (max-width: 600px) {
  .blog main.asta-content > .asta-archive-hero,
  .archive main.asta-content > .asta-archive-hero {
    width: calc(100% + 32px) !important;
    margin-inline: -16px !important;
  }
}
