/* ==========================================================================
   Stahlreport - Ghost-Theme
   Custom Theme fuer news.stahlreport.com (BDS / Stahlreport)

   Branding zentral ueber die CSS-Variablen in :root.
   Farben/Typografie abgeleitet aus der Optik von stahlreport.com
   (B2B-Fachzeitschrift, seriös-klassisch). Falls exakte CI-Werte
   vorliegen, hier anpassen -- der Rest zieht automatisch nach.
   ========================================================================== */

:root {
    /* --- Markenfarben (abgeleitet -- bei Bedarf an CI anpassen) --- */
    --color-primary:       #0f2a47;   /* Dunkelblau/Anthrazit (Header, Titel) */
    --color-primary-dark:  #0a1d33;
    --color-accent:        #e2001a;   /* Rot/Orange-Akzent (Links, Kicker) */
    --color-accent-dark:   #b80016;

    --color-bg:            #ffffff;
    --color-surface:       #f4f6f8;   /* Karten-/Sektionshintergrund */
    --color-text:          #1a2330;
    --color-text-muted:    #5a6b7b;
    --color-border:        #e2e8ee;

    /* --- Typografie --- */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    --font-heading: var(--font-sans);

    /* --- Layout --- */
    --container-width: 1180px;
    --container-narrow: 720px;
    --radius: 6px;
    --shadow: 0 1px 3px rgba(15, 42, 71, 0.08), 0 6px 18px rgba(15, 42, 71, 0.06);
    --gap: 2rem;
}

/* --- Reset / Basis --- */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 17px; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-sans);
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-dark); text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
    margin: 0 0 0.5em;
    font-weight: 700;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.container--narrow { max-width: var(--container-narrow); }

.button {
    display: inline-block;
    background: var(--color-accent);
    color: #fff;
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
}
.button:hover { background: var(--color-accent-dark); color: #fff; text-decoration: none; }

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
    background: var(--color-primary);
    border-bottom: 3px solid var(--color-accent);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 1rem;
}
.site-logo img { height: 44px; width: auto; }

.site-nav__list {
    display: flex;
    gap: 1.6rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav__item a {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.4rem 0;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.site-nav__item a:hover { color: #fff; border-bottom-color: var(--color-accent); }
.site-nav__item.is-current a { border-bottom-color: var(--color-accent); }

/* Mobile-Burger (CSS-only) */
.site-nav__toggle { display: none; }
.site-nav__burger { display: none; cursor: pointer; }
.site-nav__burger span {
    display: block; width: 26px; height: 2px; margin: 5px 0;
    background: #fff; transition: 0.2s;
}

/* ==========================================================================
   Beitrags-Feed (Startseite, Archive)
   ========================================================================== */
.site-main { padding: 3rem 0 4rem; }

.post-feed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(15,42,71,0.12); }

.post-card__image-link { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.post-card__image { width: 100%; height: 100%; object-fit: cover; }

.post-card__body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }

.post-card__tag,
.article__kicker,
.archive-header__kicker {
    display: inline-block;
    color: var(--color-accent);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
    text-decoration: none;
}
.post-card__title { font-size: 1.25rem; margin: 0 0 0.5rem; }
.post-card__title a { color: var(--color-primary); text-decoration: none; }
.post-card__title a:hover { color: var(--color-accent); }
.post-card__excerpt { color: var(--color-text-muted); font-size: 0.95rem; margin: 0 0 1rem; flex: 1; }
.post-card__meta {
    color: var(--color-text-muted);
    font-size: 0.82rem;
    display: flex;
    gap: 1rem;
    border-top: 1px solid var(--color-border);
    padding-top: 0.8rem;
}

/* Hero-Beitrag (erster auf der Startseite) */
.post-card--feature {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    align-items: stretch;
}
.post-card--feature .post-card__image-link { aspect-ratio: auto; height: 100%; min-height: 320px; }
.post-card--feature .post-card__body { justify-content: center; padding: 2.5rem; }
.post-card--feature .post-card__title { font-size: 2rem; }
.post-card--feature .post-card__excerpt { font-size: 1.05rem; }

/* ==========================================================================
   Artikel (Landing-/Leseseite)
   ========================================================================== */
.article { padding-bottom: 1rem; }
.article__header { text-align: center; padding: 1rem 0 2rem; }
.article__title { font-size: 2.6rem; margin: 0.3rem 0 1rem; }
.article__excerpt { font-size: 1.2rem; color: var(--color-text-muted); margin: 0 auto 1.5rem; max-width: 600px; }
.article__meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}
.article__author { font-weight: 600; color: var(--color-primary); }

.article__feature-image {
    margin: 0 0 2.5rem;
}
.article__feature-image img { width: 100%; max-height: 620px; object-fit: cover; }
.article__feature-image figcaption {
    text-align: center; color: var(--color-text-muted);
    font-size: 0.85rem; padding: 0.6rem 1.5rem 0;
}

.article__content { font-size: 1.12rem; }
.article__tags { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); display: flex; flex-wrap: wrap; gap: 0.6rem; }

.tag-chip {
    display: inline-block;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    text-decoration: none;
}
.tag-chip:hover { background: var(--color-primary); color: #fff; text-decoration: none; }

/* --- Ghost-Content (Koenig-Editor-Ausgabe) --- */
.gh-content > * { margin: 0 0 1.5rem; }
.gh-content h2 { font-size: 1.8rem; margin-top: 2.5rem; }
.gh-content h3 { font-size: 1.4rem; margin-top: 2rem; }
.gh-content a { text-decoration: underline; }
.gh-content img { border-radius: var(--radius); margin: 2rem auto; }
.gh-content figure { margin: 2rem 0; }
.gh-content figcaption { text-align: center; color: var(--color-text-muted); font-size: 0.85rem; margin-top: 0.6rem; }
.gh-content blockquote {
    margin: 2rem 0; padding: 0.5rem 0 0.5rem 1.5rem;
    border-left: 4px solid var(--color-accent);
    font-size: 1.25rem; color: var(--color-primary); font-style: italic;
}
.gh-content ul, .gh-content ol { padding-left: 1.4rem; }
.gh-content li { margin-bottom: 0.5rem; }
.gh-content pre {
    background: var(--color-primary-dark); color: #f4f6f8;
    padding: 1.2rem; border-radius: var(--radius); overflow-x: auto; font-size: 0.92rem;
}
.gh-content hr { border: none; border-top: 1px solid var(--color-border); margin: 2.5rem 0; }
.kg-width-wide { max-width: calc(var(--container-narrow) + 180px); margin-left: 50%; transform: translateX(-50%); }
.kg-width-full { max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }

/* ==========================================================================
   Archiv-Header (Tag / Autor)
   ========================================================================== */
.archive-header { background: var(--color-surface); padding: 3rem 0; margin-bottom: 3rem; border-bottom: 1px solid var(--color-border); text-align: center; }
.archive-header__title { font-size: 2.4rem; margin: 0.3rem 0 0.5rem; }
.archive-header__desc { color: var(--color-text-muted); max-width: 600px; margin: 0 auto; }

/* --- Related --- */
.related { background: var(--color-surface); padding: 3rem 0; margin-top: 3rem; border-top: 1px solid var(--color-border); }
.related__title { font-size: 1.5rem; margin-bottom: 1.5rem; }

/* --- Pagination --- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 1.5rem; margin-top: 3rem; }
.pagination a { font-weight: 600; }
.pagination .page-number { color: var(--color-text-muted); }

/* --- Fehlerseite --- */
.error-page { text-align: center; padding: 5rem 0; }
.error-page__code { font-size: 4rem; font-weight: 800; color: var(--color-accent); margin: 0; }
.error-page__title { font-size: 1.6rem; margin: 0.5rem 0 2rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--color-primary); color: #c8d4e0; margin-top: 4rem; }
.site-footer__inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding: 3rem 1.5rem; }
.site-footer__logo { height: 40px; width: auto; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.site-footer__desc { max-width: 360px; font-size: 0.95rem; color: #c8d4e0; }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; }
.site-footer__nav a { color: #c8d4e0; text-decoration: none; line-height: 2; }
.site-footer__nav a:hover { color: #fff; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 1.2rem 1.5rem; font-size: 0.85rem; color: #9fb0c0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .post-feed { grid-template-columns: repeat(2, 1fr); }
    .post-card--feature { grid-template-columns: 1fr; }
    .post-card--feature .post-card__image-link { min-height: 240px; }
    .article__title { font-size: 2rem; }
}

@media (max-width: 640px) {
    .post-feed { grid-template-columns: 1fr; }
    .article__title { font-size: 1.7rem; }
    .article__content { font-size: 1.05rem; }

    /* Mobile-Navigation */
    .site-nav__burger { display: block; }
    .site-nav {
        position: absolute; left: 0; right: 0; top: 76px;
        background: var(--color-primary-dark);
        max-height: 0; overflow: hidden; transition: max-height 0.25s ease; z-index: 20;
    }
    .site-nav__list { flex-direction: column; gap: 0; padding: 0.5rem 1.5rem; }
    .site-nav__item a { display: block; padding: 0.8rem 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .site-nav__toggle:checked ~ .site-nav { max-height: 380px; }
    .site-header__inner { position: relative; }
}
