/* Nousable blog — listing, single, archive.
   Structure reuses the theme's own page shells (.about-mission hero,
   .about-story content section) so padding, side gutters, and the H1 match
   the rest of the site on desktop and mobile. This file only styles the
   blog-specific bits: the category filter, the post grid, cards, pagination. */

.blog-main { background: var(--cream); color: var(--ink); font-family: var(--font); }

/* inner width for the listing (sits inside a themed .about-story section,
   so horizontal padding is inherited from .about-story: 48px / 24px) */
.blog-inner { max-width: 1120px; margin: 0 auto; }

/* ---------- category filter ---------- */
.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 40px;
}
.blog-filter a {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  border-radius: var(--r-full);
  background: var(--white);
  border: 1px solid var(--border-soft);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s var(--ease-out), background .2s var(--ease-out),
    border-color .2s var(--ease-out), transform .2s var(--ease-out);
}
.blog-filter a:hover { color: var(--ink); border-color: var(--primary-200); transform: translateY(-1px); }
.blog-filter a.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.blog-filter a .count { color: var(--ink-4); margin-left: 6px; font-weight: 500; }
.blog-filter a.is-active .count { color: rgba(255,255,255,.6); }

/* ---------- listing grid ---------- */
.blog-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.blog-grid > li { margin: 0; }

/* ---------- post card ---------- */
.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-hard);
  transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out), border-color .28s var(--ease-out);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--sh-card); border-color: var(--cream-3); }
.post-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-100), var(--cream-2) 60%, var(--accent-100));
}
.post-card__media img,
.post-card__media .wp-block-post-featured-image,
.post-card__media .wp-block-post-featured-image a { width: 100%; height: 100%; margin: 0; }
.post-card__media img { object-fit: cover; display: block; transition: transform .5s var(--ease-out); }
.post-card:hover .post-card__media img { transform: scale(1.04); }

.post-card__body { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 24px; flex: 1; }
.post-card__cat, .post-card__cat a {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--cyan-dark); text-decoration: none;
}
.post-card__title { margin: 0; }
.post-card__title a {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  transition: color .2s var(--ease-out);
}
.post-card__title a:hover { color: var(--primary-600); }
.post-card__excerpt { font-size: 15px; line-height: 1.55; color: var(--ink-2); margin: 0; }
.post-card__excerpt a { color: var(--primary-600); text-decoration: none; }
.post-card__date { margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--ink-4); }

/* ---------- pagination ---------- */
.blog-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 48px; }
.blog-pagination a.page-numbers,
.blog-pagination span.page-numbers,
.blog-pagination .wp-block-query-pagination-previous,
.blog-pagination .wp-block-query-pagination-next {
  min-width: 40px; height: 40px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-full); border: 1px solid var(--border-soft);
  background: var(--white); color: var(--ink-2);
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: all .2s var(--ease-out);
}
.blog-pagination a:hover { color: var(--ink); border-color: var(--primary-200); }
.blog-pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* ---------- no results ---------- */
.blog-list .wp-block-query-no-results { text-align: center; color: var(--ink-2); font-size: 17px; padding: 40px 0; }

/* ---------- single post ---------- */
/* hero meta (inside the themed .about-mission-inner, which is centered) */
.post-hero-eyebrow, .post-hero-eyebrow a {
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--cyan-dark); text-decoration: none; display: block; margin-bottom: 4px;
}
.post-hero-date { font-size: 14px; color: var(--ink-3); margin-top: 18px; }
/* back link at the top of the article body */
.post-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  text-decoration: none; margin: 0 0 26px;
  transition: color .2s var(--ease-out);
}
.post-back:hover { color: var(--ink); }
.post-back .material-icons { font-size: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) { .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; } }
@media (max-width: 640px)  { .blog-grid { grid-template-columns: 1fr; gap: 20px; } }

@media (prefers-reduced-motion: reduce) {
  .post-card, .post-card__media img, .blog-filter a { transition: none; }
  .post-card:hover { transform: none; }
  .post-card:hover .post-card__media img { transform: none; }
}
