/* public/css/blog.css — Blog Listing & Post Page Styles
   Extracted from views/pages/blog.ejs and views/pages/post.ejs */

/* ── Blog listing section ────────────────────────────────────────────────── */

.blog-listing-section {
  padding: 60px 0;
}

/* ── Blog card components ────────────────────────────────────────────────── */

.blog-card-img {
  object-fit: cover;
  height: 220px;
}

.blog-card-date {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 8px;
}

.blog-card-excerpt {
  color: #c3c3c3;
  flex-grow: 1;
}

/* "Read More" anchor styled as a teal button */
.blog-card-link {
  background-color: #007480;
  color: #fff;
  align-self: flex-start;
}

.blog-card-link:hover {
  background-color: #005f6b;
  color: #fff;
}

/* ── Infinite scroll UI elements ─────────────────────────────────────────── */

/* Initial hidden state for JS-controlled spinner and end-of-posts message.
   JavaScript overrides this with element.style.display to show/hide. */
.blog-state-hidden {
  display: none;
}

/* Spinner inner icon colour */
.blog-spinner-color {
  color: #007480;
}

/* "You've reached the end" message text */
.blog-end-text {
  color: #888;
}

/* "Get more articles" button */
.blog-load-more-btn {
  background-color: var(--ona-teal);
  color: #fff;
}

.blog-load-more-btn:hover {
  background-color: #005f6b;
  color: #fff;
}

/* ── Single post page ────────────────────────────────────────────────────── */

.post-section {
  padding: 60px 0 80px;
}

.post-back-link {
  color: #007480;
  font-size: 0.9rem;
}

.post-back-link:hover {
  color: #005f6b;
}

.post-meta-row {
  gap: 16px;
  color: #888;
  font-size: 0.85rem;
}

.post-meta-icon {
  color: #007480;
}

.post-hero-img {
  max-height: 480px;
  object-fit: cover;
}

.post-divider {
  border-color: #007480;
  margin-top: 48px;
}

.post-cta-block {
  border-top: 1px solid rgba(0, 116, 128, 0.25);
  border-bottom: 1px solid rgba(0, 116, 128, 0.25);
}

/* ── Portable Text body styles ───────────────────────────────────────────── */

/* Wrapper for all Portable Text output — bare elements (h2, p, ul, etc.)
   have no class attributes so descendant selectors are the only styling hook */
.post-body {
  color: #c3c3c3;
  line-height: 1.8;
  font-size: 1.05rem;
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
  color: #007480;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-body p {
  margin-bottom: 1.25rem;
}

.post-body a {
  color: #D1B49C;
  text-decoration: underline;
}

.post-body a:hover {
  color: #fff;
}

.post-body ul,
.post-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.post-body li {
  margin-bottom: 0.4rem;
}

.post-body blockquote {
  border-left: 3px solid #007480;
  padding-left: 1rem;
  margin-left: 0;
  color: #888;
  font-style: italic;
}

.post-body img {
  max-width: 100%;
  border-radius: 4px;
  margin: 1.5rem 0;
}

.post-body pre,
.post-body code {
  background-color: #111;
  color: #D1B49C;
  border-radius: 4px;
  font-size: 0.9rem;
}

.post-body pre {
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.post-body code {
  padding: 0.1em 0.4em;
}
