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

.kkp-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 */
.kkp-topbar,
.kkp-head,
.kkp-content,
.kkp-links {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

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

.kkp-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;
}
.kkp-topbar { margin-bottom: 24px; }
.kkp-back:hover { color: var(--rz-color-text, #1a1a1a); }
.kkp-back-arrow { display: inline-block; transition: transform 0.18s; }
.kkp-back:hover .kkp-back-arrow { transform: translateX(-3px); }

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

.kkp-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);
}

.kkp-desc-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);
}

.kkp-meta-legacy {
    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);
}
.kkp-meta-sep { opacity: 0.5; }

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

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

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

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

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

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

.kkp-content h2,
.kkp-content h3,
.kkp-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;
}
.kkp-content h2 { font-size: 27px; }
.kkp-content h3 { font-size: 21px; margin-top: 38px; }
.kkp-content h4 { font-size: 18px; margin-top: 32px; }

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

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

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

/* Bilder im Inhalt dürfen breiter sein als die Textspalte */
.kkp-content figure,
.kkp-content .wp-block-image {
    margin: 40px 0;
}
.kkp-content img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--rz-img-radius, 0px);
}
.kkp-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") */
.kkp-content .alignwide {
    width: calc(100% + 160px);
    max-width: calc(100vw - 80px);
    margin-left: -80px;
    margin-right: -80px;
}
.kkp-content .alignfull {
    width: calc(100% + 240px);
    max-width: calc(100vw - 40px);
    margin-left: -120px;
    margin-right: -120px;
}

/* Zitate */
.kkp-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;
}
.kkp-content blockquote p:last-child { margin-bottom: 0; }
.kkp-content blockquote cite {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--rz-color-muted, #8a8a8a);
    font-style: normal;
}

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

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

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

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

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

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

.kkp-gal-fig {
    margin: 0;
    padding: 0;
}
.kkp-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;
}
.kkp-gal-fig img:hover { opacity: 0.88; }

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

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

.kkp-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;
}
.kkp-lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}
.kkp-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    display: block;
}
.kkp-lb-close,
.kkp-lb-prev,
.kkp-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;
}
.kkp-lb-close:hover,
.kkp-lb-prev:hover,
.kkp-lb-next:hover { background: rgba(255,255,255,0.26); }

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

.kkp-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;
}

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

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

.kkp-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);
}

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

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

.kkp-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);
}
.kkp-related-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.kkp-related-card:hover .kkp-related-img-wrap img { transform: scale(1.04); }

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

.kkp-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);
}
.kkp-related-meta {
    font-size: 12.5px;
    color: var(--rz-color-muted, #8a8a8a);
}

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

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

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

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

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

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

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

/* ═══════════════════════════════════════════════════════════
   PROJEKTSEITE – SPEZIFISCH
   ═══════════════════════════════════════════════════════════ */

.kkp-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 22px;
    color: var(--rz-color-text, #1a1a1a);
}

/* ── Kunde ─────────────────────────────────────────────────── */

.kkp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    padding: 20px 0;
    margin-bottom: 28px;
    border-top: 1px solid var(--rz-color-line, #e8e8e8);
    border-bottom: 1px solid var(--rz-color-line, #e8e8e8);
}

.kkp-meta-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.kkp-meta-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--rz-color-muted, #8a8a8a);
}

.kkp-meta-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--rz-color-text, #1a1a1a);
}
.kkp-meta-value a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: opacity 0.15s;
}
.kkp-meta-value a:hover { opacity: 0.6; }

.kkp-ext {
    font-size: 12px;
    margin-left: 3px;
    opacity: 0.6;
}

/* ── Beschreibung ──────────────────────────────────────────── */

.kkp-desc {
    font-size: 17px;
    line-height: 1.78;
    font-weight: var(--rz-weight-body, 300);
    color: var(--rz-color-text, #1a1a1a);
    margin-bottom: 30px;
}
.kkp-desc p { margin: 0 0 20px; }
.kkp-desc p:last-child { margin-bottom: 0; }
.kkp-desc h3 {
    font-family: var(--rz-font-heading, 'Inter', sans-serif);
    font-size: 20px;
    font-weight: var(--rz-weight-heading, 600);
    margin: 34px 0 14px;
}
.kkp-desc ul, .kkp-desc ol { margin: 0 0 20px; padding-left: 22px; }
.kkp-desc li { margin-bottom: 8px; }
.kkp-desc a {
    color: var(--rz-color-accent, #1a1a1a);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Projekt-Button ────────────────────────────────────────── */

.kkp-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--rz-font, 'Inter', sans-serif);
    font-size: 14px;
    font-weight: 500;
    padding: 14px 28px;
    border: 1.5px solid var(--rz-color-accent, #1a1a1a);
    border-radius: var(--rz-btn-radius, 0px);
    background: var(--rz-color-accent, #1a1a1a);
    color: #fff;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}
.kkp-cta:hover {
    background: transparent;
    color: var(--rz-color-accent, #1a1a1a);
}
.kkp-cta-arrow { transition: transform 0.18s ease; display: inline-block; }
.kkp-cta:hover .kkp-cta-arrow { transform: translateX(3px); }

/* ── Weitere Referenzen ────────────────────────────────────── */

.kkp-related-client {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--rz-color-muted, #8a8a8a);
}

/* ═══════════════════════════════════════════════════════════
   VIDEO statt Titelbild
   ═══════════════════════════════════════════════════════════ */

.kkp-hero--video {
    background: none;
    max-width: 980px;
    margin: 0 auto 40px;
}

.kkp-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--rz-img-radius, 0px);
    overflow: hidden;
}
.kkp-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

@media (max-width: 640px) {
    .kkp-hero--video { margin-bottom: 28px; }
}

@media print {
    .kkp-hero--video { display: none !important; }
}
