/* ============================================================
   Florian Haacks — Blog: Einzelbeitrag und Übersichtsseite
   Nutzt Tokens und Basisstile aus fh-global.css.
   Lädt auf Einzelbeiträgen und auf der Seite mit dem Slug "blog".
   ============================================================ */

/* ---------- Lesefortschritt ---------- */
.fh-progress{
  position:fixed; top:0; left:0; height:2px; width:0;
  background:var(--accent); z-index:100000; transition:width .1s linear;
}
body.admin-bar .fh-progress{ top:32px; }
@media (max-width:782px){ body.admin-bar .fh-progress{ top:46px; } }

/* ---------- Gemeinsame Bausteine ---------- */
.fh-narrow{ max-width:720px; margin-left:auto; margin-right:auto; }

.fh-tag{
  display:inline-block; padding:4px 11px; border-radius:999px;
  font-size:0.72rem; letter-spacing:0.05em; text-transform:uppercase;
  background:var(--surface-2); color:var(--muted);
}

/* ---------- Beitragskopf ---------- */
/* Abstand zum schwebenden Header (Breadcrumbs gibt es nicht mehr) */
.fh-post-head{ padding:160px 0 var(--s-8); }
.fh-tags{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:var(--s-5); }
.fh-post-title{
  font-size:clamp(2rem,3.6vw,2.9rem); font-weight:600; line-height:1.12;
  margin:0 0 var(--s-5);
}
.fh-standfirst{ font-size:1.12rem; line-height:1.75; margin:0 0 var(--s-6); }
.fh-meta{
  display:flex; align-items:center; gap:var(--s-4); flex-wrap:wrap;
  padding-top:var(--s-5); border-top:1px solid var(--line);
  font-size:0.84rem; color:var(--muted);
}
.fh-meta .fh-who{ display:flex; align-items:center; gap:10px; }
.fh-meta .fh-who img{
  width:34px; height:34px; border-radius:50%; display:block;
  object-fit:cover; object-position:50% 6%; background:var(--surface-2);
}
.fh-meta b{ color:var(--text); font-weight:700; }
.fh-meta .fh-sep{ opacity:0.4; }

/* ---------- Fließtext ---------- */
.fh-prose{ font-size:1rem; line-height:1.75; }
.fh-prose > :first-child{ margin-top:0 !important; }
.fh-prose h1,
.fh-prose h2{
  font-size:clamp(1.5rem,2.4vw,1.85rem); font-weight:600;
  margin:var(--s-8) 0 var(--s-4);
}
.fh-prose h3{ font-size:1.25rem; font-weight:600; margin:var(--s-7) 0 var(--s-3); }
.fh-prose h4{ font-size:1.05rem; font-weight:600; margin:var(--s-6) 0 var(--s-2); }
.fh-prose p{ margin:0 0 var(--s-5); color:var(--muted); }
.fh-prose p strong,.fh-prose li strong{ color:var(--text); font-weight:700; }
.fh-prose a{
  color:var(--accent-soft); text-decoration:underline;
  text-underline-offset:3px; text-decoration-thickness:1px;
}
.fh-prose a:hover{ color:var(--accent); }
/* Astra setzt Listen-Abstände eigenständig, hier festlegen. */
.fh-prose ul,.fh-prose ol{
  margin:0 0 var(--s-5) var(--s-5) !important; padding:0 !important; color:var(--muted);
}
.fh-prose ul{ list-style:disc; }
.fh-prose ol{ list-style:decimal; }
.fh-prose li{ margin-bottom:var(--s-2); padding-left:var(--s-2); }
.fh-prose li::marker{ color:var(--accent); }
.fh-prose ul ul,.fh-prose ol ol,.fh-prose ul ol,.fh-prose ol ul{ margin-top:var(--s-2) !important; margin-bottom:0 !important; }
.fh-prose blockquote,
.fh-prose .wp-block-quote{
  border-left:2px solid var(--accent); padding:var(--s-2) 0 var(--s-2) var(--s-5);
  margin:var(--s-6) 0; font-size:1.1rem; color:var(--text); font-style:normal;
}
.fh-prose blockquote p{ color:var(--text); margin-bottom:var(--s-2); }
.fh-prose blockquote cite{
  display:block; margin-top:var(--s-3); font-size:0.85rem; color:var(--muted); font-style:normal;
}
.fh-prose hr{ border:none; border-top:1px solid var(--line); margin:var(--s-8) 0; }
.fh-prose figure{ margin:var(--s-7) 0; }
.fh-prose figure img{
  max-width:100%; height:auto; border-radius:var(--r-md); display:block; margin-left:auto; margin-right:auto;
}
.fh-prose figcaption{ margin-top:var(--s-3); font-size:0.8rem; color:var(--muted); text-align:center; }
/* WordPress-Emojis sind kleine Bilder im Text, nicht wie Abbildungen behandeln. */
.fh-prose img.emoji{
  display:inline !important; width:1em !important; height:1em !important;
  border-radius:0 !important; margin:0 0.07em !important; vertical-align:-0.1em !important;
}
.fh-prose code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:0.85em;
  background:var(--surface-2); padding:2px 7px; border-radius:6px; color:var(--accent-soft);
}
.fh-prose pre{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-sm);
  padding:var(--s-4); overflow-x:auto; margin:0 0 var(--s-5);
}
.fh-prose pre code{ background:none; padding:0; }
.fh-prose .wp-block-columns{ gap:var(--s-5); margin-bottom:var(--s-5); }
.fh-prose .alignwide,.fh-prose .alignfull{
  width:100% !important; max-width:100% !important; margin-left:0 !important; margin-right:0 !important;
}

/* Tabellen: im Editor als Tabellen-Block, scrollen auf schmalen Bildschirmen */
.fh-prose .wp-block-table{ overflow-x:auto; margin:var(--s-6) 0; }
.fh-prose table{ width:100%; border-collapse:collapse; font-size:0.9rem; min-width:460px; }
.fh-prose th,.fh-prose td{
  text-align:left; padding:14px 18px; border:0; border-bottom:1px solid var(--line);
}
.fh-prose th{
  font-family:var(--font-head); font-weight:600; font-size:0.8rem; letter-spacing:0.04em;
  text-transform:uppercase; color:var(--muted); background:transparent;
}
.fh-prose td{ color:var(--muted); }

/* Merkkasten: Gruppen-Block mit der Zusatzklasse "fh-callout" */
.fh-prose .fh-callout{
  background:var(--surface); border:1px solid var(--line); border-left:2px solid var(--accent);
  border-radius:var(--r-md); padding:var(--s-5) !important; margin:var(--s-6) 0;
}
.fh-prose .fh-callout h4{ margin:0 0 var(--s-2); font-size:0.98rem; }
.fh-prose .fh-callout p{ font-size:0.9rem; margin:0; }

/* ---------- CTA am Beitragsende ---------- */
.fh-post-cta{
  position:relative; overflow:hidden; text-align:center;
  background:linear-gradient(150deg,#222E3B,#141C24);
  border:1px solid var(--line); border-radius:var(--r-lg);
  padding:56px 40px; margin-top:var(--s-8);
}
.fh-post-cta::before{
  content:''; position:absolute; bottom:-45%; left:50%; transform:translateX(-50%);
  width:65%; height:95%; background:radial-gradient(circle,rgba(255,122,69,0.16),transparent 66%);
}
.fh-post-cta > *{ position:relative; z-index:1; }
.fh-post-cta h2{ margin:0 0 var(--s-3); font-size:clamp(1.5rem,2.4vw,1.85rem); }
.fh-post-cta p{ margin:0 0 var(--s-5); font-size:0.95rem; }
.fh-post-cta .wp-block-buttons{ display:flex; justify-content:center; }

/* ---------- Beitragskarten und Raster ---------- */
.fh-more-sec{ padding:var(--s-9) 0; }
.fh-more-head{ margin-bottom:var(--s-6); }
.fh-more-head h6{ margin:0 0 8px; }
.fh-more-head h2{ margin:0; }
.fh-blog-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.fh-pcard{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md);
  display:flex; flex-direction:column; text-decoration:none;
  transition:transform .28s, border-color .28s;
}
.fh-pcard:hover{ transform:translateY(-3px); border-color:var(--line-2); }
.fh-pcard-body{ padding:var(--s-5); display:flex; flex-direction:column; flex:1; }
.fh-pcard .fh-tag{ margin-bottom:var(--s-4); align-self:flex-start; }
.fh-pcard h4{ margin:0 0 var(--s-3); line-height:1.35; font-size:1.15rem; color:var(--text); }
.fh-pcard p{ font-size:0.88rem; margin:0 0 var(--s-5); flex:1; }
.fh-pcard .fh-pmeta{
  font-size:0.76rem; color:var(--muted); padding-top:var(--s-3); border-top:1px solid var(--line);
}

/* ---------- Blog-Übersichtsseite ---------- */
.fh-blog-head{ max-width:720px; padding:160px 0 var(--s-7) !important; }
.fh-blog-head h1{ margin:0 0 var(--s-4); }
.fh-blog-head p{ font-size:1.12rem; line-height:1.75; margin:0; }
.fh-pagination{ display:flex; gap:8px; justify-content:center; margin-top:var(--s-7); }
.fh-pagination a,.fh-pagination span{
  width:40px; height:40px; border-radius:50%; border:1px solid var(--line-2);
  display:flex; align-items:center; justify-content:center;
  color:var(--text); text-decoration:none; font-size:0.9rem;
}
.fh-pagination a:hover{ border-color:var(--accent); }
.fh-pagination .current{ background:var(--accent); border-color:var(--accent); color:#0E141A; font-weight:700; }

/* CTA-Band der Übersichtsseite, gleiche Optik wie auf den Leistungsseiten */
.entry-content > .alignwide{
  width:100% !important; max-width:none !important; margin-left:0 !important; margin-right:0 !important;
}
.fh-ctaband{ padding:96px 0; }
.fh-ctabox{
  position:relative; overflow:hidden; text-align:center;
  background:linear-gradient(150deg,#222E3B,#141C24);
  border:1px solid var(--line); border-radius:var(--r-lg); padding:70px 40px;
}
.fh-ctabox::before{
  content:''; position:absolute; bottom:-45%; left:50%; transform:translateX(-50%);
  width:65%; height:95%; background:radial-gradient(circle,rgba(255,122,69,0.16),transparent 66%);
}
.fh-ctabox > *{ position:relative; z-index:1; }
.fh-ctabox h2{
  font-size:clamp(1.8rem,3.3vw,2.55rem); font-weight:600; margin-bottom:16px;
  max-width:600px; margin-left:auto; margin-right:auto; line-height:1.2;
}
.fh-ctabox .wp-block-buttons{ justify-content:center; }
.fh-badge{
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid var(--line-2); border-radius:999px;
  padding:6px 15px 6px 10px; font-size:0.76rem !important; color:var(--muted) !important;
  letter-spacing:0.02em; margin-bottom:24px !important;
}
.fh-badge::before{ content:''; width:6px; height:6px; border-radius:50%; background:var(--accent); flex-shrink:0; }
.fh-ctabox .fh-badge{ margin-left:auto; margin-right:auto; }

/* ---------- Responsive ---------- */
@media (max-width:980px){
  .fh-blog-grid{ grid-template-columns:1fr 1fr; }
}
@media (max-width:760px){
  .fh-post-head{ padding-top:130px; }
  .fh-blog-head{ padding-top:130px !important; }
  .fh-blog-grid{ grid-template-columns:1fr; }
  .fh-post-cta{ padding:40px 24px; }
  .fh-ctaband{ padding:64px 0; }
  .fh-ctabox{ padding:48px 24px; }
  .fh-more-sec{ padding:var(--s-8) 0; }
}
@media (prefers-reduced-motion:reduce){ .fh-progress{ transition:none; } }
