/* Bereich "Aktuelles": Blogübersicht, Beitragsseiten und Block auf der Startseite. Baut auf styles.css auf. */

/* ---------- Karten ---------- */
.kh-news-grid { display: grid; gap: 24px; margin-top: 32px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .kh-news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .kh-news-grid { grid-template-columns: repeat(3, 1fr); } }

.kh-news-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    isolation: isolate;
    transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s;
}
.kh-news-card::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .6s var(--ease);
}
.kh-news-media { display: block; overflow: hidden; aspect-ratio: 16 / 9; background: var(--ink-2); }
.kh-news-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.kh-news-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 22px 24px 20px; }
.kh-news-body h3 { font-family: var(--serif); font-weight: 450; font-size: 23px; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
.kh-news-body p { margin: 0; color: var(--muted); }
.kh-news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--muted); }
.kh-news-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}
@media (hover: hover) {
    .kh-news-card:hover { transform: translateY(-6px); box-shadow: 0 24px 60px -24px rgba(11, 23, 18, 0.35); border-color: transparent; }
    .kh-news-card:hover .kh-news-media img { transform: scale(1.06); }
    .kh-news-card:hover::after { transform: scaleX(1); }
}
.kh-news-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.kh-news-card-featured { margin-top: 8px; }
@media (min-width: 900px) {
    .kh-news-card-featured { display: grid; grid-template-columns: 1.35fr 1fr; }
    .kh-news-card-featured .kh-news-media { aspect-ratio: auto; min-height: 420px; }
    .kh-news-card-featured .kh-news-body { justify-content: center; padding: 48px; gap: 16px; }
    .kh-news-card-featured h3 { font-size: clamp(30px, 3vw, 42px); }
    .kh-news-card-featured p { font-size: 18px; }
}

.kh-news-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.kh-news-filter button {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--text);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background .25s, color .25s, border-color .25s;
}
.kh-news-filter button[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.kh-news-card[hidden] { display: none; }
.kh-news-empty { font-size: 18px; color: var(--muted); }

/* ---------- Logo als Wasserzeichen ---------- */
.kh-news-intro,
.kh-news-hero,
.kh-news-home { position: relative; overflow: hidden; }
.kh-news-intro-mark,
.kh-news-watermark,
.kh-news-home-mark {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    color: var(--accent-soft);
    animation: kh-mark-drift 28s ease-in-out infinite alternate;
}
.kh-news-intro-mark { width: min(620px, 80vw); right: -8%; top: -18%; opacity: .1; }
.kh-news-watermark { width: min(560px, 70vw); right: -6%; bottom: -22%; opacity: .14; color: #fff; z-index: 2; }
.kh-news-home-mark { width: min(520px, 70vw); left: -10%; bottom: -30%; opacity: .06; color: var(--accent-strong); }
.kh-news-home .kh-container,
.kh-news-intro .kh-container { position: relative; z-index: 1; }
@keyframes kh-mark-drift {
    from { transform: rotate(-6deg) translate3d(0, 0, 0); }
    to { transform: rotate(6deg) translate3d(-3%, 4%, 0); }
}

/* ---------- Übersicht ---------- */
.kh-news-intro { background: var(--ink); color: var(--white); padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 7vw, 96px); }
.kh-news-intro .kh-sub-h1 em { font-style: italic; }

/* ---------- Beitragsseite ---------- */
.kh-news-hero { min-height: min(78vh, 760px); display: flex; align-items: flex-end; background: var(--ink); color: var(--white); isolation: isolate; }
.kh-news-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transform: scale(1.08); animation: kh-hero-zoom 2.4s var(--ease) forwards; }
.kh-news-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(11, 23, 18, .25) 0%, rgba(11, 23, 18, .55) 45%, rgba(11, 23, 18, .94) 100%); }
.kh-news-hero-inner { position: relative; z-index: 3; width: 100%; padding-top: 96px; padding-bottom: clamp(36px, 6vw, 72px); }
.kh-news-hero .kh-sub-h1 { max-width: 20ch; }
.kh-news-byline { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .75); }
@keyframes kh-hero-zoom { to { transform: scale(1); } }

.kh-news-anim { opacity: 0; transform: translateY(24px); animation: kh-rise .9s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 120ms + 150ms); }
@keyframes kh-rise { to { opacity: 1; transform: none; } }

.kh-news-progress { position: sticky; top: var(--nav-h); z-index: 50; height: 3px; background: transparent; }
.kh-news-progress span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-soft)); transform: scaleX(0); transform-origin: left; }

.kh-news-article > p:first-of-type::first-letter {
    float: left;
    font-family: var(--serif);
    font-size: 4.2em;
    line-height: .85;
    padding: 6px 10px 0 0;
    color: var(--accent-strong);
}
.kh-news-article blockquote {
    margin: 32px 0;
    padding: 8px 0 8px 24px;
    border-left: 3px solid var(--accent);
    font-family: var(--serif);
    font-size: 22px;
    line-height: 1.45;
    color: var(--text);
}

.kh-news-sources { margin-top: 48px; padding: 24px 28px; border-radius: 18px; background: var(--paper-2); }
.kh-news-sources h2 { margin: 0 0 12px !important; font-size: 22px !important; }
.kh-news-sources ul { margin: 0; padding-left: 20px; }
.kh-news-sources li span { color: var(--muted); }
.kh-news-credit { margin: 16px 0 0 !important; font-size: 14px; color: var(--muted); }

.kh-news-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 32px; }
.kh-news-share > span { font-weight: 600; color: var(--text); margin-right: 4px; }
.kh-news-share a,
.kh-news-share button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--text) !important;
    font: inherit;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .25s, background .25s;
}
.kh-news-share a:hover,
.kh-news-share button:hover { border-color: var(--accent); background: rgba(16, 185, 129, .08); }

/* ---------- Einblenden beim Scrollen (nur wenn JS läuft) ---------- */
.kh-js-reveal [data-kh-reveal] { opacity: 0; transform: translateY(40px) scale(.98); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--kh-delay, 0ms); }
.kh-js-reveal [data-kh-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .kh-news-intro-mark, .kh-news-watermark, .kh-news-home-mark, .kh-news-hero-img { animation: none; transform: none; }
    .kh-news-anim { animation: none; opacity: 1; transform: none; }
    .kh-js-reveal [data-kh-reveal] { opacity: 1; transform: none; transition: none; }
    .kh-news-card, .kh-news-media img, .kh-news-card::after { transition: none; }
}
