/* ============================================================
   Budgley Byline — Blog Styles
   ============================================================ */

/* Blog hero */
.blog-hero {
  background: linear-gradient(135deg, #fff9f5 0%, #fff 100%);
  padding: 64px 24px 48px;
  text-align: center;
  border-bottom: 1px solid #f0ebe6;
}

.blog-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.blog-hero p {
  font-size: 1.1rem;
  color: #6b7280;
  max-width: 500px;
  margin: 0 auto;
}

/* Blog listing */
.blog-listing {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

/* Post card */
.post-card {
  background: #fff;
  border: 1px solid #f0ebe6;
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  position: relative;
}

.post-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.post-card-has-image {
  padding: 0;
  gap: 0;
}

.post-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.post-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .post-card-image img {
  transform: scale(1.04);
}

.post-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 24px 24px;
  flex: 1;
}

.post-card:not(.post-card-has-image) .post-card-body {
  padding: 0;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  display: inline-block;
  padding: 3px 10px;
  background: #fff4ed;
  color: var(--orange, #E8751A);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.post-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.35;
  margin: 0;
}

.post-card p {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.post-card-meta {
  font-size: 0.8rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-card-meta .read-more {
  color: var(--orange, #E8751A);
  font-weight: 600;
  font-size: 0.82rem;
}

/* Empty state */
.blog-empty {
  text-align: center;
  padding: 80px 24px;
  color: #9ca3af;
}

.blog-empty h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 8px;
}

/* Blog loading skeleton */
.blog-loading {
  display: flex;
  justify-content: center;
  padding: 80px 24px;
  color: #9ca3af;
  font-size: 0.95rem;
}

/* ============================================================
   Single Post Page
   ============================================================ */

/* Post cover image (single post page) */
.post-cover-image {
  max-width: 780px;
  margin: 24px auto 0;
  padding: 0 24px;
}

.post-cover-image img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 14px;
}

.post-breadcrumb {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 24px 0;
  font-size: 0.85rem;
  color: #9ca3af;
}

.post-breadcrumb a {
  color: var(--orange, #E8751A);
  text-decoration: none;
  font-weight: 500;
}

.post-breadcrumb a:hover { text-decoration: underline; }
.post-breadcrumb span { margin: 0 6px; }

.post-article {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.post-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #f0ebe6;
}

.post-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: #9ca3af;
}

.post-author { font-weight: 600; color: #6b7280; }

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

/* Post content (rendered markdown) */
.post-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #374151;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  font-weight: 700;
  color: #1a1a1a;
  margin: 2em 0 0.5em;
  letter-spacing: -0.01em;
}

.post-content h1 { font-size: 1.75rem; }
.post-content h2 { font-size: 1.375rem; }
.post-content h3 { font-size: 1.125rem; }
.post-content h4 { font-size: 1rem; }

.post-content p { margin: 1em 0; }

.post-content ul,
.post-content ol {
  padding-left: 1.5em;
  margin: 1em 0;
}

.post-content li { margin: 0.35em 0; }

.post-content a {
  color: var(--orange, #E8751A);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:hover { text-decoration: none; }

.post-content code {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.875em;
  color: #111827;
}

.post-content pre {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin: 1.5em 0;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: #111827;
}

.post-content blockquote {
  border-left: 3px solid var(--orange, #E8751A);
  margin-left: 0;
  padding: 4px 0 4px 20px;
  color: #6b7280;
  font-style: italic;
}

.post-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1em 0;
}

.post-content hr {
  border: none;
  border-top: 1px solid #f0ebe6;
  margin: 2em 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9rem;
}

.post-content th,
.post-content td {
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.post-content th {
  background: #f9fafb;
  font-weight: 600;
}

/* Post not found */
.post-not-found {
  max-width: 780px;
  margin: 80px auto;
  padding: 0 24px;
  text-align: center;
}

.post-not-found h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.post-not-found p {
  color: #6b7280;
  margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-hero { padding: 48px 20px 36px; }
  .post-article { padding: 24px 20px 60px; }
}
