/* ===================================================================
   BLOG — page-specific styles
   ================================================================== */

/* HERO */
.blog-hero {
  padding: 120px clamp(1.5rem, 8vw, 8rem) clamp(3rem, 5vw, 4rem);
  background: var(--cream);
  text-align: center;
}
.blog-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
.blog-hero p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 50ch;
  margin: 0 auto;
  opacity: 0;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

/* FILTERS */
.blog-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 clamp(1.5rem, 8vw, 8rem);
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 0.5rem 1.1rem;
  border-radius: 100px;
  border: 1px solid rgba(47, 39, 31, 0.12);
  background: transparent;
  color: var(--ink-soft);
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}
.filter-btn:hover {
  background: var(--beige);
}
.filter-btn.active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.blog-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 100px;
  border: 1px solid rgba(47, 39, 31, 0.12);
  background: transparent;
  margin-left: 0.5rem;
}
.blog-search input {
  border: none;
  background: none;
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  outline: none;
  color: var(--ink);
  width: 140px;
}
.blog-search svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

/* FEATURED */
.featured {
  padding: 0 clamp(1.5rem, 8vw, 8rem);
  margin-bottom: 3rem;
}
.featured-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s ease;
  cursor: pointer;
}
.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(47, 39, 31, 0.1);
}
.featured-img {
  background: var(--beige);
  min-height: 360px;
  position: relative;
  overflow: hidden;
}
.featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 4s ease;
}
.featured-card:hover .featured-img img {
  transform: scale(1.04);
}
.featured-body {
  padding: clamp(2rem, 3vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 1rem;
}
.featured-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--indigo);
}
.featured-body h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.featured-body p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}
.featured-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.featured-meta .divider {
  width: 1px;
  height: 14px;
  background: rgba(47, 39, 31, 0.15);
}
.featured-meta .tag-pill {
  background: rgba(50, 66, 143, 0.06);
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-size: 0.7rem;
  color: var(--indigo);
  font-weight: 600;
}

/* POSTS GRID */
.posts-section {
  padding: 0 clamp(1.5rem, 8vw, 8rem);
  margin-bottom: 3rem;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
  grid-column: 1 / -1;
}
.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s ease;
  cursor: pointer;
  border: 1px solid rgba(47, 39, 31, 0.04);
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(47, 39, 31, 0.08);
}
.post-thumb {
  height: 200px;
  background: var(--beige);
  position: relative;
  overflow: hidden;
}
.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 4s ease;
}
.post-card:hover .post-thumb img {
  transform: scale(1.04);
}
.post-type-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
  color: #fff;
}
.post-type-badge.article {
  background: rgba(50, 66, 143, 0.85);
}
.post-type-badge.podcast {
  background: rgba(45, 138, 86, 0.85);
}
.post-type-badge.video {
  background: rgba(192, 57, 43, 0.85);
}
.post-duration {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
}
.post-body {
  padding: 1.25rem;
}
.post-tags {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.post-tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  background: rgba(50, 66, 143, 0.06);
  color: var(--indigo);
}
.post-body h3 {
  font-size: 1.05rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.post-body p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}
.post-meta-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.post-author-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cream-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--ink-soft);
}

/* NEWSLETTER */
.newsletter {
  background: var(--ink);
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 8vw, 8rem);
  text-align: center;
}
.newsletter h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 0.5rem;
}
.newsletter > div > p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  max-width: 440px;
  margin: 0 auto;
}
.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s;
}
.newsletter-form input:focus {
  border-color: rgba(255, 255, 255, 0.4);
}
.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}
.newsletter-form button {
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  border: none;
  background: var(--cream);
  color: var(--ink);
  font-family: "Archivo Black", sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.newsletter-form button:hover {
  background: #fff;
  transform: translateY(-2px);
}

/* LOAD MORE */
.load-more-wrap {
  text-align: center;
  padding: 2rem 0;
}
.load-more {
  padding: 0.7rem 2rem;
  border-radius: 100px;
  border: 1px solid rgba(47, 39, 31, 0.15);
  background: transparent;
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.load-more:hover {
  background: var(--beige);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
  .featured-img {
    min-height: 240px;
  }
}

@media (max-width: 600px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .blog-search {
    margin-left: 0;
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
  }
  .blog-search input {
    width: 100%;
  }
  /* Bump filter pill height to meet 44px touch target on mobile (WCAG). */
  .filter-btn {
    min-height: 44px;
  }
}

/* ===================================================================
   POST DETAIL PAGE  (/blog-post.html?slug=…)
   ================================================================== */
.post-page {
  max-width: 760px;
  margin: 0 auto;
  /* Fixed nav is 72px tall — pad enough to clear it plus breathing room. */
  padding: 9rem 1.5rem 5rem;
}

.post-back {
  display: inline-flex;
  align-items: center;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 200ms ease;
}
.post-back:hover { color: var(--indigo); }

.post-state {
  padding: 3rem 1rem;
  text-align: center;
}
.post-state .empty-state.error {
  color: var(--red);
}

.post-header { margin-bottom: 2rem; }

.post-header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.post-header-meta .post-divider { color: rgba(47, 39, 31, 0.25); }

.post-article h1 {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(1.85rem, 4.5vw, 2.6rem);
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 1rem;
  letter-spacing: -0.005em;
}

.post-excerpt {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
  font-weight: 400;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(47, 39, 31, 0.08);
  border-bottom: 1px solid rgba(47, 39, 31, 0.08);
  margin-bottom: 2rem;
}
.post-author-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}
.post-author-role {
  font-size: 0.78rem;
  color: var(--muted);
}

.post-cover {
  margin: 0 0 2.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.post-cover img {
  display: block;
  width: 100%;
  height: auto;
}

.post-media { margin-bottom: 2rem; }
.post-media-video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.post-media-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.post-media-audio {
  width: 100%;
}

.post-body {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
}
.post-body h2 {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  margin: 2.5rem 0 1rem;
  color: var(--ink);
  letter-spacing: 0.005em;
}
.post-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.75rem 0 0.6rem;
  color: var(--ink);
}
.post-body p { margin: 0 0 1.1rem; color: var(--ink-soft); }
.post-body ul, .post-body ol { margin: 0 0 1.2rem; padding-left: 1.5rem; color: var(--ink-soft); }
.post-body li { margin-bottom: 0.5rem; }
.post-body a {
  color: var(--indigo);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-body a:hover { color: var(--indigo-deep); text-decoration: none; }
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.3rem;
  border-left: 3px solid var(--indigo);
  background: var(--cream);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--ink-soft);
}
.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-md);
}
.post-body code {
  background: var(--cream);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(47, 39, 31, 0.08);
  text-align: center;
}
.post-cta {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--ink);
  color: var(--cream);
  font-family: "Archivo Black", sans-serif;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.post-cta:hover {
  background: var(--indigo);
  color: var(--white);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .post-page { padding: 7rem 1.2rem 3.5rem; }
}

/* The grid post cards already use cursor:pointer; make sure they look
   tappable. Also expose a focus state for keyboard navigation. */
.post-card { cursor: pointer; }
.post-card:focus-within {
  outline: 2px solid var(--indigo);
  outline-offset: 4px;
}
