/* Blog Hero Section — layered gradients, soft highlight */
.blog-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 92px 0 76px;
  text-align: center;
  background:
    radial-gradient(ellipse 125% 85% at 50% -25%, rgba(255, 255, 255, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 90% 70% at 105% 100%, rgba(12, 28, 24, 0.65) 0%, transparent 52%),
    radial-gradient(ellipse 75% 55% at -5% 85%, rgba(60, 130, 108, 0.4) 0%, transparent 48%),
    linear-gradient(148deg, #142922 0%, #1e4a3f 22%, #2d6b58 48%, #255e50 62%, #18332c 88%, #0f1f1b 100%);
}

.blog-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.07) 0%,
    transparent 38%,
    rgba(0, 0, 0, 0.12) 100%
  );
}

.blog-hero-inner {
  position: relative;
  z-index: 1;
}

.blog-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.25rem, 6.5vw, 3.35rem);
  font-weight: 700;
  margin: 0 0 1.1rem 0;
  color: #fff;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.blog-hero-subtitle {
  font-family: 'Cormorant Garamond', 'Source Serif Pro', Georgia, serif;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  font-weight: 500;
  line-height: 1.45;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 0.5rem;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.2);
}

/* Blog Post Hero (for single post) */
.blog-post-hero {
  padding: 20px 0;
  background: #f9fafb;
}

.blog-back-link {
  display: inline-block;
  color: #255e50;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.blog-back-link:hover {
  color: #1e4a3f;
  text-decoration: underline;
}

/* Blog Listing Section */
.blog-listing {
  padding: 60px 0;
  background: #fff;
}

.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

@media (max-width: 768px) {
  .blog-posts-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Blog Post Card */
.blog-post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.blog-post-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.blog-post-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #f3f4f6;
}

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

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

.blog-post-content {
  padding: 24px;
}

.blog-post-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #1f2937;
  line-height: 1.3;
}

.blog-post-date {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 12px 0;
}

.blog-post-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #4b5563;
  margin: 0;
}

/* Blog Post Content Section */
.blog-post-content-section {
  padding: 40px 0 80px;
  background: #fff;
}

.blog-post-article {
  max-width: 42rem;
  margin: 0 auto;
  background: #fff;
}

.blog-post-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.blog-post-article .blog-post-title {
  font-size: clamp(2rem, 5.5vw, 2.65rem);
  margin-bottom: 20px;
  color: #1f2937;
}

.blog-post-meta {
  display: flex;
  gap: 16px;
  font-size: 1rem;
  color: #6b7280;
}

.blog-post-featured-image {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 40px;
  background: #f3f4f6;
}

.blog-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Article prose — CSS variables normalize all CKEditor/Strapi inline font-* */
.blog-post-body {
  --blog-prose-font: 'Cormorant Garamond', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  /* Slightly tighter than before; identical for every post regardless of DB inline styles */
  --blog-prose-size: clamp(1.18rem, 2.4vw + 0.48rem, 1.38rem);
  --blog-prose-line: 1.72;
  --blog-prose-caption-size: clamp(0.94rem, 1.7vw, 1.03rem);

  font-family: var(--blog-prose-font);
  font-size: var(--blog-prose-size);
  line-height: var(--blog-prose-line);
  font-weight: 500;
  color: #1f2937;
  letter-spacing: 0.004em;
  -webkit-font-smoothing: antialiased;
}

/* Force one typography scale — inline font-size/font-family/font-weight on <div>/<span> lose to !important */
.blog-post-body :where(
    p,
    span,
    li,
    td,
    th,
    dd,
    dt,
    div,
    address,
    small,
    sub,
    sup,
    blockquote,
    a,
    em,
    i,
    b,
    strong,
    mark,
    u,
    cite,
    q,
    label,
    font,
    figcaption
  ):not(pre, pre *) {
  font-size: var(--blog-prose-size) !important;
  font-family: var(--blog-prose-font) !important;
  line-height: var(--blog-prose-line) !important;
  letter-spacing: 0.004em !important;
  color: inherit !important;
}

.blog-post-body
  :where(p, span, li, td, th, dd, dt, div, address, small, sub, sup, blockquote, a, em, i, mark, u, cite, q, label, font, figcaption):not(
    pre,
    pre *
  ) {
  font-weight: 500 !important;
}

.blog-post-body :where(strong, b, th) {
  font-weight: 600 !important;
}

.blog-post-body :where(h1, h2, h3, h4, h5, h6) {
  font-family: 'Playfair Display', serif !important;
  color: #111827 !important;
  font-weight: 600;
  line-height: 1.25;
}

.blog-post-body h1 {
  font-size: clamp(1.85rem, 5.2vw, 2.45rem) !important;
  margin: 2rem 0 1rem;
}

.blog-post-body h2 {
  font-size: clamp(1.65rem, 4.6vw, 2.15rem) !important;
  margin: 2.5rem 0 1rem;
}

.blog-post-body h3 {
  font-size: clamp(1.4rem, 3.6vw, 1.75rem) !important;
  margin: 2rem 0 0.75rem;
}

.blog-post-body h4 {
  font-size: clamp(1.25rem, 2.7vw, 1.45rem) !important;
  margin: 1.75rem 0 0.5rem;
}

.blog-post-body h5,
.blog-post-body h6 {
  font-size: clamp(1.1rem, 2.1vw, 1.28rem) !important;
  margin: 1.5rem 0 0.5rem;
}

.blog-post-body p {
  margin: 0 0 1.12rem;
}

.blog-post-body ul,
.blog-post-body ol {
  margin: 0 0 1.05rem;
  padding-left: 1.5rem;
}

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

.blog-post-body li::marker {
  color: #255e50;
}

.blog-post-body a {
  color: #255e50 !important;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color 0.2s;
}

.blog-post-body a:hover {
  color: #1e4a3f !important;
}

.blog-post-body a * {
  color: inherit !important;
}

.blog-post-body strong,
.blog-post-body b {
  color: #111827 !important;
}

.blog-post-body em,
.blog-post-body i {
  font-style: italic;
}

.blog-post-body hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

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

.blog-post-body figure {
  margin: 1.5rem 0;
}

.blog-post-body figcaption {
  margin-top: 0.55rem;
  font-size: var(--blog-prose-caption-size) !important;
  line-height: 1.55 !important;
  color: #6b7280 !important;
}

.blog-post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.blog-post-body th,
.blog-post-body td {
  border: 1px solid #e5e7eb;
  padding: 0.65rem 0.85rem;
  vertical-align: top;
}

.blog-post-body th {
  background: #f9fafb;
  color: #111827 !important;
  text-align: left;
}

.blog-post-body tbody tr:nth-child(even) {
  background: #fafafa;
}

.blog-post-body code {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace !important;
  font-size: 0.9em !important;
  background: #f3f4f6;
  color: #1f2937 !important;
  padding: 0.15em 0.45em;
  border-radius: 4px;
}

.blog-post-body pre {
  background: #1f2937;
  color: #f3f4f6 !important;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.9rem !important;
  line-height: 1.6 !important;
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace !important;
}

.blog-post-body pre,
.blog-post-body pre * {
  color: #f3f4f6 !important;
}

.blog-post-body pre code {
  background: transparent;
  padding: 0;
  font-size: inherit !important;
  font-family: inherit !important;
}

.blog-post-body blockquote {
  border-left: 4px solid #255e50;
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #4b5563 !important;
  background: linear-gradient(90deg, rgba(37, 94, 80, 0.06) 0%, transparent 100%);
  border-radius: 0 8px 8px 0;
}

.blog-post-body mark {
  background: #fef3c7;
  color: #1f2937 !important;
  padding: 0.05em 0.2em;
  border-radius: 2px;
}

/* Empty and Error States */
.empty-state,
.error-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state h3,
.error-state h2 {
  font-size: 24px;
  margin-bottom: 12px;
  color: #374151;
}

.empty-state p,
.error-state p {
  color: #6b7280;
  font-size: 16px;
}

/* Loading Spinner */
.loading-spinner {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

