/* ═══════════════════════════════════════════════════════════
   BLOGBEITRAG – EINZELSEITE
   Lesekomfort: schmale Textspalte, Bilder dürfen ausbrechen
   ═══════════════════════════════════════════════════════════ */

.kkb-article {
    font-family: var(--rz-font, 'Inter', sans-serif);
    font-weight: var(--rz-weight-body, 300);
    color: var(--rz-color-text, #1a1a1a);
    width: 90%;
    max-width: 1290px;
    margin: 0 auto;
    padding: 48px 0 80px;
    line-height: 1.6;
}

/* Lesespalte – alles Textliche wird hierauf begrenzt */
.kkb-topbar,
.kkb-head,
.kkb-content,
.kkb-links {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Kopf ──────────────────────────────────────────────────── */

.kkb-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--rz-color-muted, #8a8a8a);
    text-decoration: none;
    margin-bottom: 0;
    transition: color 0.18s;
}
.kkb-topbar { margin-bottom: 24px; }
.kkb-back:hover { color: var(--rz-color-text, #1a1a1a); }
.kkb-back-arrow { display: inline-block; transition: transform 0.18s; }
.kkb-back:hover .kkb-back-arrow { transform: translateX(-3px); }

.kkb-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    line-height: 1;
}
.kkb-cat {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--rz-color-muted, #8a8a8a);
}
.kkb-cat + .kkb-cat::before {
    content: '·';
    margin-right: 10px;
    font-weight: 400;
    opacity: 0.55;
}

.kkb-title {
    font-family: var(--rz-font-heading, 'Inter', sans-serif);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: var(--rz-weight-heading, 600);
    line-height: 1.18;
    letter-spacing: -0.015em;
    margin: 0 0 18px;
    color: var(--rz-color-text, #1a1a1a);
}

.kkb-lead {
    font-size: 18px;
    line-height: 1.65;
    color: var(--rz-color-muted, #8a8a8a);
    margin: 0 0 24px;
    font-weight: var(--rz-weight-body, 300);
}

.kkb-byline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--rz-color-muted, #8a8a8a);
    padding-bottom: 28px;
    margin-bottom: 36px;
    border-bottom: 1px solid var(--rz-color-line, #e8e8e8);
}
.kkb-meta-sep { opacity: 0.5; }

/* ── Titelbild (volle Breite) ──────────────────────────────── */

.kkb-hero {
    margin: 0 0 40px;
    padding: 0;
    max-width: 720px;   /* gleiche Breite wie die Textspalte */
    margin-left: auto;
    margin-right: auto;
}
.kkb-hero img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--rz-img-radius, 0px);
}
.kkb-hero figcaption {
    font-size: 12.5px;
    color: var(--rz-color-muted, #8a8a8a);
    margin-top: 10px;
    text-align: center;
    font-style: italic;
}

/* ── Inhalt (Gutenberg) ────────────────────────────────────── */

.kkb-content {
    font-size: 17px;
    line-height: 1.78;
}

.kkb-content > * { margin-bottom: 24px; }
.kkb-content > *:last-child { margin-bottom: 0; }

.kkb-content p {
    margin: 0 0 24px;
    color: var(--rz-color-text, #1a1a1a);
}

.kkb-content h2,
.kkb-content h3,
.kkb-content h4 {
    font-family: var(--rz-font-heading, 'Inter', sans-serif);
    font-weight: var(--rz-weight-heading, 600);
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--rz-color-text, #1a1a1a);
    margin: 48px 0 16px;
}
.kkb-content h2 { font-size: 27px; }
.kkb-content h3 { font-size: 21px; margin-top: 38px; }
.kkb-content h4 { font-size: 18px; margin-top: 32px; }

.kkb-content a {
    color: var(--rz-color-accent, #1a1a1a);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: opacity 0.15s;
}
.kkb-content a:hover { opacity: 0.65; }

.kkb-content ul,
.kkb-content ol {
    margin: 0 0 24px;
    padding-left: 22px;
}
.kkb-content li { margin-bottom: 9px; }

.kkb-content strong { font-weight: var(--rz-weight-heading, 600); }

/* Bilder im Inhalt dürfen breiter sein als die Textspalte */
.kkb-content figure,
.kkb-content .wp-block-image {
    margin: 40px 0;
}
.kkb-content img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--rz-img-radius, 0px);
}
.kkb-content figcaption {
    font-size: 12.5px;
    color: var(--rz-color-muted, #8a8a8a);
    margin-top: 10px;
    text-align: center;
    font-style: italic;
}

/* Breite Bilder (Gutenberg "Weite Breite" / "Volle Breite") */
.kkb-content .alignwide {
    width: calc(100% + 160px);
    max-width: calc(100vw - 80px);
    margin-left: -80px;
    margin-right: -80px;
}
.kkb-content .alignfull {
    width: calc(100% + 240px);
    max-width: calc(100vw - 40px);
    margin-left: -120px;
    margin-right: -120px;
}

/* Zitate */
.kkb-content blockquote {
    margin: 40px 0;
    padding: 22px 28px;
    background: var(--rz-color-bg-soft, #fafafa);
    border-left: 2.5px solid var(--rz-color-accent, #1a1a1a);
    font-size: 18px;
    line-height: 1.7;
}
.kkb-content blockquote p:last-child { margin-bottom: 0; }
.kkb-content blockquote cite {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--rz-color-muted, #8a8a8a);
    font-style: normal;
}

/* Trennlinie */
.kkb-content hr {
    border: none;
    border-top: 1px solid var(--rz-color-line, #e8e8e8);
    margin: 48px 0;
}

/* Galerie */
.kkb-content .wp-block-gallery { margin: 40px 0; }

/* Eingebettete Videos */
.kkb-content iframe {
    max-width: 100%;
    border-radius: var(--rz-img-radius, 0px);
}

/* ── Galerie ───────────────────────────────────────────────── */

.kkb-gallery-section {
    margin-top: 48px;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.kkb-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.kkb-gal-fig {
    margin: 0;
    padding: 0;
}
.kkb-gal-fig img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    border-radius: var(--rz-img-radius, 0px);
    cursor: zoom-in;
    transition: opacity 0.2s;
}
.kkb-gal-fig img:hover { opacity: 0.88; }

.kkb-gal-fig figcaption {
    font-size: 12px;
    color: var(--rz-color-muted, #8a8a8a);
    margin-top: 7px;
    line-height: 1.5;
}

/* ── Lightbox ──────────────────────────────────────────────── */

.kkb-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15,15,15,0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.kkb-lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}
.kkb-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    display: block;
}
.kkb-lb-close,
.kkb-lb-prev,
.kkb-lb-next {
    position: absolute;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.16s;
    font-family: inherit;
}
.kkb-lb-close:hover,
.kkb-lb-prev:hover,
.kkb-lb-next:hover { background: rgba(255,255,255,0.26); }

.kkb-lb-close {
    top: 22px; right: 22px;
    width: 42px; height: 42px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
}
.kkb-lb-prev, .kkb-lb-next {
    top: 50%;
    transform: translateY(-50%);
    width: 48px; height: 68px;
    font-size: 26px;
}
.kkb-lb-prev { left: 18px; }
.kkb-lb-next { right: 18px; }

.kkb-lb-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    letter-spacing: 0.05em;
}

/* ── Link-Buttons ──────────────────────────────────────────── */

.kkb-links {
    margin-top: 52px;
    padding-top: 38px;
    border-top: 1px solid var(--rz-color-line, #e8e8e8);
}

.kkb-links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.kkb-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--rz-font, 'Inter', sans-serif);
    font-size: 14.5px;
    font-weight: 500;
    padding: 14px 28px;
    border-radius: var(--rz-btn-radius, 0px);
    text-decoration: none;
    border: 1.5px solid var(--rz-color-accent, #1a1a1a);
    transition: all 0.18s;
    line-height: 1.3;
}

.kkb-link-btn--primary {
    background: var(--rz-color-accent, #1a1a1a);
    color: #fff;
}
.kkb-link-btn--primary:hover {
    opacity: 0.84;
    color: #fff;
}

.kkb-link-btn--outline {
    background: transparent;
    color: var(--rz-color-accent, #1a1a1a);
}
.kkb-link-btn--outline:hover {
    background: var(--rz-color-accent, #1a1a1a);
    color: #fff;
}

.kkb-link-arrow {
    transition: transform 0.18s;
    display: inline-block;
}
.kkb-link-btn:hover .kkb-link-arrow { transform: translateX(3px); }

/* ── Weitere Beiträge ──────────────────────────────────────── */

.kkb-related {
    margin-top: 80px;
    padding-top: 52px;
    border-top: 1px solid var(--rz-color-line, #e8e8e8);
}

.kkb-related-title {
    font-family: var(--rz-font-heading, 'Inter', sans-serif);
    font-size: 24px;
    font-weight: var(--rz-weight-heading, 600);
    margin: 0 0 32px;
    text-align: center;
    color: var(--rz-color-text, #1a1a1a);
}

.kkb-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.kkb-related-card {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.22s ease;
    min-width: 0;
}
.kkb-related-card:hover { transform: translateY(-4px); color: inherit; }

.kkb-related-img-wrap {
    aspect-ratio: var(--rz-card-ratio, 4/3);
    overflow: hidden;
    background: #f2f2f2;
    margin-bottom: 14px;
    border-radius: var(--rz-img-radius, 0px);
}
.kkb-related-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.kkb-related-card:hover .kkb-related-img-wrap img { transform: scale(1.04); }

.kkb-related-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    background: #f5f5f5;
}

.kkb-related-name {
    font-family: var(--rz-font-heading, 'Inter', sans-serif);
    font-size: 16px;
    font-weight: var(--rz-weight-heading, 600);
    line-height: 1.35;
    margin: 0 0 6px;
    color: var(--rz-color-text, #1a1a1a);
}
.kkb-related-meta {
    font-size: 12.5px;
    color: var(--rz-color-muted, #8a8a8a);
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 900px) {
    .kkb-content .alignwide,
    .kkb-content .alignfull {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .kkb-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kkb-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .kkb-article { padding: 28px 0 56px; }
    .kkb-hero { margin: 0 0 28px; }
    .kkb-content { font-size: 16.5px; }
    .kkb-content h2 { font-size: 23px; margin-top: 38px; }
    .kkb-content h3 { font-size: 19px; }

    .kkb-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .kkb-link-btn { width: 100%; justify-content: center; }
    .kkb-lb-prev, .kkb-lb-next { width: 40px; height: 56px; font-size: 22px; }

    .kkb-related-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
}

/* ── Druck ─────────────────────────────────────────────────── */

@media print {
    .kkb-back, .kkb-related, .kkb-lightbox, nav, .site-header, .site-footer { display: none !important; }
    .kkb-article { width: 100%; max-width: 100%; padding: 0; }
    .kkb-content { font-size: 12pt; }
}
