/* ── Blog-specific styles — extends main styles.css ─────────────────────── */

/* ── Layout ─────────────────────────────────────────────────────────────── */
.blog-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(100px, 12vw, 140px) clamp(18px, 5vw, 60px) clamp(60px, 8vw, 100px);
}

/* ── Blog hero ───────────────────────────────────────────────────────────── */
.blog-hero {
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 64px);
}

.blog-hero h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 700;
  line-height: 1.08;
  margin: 8px 0 16px;
  color: var(--ink);
}

.blog-hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
}

/* ── Tag pills ───────────────────────────────────────────────────────────── */
.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 36px;
}

.tag-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(24, 33, 28, 0.14);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-decoration: none;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}

.tag-pill:hover,
.tag-pill.active {
  background: var(--pine);
  border-color: var(--pine);
  color: #fff;
}

.tag-pill.small {
  padding: 3px 10px;
  font-size: 0.74rem;
}

.blog-filter-notice {
  text-align: center;
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 0.95rem;
}

.blog-filter-notice a {
  color: var(--clay);
  text-decoration: underline;
}

/* ── Blog grid ───────────────────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 3vw, 28px);
  margin-bottom: 48px;
}

/* ── Blog card ───────────────────────────────────────────────────────────── */
.blog-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 33, 28, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(24, 33, 28, 0.13);
}

.blog-card.featured {
  grid-column: span 3;
  flex-direction: row;
}

.blog-card.featured .blog-card-img {
  flex: 1.4;
  aspect-ratio: unset;
  min-height: 340px;
}

.blog-card.featured .blog-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 48px);
}

.blog-card.featured h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.blog-card-img {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 440ms ease;
}

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

.blog-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

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

.blog-card h2,
.blog-card h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.blog-card h2 a,
.blog-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.blog-card h2 a:hover,
.blog-card h3 a:hover {
  color: var(--fern);
}

.blog-card-excerpt {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  display: flex;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: auto;
  padding-top: 6px;
}

.blog-read-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--clay);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.blog-read-more:hover {
  color: var(--fern);
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.page-btn {
  padding: 9px 20px;
  border: 1px solid rgba(24, 33, 28, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 200ms ease, border-color 200ms ease;
}

.page-btn:hover {
  background: var(--pine);
  border-color: var(--pine);
  color: #fff;
}

/* ── Blog empty ──────────────────────────────────────────────────────────── */
.blog-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}

/* ── Single post ─────────────────────────────────────────────────────────── */
.post-article {
  max-width: 780px;
  margin: 0 auto;
}

.post-back {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.post-back:hover {
  color: var(--clay);
}

.post-header {
  margin-bottom: 32px;
}

.post-header h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 12px 0 16px;
  color: var(--ink);
}

.post-meta {
  display: flex;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}

.post-cover {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}

.post-cover img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

/* ── Post body typography ────────────────────────────────────────────────── */
.post-body {
  font-size: clamp(1rem, 1.6vw, 1.13rem);
  line-height: 1.8;
  color: var(--ink);
}

.post-body p {
  margin: 0 0 1.4em;
}

.post-body h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  margin: 2em 0 0.5em;
  color: var(--ink);
}

.post-body h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 600;
  margin: 1.6em 0 0.4em;
}

.post-body ul,
.post-body ol {
  padding-left: 1.4em;
  margin-bottom: 1.4em;
}

.post-body li {
  margin-bottom: 0.5em;
}

.post-body blockquote {
  border-left: 4px solid var(--honey);
  padding: 12px 20px;
  margin: 1.6em 0;
  background: rgba(201, 144, 55, 0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--muted);
}

.post-body img {
  width: 100%;
  border-radius: var(--radius);
  margin: 1.6em 0;
  box-shadow: 0 12px 40px rgba(24, 33, 28, 0.1);
}

.post-body a {
  color: var(--fern);
  text-decoration: underline;
}

.post-body a:hover {
  color: var(--clay);
}

/* ── Post footer ─────────────────────────────────────────────────────────── */
.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(24, 33, 28, 0.1);
}

.post-share {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.post-share a {
  color: var(--fern);
  font-weight: 600;
  text-decoration: none;
}

.post-share a:hover {
  color: var(--clay);
}

/* ── Related posts ───────────────────────────────────────────────────────── */
.related-posts {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid rgba(24, 33, 28, 0.08);
}

.related-posts h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin-bottom: 28px;
}

.related-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ── Prev / Next navigation ─────────────────────────────────────────────── */
.post-prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(24, 33, 28, 0.08);
}

.prev-next-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid rgba(24, 33, 28, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.prev-next-link:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--moss);
  transform: translateY(-2px);
}

.next-link {
  text-align: right;
}

.pn-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pn-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

/* ── Not found ───────────────────────────────────────────────────────────── */
.post-not-found {
  text-align: center;
  padding: 80px 20px;
}

.post-not-found h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 3rem;
  margin-bottom: 16px;
}

/* ── Active nav link ─────────────────────────────────────────────────────── */
.nav-active {
  color: var(--clay) !important;
  font-weight: 700;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-card.featured {
    grid-column: span 2;
    flex-direction: column;
  }

  .blog-card.featured .blog-card-img {
    min-height: unset;
    aspect-ratio: 16 / 10;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .blog-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .blog-card.featured {
    grid-column: span 1;
  }

  .post-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
