/* ============================================================
   blog-article.css — Components for blog article pages
   (Phase 16: 33 blog articles)

   Loaded alongside design-system.css.

   Existing components NOT duplicated here:
   - ffo-split / ffo-split--reverse  (design-system.css)
   - ffo-checklist                   (design-system.css)
   - ffo-video-wrapper / ffo-play-btn(design-system.css)
   - ffo-faq                         (design-system.css)
   - ffo-testimonial                 (design-system.css)
   - ffo-card                        (design-system.css)
   - ffo-btn variants                (design-system.css)
   - ffo-section variants            (design-system.css)

   Blog-specific components defined here:
   1. Blog Hero (title, meta, featured image)
   2. Article Prose (long-form reading typography)
   3. Article Tags
   4. Article Images (inline figures within prose)
   5. Article Video Embed
   6. Article Table (data/comparison tables)
   7. Article Blockquote / Callout
   8. Article CTA (mid-article and end-of-article)
   9. Author Bio
   10. Related Articles / Cross-sell
   11. Back-to-Blog Navigation
   12. Responsive overrides
   ============================================================ */


/* ================================================================
   1. Blog Hero
   Editorial stacked layout: meta → title → subtitle → featured
   image below at prose width, capped height to prevent oversized
   images from dominating the viewport.
   ================================================================ */

.ffo-blog-hero {
  padding-top: 180px;
  padding-bottom: 0;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.ffo-blog-hero__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ffo-neutral-400);
}

.ffo-blog-hero__date {
  color: #64748b;
}

.ffo-blog-hero__separator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ffo-neutral-300);
  flex-shrink: 0;
}

.ffo-blog-hero__reading-time {
  color: #64748b;
}

.ffo-blog-hero__author {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ffo-dark);
  font-weight: 600;
}

.ffo-blog-hero__author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.ffo-blog-hero h1 {
  margin-bottom: 24px;
}

.ffo-blog-hero__subtitle {
  font-size: 18px;
  font-weight: 500;
  color: var(--ffo-neutral-400);
  line-height: 1.6;
  margin-bottom: 0;
}

.ffo-blog-hero__image {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--ffo-radius-lg);
  margin-top: 40px;
}

/* Small source images (≤500px wide) — don't stretch, display at natural size */
.ffo-blog-hero__image--small {
  width: auto;
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
}

@media (max-width: 767px) {
  .ffo-blog-hero {
    padding-top: 140px;
  }

  .ffo-blog-hero h1 {
    margin-bottom: 16px;
  }

  .ffo-blog-hero__subtitle {
    font-size: 16px;
  }

  .ffo-blog-hero__image {
    max-height: 260px;
    margin-top: 24px;
  }
}


/* ================================================================
   2. Article Prose
   Long-form reading content. Narrower max-width (~760px) for
   comfortable reading. Extends educational prose patterns with
   blog-specific refinements.
   ================================================================ */

.ffo-blog-prose {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.ffo-blog-prose p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--ffo-dark);
  margin-bottom: 24px;
}

.ffo-blog-prose p:last-child {
  margin-bottom: 0;
}

.ffo-blog-prose a:not(.ffo-btn) {
  color: var(--ffo-primary);
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s ease;
}

.ffo-blog-prose a:not(.ffo-btn):hover {
  color: var(--ffo-dark);
}

.ffo-blog-prose strong {
  font-weight: 700;
}

.ffo-blog-prose em {
  font-style: italic;
}

/* Headings within prose */
.ffo-blog-prose h2 {
  margin-top: 56px;
  margin-bottom: 20px;
  line-height: 1.2;
}

.ffo-blog-prose h3 {
  margin-top: 40px;
  margin-bottom: 16px;
  line-height: 1.25;
}

.ffo-blog-prose h4 {
  margin-top: 32px;
  margin-bottom: 12px;
  line-height: 1.3;
}

/* Lists within prose */
.ffo-blog-prose ul,
.ffo-blog-prose ol {
  padding-left: 24px;
  margin-bottom: 24px;
  list-style: revert;
}

.ffo-blog-prose li {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 8px;
  color: var(--ffo-dark);
}

.ffo-blog-prose li:last-child {
  margin-bottom: 0;
}

/* Nested lists */
.ffo-blog-prose ul ul,
.ffo-blog-prose ol ol,
.ffo-blog-prose ul ol,
.ffo-blog-prose ol ul {
  margin-top: 8px;
  margin-bottom: 8px;
}

/* Horizontal rule as section divider */
.ffo-blog-prose hr {
  border: none;
  border-top: 1px solid var(--ffo-neutral-200);
  margin: 48px 0;
}

/* Bold intro / lead paragraph */
.ffo-blog-prose__lead {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--ffo-dark);
  margin-bottom: 32px;
}

/* Green highlight text (conclusion, key takeaway) */
.ffo-blog-prose__highlight {
  color: var(--ffo-primary);
  font-weight: 600;
}

/* Sub-heading styled as green inline label */
.ffo-blog-prose__subhead {
  display: block;
  color: var(--ffo-primary);
  font-weight: 700;
  font-size: 18px;
  margin-top: 32px;
  margin-bottom: 8px;
}

@media (max-width: 767px) {
  .ffo-blog-prose p,
  .ffo-blog-prose li {
    font-size: 16px;
    line-height: 1.7;
  }

  .ffo-blog-prose h2 {
    margin-top: 40px;
  }

  .ffo-blog-prose h3 {
    margin-top: 32px;
  }

  .ffo-blog-prose__lead {
    font-size: 17px;
  }
}


/* ================================================================
   3. Article Tags
   Tag pills displayed below the hero or at end of article.
   ================================================================ */

.ffo-blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ffo-blog-tags a {
  display: inline-block;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ffo-primary);
  background: var(--ffo-primary-light-12);
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.ffo-blog-tags a:hover {
  background: var(--ffo-primary-light-20);
  color: var(--ffo-dark);
}


/* ================================================================
   4. Article Images
   Inline figures within prose content. Full-bleed within the
   prose column, with optional captions.
   ================================================================ */

.ffo-blog-figure {
  margin: 32px 0;
}

.ffo-blog-figure img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ffo-radius-md);
}

.ffo-blog-figure figcaption {
  font-size: 14px;
  font-weight: 500;
  color: var(--ffo-neutral-400);
  margin-top: 12px;
  line-height: 1.5;
  text-align: center;
}

/* Side-by-side image pair */
.ffo-blog-figure--pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ffo-blog-figure--pair img {
  border-radius: var(--ffo-radius-sm);
}

/* Wide/breakout image that exceeds prose width */
.ffo-blog-figure--wide {
  max-width: 900px;
}

@media (max-width: 767px) {
  .ffo-blog-figure--pair {
    grid-template-columns: 1fr;
  }
}


/* ================================================================
   5. Article Video Embed
   YouTube or other video embeds within blog content.
   Builds on design-system ffo-video-wrapper but scoped
   for inline blog context.
   ================================================================ */

.ffo-blog-video {
  margin: 40px auto;
  max-width: 760px;
}

.ffo-blog-video .ffo-video-wrapper {
  border-radius: var(--ffo-radius-md);
}

.ffo-blog-video__caption {
  font-size: 14px;
  font-weight: 500;
  color: var(--ffo-neutral-400);
  margin-top: 12px;
  text-align: center;
}


/* ================================================================
   6. Article Table
   Data and comparison tables within blog articles.
   Extends educational table patterns with blog-specific
   responsive scrolling.
   ================================================================ */

.ffo-blog-table-wrap {
  margin: 32px auto;
  max-width: 760px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ffo-blog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.ffo-blog-table thead th {
  background: var(--ffo-dark);
  color: var(--ffo-white);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 20px;
  text-align: left;
  white-space: nowrap;
}

.ffo-blog-table thead th:first-child {
  border-radius: var(--ffo-radius-sm) 0 0 0;
}

.ffo-blog-table thead th:last-child {
  border-radius: 0 var(--ffo-radius-sm) 0 0;
}

.ffo-blog-table tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--ffo-neutral-100);
  vertical-align: top;
  color: var(--ffo-dark);
  line-height: 1.5;
}

.ffo-blog-table tbody tr:last-child td {
  border-bottom: none;
}

.ffo-blog-table tbody tr:hover {
  background: var(--ffo-neutral-100);
}

/* Highlight row (result/total) */
.ffo-blog-table__highlight td {
  font-weight: 700;
  color: var(--ffo-primary);
  border-top: 2px solid var(--ffo-primary-border-48);
}

/* Light header variant */
.ffo-blog-table--light thead th {
  background: var(--ffo-primary-light-12);
  color: var(--ffo-dark);
}

/* Compact variant for narrow data */
.ffo-blog-table--compact {
  font-size: 14px;
}

.ffo-blog-table--compact thead th,
.ffo-blog-table--compact tbody td {
  padding: 10px 16px;
}

@media (max-width: 767px) {
  .ffo-blog-table {
    font-size: 13px;
  }

  .ffo-blog-table thead th,
  .ffo-blog-table tbody td {
    padding: 10px 12px;
  }
}


/* ================================================================
   7. Article Blockquote / Callout
   Styled blockquotes for pull quotes, expert opinions, and
   highlighted passages within blog content.
   ================================================================ */

.ffo-blog-prose blockquote {
  margin: 32px 0;
  padding: 24px 32px;
  border-left: 4px solid var(--ffo-primary);
  background: var(--ffo-primary-light-12);
  border-radius: 0 var(--ffo-radius-sm) var(--ffo-radius-sm) 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ffo-dark);
}

.ffo-blog-prose blockquote p {
  font-size: 17px;
  margin-bottom: 12px;
}

.ffo-blog-prose blockquote p:last-child {
  margin-bottom: 0;
}

.ffo-blog-prose blockquote cite {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  font-style: normal;
  color: var(--ffo-neutral-400);
}

/* Info callout box (distinct from blockquote) */
.ffo-blog-callout {
  margin: 32px 0;
  padding: 24px 28px;
  background: var(--ffo-neutral-100);
  border-radius: var(--ffo-radius-md);
  border: 1.5px solid var(--ffo-neutral-200);
}

.ffo-blog-callout__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ffo-dark);
  margin-bottom: 8px;
}

.ffo-blog-callout p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ffo-neutral-400);
  margin-bottom: 8px;
}

.ffo-blog-callout p:last-child {
  margin-bottom: 0;
}

/* Tip variant (green border) */
.ffo-blog-callout--tip {
  background: var(--ffo-primary-light-12);
  border-color: var(--ffo-primary-border-48);
}


/* ================================================================
   8. Article CTA
   Mid-article and end-of-article call-to-action boxes.
   ================================================================ */

/* Inline CTA within article body */
.ffo-blog-cta {
  margin: 48px auto;
  padding: 40px 36px;
  background: var(--ffo-dark);
  border-radius: var(--ffo-radius-lg);
  max-width: 760px;
}

.ffo-blog-cta h2,
.ffo-blog-cta h3 {
  color: var(--ffo-white);
  margin-bottom: 16px;
}

.ffo-blog-cta p {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin-bottom: 24px;
}

.ffo-blog-cta p:last-of-type {
  margin-bottom: 0;
}

.ffo-blog-cta .ffo-btn {
  margin-top: 24px;
}

.ffo-blog-cta .ffo-btn--primary {
  color: var(--ffo-white);
}

.ffo-blog-cta .ffo-btn--primary:hover {
  color: var(--ffo-white);
}

/* Light variant */
.ffo-blog-cta--light {
  background: var(--ffo-primary-light-12);
}

.ffo-blog-cta--light h2,
.ffo-blog-cta--light h3 {
  color: var(--ffo-dark);
}

.ffo-blog-cta--light p {
  color: var(--ffo-neutral-400);
}

/* Green variant */
.ffo-blog-cta--green {
  background: var(--ffo-primary);
}

.ffo-blog-cta--green p {
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 767px) {
  .ffo-blog-cta {
    padding: 28px 24px;
    margin: 36px 0;
  }
}


/* ================================================================
   9. Author Bio
   Author card shown at the end of the article.
   ================================================================ */

.ffo-blog-author {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 32px;
  background: var(--ffo-neutral-100);
  border-radius: var(--ffo-radius-lg);
  max-width: 760px;
  margin: 48px auto 0;
}

.ffo-blog-author__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.ffo-blog-author__info {
  flex: 1;
  min-width: 0;
}

.ffo-blog-author__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--ffo-dark);
  margin-bottom: 4px;
}

.ffo-blog-author__role {
  font-size: 14px;
  font-weight: 500;
  color: var(--ffo-neutral-400);
  margin-bottom: 12px;
}

.ffo-blog-author__bio {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ffo-neutral-400);
}

@media (max-width: 767px) {
  .ffo-blog-author {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
  }

  .ffo-blog-author__avatar {
    width: 64px;
    height: 64px;
  }
}


/* ================================================================
   10. Related Articles / Cross-sell
   Grid of article cards shown at the bottom of the page,
   linking to other blog posts or service pages.
   ================================================================ */

.ffo-blog-related {
  padding-block: var(--ffo-section-py);
}

.ffo-blog-related__title {
  margin-bottom: 40px;
}

.ffo-blog-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ffo-blog-related__card {
  display: flex;
  flex-direction: column;
  background: var(--ffo-white);
  border-radius: var(--ffo-radius-md);
  box-shadow: var(--ffo-shadow-card);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.ffo-blog-related__card:hover {
  box-shadow: var(--ffo-shadow-hover);
  transform: translateY(-4px);
}

.ffo-blog-related__card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ffo-blog-related__card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}

.ffo-blog-related__card-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--ffo-neutral-400);
  margin-bottom: 8px;
}

.ffo-blog-related__card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ffo-dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.ffo-blog-related__card-excerpt {
  font-size: 15px;
  font-weight: 500;
  color: var(--ffo-neutral-400);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.ffo-blog-related__card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ffo-dark);
  text-decoration: none;
  margin-top: auto;
  transition: color 0.2s ease;
}

.ffo-blog-related__card-link:hover {
  color: var(--ffo-primary);
}

@media (max-width: 991px) {
  .ffo-blog-related__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .ffo-blog-related__grid {
    grid-template-columns: 1fr;
  }

  .ffo-blog-related {
    padding-block: 64px;
  }
}


/* ================================================================
   11. Back-to-Blog Navigation
   Simple navigation bar at top or bottom of article to return
   to the blog index.
   ================================================================ */

.ffo-blog-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid var(--ffo-neutral-200);
  max-width: 760px;
  margin: 48px auto 0;
}

.ffo-blog-nav__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ffo-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ffo-blog-nav__back:hover {
  color: var(--ffo-primary);
}

.ffo-blog-nav__back svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Breadcrumb-style top nav */
.ffo-blog-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ffo-neutral-400);
  margin-bottom: 24px;
}

.ffo-blog-breadcrumb a {
  color: var(--ffo-neutral-400);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ffo-blog-breadcrumb a:hover {
  color: var(--ffo-primary);
}

.ffo-blog-breadcrumb__separator {
  color: var(--ffo-neutral-300);
}


/* ================================================================
   12. Cross-sell Services Section
   Reusable "Gruenden, verwalten, investieren" cards section
   that appears at the bottom of most blog articles.
   ================================================================ */

.ffo-blog-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ffo-blog-service-card {
  display: flex;
  flex-direction: column;
  background: var(--ffo-white);
  border: 1.5px solid var(--ffo-primary-border-48);
  border-radius: var(--ffo-radius-md);
  padding: 28px 24px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.ffo-blog-service-card:hover {
  box-shadow: var(--ffo-shadow-hover);
  transform: translateY(-4px);
}

.ffo-blog-service-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
}

.ffo-blog-service-card__icon img {
  width: 100%;
  height: 100%;
}

.ffo-blog-service-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ffo-dark);
  margin-bottom: 8px;
}

.ffo-blog-service-card__desc {
  font-size: 15px;
  font-weight: 500;
  color: var(--ffo-neutral-400);
  line-height: 1.6;
  flex: 1;
}

.ffo-blog-service-card__image {
  width: 100%;
  border-radius: var(--ffo-radius-sm);
  margin-top: 16px;
}

.ffo-blog-service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ffo-dark);
  text-decoration: none;
  margin-top: 16px;
  transition: color 0.2s ease;
}

.ffo-blog-service-card__link:hover {
  color: var(--ffo-primary);
}

@media (max-width: 991px) {
  .ffo-blog-services {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .ffo-blog-services {
    grid-template-columns: 1fr;
  }
}


/* ================================================================
   13. Table of Contents (optional sidebar or inline)
   Sticky TOC for longer articles, or inline TOC at the start.
   ================================================================ */

.ffo-blog-toc {
  padding: 24px 28px;
  background: var(--ffo-neutral-100);
  border-radius: var(--ffo-radius-md);
  margin-bottom: 40px;
  max-width: 760px;
}

.ffo-blog-toc__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ffo-dark);
  margin-bottom: 16px;
}

.ffo-blog-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ffo-blog-toc__list a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ffo-neutral-400);
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
  padding: 2px 0;
}

.ffo-blog-toc__list a:hover {
  color: var(--ffo-primary);
}

/* Nested TOC items (H3 under H2) */
.ffo-blog-toc__list .ffo-blog-toc__nested {
  padding-left: 16px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ffo-blog-toc__nested a {
  font-size: 14px;
}


/* ================================================================
   14. Footnotes
   Footnote references and footnote list at article end.
   ================================================================ */

.ffo-blog-prose sup a {
  font-size: 12px;
  font-weight: 700;
  color: var(--ffo-primary);
  text-decoration: none;
}

.ffo-blog-footnotes {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--ffo-neutral-200);
  max-width: 760px;
}

.ffo-blog-footnotes ol {
  padding-left: 24px;
  list-style: decimal;
  margin: 0;
}

.ffo-blog-footnotes li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ffo-neutral-400);
  margin-bottom: 8px;
}

.ffo-blog-footnotes a {
  color: var(--ffo-primary);
  text-decoration: underline;
}
