/*!
 * screenfox Blog – Frontend-Styles
 * Baut auf Bootstrap 5 auf und nutzt dessen CSS-Variablen.
 * Farben/Abstände zentral über die --sfx-* Variablen anpassen.
 */
.sfx-blog {
    --sfx-accent: var(--bs-primary, #0d6efd);
    --sfx-accent-rgb: var(--bs-primary-rgb, 13, 110, 253);
    --sfx-text: var(--bs-body-color, #212529);
    --sfx-muted: var(--bs-secondary-color, #6c757d);
    --sfx-border: var(--bs-border-color, #dee2e6);
    --sfx-surface: var(--bs-tertiary-bg, #f8f9fa);
    --sfx-radius: var(--bs-border-radius-lg, .5rem);
    --sfx-header-bg: var(--sfx-surface);
    --sfx-content-width: 46rem;
    --sfx-sticky-top: 6rem; /* Höhe einer fixierten Hauptnavigation */
}

.sfx-icon { display: inline-block; vertical-align: -.125em; flex-shrink: 0; }

/* ---------------------------------------------------------------- Kopfbereich */
.sfx-blog-header {
    background: var(--sfx-header-bg);
    border-bottom: 1px solid var(--sfx-border);
    padding: 1.5rem 0 2rem;
    margin-bottom: 2.5rem;
}
.sfx-blog-breadcrumb .breadcrumb { font-size: .875rem; margin-bottom: 1rem; }
.sfx-blog-breadcrumb a { color: var(--sfx-muted); text-decoration: none; }
.sfx-blog-breadcrumb a:hover { color: var(--sfx-accent); text-decoration: underline; }
.sfx-blog-kicker {
    font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--sfx-accent); margin-bottom: .25rem;
}
.sfx-blog-title { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); line-height: 1.15; margin: 0; text-wrap: balance; }
.sfx-blog-header-meta { margin-top: .75rem; color: var(--sfx-muted); font-size: .9375rem; }

.sfx-blog-meta { color: var(--sfx-muted); font-size: .9375rem; }
.sfx-blog-meta .list-inline-item { margin-right: 1.25rem; white-space: nowrap; }
.sfx-blog-meta .list-inline-item:last-child { margin-right: 0; }
.sfx-blog-meta a { color: inherit; }
.sfx-blog-meta a:hover { color: var(--sfx-accent); }
.sfx-blog-updated { white-space: nowrap; }

.sfx-blog-body { padding-bottom: 3rem; }

/* ---------------------------------------------------------------- Karten */
.sfx-blog-card {
    border: 1px solid var(--sfx-border);
    border-radius: var(--sfx-radius);
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}
.sfx-blog-card:hover, .sfx-blog-card:focus-within {
    box-shadow: 0 .75rem 1.75rem rgba(0, 0, 0, .09);
    transform: translateY(-2px);
}
.sfx-blog-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--sfx-surface); }
.sfx-blog-card-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .4s ease; }
.sfx-blog-card:hover .sfx-blog-card-img img { transform: scale(1.03); }
.sfx-blog-card-placeholder {
    display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
    font-size: 3.5rem; font-weight: 700; color: rgba(var(--sfx-accent-rgb), .35);
    background: linear-gradient(135deg, rgba(var(--sfx-accent-rgb), .08), rgba(var(--sfx-accent-rgb), .18));
}
.sfx-blog-card .card-body { padding: 1.25rem 1.25rem 1rem; }
.sfx-blog-card-cat {
    font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    color: var(--sfx-accent); margin-bottom: .4rem;
}
.sfx-blog-card-title { line-height: 1.3; margin-bottom: .6rem; }
.sfx-blog-card-title a { color: var(--sfx-text); text-decoration: none; }
.sfx-blog-card-title a:hover { color: var(--sfx-accent); }
.sfx-blog-card-text { color: var(--sfx-muted); font-size: .9375rem; margin-bottom: 1rem; }
.sfx-blog-card-meta {
    display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .8125rem; color: var(--sfx-muted);
    border-top: 1px solid var(--sfx-border); padding-top: .75rem;
}

@media (min-width: 768px) {
    .sfx-blog-card-featured .sfx-blog-card { flex-direction: row; }
    .sfx-blog-card-featured .sfx-blog-card-img { flex: 0 0 55%; aspect-ratio: auto; min-height: 18rem; }
    .sfx-blog-card-featured .sfx-blog-card .card-body { padding: 1.75rem; }
    .sfx-blog-card-featured .sfx-blog-card-title { font-size: 1.5rem; }
}

.sfx-blog-intro { font-size: 1.0625rem; }

/* ---------------------------------------------------------------- Seitenleiste */
.sfx-blog-sidebar { display: grid; gap: 1.5rem; }
.sfx-blog-widget {
    border: 1px solid var(--sfx-border); border-radius: var(--sfx-radius);
    padding: 1.25rem 1.25rem 1rem;
}
.sfx-blog-widget-title {
    font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--sfx-muted); margin: 0 0 .75rem;
}
.sfx-blog-latest li { padding: .5rem 0; border-bottom: 1px solid var(--sfx-border); line-height: 1.35; }
.sfx-blog-latest li:last-child { border-bottom: 0; padding-bottom: 0; }
.sfx-blog-latest a { display: block; color: var(--sfx-text); text-decoration: none; font-size: .9375rem; }
.sfx-blog-latest a:hover, .sfx-blog-latest .active a { color: var(--sfx-accent); }
.sfx-blog-latest .active a { font-weight: 600; }
.sfx-blog-latest time { font-size: .75rem; color: var(--sfx-muted); }

.sfx-blog-categories a {
    display: flex; justify-content: space-between; align-items: center; gap: .5rem;
    padding: .4rem .5rem; margin: 0 -.5rem; border-radius: .375rem;
    color: var(--sfx-text); text-decoration: none;
}
.sfx-blog-categories a:hover { background: var(--sfx-surface); color: var(--sfx-accent); }
.sfx-blog-categories .active a { background: rgba(var(--sfx-accent-rgb), .1); color: var(--sfx-accent); font-weight: 600; }
.sfx-blog-categories .badge { background: var(--sfx-surface); color: var(--sfx-muted); font-weight: 500; }

.sfx-blog-tags { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.sfx-blog-tag {
    display: inline-block; padding: .2rem .65rem; border-radius: 2rem; font-size: .8125rem;
    background: var(--sfx-surface); color: var(--sfx-text); text-decoration: none; border: 1px solid var(--sfx-border);
}
.sfx-blog-tag:hover, .sfx-blog-tag.active { border-color: var(--sfx-accent); color: var(--sfx-accent); }
.sfx-blog-tag small { color: var(--sfx-muted); }

/* ---------------------------------------------------------------- Beitrag */
.sfx-blog-article { min-width: 0; }
.sfx-blog-post-image { margin: 0 0 2rem; }
.sfx-blog-post-image img { width: 100%; border-radius: var(--sfx-radius); }
.sfx-blog-lead { font-size: 1.1875rem; line-height: 1.6; color: var(--sfx-text); font-weight: 400; margin-bottom: 2rem; }

.sfx-blog-content { font-size: 1.0625rem; line-height: 1.75; }
.sfx-blog-layout-wide .sfx-blog-content, .sfx-blog-layout-wide .sfx-blog-lead { max-width: none; }
.sfx-blog-content h2 { font-size: 1.625rem; margin: 2.5rem 0 1rem; scroll-margin-top: var(--sfx-sticky-top); line-height: 1.25; }
.sfx-blog-content h3 { font-size: 1.25rem; margin: 2rem 0 .75rem; scroll-margin-top: var(--sfx-sticky-top); }
.sfx-blog-content > .sfx-block:first-child > h2:first-child { margin-top: 0; }
.sfx-blog-content img { max-width: 100%; height: auto; }
.sfx-blog-content a:not(.btn) { text-underline-offset: .2em; }
.sfx-blog-content blockquote:not(.blockquote) { border-left: 4px solid var(--sfx-border); padding-left: 1rem; color: var(--sfx-muted); }
.sfx-block { margin-bottom: 1.75rem; }
.sfx-block > :last-child { margin-bottom: 0; }

.sfx-block-image .figure { margin: 0; }
.sfx-block-image img { border-radius: var(--sfx-radius); width: 100%; }
.figure-caption { font-size: .875rem; color: var(--sfx-muted); margin-top: .5rem; }

.sfx-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .5rem; }
.sfx-gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: .375rem; }
.sfx-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.sfx-gallery a:hover img { transform: scale(1.05); }

.sfx-block-quote {
    border-left: 4px solid var(--bs-primary); padding: 1rem 1.5rem; background: var(--sfx-surface);
    border-radius: 0 var(--sfx-radius) var(--sfx-radius) 0; margin-left: 0; margin-right: 0;
}
.sfx-block-quote blockquote { font-size: 1.1875rem; font-style: italic; }
.sfx-block-quote blockquote > :last-child { margin-bottom: 0; }
.sfx-block-quote.sfx-style-info { border-left-color: var(--bs-info); }
.sfx-block-quote.sfx-style-success { border-left-color: var(--bs-success); }
.sfx-block-quote.sfx-style-warning { border-left-color: var(--bs-warning); }
.sfx-block-quote.sfx-style-danger { border-left-color: var(--bs-danger); }
.sfx-block-quote.sfx-style-dark { border-left-color: var(--bs-dark); }

.sfx-block-notice { border-radius: var(--sfx-radius); }
.sfx-block-notice > :last-child { margin-bottom: 0; }
.sfx-notice-title { margin-bottom: .35rem; display: flex; gap: .4rem; align-items: center; }

.sfx-code { border-radius: var(--sfx-radius); overflow: hidden; background: #0d1117; }
.sfx-code-bar {
    display: flex; justify-content: space-between; align-items: center; padding: .4rem .75rem;
    background: #161b22; color: #8b949e; font-size: .75rem; font-family: var(--bs-font-monospace);
}
.sfx-code-copy { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: .15rem .35rem; border-radius: .25rem; }
.sfx-code-copy:hover, .sfx-code-copy:focus-visible { color: #fff; background: rgba(255, 255, 255, .08); }
.sfx-code pre { margin: 0; max-height: 36rem; }
.sfx-code pre code { display: block; padding: 1rem 1.1rem; font-size: .875rem; line-height: 1.6; color: #e6edf3; background: transparent; }
.sfx-code pre code.hljs { padding: 1rem 1.1rem; background: transparent; }

.sfx-block-table .table { font-size: .9375rem; margin-bottom: 0; }
.sfx-block-table .table-responsive { border: 1px solid var(--sfx-border); border-radius: var(--sfx-radius); }
.sfx-block-table thead th { background: var(--sfx-surface); white-space: nowrap; }

.sfx-downloads li + li { margin-top: .5rem; }
.sfx-downloads a {
    display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem;
    border: 1px solid var(--sfx-border); border-radius: var(--sfx-radius); text-decoration: none; color: var(--sfx-text);
}
.sfx-downloads a:hover { border-color: var(--sfx-accent); color: var(--sfx-accent); }
.sfx-downloads .sfx-icon { font-size: 1.25rem; color: var(--sfx-accent); }
.sfx-dl-title { flex: 1; font-weight: 500; }
.sfx-dl-meta { font-size: .8125rem; color: var(--sfx-muted); white-space: nowrap; }

.sfx-block-cta { border-radius: var(--sfx-radius); padding: 1.75rem; margin: 2.5rem 0; }
.sfx-cta-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; }
.sfx-cta-text { flex: 1 1 18rem; }
.sfx-cta-text > :last-child { margin-bottom: 0; }
.sfx-cta-img img { width: 7.5rem; height: auto; border-radius: .375rem; }

.sfx-block-product { overflow: hidden; border-radius: var(--sfx-radius); margin: 2.5rem 0; }
.sfx-product-img img { width: 100%; height: 100%; object-fit: cover; }
.sfx-product-kicker { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sfx-accent); }

.sfx-video { border-radius: var(--sfx-radius); overflow: hidden; background: #111; }
.sfx-video-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.sfx-video-consent {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .75rem; padding: 1rem; text-align: center; color: #fff;
}
.sfx-video-consent small { max-width: 30rem; opacity: .9; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.sfx-video-consent a { color: #fff; }
.sfx-video iframe { border: 0; }

.sfx-block-faq .accordion-button { font-weight: 600; }
.sfx-block-faq .accordion-body > :last-child { margin-bottom: 0; }

/* Fuß des Beitrags */
.sfx-blog-article-footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--sfx-border); display: grid; gap: 1.25rem; }
.sfx-blog-post-tags { color: var(--sfx-muted); }
.sfx-blog-share { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.sfx-blog-share-label { font-size: .875rem; color: var(--sfx-muted); margin-right: .25rem; }
.sfx-blog-author { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem; background: var(--sfx-surface); border-radius: var(--sfx-radius); }
.sfx-blog-author-img { width: 5rem; height: 5rem; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.sfx-blog-author-name { font-weight: 700; }
.sfx-blog-author-job { font-size: .875rem; color: var(--sfx-muted); margin-bottom: .4rem; }
.sfx-blog-back { margin: 0; }
.sfx-blog-back a { text-decoration: none; font-weight: 500; }

.sfx-blog-related { background: var(--sfx-surface); padding: 3rem 0; border-top: 1px solid var(--sfx-border); }

/* Inhaltsverzeichnis (Layout „Anleitung“) */
.sfx-blog-sticky { position: sticky; top: var(--sfx-sticky-top); margin-bottom: 1.5rem; z-index: 1; }
.sfx-blog-toc { border: 1px solid var(--sfx-border); border-radius: var(--sfx-radius); padding: 1rem 1.25rem; background: var(--bs-body-bg, #fff); }
.sfx-blog-toc summary { cursor: pointer; list-style: none; margin: 0; display: flex; align-items: center; gap: .4rem; }
.sfx-blog-toc summary::-webkit-details-marker { display: none; }
.sfx-blog-toc details[open] summary { margin-bottom: .5rem; }
.sfx-blog-toc ol { padding-left: 1.25rem; font-size: .9375rem; max-height: 60vh; overflow: auto; }
.sfx-blog-toc li { padding: .2rem 0; }
.sfx-blog-toc a { color: var(--sfx-text); text-decoration: none; }
.sfx-blog-toc a:hover, .sfx-blog-toc a.active { color: var(--sfx-accent); }
.sfx-blog-toc a.active { font-weight: 600; }

/* Layout „Landingpage“ */
.sfx-blog-hero {
    position: relative; min-height: clamp(22rem, 55vh, 36rem); display: flex; align-items: flex-end;
    background: #1d232a; color: #fff; margin-bottom: 3rem; overflow: hidden;
}
.sfx-blog-hero-noimg { background: linear-gradient(135deg, rgba(var(--sfx-accent-rgb), 1), #1d232a); }
.sfx-blog-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sfx-blog-hero-overlay {
    position: relative; width: 100%; padding: 6rem 0 2.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .45) 55%, rgba(0, 0, 0, 0) 100%);
}
.sfx-blog-hero .sfx-blog-title { color: #fff; max-width: 52rem; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.sfx-blog-hero .sfx-blog-header-meta, .sfx-blog-hero .sfx-blog-meta, .sfx-blog-hero .sfx-blog-breadcrumb a,
.sfx-blog-hero .breadcrumb-item.active, .sfx-blog-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, .85); }

/* Vorschau-Hinweis */
.sfx-blog-preview-bar {
    position: sticky; top: 0; z-index: 1030; background: #ffc107; color: #000; text-align: center;
    font-weight: 600; padding: .4rem 1rem; font-size: .875rem;
}

/* ---------------------------------------------------------------- Startseiten-Teaser */
.sfx-blog-teaser { padding: 3.5rem 0; }
.sfx-teaser-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1.5rem; margin-bottom: 1.75rem; }
.sfx-teaser-title { margin: 0; }
.sfx-teaser-all { font-weight: 500; text-decoration: none; white-space: nowrap; }
.sfx-teaser-all:hover { text-decoration: underline; }
.sfx-teaser-popular { border: 1px solid var(--sfx-border); border-radius: var(--sfx-radius); padding: 1.25rem; height: 100%; }
.sfx-teaser-popular li { display: flex; gap: .9rem; padding: .75rem 0; border-bottom: 1px solid var(--sfx-border); }
.sfx-teaser-popular li:last-child { border-bottom: 0; padding-bottom: 0; }
.sfx-teaser-popular a { display: block; color: var(--sfx-text); text-decoration: none; font-weight: 600; line-height: 1.3; }
.sfx-teaser-popular a:hover { color: var(--sfx-accent); }
.sfx-teaser-popular small { color: var(--sfx-muted); }
.sfx-rank {
    flex: 0 0 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(var(--sfx-accent-rgb), .12); color: var(--sfx-accent); font-weight: 700;
}

/* ---------------------------------------------------------------- Lightbox */
.sfx-lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; overflow: visible; }
.sfx-lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.sfx-lightbox img { display: block; max-width: 96vw; max-height: 86vh; width: auto; height: auto; border-radius: .375rem; margin: 0 auto; }
.sfx-lightbox p { color: #fff; text-align: center; margin: .6rem 0 0; font-size: .9375rem; }
.sfx-lightbox button {
    position: fixed; background: rgba(255, 255, 255, .12); color: #fff; border: 0; width: 3rem; height: 3rem;
    border-radius: 50%; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.sfx-lightbox button:hover, .sfx-lightbox button:focus-visible { background: rgba(255, 255, 255, .25); }
.sfx-lightbox .sfx-lb-close { top: 1rem; right: 1rem; }
.sfx-lightbox .sfx-lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.sfx-lightbox .sfx-lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

@media (prefers-reduced-motion: reduce) {
    .sfx-blog-card, .sfx-blog-card-img img, .sfx-gallery img { transition: none; }
    .sfx-blog-card:hover { transform: none; }
}

@media print {
    .sfx-blog-sidebar, .sfx-blog-share, .sfx-blog-related, .sfx-blog-toc, .sfx-code-copy, .sfx-blog-preview-bar { display: none !important; }
    .sfx-blog .col-lg-8 { width: 100%; }
}

/* Korrekturen */
.sfx-blog-card-img, .sfx-blog-card-img:hover { text-decoration: none; }
.sfx-code pre { overflow: auto; }
