/* ============================================================
   BLOG POST PAGE STYLES — Blue Rose Financial
   ============================================================ */

/* Card + pill + newsletter styles live in insights.css (linked alongside) */


/* ── Section: Post Hero ─────────────────────────────────────── */
.sect-post-hero {
  background-color: var(--color-bg-dark);
  padding-top: 128px;
  padding-bottom: 96px;
  position: relative;
  overflow: hidden;
}

.sect-post-hero__graphic {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1226px;
  height: 584px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.sect-post-hero .container {
  position: relative;
  z-index: 5;
}

.sect-post-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 67px;
  flex-wrap: nowrap;
}

.sect-post-hero__text {
  flex: 0 1 501px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sect-post-hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 36px;
  color: var(--color-white);
}

.sect-post-hero__desc {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 20px;
  line-height: 28px;
  color: var(--color-text-muted);
}

.sect-post-hero__image {
  flex: 0 1 606px;
  min-width: 0;
  height: 360px;
  border-radius: 12px;
  overflow: hidden;
  background-color: #F3F4F6;
}

.sect-post-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* ── Section: Post Body (Rich Text) ─────────────────────────── */
.sect-post-body {
  background-color: var(--color-white);
}

.sect-post-body__article {
  max-width: 816px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Red accent stripe above article */
.post-accent {
  width: 50px;
  height: 6px;
  background-color: var(--color-accent-red);
  border-radius: 2px;
  flex-shrink: 0;
}

.post-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-content :where(h1, h2) {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 48px;
  color: var(--color-bg-dark);
}

.post-content h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 36px;
  color: var(--color-bg-dark);
}

.post-content h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 28px;
  color: var(--color-bg-dark);
}

.post-content h5 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  line-height: 24px;
  color: var(--color-bg-dark);
}

.post-content h6 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--color-bg-dark);
}

.post-content p+ :where(h1, h2, h3, h4, h5, h6) {
  margin-top: 1em;
}

/* Tighter heading rhythm — used by both the Resources rich text section
   (page-builder) and single blog posts. */
@media(min-width: 576px) {
  .post-content--article h1,
  .post-content--article h2 {
    font-size: 32px;
    line-height: 36px;
  }
}

.post-content--article p+ h1,
.post-content--article p+ h2 {
  margin-top: 8px;
}

.post-content p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #51617A;
}

.post-content :where(ol, ul) {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #51617A;
  padding-left: 24px;
  list-style-position: inside;
}

.post-content ol {
  list-style: decimal;
}

.post-content ul {
  list-style: disc;
}

.post-content li:not(:last-child) {
  margin-bottom: 12px;
}

/* Links in article copy (Insights posts and Resources rich text) —
   underlined at rest, red on hover. */
.post-content a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.post-content a:hover,
.post-content a:focus-visible {
  color: var(--color-accent-red);
}

/* Author bar */
.post-author {
  padding-top: 24px;
  border-top: 1px solid var(--color-text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-author__name {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 20px;
  color: var(--color-bg-dark);
}

.post-author__meta {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #51617A;
}


/* ── Section: Latest Insights ───────────────────────────────── */
.sect-latest-insights {
  background-color: var(--color-bg-dark);
}

.sect-latest-insights__inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.latest-insights__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
}

.latest-insights__heading {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.latest-insights__heading::before {
  content: '';
  display: block;
  width: 50px;
  height: 6px;
  background-color: var(--color-accent-red);
  border-radius: 2px;
}

.latest-insights__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 48px;
  color: var(--color-white);
}

/* 3 cards, gap 32px both axes */
.latest-insights__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}

.latest-insights__grid .insight-card {
  flex: 0 0 calc((100% - 96px) / 3);
}


/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 991px) {
  .sect-post-hero {
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .sect-post-hero__inner {
    flex-direction: column;
    flex-wrap: wrap;
    gap: 40px;
  }

  .sect-post-hero__text {
    flex: 1 1 auto;
    width: 100%;
  }

  .sect-post-hero__image {
    flex: 1 1 auto;
    width: 100%;
    height: 280px;
  }

  .sect-post-hero__title {
    font-size: 28px;
    line-height: 34px;
  }

  .sect-post-hero__desc {
    font-size: 18px;
  }

  .latest-insights__grid .insight-card {
    flex: 0 0 calc((100% - 48px) / 2);
  }

  /* Only 2 fit per row now — hide the orphaned 3rd card */
  .latest-insights__grid .insight-card:nth-child(3) {
    display: none;
  }

  .latest-insights__title {
    font-size: 32px;
    line-height: 40px;
  }

  .post-content :where(h1, h2) {
    font-size: 34px;
    line-height: 40px;
  }

  .post-content h3 {
    font-size: 28px;
    line-height: 32px;
  }

  .post-content h4 {
    font-size: 22px;
    line-height: 26px;
  }
}

@media (max-width: 575px) {
  .sect-post-hero {
    padding-top: 100px;
    padding-bottom: 48px;
  }

  .sect-post-hero__title {
    font-size: 24px;
    line-height: 30px;
  }

  .sect-post-hero__desc {
    font-size: 16px;
  }

  .sect-post-hero__image {
    height: 220px;
  }

  .latest-insights__grid .insight-card {
    flex: 0 0 100%;
  }

  .latest-insights__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .latest-insights__title {
    font-size: 26px;
    line-height: 34px;
  }

  .post-content :where(h1, h2) {
    font-size: 30px;
    line-height: 36px;
  }

  .post-content h3 {
    font-size: 26px;
    line-height: 30px;
  }

  .post-content h4 {
    font-size: 20px;
    line-height: 24px;
  }
}
