/* =====================================================================
   VOSS Ideen — Post-Template Komponenten (Single + Author).
   Bewusst zurückhaltendes Styling, das sich in das vorhandene Design einfügt.
   Farben/Spacing nutzen — wo möglich — die vorhandenen CSS-Variablen
   (--primary, --body, --white, --primary_font etc.).
   ===================================================================== */

/* --------- Breadcrumb --------- */
.bd-breadcrumb {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    color: var(--body, #555);
}
.bd-breadcrumb__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
}
.bd-breadcrumb__item {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
}
.bd-breadcrumb__item:not(:last-child)::after {
    content: "›";
    margin-left: 0.4em;
    opacity: 0.5;
}
.bd-breadcrumb__item a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
}
.bd-breadcrumb__item a:hover {
    border-bottom-style: solid;
}
.bd-breadcrumb__item [aria-current="page"] {
    color: var(--body, #222);
    font-weight: 500;
}

/* --------- Article-Header + Meta-Zeile --------- */
.bd-article-header {
    margin-bottom: 1.5rem;
}
.bd-article-header h1 {
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
}
.bd-article-meta {
    font-size: 0.9rem;
    color: var(--body, #555);
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    align-items: center;
    margin: 0 0 1rem 0;
    line-height: 1.6;
}
.bd-article-meta__hub {
    background: var(--primary, #007d32);
    color: var(--white, #fff);
    padding: 0.25em 0.75em;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.bd-article-meta__hub:hover {
    opacity: 0.9;
}
.bd-article-meta__sep {
    opacity: 0.4;
    margin: 0 0.1em;
}
.bd-article-meta__author a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
}
.bd-article-meta__author a:hover { border-bottom-style: solid; }
.bd-article-meta__updated {
    font-style: italic;
    opacity: 0.85;
}
.bd-article-meta__readtime::before {
    content: "⏱";
    margin-right: 0.3em;
    opacity: 0.6;
}

/* --------- Service-CTA-Block --------- */
.bd-service-cta {
    margin: 3rem 0;
    background: var(--primary, #007d32);
    color: var(--white, #fff);
    border-radius: 6px;
    overflow: hidden;
}
.bd-service-cta__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
}
@media (max-width: 768px) {
    .bd-service-cta__inner {
        grid-template-columns: 1fr;
    }
}
.bd-service-cta__kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
    margin: 0 0 0.5rem 0;
}
/* Optisch wie eine Headline, semantisch nur ein <p> (siehe SEO-Hierarchie). */
.bd-service-cta__headline {
    margin: 0 0 0.75rem 0;
    color: var(--white, #fff);
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 700;
    font-family: var(--secondary_font, var(--primary_font, inherit));
}
.bd-service-cta__text {
    margin: 0;
    line-height: 1.5;
    opacity: 0.95;
}
.bd-service-cta__actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}
.bd-service-cta__btn {
    white-space: nowrap;
}
.bd-service-cta__contact {
    color: var(--white, #fff);
    font-size: 0.9rem;
    opacity: 0.9;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}
.bd-service-cta__contact:hover {
    opacity: 1;
}

/* --------- Cluster-Posts --------- */
/* Bewusst kein eigenes CSS — wir nutzen das vorhandene .related-news-block-Styling
   aus dem Theme (siehe acf_news-related.php). So bleibt die Optik identisch zu den
   Leistungsseiten. Falls Spacing nötig: */
.single-post .related-news-block {
    margin-top: 3rem;
}

/* --------- Author-Box (im Single-Post am Ende) --------- */
.bd-author-card {
    margin: 3rem 0 2rem 0;
    padding: 1.5rem;
    background: rgba(0, 125, 50, 0.05);
    border-left: 4px solid var(--primary, #007d32);
    border-radius: 4px;
}
.bd-author-card__inner {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 600px) {
    .bd-author-card__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .bd-author-card__avatar {
        max-width: 100px;
        margin: 0 auto;
    }
}
.bd-author-card__avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.bd-author-card__kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary, #007d32);
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}
/* Optisch wie Headline, semantisch <p> (SEO: keine künstlichen H2 für Komponenten). */
.bd-author-card__name {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    font-family: var(--secondary_font, var(--primary_font, inherit));
}
.bd-author-card__name a {
    color: inherit;
    text-decoration: none;
}
.bd-author-card__name a:hover {
    color: var(--primary, #007d32);
}
.bd-author-card__position {
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
    color: var(--body, #555);
    font-style: italic;
}
.bd-author-card__bio {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}
.bd-author-card__bio p:last-child {
    margin-bottom: 0;
}
/* Links als horizontale Liste mit subtiler vertikaler Trennlinie (kein Mittelpunkt-Zeichen,
   keine "willkürlich nebeneinander"-Optik). Der Trenner ist ein CSS-::before-Element,
   damit screen-readern nichts störendes vorgelesen wird. */
.bd-author-card__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--body, #555);
}
.bd-author-card__links li {
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
}
.bd-author-card__links li + li::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 0.85em;
    background: rgba(0, 0, 0, 0.2);
    margin-right: 0.75rem;
}
.bd-author-card__links a {
    color: var(--primary, #007d32);
    text-decoration: none;
}
.bd-author-card__links a:hover {
    text-decoration: underline;
}

/* --------- Author-Profil-Seite (author.php) ---------
   Layout: nutzt bewusst das Theme-Designsystem (.bd_row.bd_grid.big_gap +
   .col-8/.col-4), damit die Author-Seite EXAKT die gleiche Container-Breite
   und das gleiche Spaltenverhalten wie single-post.php hat.
   Hier NUR die internen Komponenten-Styles — keine eigenen Container-/
   Width-Regeln, das macht .bd_row im Theme.                              */

/* Article-Container parallel zu #blogpost > div.bd_row.bd_grid (siehe
   _elements.css Zeile ~665). Ohne diesen Override greift die default
   .bd_row-Regel (margin: 3em auto) und der Author bekommt ungewollten
   Top-Margin → Bruch zum Single-Post-Layout. */
#author-profile > div.bd_row.bd_grid {
    max-width: var(--max-width);
    position: relative;
    width: 80%;
    margin: 0 auto;
}
@media (max-width: 768px) {
    #author-profile .bd_row.bd_grid {
        display: block;
    }
}

/* Hero zurückhaltend: keine farbige Fläche, nur eine subtile Linie unten. */
.bd-author-profile__hero {
    margin: 0 0 2.5rem 0;
    padding: 0 0 2rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.bd-author-profile__hero-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}
.bd-author-profile__avatar {
    flex: 0 0 auto;
    width: 160px;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, rgba(0, 125, 50, 0.06), rgba(0, 0, 0, 0.04));
    border-radius: 50%;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}
.bd-author-profile__avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--white, #fff);
    display: block;
}
.bd-author-profile__intro {
    flex: 1 1 auto;
    min-width: 0;
}
.bd-author-profile__kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary, #007d32);
    font-weight: 600;
    margin: 0 0 0.4rem 0;
}
.bd-author-profile__intro h1 {
    margin: 0 0 0.4rem 0;
    line-height: 1.15;
}
.bd-author-profile__role {
    font-size: 1.1rem;
    color: var(--body, #555);
    font-weight: 500;
    margin: 0 0 0.5rem 0;
}
.bd-author-profile__experience {
    font-size: 1rem;
    margin: 0 0 1rem 0;
    color: var(--body, #555);
}
.bd-author-profile__quote {
    border-left: 3px solid var(--primary, #007d32);
    padding-left: 1rem;
    font-style: italic;
    margin: 1.5rem 0 0 0;
    color: var(--body, #444);
}
.bd-author-profile__quote footer {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    color: var(--body, #777);
}
.bd-author-profile__post-count {
    font-size: 0.9rem;
    color: var(--body, #777);
    margin: 1rem 0 0 0;
}

/* Ab Tablet/Desktop: Avatar links, Intro rechts (analog Author-Card im Single-Post). */
@media (min-width: 641px) {
    .bd-author-profile__hero-inner {
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }
    .bd-author-profile__avatar {
        width: 180px;
    }
}
.bd-author-profile__section {
    margin-bottom: 2.5rem;
}
.bd-author-profile__section h2 {
    border-bottom: 2px solid var(--primary, #007d32);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}
.bd-author-profile__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.bd-author-profile__expertise .bd-author-profile__list li {
    background: var(--white, #fff);
    border: 1px solid var(--primary, #007d32);
    color: var(--primary, #007d32);
    padding: 0.4em 0.9em;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
}
.bd-author-profile__qualifications .bd-author-profile__list,
.bd-author-profile__certificates .bd-author-profile__list {
    flex-direction: column;
    gap: 0.75rem;
}
.bd-author-profile__qualifications .bd-author-profile__list li,
.bd-author-profile__certificates .bd-author-profile__list li {
    padding: 0.75rem 1rem;
    background: var(--white, #fff);
    border-left: 3px solid var(--primary, #007d32);
    border-radius: 2px;
}
.bd-author-profile__year {
    color: var(--body, #777);
    font-size: 0.9em;
}

/* Kontakt-Sidebar: neutral, kein Vollflächen-Grün. */
.bd-author-profile__contact-card {
    background: var(--white, #fff);
    color: var(--body, #222);
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    position: sticky;
    top: 1rem;
}
.bd-author-profile__contact-card h2 {
    margin-top: 0;
    color: var(--body, #222);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.bd-author-profile__contact-list {
    list-style: none;
    margin: 0 0 1.5rem 0;
    padding: 0;
}
.bd-author-profile__contact-list li {
    margin-bottom: 0.75rem;
}
.bd-author-profile__contact-list a {
    color: var(--primary, #007d32);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6em;
    word-break: break-word;
}
.bd-author-profile__contact-list a:hover {
    text-decoration: underline;
}
.bd-author-profile__contact-list i {
    width: 1.2em;
    text-align: center;
    opacity: 0.85;
    color: var(--body, #555);
}
.bd-author-profile__contact-card .btn {
    display: block;
    text-align: center;
    width: 100%;
    /* Theme-Default .btn nutzt content-box + min-width:160px + padding:10px 18px,
       was zusammen >200px ergibt und in der schmalen col-4-Sidebar überläuft.
       Border-box + min-width:0 erzwingen volle Card-Breite ohne Overflow. */
    box-sizing: border-box;
    min-width: 0;
}

/* Sidebar: das Theme-Default-.sticky-sidebar setzt max-height + overflow-y:auto.
   Auf single-post passt das (TOC kompakt), auf der Author-Seite mit Kontakt-Card
   wird's knapp und es entsteht eine störende Scrollbar. Hier neutralisieren —
   sticky-Verhalten bleibt, aber kein interner Scroll. */
.bd-author-profile__sidebar.sticky-sidebar {
    max-height: none;
    overflow-y: visible;
}
/* Sprachen-Meta-Zeile innerhalb der Kontakt-Card.
   Kein eigenes H3 mehr (war semantisch falsch — keine Subsektion von "Kontakt").
   Statt Box-Container jetzt schlichter Inline-Label im Stil einer Meta-Zeile. */
.bd-author-profile__languages {
    margin: 1rem 0 0 0;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.9rem;
    color: var(--body, #555);
}
.bd-author-profile__languages strong {
    color: var(--body, #222);
    margin-right: 0.25em;
}

.bd-author-profile__articles {
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 2px solid var(--primary, #007d32);
}
.bd-author-profile__articles h2 {
    margin-bottom: 1.5rem;
}

/* =====================================================================
   Code-Block (Gutenberg core/code)
   ---------------------------------------------------------------------
   Vorher: nackter Browser-Default (transparent <pre>, Standard-Button).
   Jetzt: dunkles Code-Panel mit horizontalem Scroll, Copy-Button oben rechts,
   Inline-`code` mit dezenter Markierung. Tokens stehen als CSS-Vars bereit,
   falls später ein Syntax-Highlighter (Prism o. ä.) ergänzt wird.
   ===================================================================== */
:root {
    --bd-code-bg:        #1e1e2e;
    --bd-code-fg:        #f8f8f2;
    --bd-code-fg-muted:  #a6adc8;
    --bd-code-border:    rgba(255, 255, 255, 0.08);
    --bd-code-radius:    8px;
    --bd-code-font:      'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Monaco, 'Courier New', monospace;
    --bd-code-inline-bg: #f4f4f4;
    --bd-code-inline-fg: #c7254e;
}

.wp-block-code {
    position: relative;
    background: var(--bd-code-bg);
    color: var(--bd-code-fg);
    border: 1px solid var(--bd-code-border);
    border-radius: var(--bd-code-radius);
    padding: 1.5rem 1.25rem;
    margin: 1.75rem 0;
    overflow-x: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    font-family: var(--bd-code-font);
    font-size: 0.9rem;
    line-height: 1.6;
    /* Damit der Copy-Button nicht über den Text läuft, wenn die erste Zeile lang ist. */
    padding-right: 6.5rem;
}
.wp-block-code code {
    display: block;
    background: none;
    color: inherit;
    padding: 0;
    margin: 0;
    border: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    white-space: pre;
    /* Tab-Stops vernünftig — Default 8 ist auf engen Spalten unangenehm */
    tab-size: 4;
    -moz-tab-size: 4;
}

/* Eigener Scrollbalken im Code-Panel: schlank + farblich passend */
.wp-block-code::-webkit-scrollbar {
    height: 8px;
}
.wp-block-code::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}
.wp-block-code::-webkit-scrollbar-track {
    background: transparent;
}

/* Copy-Button (von codeblock-script.js eingehängt) */
.bd-copy-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    background: rgba(255, 255, 255, 0.08);
    color: var(--bd-code-fg);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 5px;
    padding: 0.35rem 0.7rem;
    font-family: var(--bd-code-font);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    user-select: none;
}
.bd-copy-btn:hover,
.bd-copy-btn:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.32);
    outline: none;
}
.bd-copy-btn--success {
    background: rgba(112, 195, 55, 0.22);
    border-color: rgba(112, 195, 55, 0.5);
    color: #d7f5be;
}
.bd-copy-btn--error {
    background: rgba(229, 62, 62, 0.22);
    border-color: rgba(229, 62, 62, 0.5);
    color: #ffcfcf;
}

/* Inline-Code: <code> nicht in <pre> (z. B. innerhalb Absätzen, Listen, Headings) */
:not(pre) > code {
    background: var(--bd-code-inline-bg);
    color: var(--bd-code-inline-fg);
    padding: 0.12em 0.45em;
    border-radius: 3px;
    font-family: var(--bd-code-font);
    font-size: 0.875em;
    word-break: break-word;
}

/* Mobile: weniger Padding, kleinere Schrift, Button kompakter */
@media (max-width: 640px) {
    .wp-block-code {
        font-size: 0.82rem;
        padding: 1.25rem 1rem;
        padding-right: 1rem;
        padding-top: 2.75rem; /* Platz für Button oben statt rechts */
    }
    .bd-copy-btn {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.3rem 0.6rem;
        font-size: 0.72rem;
    }
}
