/*
 * STM-Koenigliste – Frontend CSS v2.0
 * Akzentfarbe: #00381c
 */

:root {
    --stm-kl-accent:       #00381c;
    --stm-kl-accent-mid:   #00582c;
    --stm-kl-accent-light: #e6f2ec;
    --stm-kl-border:       #d0d7de;
    --stm-kl-text:         #1a1a1a;
    --stm-kl-muted:        #5a6472;
    --stm-kl-stripe:       #f4f8f6;
    --stm-kl-gold:         #c8941a;
    --stm-kl-gold-light:   #fdf6e3;
    --stm-kl-radius:       6px;
    --stm-kl-font:         'Georgia', serif;
    --stm-kl-font-ui:      -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Liste ───────────────────────────────────── */
.stm-kl-liste {margin: 1.5em 0; }

.stm-kl-table-wrap {
    overflow-x: auto; overflow-y: auto; max-height: 70vh;
    border-radius: var(--stm-kl-radius); border: 1px solid var(--stm-kl-border);
}

.stm-kl-table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--stm-kl-text); }

.stm-kl-table thead th {
    background: var(--stm-kl-accent); color: #fff;
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    padding: 10px 14px; text-align: left; white-space: nowrap;
    position: sticky; top: 0; z-index: 2; box-shadow: 0 2px 4px rgba(0,0,0,.15);
}

.stm-kl-table tbody tr:nth-child(even) { background: var(--stm-kl-stripe); }
.stm-kl-table tbody tr:hover           { background: var(--stm-kl-accent-light); }
.stm-kl-table tbody td { padding: 9px 14px; border-bottom: 1px solid var(--stm-kl-border); vertical-align: middle; }
.stm-kl-table tbody tr:last-child td { border-bottom: none; }

.stm-kl-nr, .stm-kl-jahr { white-space: nowrap; width: 60px; }

.stm-kl-table a { color: var(--stm-kl-accent); text-decoration: none; font-weight: 600; }
.stm-kl-table a:hover { text-decoration: underline; color: var(--stm-kl-accent-mid); }

/* ── Detail ──────────────────────────────────── */
.stm-kl-detail {max-width: 800px; margin: 1.5em auto; }

.stm-kl-detail__header { border-left: 4px solid var(--stm-kl-accent); padding-left: 16px; margin-bottom: 24px; }

.stm-kl-detail__meta { display: flex; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.stm-kl-detail__badge {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    color: var(--stm-kl-muted); background: var(--stm-kl-stripe);
    padding: 2px 8px; border-radius: 3px;
}

.stm-kl-detail__name {
    color: var(--stm-kl-accent); margin: 0 !important;
}

.stm-kl-detail__bild { margin-bottom: -24px; }
.stm-kl-detail__bild img {
    max-width: 100%; height: auto; border-radius: var(--stm-kl-radius);
    border: 1px solid var(--stm-kl-border);
}

.stm-kl-detail__section { margin-bottom: 24px; }
.stm-kl-detail__section-title {
    font-size: 16px; font-weight: normal;
    color: var(--stm-kl-accent); border-bottom: 2px solid var(--stm-kl-accent-light);
    padding-bottom: 6px; margin: 0 0 12px;
}

/* Hofstaat-Tabelle */
.stm-kl-detail__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stm-kl-detail__table tr:nth-child(even) { background: var(--stm-kl-stripe); }
.stm-kl-detail__table td { padding: 7px 12px; border-bottom: 1px solid var(--stm-kl-border); width: 50%; }
.stm-kl-detail__table tr:last-child td { border-bottom: none; }

/* Insignien-Tabelle */
.stm-kl-detail__insignien-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stm-kl-detail__insignien-table thead th {
    background: var(--stm-kl-gold-light); color: var(--stm-kl-gold);
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    padding: 7px 12px; text-align: left; border-bottom: 2px solid #e8d5a3;
}
.stm-kl-detail__insignien-table tbody tr:nth-child(even) { background: var(--stm-kl-stripe); }
.stm-kl-detail__insignien-table tbody td { padding: 7px 12px; border-bottom: 1px solid var(--stm-kl-border); }
.stm-kl-detail__insignien-table tbody tr:last-child td { border-bottom: none; }
.stm-kl-ins-label { font-weight: 600; color: var(--stm-kl-text); }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 600px) {
    .stm-kl-table { font-size: 13px; }
    .stm-kl-detail__insignien-table { font-size: 13px; }
}

/* ════════════════════════════════════════════════
   Detail – Kadence-Stil
   Bild volle Breite proportional, Content-Box ragt ins Bild
   ════════════════════════════════════════════════ */

.stm-kl-detail-wrap {
    max-width: 100%;
    margin: 0 auto 2em;
    font-family: var(--stm-kl-font-ui);
}

/* ── Hero-Bild ───────────────────────────────── */
.stm-kl-detail-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0;
    background: var(--stm-kl-accent);
}

.stm-kl-detail-hero--nobild {
    height: 140px;
}

/* Bild nimmt volle Breite, Höhe proportional zum Bild */
.stm-kl-detail-hero__img {
    width: 100%;
    height: auto;
    display: block;
}

/* Verlauf unten für weichen Übergang zur Content-Box */
.stm-kl-detail-hero__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.35) 100%
    );
    pointer-events: none;
}

.stm-kl-detail-hero__placeholder {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: rgba(255,255,255,.4);
}

/* ── Content-Card ragt ins Bild ──────────────── */
.stm-kl-detail-card {
    position: relative;
    background: #fff;
    border-radius: var(--stm-kl-radius);
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    padding: 28px 32px 32px;
    margin: -60px 125px 0;   /* ragt 60px ins Bild hinein */
    z-index: 2;
}

/* ── Badges ──────────────────────────────────── */
.stm-kl-detail-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.stm-kl-detail-card__badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--stm-kl-accent);
    background: var(--stm-kl-accent-light);
    padding: 3px 10px;
    border-radius: 20px;
}

/* ── Name ────────────────────────────────────── */
.stm-kl-detail-card__name {
    font-family: var(--stm-kl-font);
    font-size: 28px;
    font-weight: normal;
    color: var(--stm-kl-accent);
    margin: 0 0 24px !important;
    line-height: 1.2;
    border-bottom: 2px solid var(--stm-kl-accent-light);
    padding-bottom: 16px;
}

/* ── Sektionen ───────────────────────────────── */
.stm-kl-detail-section {
    margin-bottom: 24px;
}

.stm-kl-detail-section__title {
    font-family: var(--stm-kl-font);
    font-size: 15px;
    font-weight: normal;
    color: var(--stm-kl-accent);
    border-bottom: 1px solid var(--stm-kl-accent-light);
    padding-bottom: 6px;
    margin: 0 0 12px;
}

/* Hofstaat */
.stm-kl-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.stm-kl-detail-table tr:nth-child(even) { background: var(--stm-kl-stripe); }
.stm-kl-detail-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--stm-kl-border);
}
.stm-kl-detail-table tr:last-child td { border-bottom: none; }

/* Insignien */
.stm-kl-detail-insignien {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.stm-kl-detail-insignien thead th {
    background: var(--stm-kl-gold-light);
    color: var(--stm-kl-gold);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 7px 12px;
    text-align: left;
    border-bottom: 2px solid #e8d5a3;
}
.stm-kl-detail-insignien tbody tr:nth-child(even) { background: var(--stm-kl-stripe); }
.stm-kl-detail-insignien tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--stm-kl-border);
}
.stm-kl-detail-insignien tbody tr:last-child td { border-bottom: none; }
.stm-kl-ins-label { font-weight: 600; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
    .stm-kl-detail-card {
        margin: -40px 16px 0;
        padding: 20px 18px 24px;
    }
    .stm-kl-detail-card__name { font-size: 22px; }
}

@media (max-width: 480px) {
    .stm-kl-detail-card {
        margin: -28px 8px 0;
        padding: 16px 14px 20px;
    }
    .stm-kl-detail-card__name { font-size: 18px; }
}
