/* ═══════════════════════════════════════
   BLOG.CSS — Out Shine Web Design
   Shared styles for the blog listing page and individual posts.
   Listing: notes taped to a blush board. Posts: a long letter
   on the ruled sheet, set for comfortable reading.
═══════════════════════════════════════ */

/* ── BLOG HERO (listing page) ── (ruled sheet comes from main.css) */
.blog-hero { padding: 5rem 5rem 4.5rem 6rem; }
.blog-hero .hero-title { margin-bottom: 1.25rem; font-size: clamp(2.6rem, 4.8vw, 4.4rem); }
.blog-hero .lead { font-size: 1.12rem; }

/* ── BLOG GRID (listing page) — reuses .hero-work-card* from index.css ── */
.blog-section {
  background: var(--tint);
  padding: var(--section-pad);
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 1rem;
}
.blog-grid .hero-work-card { position: relative; overflow: visible; }
.blog-grid .hero-work-card:nth-child(odd) { transform: rotate(-0.8deg); }
.blog-grid .hero-work-card:nth-child(even) { transform: rotate(0.8deg); }
.blog-grid .hero-work-card:hover { transform: rotate(0) translateY(-6px); }
.blog-grid .hero-work-card::before {
  content: '';
  position: absolute;
  top: -12px; left: 50%;
  z-index: 2;
  width: 80px; height: 22px;
  margin-left: -40px;
  background: rgba(var(--blush-rgb), .85);
  transform: rotate(-2deg);
}
/* Illustration panel: navy field, blush line art */
.blog-grid .hero-work-card-image {
  aspect-ratio: 16 / 9;
  background: var(--teal);
  border-radius: 6px 6px 0 0;
}
.blog-grid .hero-work-card-image svg {
  width: 32%;
  height: auto;
  color: var(--blush);
}
.blog-grid .hero-work-card-body { text-align: left; padding: 1.75rem 2rem 2rem; }
.blog-grid .hero-work-card-name { font-size: 1.55rem; margin-bottom: 0.75rem; }
.blog-card-excerpt {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

/* ── POST HERO (individual post pages) ── (ruled sheet comes from main.css) */
.post-hero { padding: 5rem 5rem 3.5rem 6rem; }
.post-hero h1 {
  margin-bottom: 1.25rem;
  max-width: 22ch;
  font-size: clamp(2.4rem, 4.6vw, 4rem);
}
.post-meta {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ── POST CONTENT ── */
.post-section {
  background: var(--cream);
  padding: var(--section-pad);
}
.post-content {
  max-width: 700px;
  margin: 0 auto;
}
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  text-decoration: none;
  margin-bottom: 2.5rem;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid var(--blush);
}
.post-back svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.post-back:hover svg { transform: translateX(-4px); }

.post-content p {
  font-size: 1.12rem;
  font-weight: 400;
  line-height: 1.85;
  color: var(--ink);
  max-width: none;
  margin-bottom: 1.5rem;
}
.post-content h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.2;
  margin: 3rem 0 1.25rem;
}
.post-content h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--teal);
  margin: 2.25rem 0 1rem;
}
.post-content a {
  color: var(--teal);
  font-weight: 600;
  text-decoration-color: var(--blush);
  text-decoration-thickness: 2px;
}
.post-content a:hover { text-decoration-color: var(--teal); }
.post-content strong { font-weight: 600; color: var(--teal); }

.post-content ul,
.post-content ol {
  margin: 0 0 1.75rem 1.25rem;
  padding: 0;
}
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content ul li,
.post-content ol li {
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 0.7rem;
  padding-left: 0.35rem;
}
.post-content ul li::marker { color: var(--blush); font-size: 1.2em; }
.post-content ol li::marker { color: var(--teal); font-family: var(--font-serif); }

.post-content img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  margin: 2rem 0;
  display: block;
  box-shadow: var(--note-shadow);
}
.post-content figure { margin: 2.25rem 0; }
.post-content figure img { margin: 0 0 0.85rem; }
.post-content figcaption {
  font-size: 0.88rem;
  color: var(--ink);
  text-align: center;
}

/* ── POST CTA (closing call-to-action) ── (ruled sheet comes from main.css) */
.post-cta {
  text-align: center;
  padding: 6rem 5rem;
}
.post-cta h2 { margin-bottom: 1.25rem; font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
.post-cta .lead {
  max-width: 500px;
  margin: 0 auto 2.25rem;
  text-align: center;
}

/* ═══════════════════════════════════════
   POST STRUCTURE (matches the Integrity Roofing post layout):
   breadcrumbs + meta, "In this article" list beside the text,
   key takeaways, FAQ, a CTA box, share links, and related posts.
═══════════════════════════════════════ */
.post-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin-bottom: 1.1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.post-crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--blush); }
.post-crumbs a { color: var(--teal); text-decoration: none; }
.post-crumbs a:hover { text-decoration: underline; text-decoration-color: var(--blush); }
.post-crumbs [aria-current] { color: var(--ink); }
.post-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.post-meta span + span::before { content: "\2022"; margin-right: 1rem; color: var(--blush); }

.post { background: var(--cream); padding: var(--section-pad); }
.post-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 720px);
  gap: 3.5rem;
  justify-content: center;
  align-items: start;
}
/* The article reuses the .post-content typography above, without its centering */
.post-layout .post-content { max-width: none; margin: 0; grid-column: 2; }
.post-toc {
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
  padding: 1.25rem 1.3rem;
  background: var(--cream);
  border: 1px solid rgba(var(--teal-rgb), .15);
  border-left: 4px solid var(--blush);
  border-radius: 3px;
  box-shadow: var(--note-shadow);
}
.post-toc-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--teal);
  margin-bottom: 0.8rem;
}
.post-toc ol { list-style: none; margin: 0; padding: 0; }
.post-toc li + li { margin-top: 0.85rem; }
.post-toc a {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: rgba(var(--blush-rgb), .7);
  text-underline-offset: 3px;
}
.post-toc a:hover { text-decoration-color: var(--teal); }
.post-content h2 { scroll-margin-top: calc(var(--nav-height) + 1.5rem); }

.post-takeaways {
  margin-bottom: 2.25rem;
  padding: 1.5rem 1.6rem;
  background: var(--tint);
  border-left: 4px solid var(--blush);
  border-radius: 3px;
}
.post-content .post-takeaways-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--teal);
  margin-bottom: 0.75rem !important;
}
.post-content .post-takeaways ul { margin-bottom: 0; }
.post-content .post-takeaways li:last-child { margin-bottom: 0; }

/* Mid-article nudge: same tinted note as the takeaways box */
.post-callout {
  margin: 2.25rem 0;
  padding: 1.25rem 1.6rem;
  background: var(--tint);
  border-left: 4px solid var(--blush);
  border-radius: 3px;
}
.post-content .post-callout p { margin-bottom: 0; }

/* Comparison tables: scroll sideways on small screens instead of squashing */
.post-table {
  margin: 2rem 0 2.25rem;
  overflow-x: auto;
  border: 1px solid rgba(var(--teal-rgb), .15);
  border-radius: 3px;
}
.post-table table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink);
}
.post-table th,
.post-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(var(--teal-rgb), .12);
}
.post-table thead th {
  background: var(--teal);
  color: var(--cream);
  font-weight: 600;
}
.post-table tbody th { font-weight: 600; color: var(--teal); }
.post-table tbody tr:nth-child(even) { background: var(--tint); }
.post-table tbody tr:last-child > * { border-bottom: 0; }

/* CTA box at the end of the article: navy panel, blush script */
.post-box-cta {
  --em-color: var(--blush);
  --em-shade: transparent;
  --focus: var(--blush);
  margin-top: 3rem;
  padding: 2.25rem 2rem;
  background: var(--teal);
  border-radius: 3px;
  box-shadow: var(--pinstripe-panel);
}
.post-content .post-box-cta h2 { color: var(--cream); margin: 0 0 1rem; }
.post-content .post-box-cta p { color: var(--cream); margin-bottom: 1.5rem; }
.post-content .post-box-cta p a { color: var(--cream); white-space: nowrap; }
.post-content .post-box-cta p a:hover { text-decoration-color: var(--cream); }

/* Short author note under the CTA box */
.post-author {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(var(--teal-rgb), .15);
}
.post-content .post-author p { font-size: 1rem; line-height: 1.7; margin-bottom: 0; }

.post-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(var(--teal-rgb), .15);
}
.post-content .post-share-label {
  margin: 0 0.4rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--teal);
}
.post-content a.post-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  border: 1.5px solid var(--teal);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}
.post-content a.post-share-btn:hover { background: var(--teal); color: var(--cream); }
.post-share-btn svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
/* Text-message sharing only makes sense on a phone */
.post-share-btn--sms { display: none !important; }

.more-posts { background: var(--tint); padding: var(--section-pad); }
.more-posts-head { text-align: center; margin-bottom: 3rem; }
.more-posts-head h2 { font-size: clamp(2rem, 4vw, 3rem); }
.blog-grid--related { grid-template-columns: repeat(3, 1fr); max-width: 1180px; }
.more-posts-cta { text-align: center; margin-top: 3rem; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  /* The "In this article" list moves above the text and stops following */
  .post-layout { grid-template-columns: minmax(0, 720px); gap: 2rem; }
  .post-layout .post-content { grid-column: 1; }
  .post-toc { position: static; }
  .blog-grid--related { grid-template-columns: repeat(2, 1fr); }
  .post { padding: 4rem 3rem; }
}
@media (max-width: 768px) {
  .post { padding: 3rem 1.25rem; }
  .post-box-cta { padding: 1.75rem 1.4rem; }
  .post-share { justify-content: center; }
  .post-content .post-share-label { flex-basis: 100%; margin: 0 0 0.4rem; text-align: center; }
  .post-share-btn--sms { display: inline-flex !important; }
  .blog-grid--related { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .blog-hero { padding: 4rem 3rem 4rem 4rem; }
  .post-hero { padding: 4rem 3rem 3rem 4rem; }
  .post-cta { padding: 5rem 3rem; }
}
@media (max-width: 768px) {
  .blog-hero { padding: 2.5rem 1.25rem 3rem 2rem; }
  .blog-grid { grid-template-columns: 1fr; gap: 2.75rem; }
  .blog-grid .hero-work-card-body { padding: 1.5rem 1.4rem 1.6rem; }
  .post-hero { padding: 2.5rem 1.25rem 2.5rem 2rem; }
  .post-content p { font-size: 1.12rem; }
  .post-content ul li,
  .post-content ol li { font-size: 1.08rem; }
  .post-cta { padding: 4.5rem 1.5rem; }
}
