/* ============================================================
   CFHTW — pages.css
   Page-specific styles: blog, news aggregator, post body
   ============================================================ */

/* ── Hero Image Block (full-width, uncropped, with caption) ── */
.hero-image-block {
  width: 100%;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.hero-image-block img {
  display: block;
  width: 100%;
  height: auto;        /* fully uncropped — natural aspect ratio */
  max-height: none;
  object-fit: unset;
}

.hero-image-caption {
  padding: 0.6rem 1.5rem;
  font-size: 0.775rem;
  color: var(--text-dim);
  font-style: italic;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  letter-spacing: 0.01em;
}

/* ── Blog Listing ─────────────────────────────────────────── */
.blog-header {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.blog-header h1 {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.blog-header p {
  color: var(--text-muted);
  max-width: 480px;
}

.blog-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0 2.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.3em 0.9em;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Blog Post Body ───────────────────────────────────────── */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  padding: 3rem 0 5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .post-layout { grid-template-columns: 1fr; }
}

.post-header {
  padding: 4rem 0 0;
}

.post-header .post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.post-header h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.post-feature-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 0;
  border: 1px solid var(--border);
}

.post-body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 680px;
}

.post-body h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
}

.post-body h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
}

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

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }

.post-body li { margin-bottom: 0.5rem; color: var(--text); }

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--bg-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-body blockquote p {
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

.post-body img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.post-comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-comments h3 {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── News Aggregator Page ─────────────────────────────────── */
.news-header {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.news-header h1 {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.news-header p { color: var(--text-muted); max-width: 540px; }

.news-api-note {
  margin-top: 2rem;
  padding: 0.75rem 1rem;
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.25);
  border-radius: var(--radius);
  font-size: 0.825rem;
  color: var(--warn);
}

/* ── Project Overview ─────────────────────────────────────── */
.project-overview {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.project-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}
