/* Blog index, post reader and Checklists & Guides — Paper "Cubbi Website" (Blog 32B-0,
   Checklists & Guides 36I-0 and their mobile artboards). */

.page-head {
  padding: 3.5rem 0 1.75rem;
}
.page-head h1 {
  margin-bottom: 0;
}
.page-head .squiggle {
  margin-top: -0.05rem;
}

/* Search pill + category filter chips */
.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0 2rem;
}
.blog-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--cream-100);
  border-radius: var(--radius-pill);
  padding: 0.7rem 1.25rem;
  flex: 0 1 26rem;
  min-width: 16rem;
}
.blog-search svg {
  flex-shrink: 0;
  color: var(--ink-muted);
}
.blog-search input {
  border: 0;
  background: transparent;
  font: 1rem var(--font);
  color: var(--ink);
  width: 100%;
  outline: none;
}
.blog-search input::placeholder {
  color: var(--ink-muted);
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.filter-chips a {
  display: inline-block;
  background: var(--cream-100);
  color: var(--green-700);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}
.filter-chips a[aria-current="true"] {
  background: var(--green-700);
  color: #fff;
}
.filter-chips a:not([aria-current="true"]):hover {
  background: var(--green-100);
}

/* Card grid: image (or muted colour block) with meta overlay, dark title band. */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 16.25rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  background-size: cover;
  background-position: center;
  box-shadow: 3px 3px 0 rgba(139, 87, 156, 0.18);
  transition: transform 0.15s ease;
}
.blog-card:hover {
  transform: translateY(-3px);
}
.blog-card .card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-card .card-meta {
  z-index: 1;
  position: absolute;
  top: 1rem;
  left: 1.25rem;
  color: #fff;
  background: rgba(10, 24, 16, 0.62);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.blog-card .card-title {
  position: relative;
  z-index: 1;
  background: rgba(26, 26, 26, 0.55);
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.35;
  padding: 1rem 1.25rem 1.15rem;
  margin: 0;
}
/* Muted fallback palettes for posts without a hero image (matches the design's blocks). */
.blog-card.tint-0 { background-color: #8ba178; }
.blog-card.tint-1 { background-color: #9678b0; }
.blog-card.tint-2 { background-color: #b08d78; }
.blog-card.tint-3 { background-color: #78a1b0; }
.blog-card.tint-4 { background-color: #c2996a; }
.blog-card.tint-5 { background-color: #6f9d92; }

.blog-pagination {
  display: flex;
  gap: 0.6rem;
  margin-top: 2.25rem;
}
.blog-pagination a,
.blog-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--green-700); /* CUB-232 */
  text-decoration: none;
}
.blog-pagination [aria-current="page"] {
  background: var(--lilac-500);
  color: var(--green-700);
}
.blog-pagination a:hover {
  background: var(--cream-100);
}

/* Post reader */
.post-hero-meta {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}
.post-hero-meta a {
  color: var(--purple-500);
  font-weight: 600;
  text-decoration: none;
}
.post-hero-meta a:hover {
  text-decoration: underline;
}
.prose h2,
.prose h3 {
  color: var(--green-700);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* Checklists & Guides cards: image block with an overlapping lilac panel. */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 1.75rem;
  align-items: stretch; /* CUB-255: equal-height panels across a row */
}
.guide-card {
  display: flex;
  flex-direction: column;
  min-width: 0; /* a long unbroken title must not widen its column */
}
.guide-card .guide-image {
  border-radius: var(--radius-md);
  min-height: 15.5rem;
  background-size: cover;
  background-position: center;
}
.guide-card .guide-panel {
  position: relative;
  z-index: 1;
  background: var(--lilac-500);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 16px rgba(77, 33, 109, 0.18);
  margin: -5.5rem 1rem 0;
  padding: 1.5rem 1.5rem 1.75rem;
  text-align: center;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.guide-card .guide-panel h2 {
  overflow-wrap: anywhere;
  color: var(--purple-700);
  font-size: 1.1875rem;
  margin-bottom: 0.5rem;
}
.guide-card .guide-panel p {
  color: var(--purple-700);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin-bottom: 1.1rem;
}
.guide-card .guide-panel .btn {
  margin-top: auto;
  align-self: center;
  background: #fff;
  color: var(--purple-700);
  box-shadow: 0 2px 6px rgba(77, 33, 109, 0.25);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}
.guide-card .guide-panel .btn:hover {
  background: var(--lilac-100);
}

@media (max-width: 63.9rem) {
  .blog-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .page-head {
    padding-top: 2.25rem;
  }
  .blog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .blog-search {
    flex: none;
    width: 100%;
    min-width: 0;
  }
}

/* The design's mobile chip row scrolls horizontally rather than wrapping. */
@media (max-width: 47.9rem) {
  .filter-chips {
    flex-wrap: nowrap;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
  }
  .filter-chips::-webkit-scrollbar { display: none; }
  .filter-chips a { flex-shrink: 0; }
}

/* Post hero: no dead band under the nav wave; images get a calm placeholder while loading. */
.post-hero-section {
  padding-top: 1.5rem;
  padding-bottom: 0;
}
.post-hero-section img,
.prose img {
  background: var(--cream-100);
}

/* ---- Post layout polish (Jake's review) ---- */
.back-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--lilac-100);
  color: var(--purple-700);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem 0.5rem 0.7rem;
  margin-bottom: 1.25rem;
}
.back-chip:hover {
  background: var(--lilac-500);
}
/* Numbered section headings: the number should carry the same weight as its heading. */
.prose ol {
  padding-left: 1.9em;
  margin: 2.25rem 0 0;
}
.prose ol > li::marker {
  font-weight: 900;
  font-size: 1.35rem;
  color: var(--green-700);
}
.prose ol > li > h2,
.prose ol > li > h3 {
  margin: 0;
}
.prose ol + p {
  margin-top: 0.6rem;
}
/* Branded tip callout. */
.prose .cubbi-tip {
  background: var(--lilac-100);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}
.prose .cubbi-tip a {
  color: var(--purple-700);
  font-weight: 600;
}
/* Calmer default rhythm between article blocks. */
.prose p {
  margin-block: 0 1.1em;
}

/* Post-end CTA: body copy in primary green (CUB-203). */
.post-cta h2 {
  color: var(--green-700);
}
.post-cta p {
  color: var(--green-700);
}
