/* ============================================================
   TYPOGRAFISCHE BASIS – NEU
   Stadtgeschichte München
============================================================ */

/* ------------------------------------------------------------
   GRUNDLAGEN
------------------------------------------------------------ */

html {
    font-size: 16px; /* Referenz */
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.92rem;            /* bewusst kleiner */
    line-height: 1.6;
    color: #222;
    background: #f8f9fa;
    text-rendering: optimizeLegibility;
}

/* ------------------------------------------------------------
   FLIESSTEXT & STANDARD-ELEMENTE
------------------------------------------------------------ */

p {
    margin: 0 0 0.7rem;
    font-size: 0.92rem;
    line-height: 1.6;
}

li,
dt,
dd,
td,
th {
    font-size: 0.92rem;
    line-height: 1.55;
}

strong {
    font-weight: 600;
}

em {
    font-style: italic;
}

/* Meta / Nebeninformationen */
small,
.text-muted,
.meta {
    font-size: 0.78rem;
    line-height: 1.4;
    color: #666;
}

/* ------------------------------------------------------------
   ÜBERSCHRIFTEN – KOMPLETT NEU
------------------------------------------------------------ */

/* H1 – Seitenkopf (sparsam, ruhig) */
h1 {
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 0.8rem;
    color: #111;
}

/* H2 – Hauptabschnitte */
h2 {
    font-size: 1.12rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 1.3rem 0 0.6rem;
    color: #1f1f1f;
}

/* H3 – Unterabschnitte */
h3 {
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 1.1rem 0 0.45rem;
    color: #333;
}

/* H4 – Detailüberschriften */
h4 {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0.9rem 0 0.35rem;
    color: #444;
}

/* H5/H6 bewusst sehr dezent */
h5,
h6 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0.7rem 0 0.3rem;
    color: #555;
}


/* der eigentliche Unterstrich */
h2::after,
h3::after,
h4::after,
h5::after,
h6::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    margin-top: 0.35rem;
    background-color: #ddd;
}


/* ------------------------------------------------------------
   LINKS – FARBCODIERT STATT UNTERSTRICHEN
------------------------------------------------------------ */

a {
    color: #b97b4e;              /* Akzentfarbe */
    text-decoration: none;       /* kein Unterstrich */
    font-weight: 500;
    transition: color .2s ease;
}

a:hover,
a:focus {
    color: #8a5a34;              /* dunkler beim Hover */
    text-decoration: none;
}

/* Tastatur-Fokus (Barrierefreiheit) */
a:focus-visible {
    outline: 2px solid #b97b4e;
    outline-offset: 2px;
}

/* Links im Lesetext dezenter */
.reading-text a {
    color: #8a6a55;
    font-weight: 500;
}

.reading-text a:hover {
    color: #b97b4e;
}



/* ------------------------------------------------------------
   LISTEN
------------------------------------------------------------ */

ul,
ol {
    padding-left: 1.1rem;
    margin-bottom: 0.8rem;
}

li {
    margin-bottom: 0.25rem;
}

/* ------------------------------------------------------------
   INHALTSCONTAINER
------------------------------------------------------------ */

.fullwidth-section,
.card-body,
main {
    font-size: 0.92rem;
}

/* Tabellen ruhiger */
table {
    font-size: 0.88rem;
}

/* ------------------------------------------------------------
   ZITATE
------------------------------------------------------------ */

blockquote {
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    border-left: 3px solid #b97b4e;
    background: #fdfdfd;
    color: #444;
}

/* ------------------------------------------------------------
   MOBILE FEINSCHLIFF
------------------------------------------------------------ */

@media (max-width: 576px) {

    body {
        font-size: 0.9rem;
    }

    h1 {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1.05rem;
    }

    h3 {
        font-size: 0.95rem;
    }

    p,
    li {
        font-size: 0.9rem;
    }
}

/* ------------------------------------------------------------
   DRUCK
------------------------------------------------------------ */

@media print {

    body {
        font-size: 11pt;
        line-height: 1.45;
        color: #000;
        background: #fff;
    }

    h1 { font-size: 16pt; }
    h2 { font-size: 13pt; }
    h3 { font-size: 11.5pt; }

}

/* ============================================================
   HEADER
============================================================ */
.header-block {
    background: #f8f9fa;
    position: relative;
    z-index: 90000;
}

.header-logo-img {
    max-height: 70px;
    width: auto;
    margin-right: 14px;
}

.header-title-group {
    line-height: 1;
}

.header-title {
    font-size: 2rem;
    font-weight: 400;
}

.header-title-accent {
    color: #b97b4e;
}

.header-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-top: 2px;
}

.header-login-menu {
    min-width: 260px;
    z-index: 999;
}

/* ============================================================
   NAVIGATION
============================================================ */
.navbar {
    background: #f8f9fa;
    border-bottom: 1px solid #b97b4e;
    padding: .5rem 0;
    position: relative;
    z-index: 3000;
}

.navbar .nav-link {
    padding: .75rem 1rem;
    color: #333 !important;
}

.navbar .nav-link:hover,
.navbar .nav-link.nav-active {
    color: #b97b4e !important;
    font-weight: 600;
}

/* Dropdown / Mega-Menü */
.navbar .dropdown-menu {
    border: none;
    padding: 1.5rem 2rem;
    z-index: 4000;
}

.nav-item.position-static .dropdown-menu {
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    background: #f8f9fa;
    border-top: 2px solid #b97b4e;
}

.mega-columns-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.mega-columns-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.mega-menu-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 2px solid #ddd;
    margin-bottom: .75rem;
}

.dropdown-item {
    padding: .35rem 0;
    font-size: .95rem;
}

.dropdown-item:hover {
    color: #b97b4e !important;
    background: transparent;
}

/* ============================================================
   PAGE TITLE BOX
============================================================ */
.page-title-box {
    background: #b97b4e;
    padding: 1.4rem;
    color: #fff;
    border-radius: 2px;
    margin-top: 1rem;
}

.page-title-box h1 {
    margin: 0;
    font-size: 1.5rem;
}

/* ============================================================
   BREADCRUMB
============================================================ */
/* Breadcrumb Links */
.breadcrumb a {
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Breadcrumb komplett weiß */
.breadcrumb-white * {
    color: #fff !important;
}

/* 👉 Breadcrumb-Trennzeichen (/) weiß */
.breadcrumb-white .breadcrumb-item + .breadcrumb-item::before {
    color: #fff !important;
}

/* ============================================================
   ALPHABET BAR
============================================================ */
.alphabet-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.alphabet-bar .btn {
    min-width: 30px;
    padding: .20rem .40rem;
}

.alphabet-bar .btn.active {
    background: #b97b4e;
    border-color: #b97b4e;
    color: #fff;
}

/* ============================================================
   LISTEN – DREISPALTIG (LEXIKON)
============================================================ */
.liste_spalten {
    column-count: 3;
    column-gap: 2rem;
}

.liste-entry {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin-bottom: .4rem;
}

/* ============================================================
   FIGURES
============================================================ */
figure {
    margin: 0 0 12px;
    text-align: center;
}

/* Gemeinsamer Block für Bild + Caption */
figure a {
    display: block;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 6px;
    text-decoration: none;
    transition: box-shadow .25s ease, transform .25s ease;
}

/* Bild */
figure img {
    display: block;
    width: 100%;
    border-radius: 5px;
    background: #e9ecef;
    transition: transform .25s ease;
}

/* Hover nur CSS */
figure:hover a {
    box-shadow: 0 8px 18px rgba(0,0,0,.15);
    transform: translateY(-2px);
}

figure:hover img {
    transform: scale(1.02);
}

/* Lazy-Load Platzhalter */
figure img[loading="lazy"] {
    min-height: 180px;
}

figure figcaption {
    margin-top: 4px;
    font-size: .52rem;     /* deutlich kleiner */
    line-height: 1.15;     /* engere Zeilen */
    color: #495057;
}

/* Titel */
figure figcaption strong {
    display: block;
    font-weight: 600;
    font-size: .54rem;     /* minimal größer als Meta */
    margin-bottom: 1px;
    color: #212529;
}

/* Autor · Jahr */
figure figcaption span {
    font-size: .58rem;    /* sehr kompakt */
    color: #6c757d;
}
/* ============================================================
   KARTEN / MAP
============================================================ */
.map {
    width: 100%;
    height: 70vh;
    border: 1px solid #aaa;
    border-radius: 6px;
}

/* ============================================================
   POPUP (Leaflet)
============================================================ */
.popup-card {
    font-size: .9rem;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.popup-card img {
    width: 100%;
    border-bottom: 1px solid #ccc;
}

.popup-card .p-body {
    padding: .5rem .7rem;
}

/* ============================================================
   FOOTER
============================================================ */
.footer-link {
    color: #ddd;
    text-decoration: none;
}

.footer-link:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-social {
    color: #bbb;
    font-size: 1.4rem;
    margin: 0 .4rem;
}

.footer-social:hover {
    color: #fff;
}

/* ============================================================
   MOBILE HEADER
============================================================ */
@media (max-width: 576px) {

    .header-logo-img {
        max-height: 38px;
    }

    .header-title {
        font-size: 1.15rem;
        line-height: 1.15;
    }

    .header-subtitle {
        font-size: .78rem;
    }

    .mega-columns-4,
    .mega-columns-2 {
        display: block;
    }
}

/* ============================================================
   PRINT
============================================================ */
@media print {

    body {
        font-size: 11pt;
        color: #000;
        background: #fff;
    }

    header,
    nav,
    footer,
    .page-title-box,
    .btn,
    .alphabet-bar {
        display: none !important;
    }

    .container,
    .container-fluid {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    .liste_spalten {
        column-count: 2;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
    }
}



/* =========================================
   Bildkarten – Archiv (Bootstrap 5)
   ========================================= */

.bild-card {
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: transform .25s ease, box-shadow .25s ease;
}

.bild-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.18);
}

/* ---------- Bildbereich ---------- */

.bild-box {
    position: relative;
    width: 100%;
    padding-top: 140%;              /* Hochformat 3:4 */
    background: #f0f0f0;
    overflow: hidden;
}

.bild-box img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;              /* sauberes Zuschneiden */
    display: block;
}

/* ---------- Caption ---------- */

.bild-caption {
    padding: .6rem .7rem;
    font-size: .8rem;
    background: #fff;
}

.bild-caption .titel {
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: .15rem;
    color: #222;
}

.bild-caption .meta {
    color: #777;
    font-size: .75rem;
}

/* ---------- Link Reset ---------- */

.bild-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.bild-link:hover {
    text-decoration: none;
    color: inherit;
}

/* ============================================================
   LESETEXT – reading-text
   Für Biografien, Essays, Quellen, Langtexte
============================================================ */

.reading-text {
    max-width: 72ch;              /* optimale Zeilenlänge */
    margin: 0 auto;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #222;
}

/* Absätze */
.reading-text p {
    margin: 0 0 1.1rem;
}

/* Überschriften im Lesetext */
.reading-text h2 {
    font-size: 1.15rem;
    margin-top: 2.2rem;
    margin-bottom: 0.7rem;
}

.reading-text h3 {
    font-size: 1.0rem;
    margin-top: 1.6rem;
    margin-bottom: 0.5rem;
}

/* Listen im Lesetext */
.reading-text ul,
.reading-text ol {
    margin: 0 0 1.1rem 1.2rem;
}

.reading-text li {
    margin-bottom: 0.35rem;
}

/* Hervorhebungen */
.reading-text strong {
    font-weight: 600;
}

.reading-text em {
    font-style: italic;
}

/* Zitate */
.reading-text blockquote {
    margin: 1.4rem 0;
    padding: 0.6rem 1.2rem;
    border-left: 3px solid #b97b4e;
    background: #fdfdfd;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #444;
}

/* Quellen / Fußnoten */
.reading-text .quelle,
.reading-text .footnote {
    font-size: 0.8rem;
    line-height: 1.45;
    color: #555;
    margin-top: 1.2rem;
}

/* Abstände nach Medien */
.reading-text figure {
    margin: 1.5rem auto;
}

.reading-text img {
    max-width: 100%;
    height: auto;
}

/* ------------------------------------------------------------
   MOBILE
------------------------------------------------------------ */

@media (max-width: 768px) {

    .reading-text {
        max-width: 100%;
        font-size: 0.92rem;
        padding: 0 .5rem;
    }

    .reading-text h2 {
        font-size: 1.08rem;
    }

    .reading-text h3 {
        font-size: 0.96rem;
    }
}

/* ------------------------------------------------------------
   DRUCK – optimal für Archiv & PDF
------------------------------------------------------------ */

@media print {

    .reading-text {
        max-width: 100%;
        font-size: 11pt;
        line-height: 1.5;
        color: #000;
    }

    .reading-text h2 {
        font-size: 14pt;
    }

    .reading-text h3 {
        font-size: 12pt;
    }

    .reading-text blockquote {
        border-left: 2pt solid #000;
        background: transparent;
    }
}