/* ============================================================
   SINGLE POST — redesigned layout
   ============================================================ */

.post-hero {
  background-color: var(--brown);
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  padding: 7rem 5% 4rem;
}
.post-hero-inner { max-width: 700px; margin: 0 auto; text-align: center; }

.post-breadcrumb { font-size: 0.75rem; color: rgba(255,255,255,0.45); margin-bottom: 1.25rem; }
.post-breadcrumb a { color: rgba(255,255,255,0.45); text-decoration: none; transition: color 0.2s; }
.post-breadcrumb a:hover { color: var(--gold); }
.post-breadcrumb span { margin: 0 0.4rem; opacity: 0.4; }

.post-hero-cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.post-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin: 0.4rem 0 0;
}
.post-subhead {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  margin: 1rem 0 0;
}
.post-meta { display: flex; align-items: center; justify-content: center; gap: 0.6rem; margin-top: 1.25rem; font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.post-meta-dot { opacity: 0.4; }

.post-featured-img-wrap { max-width: 700px; margin: -2.5rem auto 0; padding: 0 5%; position: relative; z-index: 1; overflow: hidden; border-radius: var(--radius-lg); }
.post-featured-img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: block; transition: transform 0.35s ease; }
.post-featured-img-wrap:hover .post-featured-img { transform: scale(1.03); }

.post-body-wrap {
  background: var(--gold-wash);
  background-image:
    linear-gradient(rgba(196,87,42,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196,87,42,0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  padding: 4rem 5%;
}
.post-body {
  max-width: 700px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 3.25rem 3.75rem;
}

/* Reuse the existing single-post-content typography rules for the article body */
.post-body { font-size: 1rem; line-height: 1.85; color: var(--charcoal); }
.post-body h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--brown); margin: 2.5rem 0 1rem; }
.post-body p { margin-bottom: 1.25rem; }
.post-body ul, .post-body ol { padding-left: 1.5rem; margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.post-body li { line-height: 1.6; }
.post-body a { color: var(--terracotta); font-weight: 500; }
.post-body a:hover { color: var(--terracotta-dark); }
.post-body strong { color: var(--brown); }

.post-body figure.wp-block-image {
  max-width: 380px;
  margin: 2rem auto;
  overflow: hidden;
  border-radius: var(--radius);
}
.post-body figure.wp-block-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.post-body figure.wp-block-image:hover img {
  transform: scale(1.04);
  box-shadow: var(--shadow-lg);
}
.post-body figure.wp-block-image figcaption {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

/* Reusable content components — hand-placed in post_content where they fit, like pull-quotes */

/* Quick-answer / TLDR callout */
.post-tldr {
  background: var(--gold-tint);
  border-left: 4px solid var(--terracotta);
  border-radius: var(--radius-sm);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}
.post-tldr-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta-dark);
  margin: 0 0 0.5rem;
}
.post-tldr p { font-size: 1rem; color: var(--brown); line-height: 1.6; margin: 0; }
.post-tldr p:not(:last-child) { margin-bottom: 0.6rem; }

/* Comparison table */
.post-table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(196,87,42,0.15);
}
.post-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.post-table thead tr { background: var(--brown); }
.post-table thead th {
  padding: 0.85rem 1.1rem;
  text-align: left;
  color: var(--white);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.post-table tbody tr:nth-child(even) { background: var(--gold-wash); }
.post-table tbody tr:nth-child(odd) { background: var(--white); }
.post-table tbody td { padding: 0.75rem 1.1rem; border-bottom: 1px solid rgba(196,87,42,0.08); color: var(--charcoal); }
.post-table tbody tr:last-child td { border-bottom: none; }

/* Numbered steps */
.post-steps { margin: 2.25rem 0; display: flex; flex-direction: column; gap: 1.25rem; }
.post-step { display: flex; gap: 1rem; align-items: flex-start; }
.post-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}
.post-step-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--brown); margin: 0.25rem 0 0.3rem; }
.post-step-text { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

@media (max-width: 480px) {
  .post-tldr { padding: 1.25rem 1.4rem; margin: 1.5rem 0; }
  .post-table thead th, .post-table tbody td { padding: 0.6rem 0.75rem; }
}

@media (max-width: 480px) {
  .post-body figure.wp-block-image { max-width: 280px; }
}

/* Pull-quote — hand-placed inside post_content as <div class="post-pull-quote">…</div> */
.post-pull-quote {
  position: relative;
  text-align: center;
  padding: 2.5rem 2rem 2.75rem;
  margin: 3rem -3.75rem;
  border-top: 1px solid rgba(196,87,42,0.15);
  border-bottom: 1px solid rgba(196,87,42,0.15);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-style: italic;
  color: var(--brown);
  line-height: 1.4;
}
.post-pull-quote::before {
  content: '\201C';
  display: block;
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--terracotta);
  opacity: 0.5;
  margin-bottom: 0.25rem;
  font-style: normal;
}

/* Lead magnet opt-in — floating popup, triggered by scroll/idle via afc-blog-filter.js */
.post-optin-popup {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--gold-tint);
  border: 1px solid rgba(232,168,48,0.4);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.75rem;
  z-index: 999;
  transform: translateX(140%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s ease, opacity 0.45s ease;
}
.post-optin-popup.is-visible { transform: translateX(0); opacity: 1; pointer-events: auto; }
.post-optin-popup-close {
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
  border: none;
  background: none;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
}
.post-optin-popup-close:hover { color: var(--brown); }
.post-optin-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--terracotta); margin: 0 0 0.4rem; }
.post-optin-popup h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--brown); margin: 0 0 0.5rem; }
.post-optin-popup > p { font-size: 0.83rem; color: var(--text-muted); line-height: 1.55; margin: 0 0 1rem; }
.post-optin-form { display: flex; flex-direction: column; gap: 0.6rem; }
.post-optin-form input[type="email"] {
  border: 1px solid rgba(196,87,42,0.25);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--white);
}
.post-optin-form input[type="email"]:focus { outline: none; border-color: var(--terracotta); }
.post-optin-form .btn { font-size: 0.8rem; text-align: center; }
.post-optin-form .btn:disabled { opacity: 0.6; cursor: default; }
.post-optin-privacy { font-size: 0.7rem; color: var(--text-muted); margin: 0; text-align: center; }

/* Author signature line, doubles as the post's closing CTA */
.post-author-box {
  border-top: 1px solid rgba(196,87,42,0.15);
  padding-top: 1.25rem;
  margin-top: 2.5rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.post-author-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--white); box-shadow: 0 2px 10px rgba(59,31,14,0.15); }
.post-author-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 0.35rem;
}
.post-author-info h4 { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; color: var(--brown); margin: 0 0 0.3rem; }
.post-author-info p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; margin: 0; }
.post-author-cta-line { margin-top: 0.6rem !important; }
.post-author-cta { font-size: 0.8rem; font-weight: 600; color: var(--terracotta); text-decoration: none; }
.post-author-cta:hover { color: var(--terracotta-dark); }
.post-author-cta-dot { color: rgba(196,87,42,0.3); margin: 0 0.4rem; }

/* Related posts */
.post-related { background: var(--cream); padding: 4rem 5%; border-top: 2px solid rgba(196,87,42,0.15); }
.post-related-inner { max-width: 860px; margin: 0 auto; }
.post-related-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(196,87,42,0.15);
}
.post-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) {
  .post-related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .post-body { padding: 2rem 1.5rem; border-radius: var(--radius); }
  .post-body-wrap { padding: 2.5rem 4%; }
  .post-pull-quote { margin: 2.5rem -1.5rem; padding: 2rem 1.5rem; }
  .post-author-box { flex-direction: column; text-align: center; align-items: center; }
  .post-related-grid { grid-template-columns: 1fr; }

  /* On small screens, slide up from the bottom edge-to-edge instead of in from the right */
  .post-optin-popup {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: none;
    transform: translateY(140%);
  }
  .post-optin-popup.is-visible { transform: translateY(0); }
}
