/* ================================================================
   BLOG & ARTICLE STYLES
   ================================================================ */

/* ── Blog Header / Hero ── */
.blog-hero {
  background: var(--ink-deep);
  padding-block: clamp(4rem, 8vw, 6rem);
  text-align: center;
}
.blog-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: #fff;
  margin-bottom: 1rem;
}
.blog-hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.6);
  max-width: 50ch;
  margin-inline: auto;
}

/* ── Blog Toolbar (Search & Filter) ── */
.blog-toolbar {
  padding-block: 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.bt-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.bt-search {
  position: relative;
  flex: 1;
  max-width: 350px;
}
.bt-search input {
  width: 100%;
  padding: .7rem 1rem .7rem 2.5rem;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-family: var(--f-body);
  font-size: .9rem;
  outline: none;
  transition: all .2s;
}
.bt-search input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.bt-search svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--slate-lt);
}
.bt-tags {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.bt-tag {
  padding: .4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--slate);
  cursor: pointer;
  transition: all .2s;
  background: var(--white);
}
.bt-tag:hover {
  background: var(--cream);
  border-color: var(--slate-lt);
}
.bt-tag.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ── Blog Grid ── */
.blog-grid-sec {
  padding-block: clamp(3rem, 6vw, 5rem);
  background: var(--off-white);
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.blog-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  transition: transform .25s var(--ease), box-shadow .25s;
  overflow: hidden;
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(15,30,53,.08);
}
.bc-img-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.bc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.blog-card:hover .bc-img {
  transform: scale(1.05);
}
.bc-content-wrap {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.bc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.bc-tag {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  padding: .25rem .75rem;
  border-radius: 100px;
}
.bc-time {
  font-size: .75rem;
  color: var(--slate-lt);
}
.bc-title {
  font-family: var(--f-head);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .75rem;
  line-height: 1.25;
}
.bc-title a {
  color: inherit;
}
.bc-title a::before {
  content: '';
  position: absolute;
  inset: 0;
}
.bc-exc {
  font-size: .9375rem;
  color: var(--slate);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}
.bc-read {
  font-size: .875rem;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  position: relative; /* relative for z-index above absolute link */
  z-index: 1;
}
.bc-read:hover {
  color: var(--gold);
}

.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 0;
  color: var(--slate);
}

/* ── Single Post Layout ── */
.post-header {
  padding-block: clamp(4rem, 8vw, 6rem);
  background: var(--ink-deep);
  color: #fff;
  text-align: center;
}
.post-header-inner {
  max-width: 800px;
  margin-inline: auto;
  padding-inline: var(--gx);
}
.ph-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: .875rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 1.5rem;
}
.ph-meta span {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.ph-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1.5rem;
}
.ph-tags {
  display: flex;
  justify-content: center;
  gap: .5rem;
}

.post-banner {
  width: 100%;
  max-width: 1000px;
  margin: -3rem auto 0; /* pulls image up into the dark header slightly */
  padding-inline: var(--gx);
  position: relative;
  z-index: 2;
}
.post-banner img {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.15);
  display: block;
}

.post-body {
  padding-block: clamp(3rem, 6vw, 5rem);
  background: #fff;
}
.post-content {
  max-width: 720px;
  margin-inline: auto;
  padding-inline: var(--gx);
  font-size: 1.125rem;
  color: var(--body-txt);
  line-height: 1.8;
}

/* Rich Text Formatting */
.post-content h2 {
  font-size: 2.25rem;
  color: var(--ink);
  margin-top: 3rem;
  margin-bottom: 1rem;
}
.post-content h3 {
  font-size: 1.5rem;
  color: var(--ink);
  margin-top: 2rem;
  margin-bottom: .75rem;
}
.post-content p {
  margin-bottom: 1.5rem;
}
.post-content ul, .post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}
.post-content li {
  margin-bottom: .5rem;
}
.post-content a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.post-content a:hover {
  color: var(--ink);
}
.post-content blockquote {
  border-left: 4px solid var(--gold);
  padding-left: 1.5rem;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--slate);
  margin-block: 2rem;
}
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-block: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

/* Author Box */
.post-author {
  max-width: 720px;
  margin-inline: auto;
  margin-top: 4rem;
  padding: 2rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.pa-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.pa-info h4 {
  font-family: var(--f-head);
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: .25rem;
}
.pa-info p {
  font-size: .9rem;
  color: var(--slate);
  margin-bottom: 0;
}

/* ── Latest Insights (Homepage) ── */
.home-insights {
  padding-block: var(--sec);
  background: var(--off-white);
}
.hi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
}
.hi-header h2 {
  margin-bottom: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .hi-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .post-author {
    flex-direction: column;
    text-align: center;
  }
}
