/* ==========================================================================
   Rain City Pro - Post Styles
   Wide content, TOC sidebar grid, image-float, tables
   ========================================================================== */

/* ---------- Post Header ---------- */
.post-header {
  max-width: var(--content-width);
  margin: 0 auto 1.5rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.post-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0;
}

.post-excerpt {
  max-width: var(--content-width);
  margin: 0 auto 2rem;
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}

/* ---------- Feature Image ---------- */
.post-feature-image {
  max-width: var(--content-width);
  margin: 0 auto 2.5rem;
  border-radius: 0;
  overflow: hidden;
}

.post-feature-image img {
  width: 100%;
  height: auto;
}

/* ---------- Post Content ---------- */
.post-content {
  max-width: var(--content-width);
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
}

.post-content h2 {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.post-content h3 {
  margin-top: 2rem;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.25em;
}

.post-content li {
  margin-bottom: 0.375em;
}

.post-content li > ul,
.post-content li > ol {
  margin-top: 0.375em;
  margin-bottom: 0;
}

.post-content a {
  text-decoration: none;
  color: var(--accent-light);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast);
}

.post-content a:hover {
  border-bottom-color: var(--accent);
}

.post-content img {
  border-radius: 0;
}

/* ---------- Image Float Classes ---------- */
.img-float-left,
.img-float-right {
  max-width: 45%;
  margin-bottom: 1rem;
}

.img-float-left {
  float: left;
  margin-right: 1.5rem;
}

.img-float-right {
  float: right;
  margin-left: 1.5rem;
}

/* ---------- Post Footer ---------- */
.post-footer {
  max-width: var(--post-content-width);
  margin: 2rem auto 0;
}

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

.post-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.post-footer .share-buttons {
  padding: 0;
  border: none;
}

.post-footer .helpful-section {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.post-footer .helpful-section p {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.post-footer .helpful-buttons {
  margin: 0;
}

.post-footer .helpful-btn {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
}

.post-footer .helpful-btn svg {
  width: 14px;
  height: 14px;
}

.post-footer .helpful-thanks {
  font-size: 0.75rem;
  margin-top: 0;
}

/* ---------- Ghost Width Classes ---------- */
.post-content .kg-width-wide {
  max-width: var(--content-width);
  margin-left: calc((var(--post-content-width) - var(--content-width)) / 2);
  margin-right: calc((var(--post-content-width) - var(--content-width)) / 2);
}

.post-content .kg-width-full {
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* ---------- Responsive ---------- */
@media (max-width: 639px) {
  .toc-content .toc-list {
    column-count: 1;
  }

  .post-title {
    font-size: 1.75rem;
  }

  .post-excerpt {
    font-size: 0.9375rem;
  }

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

  .img-float-left,
  .img-float-right {
    float: none;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .post-content .kg-width-wide {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    max-width: calc(100% + 3rem);
  }

  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
